Skip to content

Commit 2edddf8

Browse files
Add geopotential height conversion to GNSSRO RefMetOffice forward operator
The RefMetOffice GNSSRO forward operator was previous reading geometric height from the MetaData/height variable, but treating it as a geopotential height when comparing to model data. This resulted in a significant bias, especially in the upper atmosphere, when compared to the RefNCEP FO. This code adds an explicit conversion from geometric to geopotential height, using the same function used by RefNCEP.
1 parent f9a2533 commit 2edddf8

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

src/ufo/operators/gnssro/RefMetOffice/ufo_gnssro_refmetoffice_mod.F90

+11-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module ufo_gnssro_refmetoffice_mod
2828
c_virtual, & ! Related to mw_ratio
2929
n_alpha, & ! Refractivity constant a
3030
n_beta ! Refractivity constant b
31+
use gnssro_mod_transform, only: geometric2geop
3132

3233

3334
implicit none
@@ -114,6 +115,7 @@ subroutine ufo_gnssro_refmetoffice_simobs(self, geovals, obss, hofx, obs_diags)
114115
integer :: iVar ! Loop variable, obs diagnostics variable number
115116
real(kind_real), allocatable :: refractivity(:) ! Refractivity on various model levels
116117
real(kind_real), allocatable :: model_heights(:) ! Geopotential heights that refractivity is calculated on
118+
real(kind_real) :: tmp_geop_height ! Tmp var used in geopotential height calculation
117119

118120
write(err_msg,*) "TRACE: ufo_gnssro_refmetoffice_simobs: begin"
119121
call fckit_log%info(err_msg)
@@ -171,6 +173,12 @@ subroutine ufo_gnssro_refmetoffice_simobs(self, geovals, obss, hofx, obs_diags)
171173
call obsspace_get_db(obss, "MetaData", "latitude", obsLat)
172174
call obsspace_get_db(obss, "MetaData", "height", obs_height)
173175

176+
! Convert geometric height to geopotential height
177+
do iobs = 1, nobs
178+
call geometric2geop(obsLat(iobs), obs_height(iobs), tmp_geop_height)
179+
obs_height(iobs) = tmp_geop_height
180+
end do
181+
174182
obs_loop: do iobs = 1, nobs
175183

176184
call RefMetOffice_ForwardModel(prs % nval, &
@@ -270,15 +278,15 @@ SUBROUTINE RefMetOffice_ForwardModel(nlevp, &
270278

271279
INTEGER, INTENT(IN) :: nlevp ! no. of p levels in state vec.
272280
INTEGER, INTENT(IN) :: nlevq ! no. of theta levels
273-
REAL(kind_real), INTENT(IN) :: za(1:nlevp) ! heights of rho levs
274-
REAL(kind_real), INTENT(IN) :: zb(1:nlevq) ! heights of theta levs
281+
REAL(kind_real), INTENT(IN) :: za(1:nlevp) ! geopotential heights of rho levs
282+
REAL(kind_real), INTENT(IN) :: zb(1:nlevq) ! geopotential heights of theta levs
275283
REAL(kind_real), INTENT(IN) :: pressure(1:nlevp) ! Model background pressure
276284
REAL(kind_real), INTENT(IN) :: humidity(1:nlevq) ! Model background specific humidity
277285
LOGICAL, INTENT(IN) :: GPSRO_pseudo_ops ! Option: Use pseudo-levels in vertical interpolation?
278286
LOGICAL, INTENT(IN) :: GPSRO_vert_interp_ops ! Option: Use ln(p) for vertical interpolation? (rather than exner)
279287
REAL(kind_real), INTENT(IN) :: GPSRO_min_temp_grad ! The minimum temperature gradient which is used
280288
INTEGER, INTENT(IN) :: nobs ! Number of observations in the profile
281-
REAL(kind_real), INTENT(IN) :: zobs(1:nobs) ! Impact parameter for the obs
289+
REAL(kind_real), INTENT(IN) :: zobs(1:nobs) ! Geopotential heights for the obs
282290
REAL(kind_real), INTENT(IN) :: Latitude ! Latitude of this profile
283291
REAL(kind_real), INTENT(INOUT) :: ycalc(1:nobs) ! Model forecast of the observations
284292
LOGICAL, INTENT(OUT) :: BAErr ! Was an error encountered during the calculation?

src/ufo/operators/gnssro/RefMetOffice/ufo_gnssro_refmetoffice_tlad_mod.F90

+14-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module ufo_gnssro_refmetoffice_tlad_mod
3232
c_virtual, & ! Related to mw_ratio
3333
n_alpha, & ! Refractivity constant a
3434
n_beta ! Refractivity constant b
35+
use gnssro_mod_transform, only: geometric2geop
3536

3637
private
3738
public :: ufo_gnssro_refmetoffice_tlad
@@ -126,6 +127,8 @@ subroutine ufo_gnssro_refmetoffice_tlad_settraj(self, geovals, obss)
126127
integer :: iobs ! Loop variable, observation number
127128

128129
real(kind_real), allocatable :: obs_height(:) ! Geopotential height of the observation
130+
real(kind_real), allocatable :: obsLat(:) ! Observed latitude used in geop hgt calc
131+
real(kind_real) :: tmp_geop_height ! Tmp var used in geopotential height calc
129132

130133
write(err_msg,*) "TRACE: ufo_gnssro_refmetoffice_tlad_settraj: begin"
131134
call fckit_log%info(err_msg)
@@ -152,7 +155,16 @@ subroutine ufo_gnssro_refmetoffice_tlad_settraj(self, geovals, obss)
152155

153156
! Get the meta-data from the observations
154157
allocate(obs_height(self%nlocs))
158+
allocate(obsLat(self%nlocs))
155159
call obsspace_get_db(obss, "MetaData", "height", obs_height)
160+
call obsspace_get_db(obss, "MetaData", "latitude", obsLat)
161+
162+
! Convert geometric height to geopotential height.
163+
do iobs = 1, self%nlocs
164+
call geometric2geop(obsLat(iobs), obs_height(iobs), tmp_geop_height)
165+
obs_height(iobs) = tmp_geop_height
166+
end do
167+
156168
allocate(self % K(1:self%nlocs, 1:prs%nval + q%nval))
157169

158170
! For each observation, calculate the K-matrix
@@ -167,7 +179,7 @@ subroutine ufo_gnssro_refmetoffice_tlad_settraj(self, geovals, obss)
167179
self % vert_interp_ops, & ! Whether to interpolate using log(pressure)
168180
self % min_temp_grad, & ! Minimum allowed vertical temperature gradient
169181
1, & ! Number of observations in the profile
170-
obs_height(iobs:iobs), & ! Impact parameter for this observation
182+
obs_height(iobs:iobs), & ! Geopotential height for this observation
171183
self % K(iobs:iobs,1:prs%nval+q%nval)) ! K-matrix (Jacobian of the observation with respect to the inputs)
172184
! Flip the K-matrix back the right way around
173185
self % K(iobs,1:prs%nval) = self % K(iobs, prs%nval:1:-1)
@@ -178,6 +190,7 @@ subroutine ufo_gnssro_refmetoffice_tlad_settraj(self, geovals, obss)
178190
self%ltraj = .true.
179191

180192
deallocate(obs_height)
193+
deallocate(obsLat)
181194

182195
end subroutine ufo_gnssro_refmetoffice_tlad_settraj
183196

0 commit comments

Comments
 (0)