|
| subroutine | wmuini (NDSE, NDST) |
| | Allocate and initialize arrays of module. More...
|
| |
| subroutine | wmudmp (NDS, IREQ) |
| | Display assigned unit number information from private data base. More...
|
| |
| subroutine | wmuset (NDSE, NDST, NDS, FLAG, TYPE, NAME, DESC) |
| | Directly set information for a unit number in the data structure. More...
|
| |
| subroutine | wmuget (NDSE, NDST, NDS, TYPE, NR) |
| | Find a free unit number for a given file type. More...
|
| |
| subroutine | wmuinq (NDSE, NDST, NDS) |
| | Update data base information for a given unit number. More...
|
| |
Dynamic assignement of unit numbers for the multi-grid wave model.
Allowed range of unit numbers is set in parameter statements.
- Author
- H. L. Tolman
- Date
- 29-May-2009
| subroutine wmunitmd::wmudmp |
( |
integer, intent(in) |
NDS, |
|
|
integer, intent(in) |
IREQ |
|
) |
| |
Display assigned unit number information from private data base.
- Parameters
-
| [in] | NDS | Unit number for output. |
| [in] | IREQ | Request identifier. |
- Author
- H. L. Tolman
- Date
- 25-Mar-2005
Definition at line 339 of file wmunitmd.F90.
400 INTEGER,
INTENT(IN) :: NDS, IREQ
407 INTEGER,
SAVE :: IENT = 0
411 CALL strace (ient,
'WMUDMP')
417 IF ( .NOT. flinit )
THEN
422 IF ( ireq.GT.0 .AND. ( ireq.LT.unitlw .OR. ireq.GT.unithg) )
THEN
423 WRITE (nds,1001) ireq, unitlw, unithg
430 IF ( ireq .GT. 0 )
THEN
431 WRITE (nds,920) ireq, u_used(ireq), u_type(ireq), &
432 u_name(ireq), u_desc(ireq)
439 IF ( ireq .LT. 0 )
THEN
446 IF ( ireq.LT.0 .OR. u_used(i) ) &
447 WRITE (nds,932) i, u_used(i), u_type(i), &
458 920
FORMAT (/
' WMUDMP: Unit number : ',i6/ &
462 ' Description : ',a/)
464 930
FORMAT (/
' WMUDMP: Unit information '// &
465 ' Nr Flg Type Name Description '/ &
466 ' -------------------------------------------------', &
467 '---------------------')
468 931
FORMAT (/
' WMUDMP: Unit information (assigned only)'// &
469 ' Nr Flg Type Name Description '/ &
470 ' -------------------------------------------------', &
471 '---------------------')
472 932
FORMAT ( 2x,i4,l4,2x,a3,2x,a20,2x,a)
474 1000
FORMAT (/
' *** ERROR WMUDMP: DATA STRUCTURE READY ***'/ &
475 /
' RUN WMUINI FIRST '/)
476 1001
FORMAT (/
' *** ERROR WMUDMP: UNIT NUMBER OUT OF RANGE ***' &
References w3servmd::extcde(), and w3servmd::strace().
Referenced by wminitmd::wminit(), and wminitmd::wminitnml().
| subroutine wmunitmd::wmuget |
( |
integer, intent(in) |
NDSE, |
|
|
integer, intent(in) |
NDST, |
|
|
integer, intent(out) |
NDS, |
|
|
character(len=3), intent(in) |
TYPE, |
|
|
integer, intent(in), optional |
NR |
|
) |
| |
Find a free unit number for a given file type.
Search the data base.
- Parameters
-
| [in] | NDSE | Unit number for error output. |
| [in] | NDST | Unit number for test output. |
| [out] | NDS | Unit number to be assigned. |
| [in] | TYPE | Type identifier to be used. |
| [in] | NR | Number of consecutive units needed for output bounday data files. |
- Author
- H. L. Tolman
- Date
- 20-Jan-2017
Definition at line 667 of file wmunitmd.F90.
733 INTEGER,
INTENT(IN) :: NDSE, NDST
734 INTEGER,
INTENT(OUT) :: NDS
735 CHARACTER(LEN=3),
INTENT(IN) :: TYPE
736 INTEGER,
INTENT(IN),
OPTIONAL :: NR
743 INTEGER,
SAVE :: IENT = 0
749 CALL strace (ient,
'WMUGET')
755 IF ( .NOT. flinit )
THEN
760 IF (
PRESENT(
nr) )
THEN
767 WRITE (ndst,9010)
TYPE, NRC
775 DO i=unitlw, unithg - nrc + 1
779 ok = .NOT.u_used(i) .AND. u_type(i).EQ.
TYPE &
781 INQUIRE ( i, opened=opnd )
782 ok = ok .AND. .NOT.opnd
785 ok = ok .AND. (.NOT.u_used(i+j) .AND. &
786 u_type(i+j).EQ.
TYPE )
787 INQUIRE ( i+j, opened=opnd )
788 ok = ok .AND. .NOT.opnd
800 IF ( nds .EQ. -1 )
THEN
801 WRITE (ndse,1020)
TYPE
806 WRITE (ndst,9020) nds
813 1010
FORMAT (/
' *** ERROR WMUGET: INITIALIZE FIRST !!! ***')
814 1020
FORMAT (/
' *** ERROR WMUGET: CANNOT FIND FREE UNIT FOR TYPE ', &
818 9010
FORMAT (
' TEST WMUGET: LOOKING FOR UNIT FOR TYPE ',a,
' [', &
820 9020
FORMAT (
' TEST WMUGET: UNIT NUMBER SET TO',i4)
References w3servmd::extcde(), and w3servmd::strace().
Referenced by wmesmfmd::readfromfile(), w3sbs1(), wminitmd::wminit(), and wminitmd::wminitnml().
| subroutine wmunitmd::wmuini |
( |
integer, intent(in) |
NDSE, |
|
|
integer, intent(in) |
NDST |
|
) |
| |
Allocate and initialize arrays of module.
Allocate and test parameter setting.
- Parameters
-
| [in] | NDSE | Unit number for error output. |
| [in] | NDST | Unit number for test output. |
- Author
- H. L. Tolman
- Date
- 25-Mar-2005
Definition at line 126 of file wmunitmd.F90.
190 INTEGER,
INTENT(IN) :: NDSE, NDST
195 INTEGER :: J, I1, IN, I
197 INTEGER,
SAVE :: IENT = 0
199 CHARACTER(LEN=3) :: STRING
202 CALL strace (ient,
'WMUINI')
212 IF ( unitlw .GE. unithg )
THEN
213 WRITE (ndse,1000) unitlw, unithg
217 IF ( unitlw .GT. inplow .OR. &
218 unitlw .GT. outlow .OR. &
219 unitlw .GT. scrlow )
THEN
220 WRITE (ndse,1001) unitlw, inplow, outlow, scrlow
224 IF ( unithg .LT. inphgh .OR. &
225 unithg .LT. outhgh .OR. &
226 unithg .LT. scrhgh )
THEN
227 WRITE (ndse,1002) unithg, inphgh, outhgh, scrhgh
240 WRITE (ndst,9010) unitlw, unithg
243 ALLOCATE ( u_used(unitlw:unithg) , u_type(unitlw:unithg) , &
244 u_name(unitlw:unithg) , u_desc(unitlw:unithg) )
276 IF ( u_type(i) .NE.
'RES' )
THEN
277 WRITE (ndse,1020) i, u_type(i)
298 WRITE (ndst,9041) i,u_used(i),u_type(i),u_name(i),u_desc(i)
306 1000
FORMAT (/
' *** ERROR WMUINI: ILLEGAL UNIT RANGE ***'/ &
307 ' LOW - HIGH : ',2i10/)
308 1001
FORMAT (/
' *** ERROR WMUINI: ILLEGAL LOWER LIMITS ***'/ &
310 1002
FORMAT (/
' *** ERROR WMUINI: ILLEGAL HIGHER LIMITS ***'/ &
312 1003
FORMAT (/
' *** ERROR WMUINI: DATA ALREADY INITIALIZED ***'/)
313 1020
FORMAT (/
' *** WARNING WMUINI: UNIT',i4,
' ALREADY ASSIGNED [', &
317 9000
FORMAT (
' TEST WMUNINI: STARTING ROUTINE')
318 9010
FORMAT (
' TEST WMUNINI: ALLOCATING ARRAYS ',2i6)
319 9020
FORMAT (
' TEST WMUNINI: INITALIZING ARRAYS')
320 9030
FORMAT (
' TEST WMUNINI: SETTING FLAGS')
321 9040
FORMAT (
' TEST WMUNINI: DATA STRUCTURE AFTER INITIALIZATION')
322 9041
FORMAT ( 5x,i4,l4,3(2x,a))
References w3servmd::extcde(), and w3servmd::strace().
Referenced by wminitmd::wminit(), and wminitmd::wminitnml().
| subroutine wmunitmd::wmuinq |
( |
integer, intent(in) |
NDSE, |
|
|
integer, intent(in) |
NDST, |
|
|
integer, intent(in) |
NDS |
|
) |
| |
Update data base information for a given unit number.
FORTRAN INQUIRE statement.
- Parameters
-
| [in] | NDSE | Unit number for error output. |
| [in] | NDST | Unit number for test output. |
| [in] | NDS | Unit number to be assigned. |
- Author
- H. L. Tolman
- Date
- 29-Mar-2005
Definition at line 839 of file wmunitmd.F90.
900 INTEGER,
INTENT(IN) :: NDSE, NDST, NDS
906 INTEGER,
SAVE :: IENT = 0
911 CALL strace (ient,
'WMUINQ')
917 IF ( .NOT. flinit )
THEN
922 IF ( nds.LT.unitlw .OR. nds.GT.unithg )
THEN
923 WRITE (ndse,1011) nds, unitlw, unithg
928 WRITE (ndst,9010) nds
935 INQUIRE (nds,opened=check)
938 WRITE (ndst,9020) check
943 IF ( .NOT. check )
THEN
944 CALL wmuset ( ndse, ndst, nds, .false. )
949 INQUIRE (nds,name=u_name(nds))
952 WRITE (ndst,9021) u_name(nds)
964 1010
FORMAT (/
' *** ERROR WMUINQ: INITIALIZE FIRST !!! ***')
965 1011
FORMAT (/
' *** ERROR WMUINQ: UNIT NUMBER OUT OF RANGE ***' &
969 9010
FORMAT (
' TEST WMUINQ: TESTING UNIT NUMBER',i4)
970 9020
FORMAT (
' INQUIRE ON OPENED : ',l2)
971 9021
FORMAT (
' NAME OF FILE : ',a)
References check(), w3servmd::extcde(), w3servmd::strace(), and wmuset().
Referenced by wminitmd::wminit(), and wminitmd::wminitnml().
| subroutine wmunitmd::wmuset |
( |
integer, intent(in) |
NDSE, |
|
|
integer, intent(in) |
NDST, |
|
|
integer, intent(in) |
NDS, |
|
|
logical, intent(in) |
FLAG, |
|
|
character(len=3), intent(in), optional |
TYPE, |
|
|
character*(*), intent(in), optional |
NAME, |
|
|
character*(*), intent(in), optional |
DESC |
|
) |
| |
Directly set information for a unit number in the data structure.
- Parameters
-
| [in] | NDSE | Unit number for error output. |
| [in] | NDST | Unit number for test output. |
| [in] | NDS | Unit number to be assigned. |
| [in] | FLAG | Flag for assigning unit. |
| [in] | TYPE | Type identifier to be used. |
| [in] | NAME | Name of file. |
| [in] | DESC | Description of file. |
- Author
- H. L. Tolman
- Date
- 25-Mar-2005
Definition at line 497 of file wmunitmd.F90.
560 INTEGER,
INTENT(IN) :: NDSE, NDST, NDS
561 LOGICAL,
INTENT(IN) :: FLAG
562 CHARACTER(LEN=3),
INTENT(IN),
OPTIONAL :: &
564 CHARACTER*(*),
INTENT(IN),
OPTIONAL :: &
571 INTEGER,
SAVE :: IENT = 0
575 CALL strace (ient,
'WMUSET')
581 IF ( .NOT. flinit )
THEN
586 IF ( nds.LT.unitlw .OR. nds.GT.unithg )
THEN
587 WRITE (ndse,1001) nds, unitlw, unithg
592 WRITE (ndst,9000) nds, u_used(nds), u_type(nds), &
593 u_name(nds), u_desc(nds)
604 IF (
PRESENT(type) ) u_type(nds) =
TYPE
608 IF (
PRESENT(name) )
THEN
610 ELSE IF ( .NOT. flag )
THEN
611 u_name(nds) =
'unknown'
616 IF (
PRESENT(desc) )
THEN
618 ELSE IF ( .NOT. flag )
THEN
619 u_desc(nds) =
'unknown'
623 WRITE (ndst,9001) nds, u_used(nds), u_type(nds), &
624 u_name(nds), u_desc(nds)
631 1000
FORMAT (/
' *** ERROR WMUSET: INITIALIZE FIRST !!! ***')
632 1001
FORMAT (/
' *** ERROR WMUSET: UNIT NUMBER OUT OF RANGE ***' &
636 9000
FORMAT (
' TEST WMUSET: UNIT ',i4
', ON SUBROUTINE ENTRY :'/ &
641 9001
FORMAT (
' TEST WMUSET: UNIT ',i4
', ON SUBROUTINE EXIT :'/ &
References w3servmd::extcde(), and w3servmd::strace().
Referenced by wmesmfmd::readfromfile(), w3sbs1(), wminitmd::wminit(), wminitmd::wminitnml(), and wmuinq().