emcsfc_snow2mdl  1.8.0
program_setup.F90
Go to the documentation of this file.
1 
5 
16 
17  implicit none
18 
19  private
20 
21  character*200, public :: afwa_snow_global_file
22  character*200, public :: afwa_snow_nh_file
23  character*200, public :: afwa_snow_sh_file
24  character*200, public :: afwa_lsmask_nh_file
25  character*200, public :: afwa_lsmask_sh_file
26  character*200, public :: autosnow_file
27  character*200, public :: climo_qc_file
29  character*200, public :: gfs_lpl_file
32  character*200, public :: model_lat_file
33  character*200, public :: model_lon_file
34  character*200, public :: model_lsmask_file
35  character*200, public :: model_snow_file
36  character*200, public :: nesdis_lsmask_file
37  character*200, public :: nesdis_snow_file
38 
39  integer, public :: grib_century
40 
41  integer, public :: grib_day
42  integer, public :: grib_hour
43  integer, public :: grib_month
44  integer, public :: grib_year
45 
46  logical, public :: output_grib2
47 
48  real, public :: lat_threshold
52  real, public :: min_snow_depth
53  real, public :: snow_cvr_threshold
55 
56  public :: read_config_nml
57 
58  contains
59 
80  subroutine read_config_nml
81 
82  implicit none
83 
84  integer, parameter :: iunit=41
85  integer :: istat
86 
87  namelist /source_data/ autosnow_file, &
95 
96  namelist /qc/ climo_qc_file
97 
98  namelist /model_specs/ model_lat_file, &
102 
103  namelist /output_data/ model_snow_file, &
105 
106  namelist /output_grib_time/ grib_year, &
107  grib_month, &
108  grib_day, &
109  grib_hour
110 
111  namelist /parameters/ lat_threshold, &
112  min_snow_depth, &
114 
115  print*,''
116  print*,"- READ CONFIGURATION NAMELIST"
117 
118  open(iunit, iostat=istat)
119 
120  if (istat /= 0) then
121  print*,''
122  print*,'- FATAL ERROR: BAD OPEN ON CONFIG NAMELIST. ISTAT IS ', istat
123  close(iunit)
124  call w3tage('SNOW2MDL')
125  call errexit(77)
126  end if
127 
128  read(iunit, nml=source_data, iostat=istat, err=900)
129 
130  read(iunit, nml=qc, iostat=istat, err=900)
131 
132  read(iunit, nml=model_specs, iostat=istat, err=900)
133 
134  read(iunit, nml=output_data, iostat=istat, err=900)
135 
136  read(iunit, nml=output_grib_time, iostat=istat, err=900)
137 
138  read(iunit, nml=parameters, iostat=istat, err=900)
139 
140  close(iunit)
141 
142 !-----------------------------------------------------------------------
143 ! the user determines the date/time stamp for the final interpolated
144 ! model data.
145 !-----------------------------------------------------------------------
146 
147  grib_century = grib_year / 100
148 
149  grib_year = mod(grib_year,100)
150 
151  if (grib_year == 0) then
152  grib_year = 100
153  else
155  end if
156 
157  return
158 
159  900 continue
160  print*,''
161  print*,'- FATAL ERROR: BAD READ ON CONFIG NAMELIST. ISTAT IS ', istat
162  close(iunit)
163  call w3tage('SNOW2MDL')
164  call errexit(78)
165 
166  end subroutine read_config_nml
167 
168  end module program_setup
This module reads in data from the program's configuration namelist.
real, public snow_cvr_threshold
if percent coverage according to nesdis/ims or autosnow exceeds this value, then non-zero snow depth ...
real, public min_snow_depth
minimum snow depth in meters at model points with coverage exceeding threshold.
integer, public grib_century
date of the final merged snow product that will be placed in grib header.
integer, public grib_month
date of the final merged snow product that will be placed in grib header.
character *200, public climo_qc_file
Climatological snow cover file.
character *200, public nesdis_lsmask_file
nesdis/ims land mask file
character *200, public afwa_lsmask_nh_file
path/name afwa n hemis land/sea mask
character *200, public afwa_lsmask_sh_file
path/name afwa s hemis land/sea mask
character *200, public autosnow_file
path/name s hemis autosnow file
character *200, public afwa_snow_sh_file
path/name afwa s hemis snow depth
integer, public grib_day
date of the final merged snow product that will be placed in grib header.
character *200, public nesdis_snow_file
nesdis/ims snow file
real, public lat_threshold
equatorward of this latitude, model points with undefined cover or depth (because the interpolation r...
logical, public output_grib2
when true, output model snow analysis is grib 2.
character *200, public model_lon_file
path/name lons on the model grid
character *200, public afwa_snow_global_file
global afwa snow file.
character *200, public afwa_snow_nh_file
path/name afwa n hemis snow depth
character *200, public model_snow_file
path/name nesdis/ims snow cover
character *200, public gfs_lpl_file
GFS gaussian thinned (reduced) grid definition file.
integer, public grib_year
date of the final merged snow product that will be placed in grib header.
integer, public grib_hour
date of the final merged snow product that will be placed in grib header.
character *200, public model_lsmask_file
path/name nesdis/ims land mask
subroutine, public read_config_nml
Read namelist control.
character *200, public model_lat_file
path/name lats on the model grid