ROMS
Loading...
Searching...
No Matches
inp_decode_mod::load_i Interface Reference

Public Member Functions

integer function load_0d_i (ninp, vinp, nout, vout)
 
integer function load_1d_i (ninp, vinp, nout, vout)
 
integer function load_2d_i (ninp, vinp, iout, jout, vout)
 
integer function load_3d_i (ninp, vinp, iout, jout, kout, vout)
 

Detailed Description

Definition at line 57 of file inp_decode.F.

Member Function/Subroutine Documentation

◆ load_0d_i()

integer function inp_decode_mod::load_i::load_0d_i ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) nout,
integer, intent(out) vout )

Definition at line 476 of file inp_decode.F.

477!
478!***********************************************************************
479! !
480! It loads input values into a requested model scalar integer !
481! variable. !
482! !
483! On Input: !
484! !
485! Ninp Number of input elements to process in Vinp (integer) !
486! Vinp Input values (1D real(dp) array) !
487! Nout Size of output integer variable dimension (not used) !
488! !
489! On Output: !
490! !
491! Vout Output scalar integer variable !
492! Nval Number of output values processed !
493! !
494!***********************************************************************
495!
496! Imported variable declarations.
497!
498 integer, intent(in) :: Ninp, Nout
499 real(dp), intent(in) :: Vinp(:)
500!
501 integer, intent(out) :: Vout
502!
503! Local variable declarations.
504!
505 integer :: ic
506 integer :: Nval
507!
508!-----------------------------------------------------------------------
509! Load scalar integer variable with input value.
510!-----------------------------------------------------------------------
511!
512 ic=1
513 vout=int(vinp(ic))
514 nval=ic
515
516 RETURN

◆ load_1d_i()

integer function inp_decode_mod::load_i::load_1d_i ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) nout,
integer, dimension(:), intent(out) vout )

Definition at line 519 of file inp_decode.F.

520!
521!***********************************************************************
522! !
523! It loads input values into a requested model 1D integer array. !
524! !
525! On Input: !
526! !
527! Ninp Number of input elements to process in Vinp (integer) !
528! Vinp Input values (1D real(dp) array) !
529! Nout Size of output integer variable dimension !
530! !
531! On Output: !
532! !
533! Vout Output 1D integer variable !
534! Nval Number of output values processed !
535! !
536!***********************************************************************
537!
538! Imported variable declarations.
539!
540 integer, intent(in) :: Ninp, Nout
541 real(dp), intent(in) :: Vinp(:)
542!
543 integer, intent(out) :: Vout(:)
544!
545! Local variable declarations.
546!
547 integer :: Nstr, i, ic
548 integer :: Nval
549!
550!-----------------------------------------------------------------------
551! Load 1D integer variable with input values.
552!-----------------------------------------------------------------------
553!
554! If not all values are provided for variable, assume the last value
555! for the rest of the array.
556!
557 ic=0
558 IF (ninp.le.nout) THEN
559 DO i=1,ninp
560 ic=ic+1
561 vout(i)=int(vinp(i))
562 END DO
563 IF (nout.gt.ninp) THEN
564 nstr=ninp+1
565 DO i=nstr,nout
566 ic=ic+1
567 vout(i)=int(vinp(ninp))
568 END DO
569 END IF
570 ELSE
571 DO i=1,nout
572 ic=ic+1
573 vout(i)=int(vinp(i))
574 END DO
575 END IF
576 nval=ic
577
578 RETURN

References mod_param::nstr.

◆ load_2d_i()

integer function inp_decode_mod::load_i::load_2d_i ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) iout,
integer, intent(in) jout,
integer, dimension(:,:), intent(out) vout )

Definition at line 581 of file inp_decode.F.

582!
583!***********************************************************************
584! !
585! It loads input values into a requested model 2D integer array. !
586! !
587! On Input: !
588! !
589! Ninp Number of input elements to process in Vinp (integer) !
590! Vinp Input values (1D real(dp) array) !
591! Iout Size of output integer variable first I-dimension !
592! Jout Size of output integer variable second J-dimension !
593! !
594! On Output: !
595! !
596! Vout Output 2D integer variable !
597! Nval Number of output values processed !
598! !
599!***********************************************************************
600!
601! Imported variable declarations.
602!
603 integer, intent(in) :: Ninp, Iout, Jout
604 real(dp), intent(in) :: Vinp(:)
605!
606 integer, intent(out) :: Vout(:,:)
607!
608! Local variable declarations.
609!
610 integer :: Nstr, i, ic
611 integer :: Nout, Nval
612!
613 integer, dimension(Iout*Jout) :: Vwrk
614!
615!-----------------------------------------------------------------------
616! Load 2D integer variable with input values.
617!-----------------------------------------------------------------------
618!
619! If not all values are provided for variable, assume the last value
620! for the rest of the 2D array.
621!
622 ic=0
623 nout=iout*jout
624 IF (ninp.le.nout) THEN
625 DO i=1,ninp
626 ic=ic+1
627 vwrk(i)=int(vinp(i))
628 END DO
629 IF (nout.gt.ninp) THEN
630 nstr=ninp+1
631 DO i=nstr,nout
632 ic=ic+1
633 vwrk(i)=int(vinp(ninp))
634 END DO
635 END IF
636 ELSE
637 DO i=1,nout
638 ic=ic+1
639 vwrk(i)=int(vinp(i))
640 END DO
641 END IF
642 vout=reshape(vwrk,(/iout,jout/))
643 nval=ic
644!
645 RETURN

References mod_param::nstr.

◆ load_3d_i()

integer function inp_decode_mod::load_i::load_3d_i ( integer, intent(in) ninp,
real(dp), dimension(:), intent(in) vinp,
integer, intent(in) iout,
integer, intent(in) jout,
integer, intent(in) kout,
integer, dimension(:,:,:), intent(out) vout )

Definition at line 648 of file inp_decode.F.

650!
651!***********************************************************************
652! !
653! It loads input values into a requested model 3D integer array. !
654! !
655! On Input: !
656! !
657! Ninp Number of input elements to process in Vinp (integer) !
658! Vinp Input values (1D real(dp) array) !
659! Iout Size of output integer variable first I-dimension !
660! Jout Size of output integer variable second J-dimension !
661! Kout Size of output integer variable third K-dimension !
662! !
663! On Output: !
664! !
665! Vout Output 3D integer variable !
666! Nval Number of output values processed !
667! !
668!***********************************************************************
669!
670! Imported variable declarations.
671!
672 integer, intent(in) :: Ninp, Iout, Jout, Kout
673 real(dp), intent(in) :: Vinp(:)
674!
675 integer, intent(out) :: Vout(:,:,:)
676!
677! Local variable declarations.
678!
679 integer :: Nstr, i, ic
680 integer :: Nout, Nval
681!
682 integer, dimension(Iout*Jout*Kout) :: Vwrk
683!
684!-----------------------------------------------------------------------
685! Load 3D integer variable with input values.
686!-----------------------------------------------------------------------
687!
688! If not all values are provided for variable, assume the last value
689! for the rest of the 3D array.
690!
691 ic=0
692 nout=iout*jout*kout
693 IF (ninp.le.nout) THEN
694 DO i=1,ninp
695 ic=ic+1
696 vwrk(i)=int(vinp(i))
697 END DO
698 IF (nout.gt.ninp) THEN
699 nstr=ninp+1
700 DO i=nstr,nout
701 ic=ic+1
702 vwrk(i)=int(vinp(ninp))
703 END DO
704 END IF
705 ELSE
706 DO i=1,nout
707 ic=ic+1
708 vwrk(i)=int(vinp(i))
709 END DO
710 END IF
711 vout=reshape(vwrk,(/iout,jout,kout/))
712 nval=ic
713!
714 RETURN

References mod_param::nstr.


The documentation for this interface was generated from the following file: