33 integer :: degsubs = 100
34 real(8) :: tmintbl = 150.0_8, tmaxtbl = 333.0_8
36 real(8),
allocatable :: estblx(:)
37 real(kind=kind_real),
allocatable :: ttraj(:,:,:)
38 real(kind=kind_real),
allocatable :: tvtraj(:,:,:)
39 real(kind=kind_real),
allocatable :: qtraj(:,:,:)
40 real(kind=kind_real),
allocatable :: qsattraj(:,:,:)
49 subroutine create(self, bg, fg, geom, c_conf)
56 type(c_ptr),
intent(in) :: c_conf
58 real(kind=kind_real),
allocatable :: pe(:,:,:)
59 real(kind=kind_real),
allocatable :: pm(:,:,:)
60 real(kind=kind_real),
allocatable :: dqsatdt(:,:,:)
63 self%tablesize = nint(self%tmaxtbl-self%tmintbl)*self%degsubs + 1
64 allocate(self%estblx(self%tablesize))
65 call esinit(self%tablesize,self%degsubs,self%tmintbl,self%tmaxtbl,self%estblx)
68 allocate(self%tvtraj (geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz))
69 call t_to_tv(geom,bg%t,bg%q,self%tvtraj)
72 allocate(self%ttraj (geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz))
76 allocate(self%qtraj (geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz))
80 allocate(self%qsattraj(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz))
82 allocate(pe(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1))
83 allocate(pm(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz ))
84 allocate(dqsatdt(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz ))
87 call dqsat( geom,bg%t,pm,self%degsubs,self%tmintbl,self%tmaxtbl,&
88 self%tablesize,self%estblx,dqsatdt,self%qsattraj)
103 if (
allocated(self%estblx))
deallocate(self%estblx)
104 if (
allocated(self%tvtraj))
deallocate(self%tvtraj)
105 if (
allocated(self%ttraj))
deallocate(self%ttraj)
106 if (
allocated(self%qtraj))
deallocate(self%qtraj)
107 if (
allocated(self%qsattraj))
deallocate(self%qsattraj)
113 subroutine multiply(self,geom,xctl,xmod)
131 xmod%ua , xmod%va , xmod%t , xmod%q , &
132 self%tvtraj,self%qtraj,self%qsattraj )
156 xmod%ua , xmod%va , xmod%t , xmod%q , &
157 self%tvtraj,self%qtraj,self%qsattraj )
171 real(kind=kind_real),
allocatable,
dimension(:,:,:) :: vort, divg, ua, va
235 type(fv3jedi_geom),
intent(inout) :: geom
238 real(kind=kind_real),
intent(inout) :: psi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
239 real(kind=kind_real),
intent(inout) :: chi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
240 real(kind=kind_real),
intent(inout) :: tv(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
241 real(kind=kind_real),
intent(inout) :: qc(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
244 real(kind=kind_real),
intent(inout) :: ua(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
245 real(kind=kind_real),
intent(inout) :: va(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
246 real(kind=kind_real),
intent(inout) :: t(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
247 real(kind=kind_real),
intent(inout) :: qs(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
250 real(kind=kind_real),
intent(in ) :: tvt(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
251 real(kind=kind_real),
intent(in ) :: qt(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
252 real(kind=kind_real),
intent(in ) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
254 real(kind=kind_real),
allocatable,
dimension(:,:,:) :: psi_dom, chi_dom
263 allocate(psi_dom(geom%isd:geom%ied,geom%jsd:geom%jed,1:geom%npz))
264 allocate(chi_dom(geom%isd:geom%ied,geom%jsd:geom%jed,1:geom%npz))
265 psi_dom = 0.0_kind_real
266 chi_dom = 0.0_kind_real
268 psi_dom(geom%isc:geom%iec,geom%jsc:geom%jec,:) = psi
269 chi_dom(geom%isc:geom%iec,geom%jsc:geom%jec,:) = chi
273 deallocate(psi_dom, chi_dom)
294 type(fv3jedi_geom),
intent(inout) :: geom
297 real(kind=kind_real),
intent(inout) :: psi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
298 real(kind=kind_real),
intent(inout) :: chi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
299 real(kind=kind_real),
intent(inout) :: tv(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
300 real(kind=kind_real),
intent(inout) :: qc(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
303 real(kind=kind_real),
intent(inout) :: ua(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
304 real(kind=kind_real),
intent(inout) :: va(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
305 real(kind=kind_real),
intent(inout) :: t(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
306 real(kind=kind_real),
intent(inout) :: qs(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
309 real(kind=kind_real),
intent(in ) :: tvt(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
310 real(kind=kind_real),
intent(in ) :: qt(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
311 real(kind=kind_real),
intent(in ) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
313 real(kind=kind_real),
allocatable,
dimension(:,:,:) :: psi_dom, chi_dom
330 allocate(psi_dom(geom%isd:geom%ied,geom%jsd:geom%jed,1:geom%npz))
331 allocate(chi_dom(geom%isd:geom%ied,geom%jsd:geom%jed,1:geom%npz))
332 psi_dom = 0.0_kind_real
333 chi_dom = 0.0_kind_real
337 psi = psi_dom(geom%isc:geom%iec,geom%jsc:geom%jec,:)
338 chi = chi_dom(geom%isc:geom%iec,geom%jsc:geom%jec,:)
340 deallocate(psi_dom, chi_dom)
Fortran derived type to hold FV3JEDI increment.
subroutine, public tv_to_t_tl(geom, Tv, Tv_tl, q, q_tl, T_tl)
subroutine, public psichi_to_uava_adm(geom, psi_ad, chi_ad, ua_ad, va_ad)
subroutine, public delete(self)
subroutine, public delp_to_pe_p_logp(geom, delp, pe, p, logp)
Fortran derived type to hold FV3JEDI state.
Fortran derived type to hold geometry data for the FV3JEDI model.
Variable transforms on moisture variables for fv3-jedi Daniel Holdaway, NASA/JCSDA.
subroutine, public multiplyinverse(self, geom, xmod, xctr)
subroutine, public multiplyadjoint(self, geom, xmod, xctl)
subroutine, public multiply(self, geom, xctl, xmod)
Fortran derived type to hold configuration data for the B mat variable change.
Variable transforms on temperature variables for fv3-jedi Daniel Holdaway, NASA/JCSDA.
subroutine, public t_to_tv(geom, T, q, Tv)
subroutine, public rh_to_q_tl(geom, qsat, rh, q)
Handle state for the FV3JEDI odel.
subroutine, public tv_to_t_ad(geom, Tv, Tv_ad, q, q_ad, T_ad)
subroutine, public rh_to_q_ad(geom, qsat, rh, q)
subroutine, public psichi_to_uava(geom, psi, chi, ua, va)
subroutine, public dqsat(geom, temp, pmid, degsubs, tmintbl, tmaxtbl, tablesize, estblx, dqsi, qssi)
Handle increment for the FV3JEDI model.
subroutine control_to_model_tlm(geom, psi, chi, tv, qc, ua, va, t, qs, tvt, qt, qsat)
Variable transforms on wind variables for fv3-jedi Daniel Holdaway, NASA/JCSDA.
subroutine control_to_model_adm(geom, psi, chi, tv, qc, ua, va, t, qs, tvt, qt, qsat)
Control variables to state variables - Adjoint.
Fortran module handling geometry for the FV3 model.
Variable transforms on pressure variables for fv3-jedi Daniel Holdaway, NASA/JCSDA.
subroutine, public multiplyinverseadjoint(self, geom, xctr, xmod)
subroutine, public esinit(TABLESIZE, DEGSUBS, TMINTBL, TMAXTBL, ESTBLX)
subroutine, public create(self, bg, fg, geom, c_conf)