13 type(oops_variables),
public :: geovars
14 type(oops_variables),
public :: obsvars
15 integer,
allocatable,
public :: obsvarindices(:)
17 character(len=MAXVARLEN),
public :: v_coord
18 character(len=MAXVARLEN),
public :: o_v_coord
19 logical,
public :: use_ln
31 use fckit_configuration_module,
only: fckit_configuration
34 type(fckit_configuration),
intent(in) :: grid_conf
36 character(kind=c_char,len=:),
allocatable :: coord_name
37 integer :: ivar, nvars
40 nvars = self%obsvars%nvars()
44 call self%geovars%push_back(self%obsvars%variable(ivar))
48 if( grid_conf%has(
"vertical coordinate") )
then
49 call grid_conf%get_or_die(
"vertical coordinate",coord_name)
50 self%v_coord = coord_name
51 if( (trim(self%v_coord) .eq.
var_prs) .or. &
52 (trim(self%v_coord) .eq.
var_prsi) )
then
63 if ( grid_conf%has(
"observation vertical coordinate") )
then
64 call grid_conf%get_or_die(
"observation vertical coordinate",coord_name)
65 self%o_v_coord = coord_name
67 self%o_v_coord = self%v_coord
70 call self%geovars%push_back(self%v_coord)
83 integer,
intent(in) :: nvars, nlocs
85 real(c_double),
intent(inout) :: hofx(nvars, nlocs)
86 type(c_ptr),
value,
intent(in) :: obss
88 integer :: iobs, ivar, iobsvar
89 real(kind_real),
dimension(:),
allocatable :: obsvcoord
90 type(
ufo_geoval),
pointer :: vcoordprofile, profile
91 real(kind_real),
allocatable :: wf(:)
92 integer,
allocatable :: wi(:)
93 character(len=MAXVARLEN) :: geovar
95 real(kind_real),
allocatable :: tmp(:)
96 real(kind_real) :: tmp2
102 allocate(obsvcoord(nlocs))
103 call obsspace_get_db(obss,
"MetaData", self%o_v_coord, obsvcoord)
110 allocate(tmp(vcoordprofile%nval))
112 if (self%use_ln)
then
113 tmp = log(vcoordprofile%vals(:,iobs))
114 tmp2 = log(obsvcoord(iobs))
116 tmp = vcoordprofile%vals(:,iobs)
117 tmp2 = obsvcoord(iobs)
122 do iobsvar = 1,
size(self%obsvarindices)
124 ivar = self%obsvarindices(iobsvar)
127 geovar = self%geovars%variable(iobsvar)
135 & hofx(ivar,iobs), wi(iobs), wf(iobs))
139 deallocate(obsvcoord)
subroutine atmvertinterp_simobs_(self, geovals, obss, nvars, nlocs, hofx)
subroutine atmvertinterp_setup_(self, grid_conf)
subroutine, public ufo_geovals_get_var(self, varname, geoval)
character(len=maxvarlen), parameter, public var_prsi
character(len=maxvarlen), parameter, public var_prs
Fortran module to perform linear interpolation.
subroutine vert_interp_weights(nlev, obl, vec, wi, wf)
subroutine vert_interp_apply(nlev, fvec, f, wi, wf)
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators