Go to the documentation of this file.
9 use fckit_configuration_module,
only: fckit_configuration
12 use fckit_log_module,
only : fckit_log
39 character(len=4) :: pres_var
53 type(fckit_configuration),
intent(in) :: conf
55 character(len=:),
allocatable :: str
60 if( .not. conf%get(
'do_wind', self%do_wind) ) self%do_wind = .true.
62 if( .not. conf%get(
'do_temperature', self%do_temp) ) self%do_temp = .true.
64 if( .not. conf%get(
'do_pressure', self%do_pres) ) self%do_pres = .true.
66 if( .not. conf%get(
'do_clouds', self%do_clds) ) self%do_clds = .true.
68 self%pres_var =
'delp'
69 if( conf%has(
'pres_var') )
then
70 call conf%get_or_die(
"pres_var",str)
96 logical :: have_fractions
99 real(kind=
kind_real),
pointer :: ud(:,:,:)
100 real(kind=
kind_real),
pointer :: vd(:,:,:)
101 real(kind=
kind_real),
pointer :: pe(:,:,:)
102 real(kind=
kind_real),
pointer :: pkz(:,:,:)
103 real(kind=
kind_real),
pointer :: pt(:,:,:)
104 real(kind=
kind_real),
pointer :: qils(:,:,:)
105 real(kind=
kind_real),
pointer :: qicn(:,:,:)
106 real(kind=
kind_real),
pointer :: qlls(:,:,:)
107 real(kind=
kind_real),
pointer :: qlcn(:,:,:)
110 real(kind=
kind_real),
pointer :: ua(:,:,:)
111 real(kind=
kind_real),
pointer :: va(:,:,:)
112 real(kind=
kind_real),
pointer :: delp(:,:,:)
113 real(kind=
kind_real),
pointer :: ps(:,:,:)
114 real(kind=
kind_real),
pointer :: t(:,:,:)
115 real(kind=
kind_real),
pointer :: qi(:,:,:)
116 real(kind=
kind_real),
pointer :: ql(:,:,:)
117 real(kind=
kind_real),
pointer :: qilsf(:,:,:)
118 real(kind=
kind_real),
pointer :: qicnf(:,:,:)
120 real(kind=
kind_real),
allocatable :: pe_tmp(:,:,:)
121 real(kind=
kind_real),
target,
allocatable :: pkz_tmp(:,:,:)
131 if (self%do_wind)
then
133 call xr%get_field(
'ud', ud)
134 call xr%get_field(
'vd', vd)
136 call xb%get_field(
'ua', ua)
137 call xb%get_field(
'va', va)
139 call d2a(geom, ud, vd, ua, va)
145 if (self%do_temp)
then
147 call xr%get_field(
'pt', pt)
148 call xb%get_field(
't' , t )
150 if (.not. xr%has_field(
'pkz'))
then
151 if (xr%has_field(
'delp'))
then
152 call xr%get_field(
'delp' , delp )
153 allocate(pe_tmp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1))
154 allocate(pkz_tmp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz))
159 call abor1_ftn(
"No way of getting pressures needed to convert temperature")
162 call xr%get_field(
'pkz' , pkz )
171 if (self%do_pres)
then
173 call xr%get_field(
'pe' , pe)
175 if (xb%has_field(
'delp'))
then
176 call xb%get_field(
'delp', delp)
180 if (xb%has_field(
'ps'))
then
181 call xb%get_field(
'ps' , ps)
182 ps(:,:,1) = pe(:,:,geom%npz+1)
190 if (self%do_clds)
then
192 call xr%get_field(
'qils', qils)
193 call xr%get_field(
'qicn', qicn)
194 call xr%get_field(
'qlls', qlls)
195 call xr%get_field(
'qlcn', qlcn)
197 call xb%get_field(
'ice_wat', qi)
198 call xb%get_field(
'liq_wat', ql)
200 have_fractions = .true.
201 if (.not.xb%has_field(
'qilsf')) have_fractions = .false.
202 if (.not.xb%has_field(
'qicnf')) have_fractions = .false.
204 if (have_fractions)
then
205 call xb%get_field(
'qilsf', qilsf)
206 call xb%get_field(
'qicnf', qicnf)
209 if (have_fractions)
then
210 call q4_to_q2(geom,qils,qicn,qlls,qlcn,qi,ql,qilsf,qicnf)
212 call q4_to_q2(geom,qils,qicn,qlls,qlcn,qi,ql)
219 xb%calendar_type = xr%calendar_type
220 xb%date_init = xr%date_init
234 character(len=32) :: field_name
237 real(kind=
kind_real),
pointer :: ud(:,:,:)
238 real(kind=
kind_real),
pointer :: vd(:,:,:)
239 real(kind=
kind_real),
pointer :: pe(:,:,:)
240 real(kind=
kind_real),
pointer :: pkz(:,:,:)
241 real(kind=
kind_real),
pointer :: pt(:,:,:)
242 real(kind=
kind_real),
pointer :: qils(:,:,:)
243 real(kind=
kind_real),
pointer :: qicn(:,:,:)
244 real(kind=
kind_real),
pointer :: qlls(:,:,:)
245 real(kind=
kind_real),
pointer :: qlcn(:,:,:)
248 real(kind=
kind_real),
pointer :: ua(:,:,:)
249 real(kind=
kind_real),
pointer :: va(:,:,:)
250 real(kind=
kind_real),
pointer :: delp(:,:,:)
251 real(kind=
kind_real),
pointer :: ps(:,:,:)
252 real(kind=
kind_real),
pointer :: t(:,:,:)
253 real(kind=
kind_real),
pointer :: qi(:,:,:)
254 real(kind=
kind_real),
pointer :: ql(:,:,:)
255 real(kind=
kind_real),
pointer :: qilsf(:,:,:)
256 real(kind=
kind_real),
pointer :: qicnf(:,:,:)
259 real(kind=
kind_real),
allocatable :: pe_tmp(:,:,:)
260 real(kind=
kind_real),
allocatable :: pkz_tmp(:,:,:)
270 if (self%do_wind)
then
272 call xr%get_field(
'ud', ud)
273 call xr%get_field(
'vd', vd)
275 call xb%get_field(
'ua', ua)
276 call xb%get_field(
'va', va)
278 call a2d(geom, ua, va, ud, vd)
284 if (self%do_pres)
then
286 call xr%get_field(
'pe' , pe )
287 call xr%get_field(
'pkz' , pkz )
289 if (trim(self%pres_var) ==
'delp')
then
291 call xb%get_field(
'delp' , delp )
294 elseif (trim(self%pres_var) ==
'ps')
then
296 call xb%get_field(
'ps' , ps )
302 call abor1_ftn(
"fv3jedi_vc_geosrst2bkg_mod.changevarinverse, must select a variable to set pe from. pres_var: ps or delp")
313 if (self%do_temp)
then
315 call xr%get_field(
'pt', pt)
316 call xb%get_field(
't' , t )
318 if (.not. self%do_pres)
then
320 allocate(pe_tmp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1))
321 allocate(pkz_tmp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz))
323 call xb%get_field(
'delp' , delp )
326 call pe_to_pk(geom, pe_tmp, pkz_tmp)
328 call t_to_pt(geom, pkz_tmp, t, pt)
330 deallocate(pe_tmp,pkz_tmp)
343 if (self%do_clds)
then
345 call xr%get_field(
'qils', qils)
346 call xr%get_field(
'qicn', qicn)
347 call xr%get_field(
'qlls', qlls)
348 call xr%get_field(
'qlcn', qlcn)
350 call xb%get_field(
'ice_wat', qi)
351 call xb%get_field(
'liq_wat', ql)
352 call xb%get_field(
'qilsf', qilsf)
353 call xb%get_field(
'qicnf', qicnf)
355 call q2_to_q4(geom, qi, ql, qilsf, qicnf, qils, qicn, qlls, qlcn)
361 xr%calendar_type = xb%calendar_type
362 xr%date_init = xb%date_init
Fortran derived type to hold FV3JEDI state.
subroutine, public delp_to_pe(geom, delp, pe)
subroutine, public delete(self)
subroutine, public q2_to_q4(geom, qi, ql, qilsf, qicnf, qils, qicn, qlls, qlcn)
subroutine, public copy_subset(field_in, field_ou, not_copied)
Fortran module handling geometry for the FV3 model.
Fortran derived type to hold geometry data for the FV3JEDI model.
subroutine, public pe_to_pk(geom, pe, pk)
subroutine, public changevarinverse(self, geom, xb, xr)
subroutine, public changevar(self, geom, xr, xb)
subroutine, public t_to_pt(geom, pkz, t, pt)
integer, parameter, public kind_real
subroutine, public pt_to_t(geom, pkz, pt, t)
subroutine, public q4_to_q2(geom, qils, qicn, qlls, qlcn, qi, ql, qilsf, qicnf)
subroutine, public d2a(geom, u_comp, v_comp, ua_comp, va_comp)
subroutine, public a2d(geom, ua, va, ud, vd)
subroutine, public create(self, geom, conf)
subroutine, public ps_to_pe(geom, ps, pe)
subroutine, public pe_to_delp(geom, pe, delp)