-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added bounding to temperature at layer-interface used by RRTMGP.
- Loading branch information
1 parent
2cf6a38
commit 4407989
Showing
1 changed file
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,7 +180,7 @@ subroutine GFS_rrtmgp_pre_run(me, nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhsw | |
gas_concentrations ! RRTMGP DDT: gas volumne mixing ratios | ||
|
||
! Local variables | ||
integer :: i, j, iCol, iBand, iLay | ||
integer :: i, j, iCol, iBand, iLay, iLev, iSFC_ilev | ||
real(kind_phys),dimension(nCol,nLev) :: vmr_o3, vmr_h2o | ||
real(kind_phys) :: es, tem1, tem2, pfac | ||
real(kind_phys), dimension(nLev+1) :: hgtb | ||
|
@@ -202,9 +202,11 @@ subroutine GFS_rrtmgp_pre_run(me, nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhsw | |
if (top_at_1) then | ||
iSFC = nLev | ||
iTOA = 1 | ||
iSFC_ilev = iSFC + 1 | ||
else | ||
iSFC = 1 | ||
iTOA = nLev | ||
iSFC_ilev = 1 | ||
endif | ||
|
||
! ####################################################################################### | ||
|
@@ -244,6 +246,12 @@ subroutine GFS_rrtmgp_pre_run(me, nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhsw | |
|
||
! Temperature at layer-interfaces | ||
call cmp_tlev(nCol,nLev,minGPpres,p_lay,t_lay,p_lev,tsfc,t_lev) | ||
do iCol=1,nCol | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
climbfuji
Collaborator
|
||
do iLev=1,nLev+1 | ||
if (t_lev(iCol,iLev) .le. minGPtemp) t_lev(iCol,iLev) = minGPtemp + epsilon(minGPtemp) | ||
if (t_lev(iCol,iLev) .ge. maxGPtemp) t_lev(iCol,iLev) = maxGPtemp - epsilon(maxGPtemp) | ||
enddo | ||
enddo | ||
|
||
! Save surface temperature at radiation time-step, used for LW flux adjustment betwen | ||
! radiation calls. | ||
|
@@ -361,7 +369,7 @@ subroutine GFS_rrtmgp_pre_run(me, nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhsw | |
! ####################################################################################### | ||
! Setup surface ground temperature and ground/air skin temperature if required. | ||
! ####################################################################################### | ||
tsfg(1:NCOL) = tsfc(1:NCOL) | ||
tsfg(1:NCOL) = t_lev(1:NCOL,iSFC_ilev) | ||
tsfa(1:NCOL) = t_lay(1:NCOL,iSFC) | ||
|
||
! ####################################################################################### | ||
|
FORTRAN arrays are stored in column-major order. So it should be:
do iLev=1,nlev+1
do iCol=1,nCol
....
end do
end do