Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fractional landmask changes in GFS physics #244

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 37 additions & 12 deletions physics/GFS_PBL_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,43 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,

! --- ... coupling insertion

if (cplflx) then
do i=1,im
dusfc_cpl (i) = dusfc_cpl(i) + dusfc1(i)*dtf
dvsfc_cpl (i) = dvsfc_cpl(i) + dvsfc1(i)*dtf
dtsfc_cpl (i) = dtsfc_cpl(i) + dtsfc1(i)*dtf
dqsfc_cpl (i) = dqsfc_cpl(i) + dqsfc1(i)*dtf
dusfci_cpl(i) = dusfc1(i)
dvsfci_cpl(i) = dvsfc1(i)
dtsfci_cpl(i) = dtsfc1(i)
dqsfci_cpl(i) = dqsfc1(i)
enddo
endif
! ### GJF ### the following section needs to be made CCPP-compliant when cplflx = T
! if (cplflx) then
! do i=1,im
! if (ocean(i)) then ! Ocean only, NO LAKES
! if (flag_cice(i)) cice(i) = fice_cice(i)
! if (cice(i) == 1.) then ! use results from CICE
! Coupling%dusfci_cpl(i) = dusfc_cice(i)
! Coupling%dvsfci_cpl(i) = dvsfc_cice(i)
! Coupling%dtsfci_cpl(i) = dtsfc_cice(i)
! Coupling%dqsfci_cpl(i) = dqsfc_cice(i)
! elseif (dry(i) .or. icy(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point
! tem1 = max(Diag%q1(i), 1.e-8)
! rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(1.0+con_fvirt*tem1))
! if (wind(i) > 0.) then
! Coupling%dusfci_cpl(i) = -rho * stress_ocean(i) * Statein%ugrs(i,1) / wind(i) ! U-momentum flux
! Coupling%dvsfci_cpl(i) = -rho * stress_ocean(i) * Statein%vgrs(i,1) / wind(i) ! V-momentum flux
! else
! Coupling%dusfci_cpl(i) = 0.
! Coupling%dvsfci_cpl(i) = 0.
! end if
! Coupling%dtsfci_cpl(i) = con_cp * rho * hflx_ocean(i) !sensible heat flux over open ocean
! Coupling%dqsfci_cpl(i) = con_hvap * rho * evap_ocean(i) ! latent heat flux over open ocean
! else ! use results from PBL scheme for 100% open ocean
! Coupling%dusfci_cpl(i) = dusfc1(i)
! Coupling%dvsfci_cpl(i) = dvsfc1(i)
! Coupling%dtsfci_cpl(i) = dtsfc1(i)
! Coupling%dqsfci_cpl(i) = dqsfc1(i)
! endif
!
! Coupling%dusfc_cpl (i) = Coupling%dusfc_cpl(i) + Coupling%dusfci_cpl(i) * dtf
! Coupling%dvsfc_cpl (i) = Coupling%dvsfc_cpl(i) + Coupling%dvsfci_cpl(i) * dtf
! Coupling%dtsfc_cpl (i) = Coupling%dtsfc_cpl(i) + Coupling%dtsfci_cpl(i) * dtf
! Coupling%dqsfc_cpl (i) = Coupling%dqsfc_cpl(i) + Coupling%dqsfci_cpl(i) * dtf
! !
! endif ! Ocean only, NO LAKES
! enddo
! endif
!-------------------------------------------------------lssav if loop ----------
if (lssav) then
do i=1,im
Expand Down
8 changes: 7 additions & 1 deletion physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,17 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
if (mpirank==impi .and. omprank==iomp) then
! Sfcprop
call print_var(mpirank,omprank, blkno, 'Sfcprop%slmsk' , Sfcprop%slmsk)
call print_var(mpirank,omprank, blkno, 'Sfcprop%lakemsk' , Sfcprop%lakemsk)
call print_var(mpirank,omprank, blkno, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac)
call print_var(mpirank,omprank, blkno, 'Sfcprop%landfrac' , Sfcprop%landfrac)
call print_var(mpirank,omprank, blkno, 'Sfcprop%lakefrac' , Sfcprop%lakefrac)
call print_var(mpirank,omprank, blkno, 'Sfcprop%tsfc' , Sfcprop%tsfc)
call print_var(mpirank,omprank, blkno, 'Sfcprop%tsfco' , Sfcprop%tsfco)
call print_var(mpirank,omprank, blkno, 'Sfcprop%tsfcl' , Sfcprop%tsfcl)
call print_var(mpirank,omprank, blkno, 'Sfcprop%tisfc' , Sfcprop%tisfc)
call print_var(mpirank,omprank, blkno, 'Sfcprop%snowd' , Sfcprop%snowd)
call print_var(mpirank,omprank, blkno, 'Sfcprop%zorl' , Sfcprop%zorl)
call print_var(mpirank,omprank, blkno, 'Sfcprop%zorlo' , Sfcprop%zorlo)
call print_var(mpirank,omprank, blkno, 'Sfcprop%zorll' , Sfcprop%zorll)
call print_var(mpirank,omprank, blkno, 'Sfcprop%fice' , Sfcprop%fice)
call print_var(mpirank,omprank, blkno, 'Sfcprop%hprim' , Sfcprop%hprim)
call print_var(mpirank,omprank, blkno, 'Sfcprop%hprime' , Sfcprop%hprime)
Expand Down
12 changes: 10 additions & 2 deletions physics/GFS_suite_interstitial.F90
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ end subroutine GFS_suite_interstitial_1_finalize
!! | rhbtop | critical_relative_humidity_at_top_of_atmosphere | critical relative humidity at the top of atmosphere | frac | 0 | real | kind_phys | out | F |
!! | frain | dynamics_to_physics_timestep_ratio | ratio of dynamics timestep to physics timestep | none | 0 | real | kind_phys | out | F |
!! | islmsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | out | F |
!! | frland | land_area_fraction | land area fraction | frac | 1 | real | kind_phys | out | F |
!! | frland | land_area_fraction_for_microphysics | land area fraction used in microphysics schemes | frac | 1 | real | kind_phys | out | F |
!! | work1 | grid_size_related_coefficient_used_in_scale-sensitive_schemes | grid size related coefficient used in scale-sensitive schemes | none | 1 | real | kind_phys | out | F |
!! | work2 | grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement | complement to work1 | none | 1 | real | kind_phys | out | F |
!! | psurf | surface_air_pressure_diag | surface air pressure diagnostic | Pa | 1 | real | kind_phys | out | F |
Expand All @@ -117,11 +117,14 @@ end subroutine GFS_suite_interstitial_1_finalize
!! | dtdt | tendency_of_air_temperature_due_to_model_physics | updated tendency of the temperature | K s-1 | 2 | real | kind_phys | out | F |
!! | dtdtc | tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky | clear sky radiative (shortwave + longwave) heating rate at current time | K s-1 | 2 | real | kind_phys | out | F |
!! | dqdt | tendency_of_tracers_due_to_model_physics | updated tendency of the tracers | kg kg-1 s-1 | 3 | real | kind_phys | out | F |
!! | tisfc | sea_ice_temperature | sea ice surface skin temperature | K | 1 | real | kind_phys | in | F |
!! | tice | sea_ice_temperature_interstitial | sea ice surface skin temperature use as interstitial | K | 1 | real | kind_phys | out | F |
!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F |
!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F |
!!
subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, crtrh, dtf, dtp, slmsk, area, dxmin, dxinv, pgr, &
rhbbot, rhpbl, rhbtop, frain, islmsk, frland, work1, work2, psurf, dudt, dvdt, dtdt, dtdtc, dqdt, errmsg, errflg)
rhbbot, rhpbl, rhbtop, frain, islmsk, frland, work1, work2, psurf, dudt, dvdt, dtdt, dtdtc, dqdt, &
tisfc, tice, errmsg, errflg)

use machine, only: kind_phys

Expand All @@ -138,6 +141,8 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, crtrh, dtf, dtp, slmsk
real(kind=kind_phys), intent(out), dimension(im) :: frland, work1, work2, psurf
real(kind=kind_phys), intent(out), dimension(im,levs) :: dudt, dvdt, dtdt, dtdtc
real(kind=kind_phys), intent(out), dimension(im,levs,ntrac) :: dqdt
real(kind=kind_phys), intent(in), dimension(im) :: tisfc
real(kind=kind_phys), intent(out), dimension(im) :: tice
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand Down Expand Up @@ -165,6 +170,9 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, crtrh, dtf, dtp, slmsk
work1(i) = max(0.0, min(1.0,work1(i)))
work2(i) = 1.0 - work1(i)
psurf(i) = pgr(i)
! DH* 20190507 - assign sea ice temperature to interstitial variable
tice(i) = tisfc(i)
! *DH
end do

do k=1,levs
Expand Down
Loading