13 type(oops_variables),
public :: geovars
14 type(oops_variables),
public :: obsvars
15 character(len=MAXVARLEN),
public :: v_coord
16 logical,
public :: use_ln
28 use fckit_configuration_module,
only: fckit_configuration
31 type(fckit_configuration),
intent(in) :: grid_conf
33 character(kind=c_char,len=:),
allocatable :: coord_name
34 integer :: ivar, nvars
37 nvars = self%obsvars%nvars()
41 call self%geovars%push_back(self%obsvars%variable(ivar))
45 if( grid_conf%has(
"vertical coordinate") )
then
46 call grid_conf%get_or_die(
"vertical coordinate",coord_name)
47 self%v_coord = coord_name
48 if( trim(self%v_coord) .eq.
var_prs ) self%use_ln = .true.
53 call self%geovars%push_back(self%v_coord)
66 integer,
intent(in) :: nvars, nlocs
68 real(c_double),
intent(inout) :: hofx(nvars, nlocs)
69 type(c_ptr),
value,
intent(in) :: obss
72 real(kind_real),
dimension(:),
allocatable :: obsvcoord
73 type(
ufo_geoval),
pointer :: vcoordprofile, profile
74 real(kind_real),
allocatable :: wf(:)
75 integer,
allocatable :: wi(:)
76 character(len=MAXVARLEN) :: geovar
78 real(kind_real),
allocatable :: tmp(:)
79 real(kind_real) :: tmp2
85 allocate(obsvcoord(nlocs))
86 call obsspace_get_db(obss,
"MetaData", self%v_coord, obsvcoord)
93 allocate(tmp(vcoordprofile%nval))
96 tmp = log(vcoordprofile%vals(:,iobs))
97 tmp2 = log(obsvcoord(iobs))
99 tmp = vcoordprofile%vals(:,iobs)
100 tmp2 = obsvcoord(iobs)
107 geovar = self%geovars%variable(ivar)
115 & hofx(ivar,iobs), wi(iobs), wf(iobs))
119 deallocate(obsvcoord)