10 USE fckit_configuration_module,
ONLY: fckit_configuration
38 CHARACTER(len=maxvarlen) :: aerosol_option
39 CHARACTER(len=max_string) :: rcfile
40 CHARACTER(len=255),
ALLOCATABLE :: sensor_id(:)
42 CHARACTER(len=255) :: endian_type
43 CHARACTER(len=255) :: coefficient_path
54 TYPE(fckit_configuration),
INTENT(in) :: f_confopts
55 TYPE(fckit_configuration),
INTENT(in) :: f_confoper
57 CHARACTER(*),
PARAMETER :: routine_name =
'luts_conf_setup'
58 CHARACTER(len=:),
ALLOCATABLE :: str
60 CALL f_confopts%get_or_die(
"AerosolOption",str)
61 conf%aerosol_option = upper2lower(str)
62 CALL f_confopts%get_or_die(
"RCFile",str)
65 ALLOCATE(conf%sensor_id(conf%n_sensors))
66 CALL f_confopts%get_or_die(
"Sensor_ID",str)
67 conf%sensor_id(conf%n_sensors) = str
68 CALL f_confopts%get_or_die(
"EndianType",str)
69 conf%endian_type = str
70 CALL f_confopts%get_or_die(
"CoefficientPath",str)
71 conf%coefficient_path = str
84 IF (
ALLOCATED(conf%sensor_id))
DEALLOCATE(conf%sensor_id)
91 &n_aerosols, n_profiles, n_layers, &
92 &geovals, aero_layers, rh, layer_factors)
96 CHARACTER(*),
INTENT(in) :: aerosol_option
97 INTEGER,
INTENT(in) :: n_aerosols, n_profiles, n_layers
99 REAL(kind_real),
OPTIONAL,
INTENT(out) :: &
100 &aero_layers(n_aerosols,n_layers,n_profiles)
101 REAL(kind_real),
OPTIONAL,
INTENT(out) :: rh(n_layers,n_profiles)
102 REAL(kind_real),
OPTIONAL,
INTENT(out) :: layer_factors(n_layers,n_profiles)
109 CHARACTER(max_string) :: err_msg
110 CHARACTER(len=maxvarlen) :: varname
111 REAL(kind_real),
DIMENSION(n_layers,n_profiles) :: t,sphum,pmid
112 REAL(kind_real),
DIMENSION(n_layers+1,n_profiles) :: pint
113 CHARACTER(len=maxvarlen),
ALLOCATABLE :: var_aerosols(:)
114 REAL(kind_real) :: factors(n_layers,n_profiles)
117 IF (geoval%nval /= n_layers)
THEN
118 WRITE(err_msg,*)
'get_atm_aero_data error: layers inconsistent!'
119 CALL abor1_ftn(err_msg)
132 IF (trim(aerosol_option) /=
"aerosols_gocart_merra_2")
THEN
133 WRITE(err_msg,*)
'this aerosol not implemented - check later'
134 CALL abor1_ftn(err_msg)
137 CALL assign_aerosol_names(aerosol_option,var_aerosols)
144 factors(k,m)=1e-9_kind_real*(pint(k+1,m)-pint(k,m))/
grav/&
145 &(1_kind_real+
rv_rd*sphum(k,m)/(1_kind_real-sphum(k,m)))
149 IF (
PRESENT(aero_layers) )
THEN
152 aero_layers(ivar,:,:)=geoval%vals*factors
156 IF (
PRESENT(rh) )
THEN
157 CALL qsmith(t,sphum,pmid,rh)
158 WHERE (rh > 1_kind_real) rh=1_kind_real
161 IF (
PRESENT(layer_factors) ) layer_factors=factors
Fortran module to provide code shared between nonlinear and tlm/adm radiance calculations.
real(kind_real), parameter, public grav
real(kind_real), parameter, public aerosol_concentration_minvalue_layer
character(len(str)) function, public upper2lower(str)
real(kind_real), parameter, public aerosol_concentration_minvalue
subroutine, public assign_aerosol_names(aerosol_option, var_aerosols)
real(kind_real), parameter, public rv_rd
subroutine, public ufo_geovals_get_var(self, varname, geoval)
fortran module to provide code shared between nonlinear and tlm/adm radiance calculations
subroutine, public luts_conf_delete(conf)
integer, parameter, public max_string
subroutine, public calculate_aero_layers(aerosol_option, n_aerosols, n_profiles, n_layers, geovals, aero_layers, rh, layer_factors)
subroutine, public luts_conf_setup(conf, f_confopts, f_confoper)
character(len=maxvarlen), parameter, public var_prsi
character(len=maxvarlen), parameter, public var_prs
character(len=maxvarlen), parameter, public var_q
character(len=maxvarlen), parameter, public var_ts
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators