@@ -98,8 +98,9 @@ end subroutine GFS_rrtmgp_pre_init
98
98
! !
99
99
subroutine GFS_rrtmgp_pre_run (nCol , nLev , nTracers , i_o3 , lsswr , lslwr , fhswr , fhlwr , &
100
100
xlat , xlon , prsl , tgrs , prslk , prsi , qgrs , tsfc , con_eps , con_epsm1 , con_fvirt , &
101
- con_epsqs , minGPpres , minGPtemp , raddt , p_lay , t_lay , p_lev , t_lev , tsfg , tsfa , &
102
- qs_lay , q_lay , tv_lay , relhum , tracer , gas_concentrations , errmsg , errflg )
101
+ con_epsqs , minGPpres , maxGPpres , minGPtemp , maxGPtemp , raddt , p_lay , t_lay , p_lev , &
102
+ t_lev , tsfg , tsfa , qs_lay , q_lay , tv_lay , relhum , tracer , gas_concentrations , &
103
+ tsfc_radtime , errmsg , errflg )
103
104
104
105
! Inputs
105
106
integer , intent (in ) :: &
@@ -112,7 +113,9 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, f
112
113
lslwr ! Call LW radiation
113
114
real (kind_phys), intent (in ) :: &
114
115
minGPtemp, & ! Minimum temperature allowed in RRTMGP.
116
+ maxGPtemp, & ! Maximum ...
115
117
minGPpres, & ! Minimum pressure allowed in RRTMGP.
118
+ maxGPpres, & ! Maximum pressure allowed in RRTMGP.
116
119
fhswr, & ! Frequency of SW radiation call.
117
120
fhlwr ! Frequency of LW radiation call.
118
121
real (kind_phys), intent (in ) :: &
@@ -142,7 +145,8 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, f
142
145
raddt ! Radiation time-step
143
146
real (kind_phys), dimension (ncol), intent (inout ) :: &
144
147
tsfg, & ! Ground temperature
145
- tsfa ! Skin temperature
148
+ tsfa, & ! Skin temperature
149
+ tsfc_radtime ! Surface temperature at radiation timestep
146
150
real (kind_phys), dimension (nCol,nLev), intent (inout ) :: &
147
151
p_lay, & ! Pressure at model-layer
148
152
t_lay, & ! Temperature at model layer
@@ -202,18 +206,31 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, f
202
206
! Temperature at layer-center
203
207
t_lay(1 :NCOL,:) = tgrs(1 :NCOL,:)
204
208
205
- ! Bound temperature at layer centers.
209
+ ! Bound temperature/pressure at layer centers.
206
210
do iCol= 1 ,NCOL
207
211
do iLay= 1 ,nLev
208
212
if (t_lay(iCol,iLay) .le. minGPtemp) then
209
213
t_lay(iCol,iLay) = minGPtemp + epsilon (minGPtemp)
210
214
endif
215
+ if (p_lay(iCol,iLay) .le. minGPpres) then
216
+ p_lay(iCol,iLay) = minGPpres + epsilon (minGPpres)
217
+ endif
218
+ if (t_lay(iCol,iLay) .ge. maxGPtemp) then
219
+ t_lay(iCol,iLay) = maxGPtemp - epsilon (maxGPtemp)
220
+ endif
221
+ if (p_lay(iCol,iLay) .ge. maxGPpres) then
222
+ p_lay(iCol,iLay) = maxGPpres - epsilon (maxGPpres)
223
+ endif
211
224
enddo
212
225
enddo
213
226
214
227
! Temperature at layer-interfaces
215
228
call cmp_tlev(nCol,nLev,minGPpres,p_lay,t_lay,p_lev,tsfc,t_lev)
216
229
230
+ ! Save surface temperature at radiation time-step, used for LW flux adjustment betwen
231
+ ! radiation calls.
232
+ tsfc_radtime = tsfc
233
+
217
234
! Compute a bunch of thermodynamic fields needed by the cloud microphysics schemes.
218
235
! Relative humidity, saturation mixing-ratio, vapor mixing-ratio, virtual temperature,
219
236
! layer thickness,...
0 commit comments