13 use oops_variables_mod
23 type(oops_variables),
public :: geovars
24 type(oops_variables),
public :: obsvars
25 integer,
public :: ntracers
26 real(kind_real),
public,
allocatable :: wavelength(:)
27 character(len=maxvarlen),
public :: rcfile
42 use fckit_configuration_module,
only: fckit_configuration
46 type(fckit_configuration),
intent(in) :: f_conf
50 character(kind=c_char,len=:),
allocatable :: tracer_variables(:)
51 character(len=:),
allocatable :: str
57 call f_conf%get_or_die(
"tracer_geovals",tracer_variables)
58 self%ntracers = f_conf%get_size(
"tracer_geovals")
60 do iq = 1, self%ntracers
61 call self%geovars%push_back(tracer_variables(iq))
64 deallocate(tracer_variables)
67 nvars = self%obsvars%nvars()
70 allocate(self%wavelength(nvars))
71 call f_conf%get_or_die(
"wavelengths", self%wavelength)
74 call f_conf%get_or_die(
"RCFile",str)
86 if (
allocated(self%wavelength))
deallocate(self%wavelength)
100 integer,
intent(in) :: nvars, nlocs
102 real(c_double),
intent(inout) :: hofx(nvars, nlocs)
103 type(c_ptr),
value,
intent(in) :: obss
109 integer :: nlayers, rc, iq
111 real(kind_real),
dimension(:,:,:),
allocatable :: qm
112 real(kind_real),
dimension(:,:),
allocatable :: rh
113 real(kind_real),
dimension(:,:),
allocatable :: delp
115 character(len=MAXVARLEN) :: geovar
116 character(len=MAXVARLEN),
dimension(:),
allocatable:: tracer_name
121 nlayers = delp_profile%nval
123 allocate(delp(nlayers,nlocs))
124 delp = delp_profile%vals
127 allocate(rh(nlayers,nlocs))
132 allocate(qm(self%ntracers, nlayers, nlocs))
133 allocate(tracer_name(self%ntracers))
134 do iq = 1, self%ntracers
135 geovar = self%geovars%variable(iq)
136 tracer_name(iq) = geovar
138 qm(iq,:,:) = aer_profile%vals
139 qm(iq,:,:) = qm(iq,:,:) * delp /
grav
145 call get_geos_aod(nlayers, nlocs, nvars, self%ntracers, self%rcfile, &
146 self%wavelength, tracer_name, qm, rh, &
147 aod_tot = hofx, rc = rc)
151 deallocate(qm, rh, delp, tracer_name)
Fortran module for aodgeos observation operator.
subroutine ufo_aodgeos_simobs(self, geovals, obss, nvars, nlocs, hofx)
subroutine destructor(self)
subroutine ufo_aodgeos_setup(self, f_conf)
integer, parameter max_string
character(len=maxvarlen), dimension(2), parameter varindefault
Default variables required from model.
real(kind_real), parameter, public grav
subroutine, public ufo_geovals_get_var(self, varname, geoval)
character(len=maxvarlen), parameter, public var_rh
character(len=maxvarlen), parameter, public var_delp
Fortran derived type for the observation type.
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators