FPv9.3.1FPv9.3.1b_testingFPv9.3.2fp9.3.1-20161214-nc4grib2nc4_repair
Last change
on this file since cb8ddf8 was
48a5c5c,
checked in by Don Morton <Don.Morton@…>, 8 years ago
|
Added in AWST mods for extensionless FP filenames and
new CTBTO message for GRIB2FLEXPART
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[496c607] | 1 | |
---|
| 2 | subroutine fpgridcheck |
---|
| 3 | |
---|
| 4 | use par_mod |
---|
| 5 | use com_mod |
---|
| 6 | use conv_mod |
---|
| 7 | use fpmetbinary_mod |
---|
| 8 | !use cmapf_mod, only: stlmbr,stcm2p |
---|
| 9 | |
---|
| 10 | implicit none |
---|
| 11 | |
---|
| 12 | INTEGER :: ifn ! .fp file index number |
---|
| 13 | integer :: i |
---|
| 14 | logical :: exists |
---|
| 15 | character(len=512) fpfname ! .fp filename |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | ! Determine which .fp file to load for getting gribcheck variables |
---|
| 19 | ! Note that this picks out the first or last file in the AVAIALBLE file, |
---|
| 20 | ! not necessarily the first or last file of the simulation (in some cases |
---|
| 21 | ! the simulation may not use all the files in the AVAILABLE file |
---|
| 22 | !if(ideltas.gt.0) then |
---|
| 23 | ! ifn=1 |
---|
| 24 | !else |
---|
| 25 | ! ifn=numbwf |
---|
| 26 | !endif |
---|
| 27 | ifn=0 |
---|
| 28 | do i=1,numbwf |
---|
| 29 | if ( ifn.eq.0 ) then |
---|
| 30 | if ( ldirect.eq.1 ) then |
---|
[48a5c5c] | 31 | inquire(file=TRIM(path(3)) // TRIM(wfname(i)), exist=exists) |
---|
[496c607] | 32 | else |
---|
[48a5c5c] | 33 | inquire(file=TRIM(path(3)) // TRIM(wfname(i)), exist=exists) |
---|
[496c607] | 34 | endif |
---|
| 35 | if ( exists ) then |
---|
| 36 | ifn = i |
---|
| 37 | endif |
---|
| 38 | endif |
---|
| 39 | end do |
---|
| 40 | |
---|
| 41 | ! Create the file name and load her up |
---|
| 42 | if ( ldirect.eq.1 ) then |
---|
[48a5c5c] | 43 | fpfname = TRIM(path(3)) // TRIM(wfname(ifn)) |
---|
[496c607] | 44 | else |
---|
[48a5c5c] | 45 | fpfname = TRIM(path(3)) // TRIM(wfname(ifn)) |
---|
[496c607] | 46 | endif |
---|
| 47 | print *, 'fpgridcheck(): LOADING.... ', TRIM(fpfname) |
---|
| 48 | |
---|
| 49 | ! The second argument of this call indicates which index (1 or 2) |
---|
| 50 | ! the met fields will be loaded into. For this call, we don't really |
---|
| 51 | ! care. We just want the stuff relevant to gridcheck. So, we arbitrarily |
---|
| 52 | ! load the other stuff in index 1. It will be overwritten in subsequent |
---|
| 53 | ! loads. |
---|
| 54 | CALL fpmetbinary_load(TRIM(fpfname), 1) |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | end subroutine fpgridcheck |
---|
Note: See
TracBrowser
for help on using the repository browser.