source: flexpart.git/flexpart_code/fpgridcheck.F90 @ 5f50284

fp9.3.1-20161214-nc4
Last change on this file since 5f50284 was 5f50284, checked in by Don Morton <Don.Morton@…>, 7 years ago

In fp9.3.1-20161214-nc4 branch, decoupled the NC4 FP format from
raw binary (just commented that out for now) and tested
successfully.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1
2subroutine 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
31        inquire(file=TRIM(path(3)) // TRIM(wfname(i)), exist=exists)
32      else
33        inquire(file=TRIM(path(3)) // TRIM(wfname(i)), exist=exists)
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
43    fpfname = TRIM(path(3)) // TRIM(wfname(ifn))
44  else
45    fpfname = TRIM(path(3)) // TRIM(wfname(ifn))
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
55
56PRINT *, 'fpgridcheck(): fpfname:', fpfname
57  CALL fpmetbinary_load(TRIM(fpfname), 1)
58
59
60end subroutine fpgridcheck
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG