10 use oops_variables_mod
19 type(oops_variables),
public :: obsvars
20 type(oops_variables),
public :: geovars
21 character(len=MAXVARLEN),
public :: v_coord
36 use fckit_configuration_module,
only: fckit_configuration
40 type(fckit_configuration),
intent(in) :: yaml_conf
42 character(kind=c_char,len=:),
allocatable :: coord_name
46 if( yaml_conf%has(
"VertCoord") )
then
47 call yaml_conf%get_or_die(
"VertCoord",coord_name)
48 self%v_coord = coord_name
49 if( trim(self%v_coord) .ne.
var_z )
then
50 call abor1_ftn(
"ufo_radarradialvelocity: incorrect vertical coordinate specified")
56 call self%geovars%push_back(self%v_coord)
69 integer,
intent(in) :: nvars, nlocs
71 real(c_double),
intent(inout) :: hofx(nvars, nlocs)
72 type(c_ptr),
value,
intent(in) :: obss
75 integer :: iobs, ivar, nvars_geovars
76 real(kind_real),
dimension(:),
allocatable :: obsvcoord
77 real(kind_real),
dimension(:),
allocatable :: radarazim, radartilt, radardir, vterminal
78 type(
ufo_geoval),
pointer :: vcoordprofile, profile
79 real(kind_real),
allocatable :: wf(:)
80 integer,
allocatable :: wi(:)
82 character(len=MAXVARLEN) :: geovar
84 real(kind_real),
allocatable :: tmp(:)
85 real(kind_real) :: tmp2
87 real(kind_real),
allocatable :: vfields(:,:)
95 allocate(obsvcoord(nlocs))
96 allocate(radarazim(nlocs))
97 allocate(radartilt(nlocs))
98 allocate(radardir(nlocs))
99 allocate(vterminal(nlocs))
100 call obsspace_get_db(obss,
"MetaData",
"height", obsvcoord)
101 call obsspace_get_db(obss,
"MetaData",
"radar_azimuth", radarazim)
102 call obsspace_get_db(obss,
"MetaData",
"radar_tilt", radartilt)
103 call obsspace_get_db(obss,
"MetaData",
"radar_dir3", radardir)
104 call obsspace_get_db(obss,
"MetaData",
"vterminal", vterminal)
114 allocate(tmp(vcoordprofile%nval))
116 tmp = vcoordprofile%vals(:,iobs)
117 tmp2 = obsvcoord(iobs)
122 nvars_geovars = self%geovars%nvars() - 1
123 allocate(vfields(nvars_geovars,nlocs))
125 do ivar = 1, nvars_geovars
127 geovar = self%geovars%variable(ivar)
135 & vfields(ivar,iobs), wi(iobs), wf(iobs))
141 hofx(ivar,iobs) = vfields(1,iobs)*radarazim(iobs) &
142 + vfields(2,iobs)*radartilt(iobs) &
143 + (vfields(3,iobs)-vterminal(iobs))*radardir(iobs)
148 deallocate(obsvcoord)
149 deallocate(radarazim)
150 deallocate(radartilt)
151 deallocate(radardir )
152 deallocate(vterminal)