20 use missing_values_mod
22 use fckit_log_module,
only : fckit_log
39 use ropp_fm_types,
only: state1dfm
40 use ropp_fm_types,
only: obs1drefrac
41 use typesizes,
only: wp => eightbytereal
42 use datetimetypes,
only: dp
47 real(kind_real),
intent(inout) :: hofx(:)
48 type(c_ptr),
value,
intent(in) :: obss
49 real(c_double) :: missing
52 type(obs1drefrac) :: y
54 character(len=*),
parameter :: myname_=
"ufo_gnssgb_refropp1d_simobs"
55 real(kind=dp) :: ob_time
56 integer,
parameter :: max_string = 800
58 character(max_string) :: err_msg
59 integer :: nlev, nobs, iobs
60 integer,
allocatable,
dimension(:) :: ichk
61 type(
ufo_geoval),
pointer :: t, q, prs, gph, gph_sfc
62 real(kind_real),
allocatable :: obsLat(:), obsLon(:), obsHeight(:), obsValue(:)
63 real(kind_real),
allocatable :: model_z(:)
64 real(kind_real) :: station_phi, model_ztd
67 write(err_msg,*)
"TRACE: ufo_gnssgb_refropp1d_simobs: begin"
68 call fckit_log%info(err_msg)
71 if (geovals%nlocs /=
size(hofx))
then
72 write(err_msg,*) myname_,
' error: nlocs inconsistent!'
73 call abor1_ftn(err_msg)
83 missing = missing_value(missing)
86 nobs = obsspace_get_nlocs(obss)
90 if (prs%vals(1,1) .lt. prs%vals(prs%nval,1) )
then
92 write(err_msg,
'(a)')
' ufo_gnssgb_refropp1d_simobs:'//new_line(
'a')// &
93 ' Model vertical height profile is in descending order,'//new_line(
'a')// &
94 ' but ROPP requires it to be ascending order, need flip'
95 call fckit_log%info(err_msg)
99 allocate(obslon(nobs))
100 allocate(obslat(nobs))
101 allocate(obsheight(nobs))
102 allocate(obsvalue(nobs))
105 allocate(model_z(nlev))
108 call obsspace_get_db(obss,
"MetaData",
"longitude", obslon)
109 call obsspace_get_db(obss,
"MetaData",
"latitude", obslat)
110 call obsspace_get_db(obss,
"MetaData",
"station_height", obsheight)
111 call obsspace_get_db(obss,
"ObsValue",
"ZTD", obsvalue)
117 write(err_msg,*)
"TRACE: ufo_gnssgb_refropp1d_simobs: begin observation loop, nobs = ", nobs
118 call fckit_log%info(err_msg)
120 obs_loop:
do iobs = 1, nobs
132 gph_sfc%vals(1,iobs), &
143 call ropp_fm_refrac_1d(x,y)
147 call gnss_ztd_integral(nlev, y%refrac, model_z, obsheight(iobs), model_ztd, l_linear)
149 if ( model_ztd == 0.0 )
then
154 write(err_msg,
'(a9,2a11,2a15)')
'ROPPsim: ',
'ob',
'bk',
'station_hgt',
'model_terr'
155 call fckit_log%debug(err_msg)
156 write(err_msg,
'(9x,2f11.3,2f15.3)') obsvalue(iobs), model_ztd, obsheight(iobs), model_z(1)
157 call fckit_log%debug(err_msg)
159 hofx(iobs) = model_ztd
169 deallocate(obsheight)
173 write(err_msg,*)
"TRACE: ufo_gnssgb_refropp1d_simobs: completed"
174 call fckit_log%info(err_msg)
Fortran module to prepare for Lagrange polynomial interpolation. based on GSI: lagmod....
subroutine, public lag_interp_const(q, x, n)
subroutine, public lag_interp_smthweights(x, xt, aq, bq, w, dw, n)
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
subroutine, public ufo_geovals_get_var(self, varname, geoval)
Fortran module for ground-based gnss refractivity ropp1d forward operator following the ROPP (2018 Au...
subroutine ufo_gnssgb_refropp1d_simobs(self, geovals, hofx, obss)
Fortran module to handle ground-based gnss observations following the ROPP (2018 Aug) implementation.
subroutine, public init_ropp_1d_statevec(step_time, rlon, rlat, temp, shum, pres, phi, lm, phi_sfc, x, iflip)
subroutine, public calc_model_z(nlev, rlat, model_phi, model_z)
subroutine, public init_ropp_1d_obvec(nlev, ichk, ob_time, rlat, rlon, station_phi, x, y)
subroutine, public ropp_tidy_up_1d(x, y)
subroutine, public calc_station_phi(rlat, station_height, station_phi)
subroutine, public gnss_ztd_integral(lm, model_refrac, model_z, ob_terr, model_ztd, l_linear)
character(len=maxvarlen), parameter, public var_prs
character(len=maxvarlen), parameter, public var_q
character(len=maxvarlen), parameter, public var_sfc_geomz
character(len=maxvarlen), parameter, public var_z
character(len=maxvarlen), parameter, public var_ts
Fortran module to perform linear interpolation.
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators
Fortran derived type for ground based gnss trajectory.