12 use fckit_configuration_module,
only: fckit_configuration
16 use oops_variables_mod
19 use fv3jedi_lm_mod,
only: fv3jedi_lm_type
36 type(fv3jedi_lm_type) :: fv3jedi_lm
59 type(fckit_configuration),
intent(in) :: conf
62 character(len=20) :: ststep
63 type(duration) :: dtstep
65 character(len=:),
allocatable :: str
69 call conf%get_or_die(
"tstep",str)
73 dt = real(duration_seconds(dtstep),
kind_real)
77 call conf%get_or_die(
"lm_do_dyn",self%fv3jedi_lm%conf%do_dyn)
78 call conf%get_or_die(
"lm_do_trb",self%fv3jedi_lm%conf%do_phy_trb)
79 call conf%get_or_die(
"lm_do_mst",self%fv3jedi_lm%conf%do_phy_mst)
81 call self%fv3jedi_lm%create(dt,geom%npx,geom%npy,geom%npz,geom%ptop,geom%ak,geom%bk)
94 call self%fv3jedi_lm%delete()
107 call self%fv3jedi_lm%init_ad()
121 call self%fv3jedi_lm%init_tl()
133 type(fv3jedi_traj),
intent(in) :: traj
138 call self%fv3jedi_lm%step_ad()
150 type(fv3jedi_traj),
intent(in) :: traj
155 call self%fv3jedi_lm%step_tl()
169 call self%fv3jedi_lm%final_ad()
183 call self%fv3jedi_lm%final_tl()
194 type(fv3jedi_lm_type),
intent(inout) :: lm
196 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ud
197 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: vd
200 call inc%get_field(
'ud', ud )
201 call inc%get_field(
'vd', vd )
202 lm%pert%u = ud(inc%isc:inc%iec,inc%jsc:inc%jec,1:inc%npz)
203 lm%pert%v = vd(inc%isc:inc%iec,inc%jsc:inc%jec,1:inc%npz)
205 call inc%get_field(
't' , lm%pert%t )
206 call inc%get_field(
'delp' , lm%pert%delp)
207 call inc%get_field(
'sphum' , lm%pert%qv )
208 call inc%get_field(
'ice_wat', lm%pert%qi )
209 call inc%get_field(
'liq_wat', lm%pert%ql )
212 if (inc%has_field(
'o3mr' ))
call inc%get_field(
'o3mr' , lm%pert%o3 )
213 if (inc%has_field(
'o3ppmv' ))
call inc%get_field(
'o3ppmv' , lm%pert%o3 )
214 if (inc%has_field(
'w' ))
call inc%get_field(
'w' , lm%pert%w )
215 if (inc%has_field(
'delz' ))
call inc%get_field(
'delz' , lm%pert%delz)
224 type(fv3jedi_lm_type),
intent(in) :: lm
227 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ud
228 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: vd
231 call inc%get_field(
'ud' , ud )
232 call inc%get_field(
'vd' , vd )
233 ud(inc%isc:inc%iec,inc%jsc:inc%jec,1:inc%npz) = lm%pert%u
234 vd(inc%isc:inc%iec,inc%jsc:inc%jec,1:inc%npz) = lm%pert%v
236 call inc%put_field(
't' , lm%pert%t )
237 call inc%put_field(
'delp' , lm%pert%delp)
238 call inc%put_field(
'sphum' , lm%pert%qv )
239 call inc%put_field(
'ice_wat', lm%pert%qi )
240 call inc%put_field(
'liq_wat', lm%pert%ql )
243 if (inc%has_field(
'o3mr' ))
call inc%put_field(
'o3mr' , lm%pert%o3 )
244 if (inc%has_field(
'o3ppmv' ))
call inc%put_field(
'o3ppmv' , lm%pert%o3 )
245 if (inc%has_field(
'w' ))
call inc%put_field(
'w' , lm%pert%w )
246 if (inc%has_field(
'delz' ))
call inc%put_field(
'delz' , lm%pert%delz)
255 type(fv3jedi_traj),
intent(in) :: traj
256 type(fv3jedi_lm_type),
intent(inout) :: lm
263 lm%traj%delp = traj%delp
269 if (.not. lm%conf%hydrostatic)
then
271 lm%traj%delz = traj%delz
274 if (lm%conf%do_phy_mst .ne. 0)
then
275 lm%traj%qls = traj%qls
276 lm%traj%qcn = traj%qcn
277 lm%traj%cfcn = traj%cfcn
281 lm%traj%phis = traj%phis
282 lm%traj%frocean = traj%frocean
283 lm%traj%frland = traj%frland
284 lm%traj%varflt = traj%varflt
285 lm%traj%ustar = traj%ustar
286 lm%traj%bstar = traj%bstar
287 lm%traj%zpbl = traj%zpbl
291 lm%traj%kcbl = traj%kcbl
293 lm%traj%khl = traj%khl
294 lm%traj%khu = traj%khu