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: obs1dbangle
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(obs1dbangle) :: y
54 character(len=*),
parameter :: myname_=
"ufo_gnssro_bndropp1d_simobs"
55 real(kind=dp) :: ob_time
56 integer,
parameter :: max_string = 800
58 character(max_string) :: err_msg
59 integer :: nlev, nobs, iobs,nvprof
60 integer,
allocatable,
dimension(:) :: ichk
61 type(
ufo_geoval),
pointer :: t, q, prs, gph, gph_sfc
62 real(kind_real),
allocatable :: obsLat(:), obsLon(:), obsImpP(:), obsLocR(:), obsGeoid(:)
64 write(err_msg,*)
"TRACE: ufo_gnssro_bndropp1d_simobs: begin"
65 call fckit_log%info(err_msg)
68 if (geovals%nlocs /=
size(hofx))
then
69 write(err_msg,*) myname_,
' error: nlocs inconsistent!'
70 call abor1_ftn(err_msg)
80 missing = missing_value(missing)
83 nobs = obsspace_get_nlocs(obss)
87 if (prs%vals(1,1) .lt. prs%vals(prs%nval,1) )
then
89 write(err_msg,
'(a)')
' ufo_gnssro_bndropp1d_simobs:'//new_line(
'a')// &
90 ' Model vertical height profile is in descending order,'//new_line(
'a')// &
91 ' but ROPP requires it to be ascending order, need flip'
92 call fckit_log%info(err_msg)
96 allocate(obslon(nobs))
97 allocate(obslat(nobs))
98 allocate(obsimpp(nobs))
99 allocate(obslocr(nobs))
100 allocate(obsgeoid(nobs))
102 call obsspace_get_db(obss,
"MetaData",
"longitude", obslon)
103 call obsspace_get_db(obss,
"MetaData",
"latitude", obslat)
104 call obsspace_get_db(obss,
"MetaData",
"impact_parameter", obsimpp)
105 call obsspace_get_db(obss,
"MetaData",
"earth_radius_of_curvature", obslocr)
106 call obsspace_get_db(obss,
"MetaData",
"geoid_height_above_reference_ellipsoid", obsgeoid)
109 allocate(ichk(nvprof))
112 write(err_msg,*)
"TRACE: ufo_gnssro_bndropp1d_simobs: begin observation loop, nobs = ", nobs
113 call fckit_log%info(err_msg)
115 obs_loop:
do iobs = 1, nobs
126 gph_sfc%vals(1,iobs), &
138 call ropp_fm_bangle_1d(x,y)
141 if (y%bangle(nvprof) .lt. -900.0_wp )
then
143 y%bangle(nvprof) = missing
145 hofx(iobs) = y%bangle(nvprof)
160 write(err_msg,*)
"TRACE: ufo_gnssro_bndropp1d_simobs: completed"
161 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 gnssro bending angle ropp1d forward operator following the ROPP (2018 Aug) impleme...
subroutine ufo_gnssro_bndropp1d_simobs(self, geovals, hofx, obss)
Fortran module to handle gnssro bending angle observations following the ROPP (2018 Aug) implementati...
subroutine, public init_ropp_1d_statevec(step_time, rlon, rlat, temp, shum, pres, phi, lm, phi_sfc, x, iflip)
subroutine, public ropp_tidy_up_1d(x, y)
subroutine, public init_ropp_1d_obvec(nvprof, obs_impact, ichk, ob_time, rlat, rlon, roc, undulat, y)
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 gnssro trajectory.