33 kappa, ptop, delp, pe, pk, pkz, peln )
36 integer,
intent(in) :: is, ie, js, je, isd, ied, jsd, jed, npz
37 real(kind=kind_real),
intent(in) ::
kappa, ptop
38 real(kind=kind_real),
intent(in) :: delp(isd:ied, jsd:jed, npz)
39 real(kind=kind_real),
intent(out) :: pe(is-1:ie+1, npz+1, js-1:je+1)
40 real(kind=kind_real),
intent(out) :: pk(is:ie, js:je, npz+1)
41 real(kind=kind_real),
intent(out) :: peln(is:ie, npz+1, js:je)
42 real(kind=kind_real),
intent(out) :: pkz(is:ie, js:je, npz)
50 pe(i, k, j) = pe(i, k-1, j) + delp(i, j, k-1)
58 peln(i, k, j) = log(pe(i, k, j))
66 pk(i, j, k) = exp(
kappa*peln(i, k, j))
74 pkz(i, j, k) = (pk(i, j, k+1)-pk(i, j, k))/(
kappa*(peln(i, k+1, j)-peln(i, k, j)))
82 kappa, ptop, delp, delp_tl, &
83 pe, pe_tl, pk, pk_tl, pkz, pkz_tl, peln, peln_tl )
86 integer,
intent(in) :: is, ie, js, je, isd, ied, jsd, jed, npz
87 real(kind=kind_real),
intent(in) ::
kappa, ptop
88 real(kind=kind_real),
intent(in) :: delp(isd:ied, jsd:jed, npz)
89 real(kind=kind_real),
intent(in) :: delp_tl(isd:ied, jsd:jed, npz)
90 real(kind=kind_real),
intent(out) :: pe(is-1:ie+1, npz+1, js-1:je+1)
91 real(kind=kind_real),
intent(out) :: pe_tl(is-1:ie+1, npz+1, js-1:je+1)
92 real(kind=kind_real),
intent(out) :: pk(is:ie, js:je, npz+1)
93 real(kind=kind_real),
intent(out) :: pk_tl(is:ie, js:je, npz+1)
94 real(kind=kind_real),
intent(out) :: peln(is:ie, npz+1, js:je)
95 real(kind=kind_real),
intent(out) :: peln_tl(is:ie, npz+1, js:je)
96 real(kind=kind_real),
intent(out) :: pkz(is:ie, js:je, npz)
97 real(kind=kind_real),
intent(out) :: pkz_tl(is:ie, js:je, npz)
106 pe_tl(i, k, j) = pe_tl(i, k-1, j) + delp_tl(i, j, k-1)
107 pe(i, k, j) = pe(i, k-1, j) + delp(i, j, k-1)
116 peln_tl(i, k, j) = pe_tl(i, k, j)/pe(i, k, j)
117 peln(i, k, j) = log(pe(i, k, j))
126 pk_tl(i, j, k) =
kappa*peln_tl(i, k, j)*exp(
kappa*peln(i, k, j))
127 pk(i, j, k) = exp(
kappa*peln(i, k, j))
136 pkz_tl(i, j, k) = ((pk_tl(i, j, k+1)-pk_tl(i, j, k))*
kappa*(peln(i, k+1, j)-peln(i, k, j)) &
137 -(pk(i, j, k+1)-pk(i, j, k))*
kappa*(peln_tl(i, k+1, j)-peln_tl(i, k, j))) &
138 /(
kappa*(peln(i, k+1, j)-peln(i, k, j)))**2
139 pkz(i, j, k) = (pk(i, j, k+1)-pk(i, j, k))/(
kappa*(peln(i, k+1, j)-peln(i, k, j)))
147 kappa, ptop, delp, delp_ad, &
148 pe, pe_ad, pk, pk_ad, pkz, pkz_ad, peln, peln_ad)
151 integer,
intent(in) :: is, ie, js, je, isd, ied, jsd, jed, npz
152 real(kind=kind_real),
intent(in) ::
kappa, ptop
153 real(kind=kind_real),
intent(in) :: delp(isd:ied, jsd:jed, npz)
154 real(kind=kind_real),
intent(inout) :: delp_ad(isd:ied, jsd:jed, npz)
155 real(kind=kind_real),
intent(in) :: pe(is-1:ie+1, npz+1, js-1:je+1)
156 real(kind=kind_real),
intent(inout) :: pe_ad(is-1:ie+1, npz+1, js-1:je+1)
157 real(kind=kind_real),
intent(in) :: pk(is:ie, js:je, npz+1)
158 real(kind=kind_real),
intent(inout) :: pk_ad(is:ie, js:je, npz+1)
159 real(kind=kind_real),
intent(in) :: peln(is:ie, npz+1, js:je)
160 real(kind=kind_real),
intent(inout) :: peln_ad(is:ie, npz+1, js:je)
161 real(kind=kind_real),
intent(in) :: pkz(is:ie, js:je, npz)
162 real(kind=kind_real),
intent(inout) :: pkz_ad(is:ie, js:je, npz)
164 real(kind=kind_real) :: temp_tj1, temp_ad1, temp_ad2
169 temp_tj1 =
kappa*(peln(i, k+1, j)-peln(i, k, j))
170 temp_ad1 = pkz_ad(i, j, k)/temp_tj1
171 temp_ad2 = -((pk(i, j, k+1)-pk(i, j, k))*
kappa*temp_ad1/temp_tj1)
172 pk_ad(i, j, k+1) = pk_ad(i, j, k+1) + temp_ad1
173 pk_ad(i, j, k) = pk_ad(i, j, k) - temp_ad1
174 peln_ad(i, k+1, j) = peln_ad(i, k+1, j) + temp_ad2
175 peln_ad(i, k, j) = peln_ad(i, k, j) - temp_ad2
176 pkz_ad(i, j, k) = 0.0
184 peln_ad(i, k, j) = peln_ad(i, k, j) + exp(
kappa*peln(i, k, j))*
kappa*pk_ad(i, j, k)
193 pe_ad(i, k, j) = pe_ad(i, k, j) + peln_ad(i, k, j)/pe(i, k, j)
194 peln_ad(i, k, j) = 0.0
202 pe_ad(i, k-1, j) = pe_ad(i, k-1, j) + pe_ad(i, k, j)
203 delp_ad(i, j, k-1) = delp_ad(i, j, k-1) + pe_ad(i, k, j)
219 real(kind=kind_real),
intent(in ) :: delp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
220 real(kind=kind_real),
intent(out) :: pe(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1)
221 real(kind=kind_real),
intent(out) :: p(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
222 real(kind=kind_real),
optional,
intent(out) :: logp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
225 integer :: isc,iec,jsc,jec,k
233 pe(isc:iec,jsc:jec,1) = geom%ptop
235 pe(isc:iec,jsc:jec,k) = pe(isc:iec,jsc:jec,k-1) + delp(isc:iec,jsc:jec,k-1)
239 p(isc:iec,jsc:jec,:) = 0.5*(pe(isc:iec,jsc:jec,2:geom%npz+1) + pe(isc:iec,jsc:jec,1:geom%npz))
241 if (
present(logp))
then 243 logp(isc:iec,jsc:jec,:) = log(p(isc:iec,jsc:jec,:))
254 real(kind=kind_real),
intent(in ) :: ps(geom%isc:geom%iec,geom%jsc:geom%jec )
255 real(kind=kind_real),
intent(inout) :: delp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
257 integer :: isc,iec,jsc,jec,i,j,k
267 delp(i,j,k) = geom%ak(k+1) + geom%bk(k+1)*ps(i,j) - (geom%ak(k) + geom%bk(k)*ps(i,j))
278 real(kind=kind_real),
intent(in ) :: ps_tl(geom%isc:geom%iec,geom%jsc:geom%jec )
279 real(kind=kind_real),
intent(inout) :: delp_tl(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
281 integer :: isc,iec,jsc,jec,i,j,k
288 delp_tl = 0.0_kind_real
292 delp_tl(i,j,k) = geom%bk(k+1)*ps_tl(i,j) - geom%bk(k)*ps_tl(i,j)
303 real(kind=kind_real),
intent(inout) :: ps_ad(geom%isc:geom%iec,geom%jsc:geom%jec )
304 real(kind=kind_real),
intent(inout) :: delp_ad(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
306 integer :: isc,iec,jsc,jec,i,j,k
313 ps_ad = 0.0_kind_real
318 ps_ad(i,j) = ps_ad(i,j) + (geom%bk(k+1) - geom%bk(k))*delp_ad(i,j,k)
real(kind=kind_real), parameter, public kappa
subroutine, public delp_to_pe_p_logp(geom, delp, pe, p, logp)
subroutine, public ps_to_delp(geom, ps, delp)
subroutine, public compute_fv3_pressures(is, ie, js, je, isd, ied, jsd, jed, npz, kappa, ptop, delp, pe, pk, pkz, peln)
Fortran derived type to hold geometry data for the FV3JEDI model.
subroutine, public compute_fv3_pressures_bwd(is, ie, js, je, isd, ied, jsd, jed, npz, kappa, ptop, delp, delp_ad, pe, pe_ad, pk, pk_ad, pkz, pkz_ad, peln, peln_ad)
subroutine, public ps_to_delp_tl(geom, ps_tl, delp_tl)
subroutine, public ps_to_delp_ad(geom, ps_ad, delp_ad)
Fortran module handling geometry for the FV3 model.
Variable transforms on pressure variables for fv3-jedi Daniel Holdaway, NASA/JCSDA.
integer, parameter, public kind_real
subroutine, public compute_fv3_pressures_tlm(is, ie, js, je, isd, ied, jsd, jed, npz, kappa, ptop, delp, delp_tl, pe, pe_tl, pk, pk_tl, pkz, pkz_tl, peln, peln_tl)