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

Chsp physics update, global latlon grid, post changes and CCN-IN followup bugfix #104

Merged
merged 20 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6416bca
point to ccpp branch chsp_latlon_post
junwang-noaa Apr 17, 2020
77e08fc
add chsp code changes from Jongil
junwang-noaa Apr 17, 2020
8e1a061
add landsfcmdl variable to model sfc history file meta data
junwang-noaa Apr 17, 2020
c39ce10
add global latlon grid on write grid component, code changes from Jef…
junwang-noaa Apr 17, 2020
8da1f47
add chsp code changes in ccpp-physics
junwang-noaa Apr 18, 2020
146171c
remove support for legacy Intel compilers in CCPP gmake build
junwang-noaa Apr 18, 2020
642a96a
fix syntax error
junwang-noaa Apr 20, 2020
85691b2
fix syntax error
junwang-noaa Apr 20, 2020
2eca23f
update ccpp physics, fix syntax error
junwang-noaa Apr 20, 2020
556c882
update sflx.f in ccpp physics
junwang-noaa Apr 21, 2020
1d2ff50
CCN-IN followup bugfix
junwang-noaa Apr 21, 2020
af3836f
Bugfix for GNU compiler in io/module_wrt_grid_comp.F90; bugfix in gfs…
climbfuji Apr 21, 2020
df9ea91
Merge pull request #2 from climbfuji/chsp_latlon_post_dom_ccpp_mods
junwang-noaa Apr 22, 2020
42fd5f9
merge fv3 dycore ccpp framework and physics to the latest repoes
junwang-noaa Apr 24, 2020
389db45
Merge remote-tracking branch 'upstream/develop' into chsp_latlon_post
junwang-noaa Apr 24, 2020
8ea431d
cmeps integration changes
junwang-noaa Apr 24, 2020
e32c3bf
update CCPP with tsfcl change
junwang-noaa Apr 24, 2020
173b86f
fix timestr in module_cap_cpl.F90
junwang-noaa Apr 25, 2020
1a9f0ad
fix syntax error in ugwp_driver_v0.F
junwang-noaa Apr 25, 2020
827a276
point ccpp/physics back to NCAR master
junwang-noaa Apr 28, 2020
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
branch = master
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = master
url = https://github.com/junwang-noaa/ccpp-physics
branch = chsp_latlon_post
12 changes: 3 additions & 9 deletions ccpp/build_ccpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function usage {
echo " SUITES=ABC,XYZ (comma-separated list of CCPP suites; "
echo " corresponding filenames: suite_ABC.xml. ...)"
echo " MULTI_GASES=Y/N (default N)"
echo " INTEL16=Y/N (default N)"
echo " clean_before [optional] can be 'YES' (default) or 'NO'"
echo " clean_after [optional] can be 'YES' (default) or 'NO'"
exit 1
Expand Down Expand Up @@ -129,14 +128,9 @@ if [[ "${MAKE_OPT}" == *"MULTI_GASES=Y"* ]]; then
else
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DMULTI_GASES=OFF"
fi
if [[ "${MAKE_OPT}" == *"INTEL16=Y"* ]]; then
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=ON"
elif [[ "${MACHINE_ID}" == "wcoss_cray" ]]; then
echo "In ccpp_build.sh: flag to cmake that wcoss_cray uses Intel 16"
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=ON"
else
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=OFF"
fi

# Flag to cmake that modern Intel compilers are used
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DLEGACY_INTEL=OFF"

# Generate additional CCPP cmake flags depending on machine / compiler
if [[ "${MACHINE_ID}" == "macosx.gnu" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion fv3_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
write_nemsioflip =.false.
write_fsyncflag =.false.

if(trim(output_grid) == 'gaussian_grid') then
if(trim(output_grid) == 'gaussian_grid' .or. trim(output_grid) == 'global_latlon') then
call ESMF_ConfigGetAttribute(config=CF, value=imo, label ='imo:',rc=rc)
call ESMF_ConfigGetAttribute(config=CF, value=jmo, label ='jmo:',rc=rc)
call ESMF_ConfigGetAttribute(config=CF, value=write_nemsioflip, label ='write_nemsioflip:',rc=rc)
Expand Down
120 changes: 77 additions & 43 deletions gfsphysics/GFS_layer/GFS_physics_driver.F90

Large diffs are not rendered by default.

65 changes: 48 additions & 17 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module GFS_typedefs

character(len=32), pointer :: tracer_names(:) !< tracers names to dereference tracer id
!< based on name location in array
character(len=65) :: fn_nml !< namelist filename
character(len=64) :: fn_nml !< namelist filename
character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist
!< for use with internal file reads
end type GFS_init_type
Expand Down Expand Up @@ -970,7 +970,7 @@ module GFS_typedefs
!< 6=areodynamical roughness over water with input 10-m wind
!< 7=slightly decrease Cd for higher wind speed compare to 6

!--- background vertical diffusion
!--- vertical diffusion
real(kind=kind_phys) :: xkzm_m !< [in] bkgd_vdif_m background vertical diffusion for momentum
real(kind=kind_phys) :: xkzm_h !< [in] bkgd_vdif_h background vertical diffusion for heat q
real(kind=kind_phys) :: xkzm_s !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion
Expand All @@ -980,7 +980,13 @@ module GFS_typedefs
real(kind=kind_phys) :: bl_upfr !< updraft fraction in boundary layer mass flux scheme
real(kind=kind_phys) :: bl_dnfr !< downdraft fraction in boundary layer mass flux scheme

!---cellular automata control parameters
!--- parameters for canopy heat storage (CHS) parameterization
real(kind=kind_phys) :: z0fac !< surface roughness fraction factor
real(kind=kind_phys) :: e0fac !< latent heat flux fraction factor relative to sensible heat flux
!< e.g., e0fac=0.5 indicates that CHS for latent heat flux is 50% of that for
!< sensible heat flux

!---cellular automata control parameters
integer :: nca !< number of independent cellular automata
integer :: nlives !< cellular automata lifetime
integer :: ncells !< cellular automata finer grid
Expand Down Expand Up @@ -1688,6 +1694,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: ep1d_land(:) => null() !<
real (kind=kind_phys), pointer :: ep1d_ocean(:) => null() !<
real (kind=kind_phys), pointer :: evap(:) => null() !<
real (kind=kind_phys), pointer :: evapq(:) => null() !<
real (kind=kind_phys), pointer :: evap_ice(:) => null() !<
real (kind=kind_phys), pointer :: evap_land(:) => null() !<
real (kind=kind_phys), pointer :: evap_ocean(:) => null() !<
Expand Down Expand Up @@ -1733,7 +1740,10 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !<
integer :: h2o_coeff !<
real (kind=kind_phys), pointer :: h2o_pres(:) => null() !<
real (kind=kind_phys), pointer :: hefac(:) => null() !<
real (kind=kind_phys), pointer :: hffac(:) => null() !<
real (kind=kind_phys), pointer :: hflx(:) => null() !<
real (kind=kind_phys), pointer :: hflxq(:) => null() !<
real (kind=kind_phys), pointer :: hflx_ice(:) => null() !<
real (kind=kind_phys), pointer :: hflx_land(:) => null() !<
real (kind=kind_phys), pointer :: hflx_ocean(:) => null() !<
Expand Down Expand Up @@ -3149,17 +3159,20 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!< 7=slightly decrease Cd for higher wind speed compare to 6
!< negative when cplwav2atm=.true. - i.e. two way wave coupling

!--- background vertical diffusion
!--- vertical diffusion
real(kind=kind_phys) :: xkzm_m = 1.0d0 !< [in] bkgd_vdif_m background vertical diffusion for momentum
real(kind=kind_phys) :: xkzm_h = 1.0d0 !< [in] bkgd_vdif_h background vertical diffusion for heat q
real(kind=kind_phys) :: xkzm_s = 1.0d0 !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion
real(kind=kind_phys) :: xkzminv = 0.3 !< diffusivity in inversion layers
real(kind=kind_phys) :: moninq_fac = 1.0 !< turbulence diffusion coefficient factor
real(kind=kind_phys) :: dspfac = 1.0 !< tke dissipative heating factor

real(kind=kind_phys) :: bl_upfr = 0.13 !< updraft fraction in boundary layer mass flux scheme
real(kind=kind_phys) :: bl_dnfr = 0.1 !< downdraft fraction in boundary layer mass flux scheme

!--- parameters for canopy heat storage (CHS) parameterization
real(kind=kind_phys) :: z0fac = 0.3
real(kind=kind_phys) :: e0fac = 0.5


!---Cellular automaton options
integer :: nca = 1
Expand Down Expand Up @@ -3291,9 +3304,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
frac_grid_off, ignore_lake, &
!--- surface layer
sfc_z0_type, &
! background vertical diffusion
! vertical diffusion
xkzm_m, xkzm_h, xkzm_s, xkzminv, moninq_fac, dspfac, &
bl_upfr, bl_dnfr, &
!--- canopy heat storage parameterization
z0fac, e0fac, &
!--- cellular automata
nca, ncells, nlives, nfracseed,nseed, nthresh, do_ca, &
ca_sgs, ca_global,iseed_ca,ca_smooth,isppt_deep,nspinup, &
Expand Down Expand Up @@ -3452,6 +3467,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%ialb = ialb
Model%iems = iems
Model%iaer = iaer
Model%iaerclm = iaerclm
if (iaer/1000 == 1 .or. Model%iccn == 2) then
Model%iaerclm = .true.
ntrcaer = ntrcaerm
Expand Down Expand Up @@ -3757,7 +3773,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%sfc_z0_type = sfc_z0_type
if (Model%cplwav2atm) Model%sfc_z0_type = -1

!--- backgroud vertical diffusion
!--- vertical diffusion
Model%xkzm_m = xkzm_m
Model%xkzm_h = xkzm_h
Model%xkzm_s = xkzm_s
Expand All @@ -3767,6 +3783,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%bl_upfr = bl_upfr
Model%bl_dnfr = bl_dnfr

!--- canopy heat storage parametrization
Model%z0fac = z0fac
Model%e0fac = e0fac

!--- stochastic physics options
! do_sppt, do_shum, do_skeb and do_sfcperts are namelist variables in group
! physics that are parsed here and then compared in init_stochastic_physics
Expand Down Expand Up @@ -3808,6 +3828,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%iau_drymassfixer = iau_drymassfixer
if(Model%me==0) print *,' model init,iaufhrs=',Model%iaufhrs

!--- debug flag
Model%debug = debug
Model%pre_rad = pre_rad

!--- tracer handling
Model%ntrac = size(tracer_names)
#ifdef CCPP
Expand Down Expand Up @@ -3927,10 +3951,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%ncnvcld3d = ncnvcld3d
Model%nctp = nctp

!--- debug flag
Model%debug = debug
Model%pre_rad = pre_rad

!--- set initial values for time varying properties
Model%ipt = 1
Model%lprnt = .false.
Expand Down Expand Up @@ -3969,11 +3989,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf
!--- ak/bk have been flipped from their original FV3 orientation and are defined sfc -> toa
Model%si = (ak + bk * con_p0 - ak(Model%levr+1)) / (con_p0 - ak(Model%levr+1))

if (Model%lsm == Model%lsm_noahmp) then
Model%yearlen = 365
Model%julian = -9999.
endif
#endif

#ifndef CCPP
Expand Down Expand Up @@ -4795,7 +4810,7 @@ subroutine control_print(Model)
print *, 'surface layer options'
print *, ' sfc_z0_type : ', Model%sfc_z0_type
print *, ' '
print *, 'background vertical diffusion coefficients'
print *, 'vertical diffusion coefficients'
print *, ' xkzm_m : ', Model%xkzm_m
print *, ' xkzm_h : ', Model%xkzm_h
print *, ' xkzm_s : ', Model%xkzm_s
Expand All @@ -4805,6 +4820,10 @@ subroutine control_print(Model)
print *, ' bl_upfr : ', Model%bl_upfr
print *, ' bl_dnfr : ', Model%bl_dnfr
print *, ' '
print *, 'parameters for canopy heat storage parametrization'
print *, ' z0fac : ', Model%z0fac
print *, ' e0fac : ', Model%e0fac
print *, ' '
print *, 'stochastic physics'
print *, ' do_sppt : ', Model%do_sppt
print *, ' do_shum : ', Model%do_shum
Expand Down Expand Up @@ -5933,6 +5952,7 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%ep1d_land (IM))
allocate (Interstitial%ep1d_ocean (IM))
allocate (Interstitial%evap (IM))
allocate (Interstitial%evapq (IM))
allocate (Interstitial%evap_ice (IM))
allocate (Interstitial%evap_land (IM))
allocate (Interstitial%evap_ocean (IM))
Expand Down Expand Up @@ -5975,7 +5995,10 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%gwdcu (IM,Model%levs))
allocate (Interstitial%gwdcv (IM,Model%levs))
allocate (Interstitial%h2o_pres (levh2o))
allocate (Interstitial%hefac (IM))
allocate (Interstitial%hffac (IM))
allocate (Interstitial%hflx (IM))
allocate (Interstitial%hflxq (IM))
allocate (Interstitial%hflx_ice (IM))
allocate (Interstitial%hflx_land (IM))
allocate (Interstitial%hflx_ocean (IM))
Expand Down Expand Up @@ -6573,6 +6596,7 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%ep1d_land = huge
Interstitial%ep1d_ocean = huge
Interstitial%evap = clear_val
Interstitial%evapq = clear_val
Interstitial%evap_ice = huge
Interstitial%evap_land = huge
Interstitial%evap_ocean = huge
Expand Down Expand Up @@ -6611,7 +6635,10 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%gflx_ocean = clear_val
Interstitial%gwdcu = clear_val
Interstitial%gwdcv = clear_val
Interstitial%hefac = clear_val
Interstitial%hffac = clear_val
Interstitial%hflx = clear_val
Interstitial%hflxq = clear_val
Interstitial%hflx_ice = huge
Interstitial%hflx_land = huge
Interstitial%hflx_ocean = huge
Expand Down Expand Up @@ -6884,6 +6911,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%ep1d_land ) = ', sum(Interstitial%ep1d_land )
write (0,*) 'sum(Interstitial%ep1d_ocean ) = ', sum(Interstitial%ep1d_ocean )
write (0,*) 'sum(Interstitial%evap ) = ', sum(Interstitial%evap )
write (0,*) 'sum(Interstitial%evapq ) = ', sum(Interstitial%evapq )
write (0,*) 'sum(Interstitial%evap_ice ) = ', sum(Interstitial%evap_ice )
write (0,*) 'sum(Interstitial%evap_land ) = ', sum(Interstitial%evap_land )
write (0,*) 'sum(Interstitial%evap_ocean ) = ', sum(Interstitial%evap_ocean )
Expand Down Expand Up @@ -6926,7 +6954,10 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%gflx_ocean ) = ', sum(Interstitial%gflx_ocean )
write (0,*) 'sum(Interstitial%gwdcu ) = ', sum(Interstitial%gwdcu )
write (0,*) 'sum(Interstitial%gwdcv ) = ', sum(Interstitial%gwdcv )
write (0,*) 'sum(Interstitial%hefac ) = ', sum(Interstitial%hefac )
write (0,*) 'sum(Interstitial%hffac ) = ', sum(Interstitial%hffac )
write (0,*) 'sum(Interstitial%hflx ) = ', sum(Interstitial%hflx )
write (0,*) 'sum(Interstitial%hflxq ) = ', sum(Interstitial%hflxq )
write (0,*) 'sum(Interstitial%hflx_ice ) = ', sum(Interstitial%hflx_ice )
write (0,*) 'sum(Interstitial%hflx_land ) = ', sum(Interstitial%hflx_land )
write (0,*) 'sum(Interstitial%hflx_ocean ) = ', sum(Interstitial%hflx_ocean )
Expand Down
42 changes: 42 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3438,6 +3438,20 @@
dimensions = ()
type = real
kind = kind_phys
[z0fac]
standard_name = surface_roughness_fraction_factor
long_name = surface roughness fraction for canopy heat storage parameterization
units = none
dimensions = ()
type = real
kind = kind_phys
[e0fac]
standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux
long_name = latent heat flux fraction relative to sensible heat flux for canopy heat storage parameterization
units = none
dimensions = ()
type = real
kind = kind_phys
[nca]
standard_name = number_of_independent_cellular_automata
long_name = number of independent cellular automata
Expand Down Expand Up @@ -6751,6 +6765,13 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[evapq]
standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness
long_name = kinematic surface upward latent heat flux reduced by surface roughness
units = kg kg-1 m s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[evap_ocean]
standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean
long_name = kinematic surface upward latent heat flux over ocean
Expand Down Expand Up @@ -7167,13 +7188,34 @@
dimensions = (vertical_dimension_of_h2o_forcing_data)
type = real
kind = kind_phys
[hefac]
standard_name = surface_upward_latent_heat_flux_reduction_factor
long_name = surface upward latent heat flux reduction factor from canopy heat storage
units = none
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[hffac]
standard_name = surface_upward_sensible_heat_flux_reduction_factor
long_name = surface upward sensible heat flux reduction factor from canopy heat storage
units = none
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[hflx]
standard_name = kinematic_surface_upward_sensible_heat_flux
long_name = kinematic surface upward sensible heat flux
units = K m s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[hflxq]
standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness
long_name = kinematic surface upward sensible heat flux reduced by surface roughness
units = K m s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[hflx_ocean]
standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean
long_name = kinematic surface upward sensible heat flux over ocean
Expand Down
Loading