13 use fckit_configuration_module,
only: fckit_configuration
16 use fv3jedi_lm_mod,
only: fv3jedi_lm_type
30 type(fv3jedi_lm_type) :: fv3jedi_lm
50 type(fckit_configuration),
intent(in) :: conf
53 character(len=20) :: ststep
54 type(duration) :: dtstep
56 character(len=:),
allocatable :: str
61 call conf%get_or_die(
"tstep",str)
66 dt = real(duration_seconds(dtstep),
kind_real)
71 call conf%get_or_die(
"lm_do_dyn",self%fv3jedi_lm%conf%do_dyn)
72 call conf%get_or_die(
"lm_do_trb",self%fv3jedi_lm%conf%do_phy_trb)
73 call conf%get_or_die(
"lm_do_mst",self%fv3jedi_lm%conf%do_phy_mst)
75 call self%fv3jedi_lm%create(dt,geom%npx,geom%npy,geom%npz,geom%ptop,geom%ak,geom%bk)
84 if ((self%fv3jedi_lm%conf%do_phy_trb .ne. 0) .or. &
85 (self%fv3jedi_lm%conf%do_phy_mst .ne. 0) )
then
86 call abor1_ftn(
"fv3lm_model | FV3LM : unless reading the trajecotory physics should be off")
100 call self%fv3jedi_lm%delete()
112 call self%fv3jedi_lm%init_nl()
118 subroutine step(self, state, geom, vdate)
124 type(datetime),
intent(inout) :: vdate
127 call self%fv3jedi_lm%step_nl()
140 call self%fv3jedi_lm%final_nl()
150 type(fv3jedi_lm_type),
intent(inout) :: lm
152 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ud
153 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: vd
154 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ua
155 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: va
156 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: t
157 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: delp
158 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: q
159 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: qi
160 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ql
161 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: o3
162 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: w
163 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: delz
164 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: phis
166 call state%get_field(
'ud' , ud )
167 call state%get_field(
'vd' , vd )
168 call state%get_field(
't' , t )
169 call state%get_field(
'delp' , delp)
170 call state%get_field(
'sphum' , q )
171 call state%get_field(
'ice_wat', qi )
172 call state%get_field(
'liq_wat', ql )
173 if (state%has_field(
'o3mr' ))
call state%get_field(
'o3mr' , o3)
174 if (state%has_field(
'o3ppmv'))
call state%get_field(
'o3ppmv', o3)
175 lm%traj%ua = 0.0_kind_real
176 lm%traj%va = 0.0_kind_real
178 lm%traj%u = ud(state%isc:state%iec,state%jsc:state%jec,:)
179 lm%traj%v = vd(state%isc:state%iec,state%jsc:state%jec,:)
187 if (state%has_field(
'ua'))
then
188 call state%get_field(
'ua', ua )
189 call state%get_field(
'va', va )
194 if (.not. lm%conf%hydrostatic)
then
195 call state%get_field(
'w ', w )
196 call state%get_field(
'delz', delz)
201 call state%get_field(
'phis', phis )
202 lm%traj%phis = phis(:,:,1)
211 type(fv3jedi_lm_type),
intent(in) :: lm
214 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ud
215 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: vd
216 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ua
217 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: va
218 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: t
219 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: delp
220 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: q
221 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: qi
222 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: ql
223 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: o3
224 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: w
225 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: delz
226 real(kind=
kind_real),
pointer,
dimension(:,:,:) :: phis
228 call state%get_field(
'ud' , ud )
229 call state%get_field(
'vd' , vd )
230 call state%get_field(
't' , t )
231 call state%get_field(
'delp' , delp)
232 call state%get_field(
'sphum' , q )
233 call state%get_field(
'ice_wat', qi )
234 call state%get_field(
'liq_wat', ql )
235 if ( state%has_field(
'o3mr' ) )
call state%get_field(
'o3mr' , o3 )
236 if ( state%has_field(
'o3ppmv' ) )
call state%get_field(
'o3ppmv' , o3 )
237 ud(state%isc:state%iec,state%jsc:state%jec,:) = lm%traj%u
238 vd(state%isc:state%iec,state%jsc:state%jec,:) = lm%traj%v
246 if (state%has_field(
'ua'))
then
247 call state%get_field(
'ua', ua )
248 call state%get_field(
'va', va )
253 if (.not. lm%conf%hydrostatic)
then
254 call state%get_field(
'w ', w )
255 call state%get_field(
'delz', delz)
260 call state%get_field(
'phis', phis )
261 phis(:,:,1) = lm%traj%phis