10 use grdvars,
only : nx,ny,ni,nj,npx,maxatmres,catm
12 use charstrings,
only : dirsrc, dirout, fv3dir, res, topofile, editsfile
24 subroutine read_inputnml(fname)
26 character(len=*),
intent(in) :: fname
29 integer :: ii, nvalid, iounit, rc
30 character(len=200) :: tmpstr
31 character(len=6) :: atmreslist(maxatmres) =
''
33 namelist /grid_nml/ ni, nj, dirsrc, dirout, fv3dir, topofile, editsfile, &
34 res, editmask, debug, do_postwgts, atmreslist
37 inquire (file=trim(fname), iostat=rc)
39 write (0,
'(3a)')
'Error: input file "', trim(fname),
'" does not exist.'
44 open (action=
'read', file=trim(fname), iostat=rc, newunit=iounit)
45 read (nml=grid_nml, iostat=rc, unit=iounit)
48 read(iounit,
'(a)')tmpstr
49 write (6,
'(a)')
'Error: invalid Namelist format '//trim(tmpstr)
56 do ii = 1,
size(atmreslist)
57 if (len_trim(atmreslist(ii)) > 0) nvalid = nvalid+1
59 allocate(catm(nvalid))
61 read(atmreslist(ii),
'(i4)')catm(ii)