36 integer :: n_absorbers
39 integer,
allocatable :: skiplist(:)
40 character(len=255),
allocatable :: sensor_id(:)
41 character(len=255) :: endian_type
42 character(len=255) :: coefficient_path
53 type(c_ptr),
intent(in) :: c_conf
55 character(len=1023) :: skipchannels
57 character(len=100),
allocatable :: skiplist_str(:)
67 rc%n_Absorbers = config_get_int(c_conf,
"n_Absorbers")
68 rc%n_Clouds = config_get_int(c_conf,
"n_Clouds" )
69 rc%n_Aerosols = config_get_int(c_conf,
"n_Aerosols" )
72 allocate(rc%SENSOR_ID(rc%n_Sensors))
75 rc%SENSOR_ID(rc%n_Sensors) = config_get_string(c_conf,len(rc%SENSOR_ID(rc%n_Sensors)),
"Sensor_ID")
78 rc%ENDIAN_TYPE = config_get_string(c_conf,len(rc%ENDIAN_TYPE),
"EndianType")
81 rc%COEFFICIENT_PATH = config_get_string(c_conf,len(rc%COEFFICIENT_PATH),
"CoefficientPath")
84 if (config_element_exists(c_conf,
"SkipChannels"))
then 85 skipchannels = config_get_string(c_conf,len(skipchannels),
"SkipChannels")
86 nskip = 1 + count(transfer(skipchannels,
'a', len(skipchannels)) ==
",")
87 allocate(skiplist_str(nskip))
88 read(skipchannels,*) skiplist_str
92 allocate(rc%skiplist(nskip))
94 read(skiplist_str(i),*) rc%skiplist(i)
106 deallocate(rc%SENSOR_ID)
107 deallocate(rc%skiplist)
116 integer,
intent(in) :: n_profiles, n_layers
118 type(crtm_atmosphere_type),
intent(inout) :: atm(:)
123 character(MAXVARLEN) :: varname
124 character(max_string) :: err_msg
128 do k1 = 1,geovals%nvar
129 varname = geovals%variables%fldnames(k1)
140 if (geoval%nval /= n_layers)
then 141 write(err_msg,*)
'Load_Atm_Data error: layers inconsistent!' 142 call abor1_ftn(err_msg)
146 atm(k1)%Temperature(1:n_layers) = geoval%vals(:,k1)
149 atm(k1)%Pressure(1:n_layers) = geoval%vals(:,k1)
151 atm(k1)%Level_Pressure(:) = geoval%vals(:,k1)
152 atm(k1)%Climatology = us_standard_atmosphere
153 atm(k1)%Absorber_Id(1:1) = (/ h2o_id /)
154 atm(k1)%Absorber_Units(1:1) = (/ mass_mixing_ratio_units /)
156 atm(k1)%Absorber(1:n_layers,1) = geoval%vals(:,k1)
157 atm(k1)%Absorber_Id(2:2) = (/ o3_id /)
158 atm(k1)%Absorber_Units(2:2) = (/ volume_mixing_ratio_units /)
160 atm(k1)%Absorber(1:n_layers,2) = geoval%vals(:,k1)
162 atm(k1)%Absorber_Id(3:3) = (/ co2_id /)
163 atm(k1)%Absorber_Units(3:3) = (/ volume_mixing_ratio_units /)
165 atm(k1)%Absorber(1:n_layers,3) = geoval%vals(:,k1)
167 atm(k1)%Cloud(1)%Type = water_cloud
169 atm(k1)%Cloud(1)%Water_Content = geoval%vals(:,k1)
171 atm(k1)%Cloud(1)%Effective_Radius = geoval%vals(:,k1)
173 atm(k1)%Cloud(2)%Type = ice_cloud
175 atm(k1)%Cloud(2)%Water_Content = geoval%vals(:,k1)
177 atm(k1)%Cloud(2)%Effective_Radius = geoval%vals(:,k1)
184 subroutine load_sfc_data(n_Profiles,n_Layers,N_Channels,geovals,sfc,chinfo,obss)
187 integer,
intent(in) :: n_profiles, n_layers, n_channels
189 type(crtm_surface_type),
intent(inout) :: sfc(:)
190 type(crtm_channelinfo_type),
intent(in) :: chinfo(:)
191 type(c_ptr),
value,
intent(in) :: obss
198 integer,
parameter :: tundra_surface_type = 10
199 integer,
parameter :: scrub_surface_type = 7
200 integer,
parameter :: coarse_soil_type = 1
201 integer,
parameter :: groundcover_vegetation_type = 7
202 integer,
parameter :: bare_soil_vegetation_type = 11
203 integer,
parameter :: sea_water_type = 1
204 integer,
parameter :: fresh_snow_type = 2
205 integer,
parameter :: fresh_ice_type = 1
207 character(len=100) :: varname_tmplate
208 character(len=200) :: varname
210 real(kind_real),
allocatable :: obstb(:,:)
212 varname_tmplate =
"brightness_temperature" 214 allocate(obstb(n_profiles, n_channels))
226 sfc(k1)%sensordata%sensor_id = chinfo(1)%sensor_id
227 sfc(k1)%sensordata%wmo_sensor_id = chinfo(1)%wmo_sensor_id
228 sfc(k1)%sensordata%wmo_satellite_id = chinfo(1)%wmo_satellite_id
229 sfc(k1)%sensordata%sensor_channel = chinfo(1)%sensor_channel
232 do n1 = 1, n_channels
233 sfc(k1)%sensordata%tb(n1) = obstb(k1,n1)
237 sfc(k1)%Water_Type = sea_water_type
241 sfc(k1)%Wind_Speed = geoval%vals(1,k1)
245 sfc(k1)%Wind_Direction = geoval%vals(1,k1)
249 sfc(k1)%Water_Coverage = geoval%vals(1,k1)
253 sfc(k1)%Water_Temperature = geoval%vals(1,k1)
257 sfc(k1)%Ice_Coverage = geoval%vals(1,k1)
261 sfc(k1)%Ice_Temperature = geoval%vals(1,k1)
265 sfc(k1)%Snow_Coverage = geoval%vals(1,k1)
269 sfc(k1)%Snow_Temperature = geoval%vals(1,k1)
273 sfc(k1)%Snow_Depth = geoval%vals(1,k1)
277 sfc(k1)%Land_Type = int(geoval%vals(1,k1))
281 sfc(k1)%Land_Coverage = geoval%vals(1,k1)
285 sfc(k1)%Land_Temperature = geoval%vals(1,k1)
289 sfc(k1)%Lai = geoval%vals(1,k1)
293 sfc(k1)%Vegetation_Fraction = geoval%vals(1,k1)
297 sfc(k1)%Vegetation_Type = int(geoval%vals(1,k1))
301 sfc(k1)%Soil_Type = int(geoval%vals(1,k1))
305 sfc(k1)%Soil_Moisture_Content = geoval%vals(1,k1)
309 sfc(k1)%Soil_Temperature = geoval%vals(1,k1)
322 type(c_ptr),
value,
intent(in) :: obss
323 type(crtm_geometry_type),
intent(inout) :: geo(:)
324 real(kind_real),
allocatable :: tmpvar(:)
328 allocate(tmpvar(nlocs))
331 geo(:)%Sensor_Zenith_Angle = tmpvar(:)
334 geo(:)%Source_Zenith_Angle = tmpvar(:)
337 geo(:)%Sensor_Azimuth_Angle = tmpvar(:)
340 geo(:)%Source_Azimuth_Angle = tmpvar(:)
343 geo(:)%Ifov = tmpvar(:)
346 geo(:)%Sensor_Scan_Angle = tmpvar(:)
356 character(len=*),
intent(in) :: varname_tmplate
357 integer,
intent(in) :: n
358 character(len=*),
intent(out) :: varname
360 character(len=3) :: chan
363 write(chan,
'(I0)') n
364 varname = trim(varname_tmplate) //
'_' // trim(chan) //
'_' subroutine, public ufo_geovals_get_var(self, varname, geoval, status)
character(len=maxvarlen), public var_sfc_wspeed
character(len=maxvarlen), public var_mixr
subroutine get_var_name(varname_tmplate, n, varname)
character(len=maxvarlen), public var_prsi
character(len=maxvarlen), public var_sfc_vegfrac
Fortran module to provide code shared between nonlinear and tlm/adm radiance calculations.
character(len=maxvarlen), public var_co2
integer, parameter max_string
subroutine, public load_atm_data(N_PROFILES, N_LAYERS, geovals, atm)
character(len=maxvarlen), public var_sfc_lfrac
character(len=maxvarlen), public var_sfc_soilt
character(len=maxvarlen), public var_clw
character(len=maxvarlen), public var_sfc_sfrac
subroutine, public load_sfc_data(n_Profiles, n_Layers, N_Channels, geovals, sfc, chinfo, obss)
subroutine, public load_geom_data(obss, geo)
character(len=maxvarlen), public var_sfc_wdir
character(len=maxvarlen), public var_cli
character(len=maxvarlen), public var_sfc_stmp
character(len=maxvarlen), public var_sfc_lai
character(len=maxvarlen), public var_oz
subroutine, public rad_conf_setup(rc, c_conf)
subroutine, public rad_conf_delete(rc)
character(len=maxvarlen), public var_prs
character(len=maxvarlen), public var_sfc_wfrac
character(len=maxvarlen), public var_sfc_soiltyp
character(len=maxvarlen), public var_clwefr
type to hold interpolated fields required by the obs operators
character(len=maxvarlen), public var_sfc_itmp
character(len=maxvarlen), public var_sfc_soilm
character(len=maxvarlen), public var_cliefr
character(len=maxvarlen), public var_sfc_vegtyp
character(len=maxvarlen), public var_sfc_ifrac
character(len=maxvarlen), public var_sfc_sdepth
character(len=maxvarlen), public var_sfc_ltmp
character(len=maxvarlen), public var_sfc_landtyp
Fortran interface to ObsSpace.
character(len=maxvarlen), public var_sfc_wtmp
character(len=maxvarlen), public var_tv
integer function, public obsspace_get_nlocs(c_dom)
Return the number of observational locations.
type to hold interpolated field for one variable, one observation