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

Code update for HR4_roughness, background diffusivity and shallow convection #119

Merged
merged 56 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c18c6d4
CCPP scheme simulator.
Jan 30, 2023
f9abb73
Fix file rename typo
Jan 30, 2023
ef0d369
Added MPI commands to ccpp_scheme_simulator
Jan 31, 2023
fd72b35
Work in progress...
Feb 3, 2023
ffd26ab
Some changes
Feb 6, 2023
112ac89
Some small cleanup
Feb 7, 2023
6a4c4b1
More OO changes. Will split into load_data and ccpp_scheme components…
Feb 9, 2023
be4cc2e
More OO changes
Feb 10, 2023
7001ef9
Split scheme into load and simulator components.
Feb 13, 2023
8bc8ec9
Small bug fix to nml
Feb 13, 2023
6db4af5
Remove dimension for tracer, handle tracers individualy, not with sta…
Feb 13, 2023
147cbac
Fixed bug in interpolation routine.
Feb 14, 2023
a296389
Moew changes
Feb 17, 2023
e49f1f6
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into ccpp…
Apr 5, 2023
a3933a5
CCPP scheme simulator
May 4, 2023
833b990
Merge branch 'ufs/dev-gf' into ufs-dev-PR64
grantfirl May 4, 2023
3ba2924
Merge branch 'main' into ufs-dev-PR64
grantfirl May 8, 2023
6e53907
Merge commit 'd474c2' into ufs-dev-PR26
grantfirl May 9, 2023
2515b27
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
May 30, 2023
5d49f79
Reorganization of scheme simulator. Now stateless.
Jun 1, 2023
d8a5b1f
Merge pull request #1015 from grantfirl/ufs-dev-PR64
grantfirl Jun 13, 2023
6f12331
Merge branch 'main' into ufs-dev-PR26
grantfirl Jun 13, 2023
4d69108
fix bug in scm_sfc_flux_spec.F90
grantfirl Jun 14, 2023
6cfaad5
Merge branch 'update_HR2' into ufs-dev-PR65
grantfirl Jun 26, 2023
93e0c8d
Merge commit '81e3f5e36' into ufs-dev-PR71
grantfirl Jun 26, 2023
bc94a0f
Merge remote-tracking branch 'joe-fork/mynn_snowfix' into ufs-dev-PR71
grantfirl Jun 26, 2023
92c8a9e
Merge pull request #1016 from grantfirl/ufs-dev-PR26
grantfirl Jun 29, 2023
c5566ab
Merge branch 'main' into ufs-dev-PR65
grantfirl Jun 29, 2023
ce731f2
Merge branch 'main' into ufs-dev-PR71
grantfirl Jun 29, 2023
12d4fc2
Working as expected!
Jul 7, 2023
6ceffe3
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Jul 7, 2023
9b77c4e
Merge pull request #1020 from grantfirl/ufs-dev-PR65
grantfirl Jul 7, 2023
9465b6f
Housekeeping
Jul 11, 2023
c61a2a6
GNU bug found in SCM CI
Jul 13, 2023
8e5646e
Some cleanup.
Jul 18, 2023
7e8cd3a
Merge branch 'main' into ufs-dev-PR71
grantfirl Jul 19, 2023
e3c00d3
Renamed scheme simulator suite simulator
Jul 19, 2023
2d6d44c
Omission from previous commit
Jul 19, 2023
5ab1a5b
Add ability to use constant forcing data when one-dimensional data is…
Jul 19, 2023
07a25fe
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Aug 1, 2023
215ba6d
Merge pull request #996 from dustinswales/ccpp_scheme_sim
dustinswales Aug 1, 2023
1e7542a
Merge branch 'main' into ufs-dev-PR71
grantfirl Aug 3, 2023
fa96015
Merge pull request #1021 from grantfirl/ufs-dev-PR71
grantfirl Aug 3, 2023
4e45989
Code update for HR4_roughness
Qingfu-Liu Oct 16, 2023
3debf89
Code update for HR4_roughness
Qingfu-Liu Oct 16, 2023
c2b1301
Code update for HR4_roughness
Qingfu-Liu Oct 16, 2023
2fc24ca
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Nov 28, 2023
91da6a0
Merge https://github.com/Qingfu-Liu/ccpp-physics into HR4_roughness
Qingfu-Liu Nov 28, 2023
562377c
remove files from old version
Qingfu-Liu Nov 28, 2023
12cd9c6
update files satmedmfvdifq.F samfshalcnv.f sfc_diff.f
Qingfu-Liu Nov 28, 2023
225848c
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Dec 1, 2023
d65507a
Fix CI 2
Qingfu-Liu Dec 14, 2023
fa9931a
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Jan 10, 2024
26ecb3d
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Jan 16, 2024
97e3b1c
update surface physics z0 from waves
Qingfu-Liu Jan 18, 2024
327fbaa
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Jan 26, 2024
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
13 changes: 10 additions & 3 deletions physics/GFS_MP_generic_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ subroutine GFS_MP_generic_post_run(
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, dfi_radar_max_intervals, &
dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d,dqdt_qmicro, lssav, num_dfi_radar, &
fh_dfi_radar,index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, prevsq, &
errmsg, errflg)
iopt_lake, iopt_lake_clm, lkm, use_lake_model, errmsg, errflg)
!
use machine, only: kind_phys
use calpreciptype_mod, only: calpreciptype
implicit none

integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac, num_dfi_radar, index_of_process_dfi_radar
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics_nssl
integer, intent(in) :: imp_physics_nssl, iopt_lake_clm, iopt_lake, lkm
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, cpllnd, progsigma, exticeden
integer, intent(in) :: index_of_temperature,index_of_process_mp
integer, intent(in) :: index_of_temperature,index_of_process_mp,use_lake_model(:)

integer :: dfi_radar_max_intervals
real(kind=kind_phys), intent(in) :: fh_dfi_radar(:), fhour
Expand Down Expand Up @@ -228,6 +228,13 @@ subroutine GFS_MP_generic_post_run(
dgraupelprv(:) = tem * graupelprv(:)
diceprv(:) = tem * iceprv(:)
end if
else if(lkm>0 .and. iopt_lake==iopt_lake_clm) then
do i=1,im
if(use_lake_model(i)>0) then
raincprv(i) = rainc(i)
rainncprv(i) = frain * rain1(i)
end if
end do
end if

if (cal_pre) then ! hchuang: add dominant precipitation type algorithm
Expand Down
28 changes: 28 additions & 0 deletions physics/GFS_MP_generic_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,34 @@
dimensions = ()
type = logical
intent = in
[lkm]
standard_name = control_for_lake_model_execution_method
long_name = control for lake model execution: 0=no lake, 1=lake, 2=lake+nsst
units = flag
dimensions = ()
type = integer
intent = in
[iopt_lake]
standard_name = control_for_lake_model_selection
long_name = control for lake model selection
units = 1
dimensions = ()
type = integer
intent = in
[iopt_lake_clm]
standard_name = clm_lake_model_control_selection_value
long_name = value that indicates clm lake model in the control for lake model selection
units = 1
dimensions = ()
type = integer
intent = in
[use_lake_model]
standard_name = flag_for_using_lake_model
long_name = flag indicating lake points using a lake model
units = flag
dimensions = (horizontal_loop_extent)
type = integer
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
32 changes: 29 additions & 3 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,22 @@ subroutine GFS_phys_time_vary_init (
zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, &
smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, &
slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, &
errmsg, errflg)
lkm, use_lake_model, lakefrac, lakedepth, iopt_lake, iopt_lake_clm, iopt_lake_flake, &
lakefrac_threshold, lakedepth_threshold, errmsg, errflg)

implicit none

! Interface variables
integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny, levs, iaermdl
logical, intent(in) :: h2o_phys, iaerclm, lsm_cold_start
integer, intent(in) :: idate(:)
real(kind_phys), intent(in) :: fhour
integer, intent(in) :: idate(:), iopt_lake, iopt_lake_clm, iopt_lake_flake
real(kind_phys), intent(in) :: fhour, lakefrac_threshold, lakedepth_threshold
real(kind_phys), intent(in) :: xlat_d(:), xlon_d(:)

integer, intent(in) :: lkm
integer, intent(inout) :: use_lake_model(:)
real(kind=kind_phys), intent(in ) :: lakefrac(:), lakedepth(:)

integer, intent(inout) :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:)
real(kind_phys), intent(inout) :: ddy_o3(:), ddy_h(:)
real(kind_phys), intent(in) :: ozpl(:,:,:), h2opl(:,:,:)
Expand Down Expand Up @@ -670,6 +675,27 @@ subroutine GFS_phys_time_vary_init (
endif noahmp_init
endif lsm_init

!Lake model
if(lkm>0 .and. iopt_lake>0) then
! A lake model is enabled.
do i = 1, im
!if (lakefrac(i) > 0.0 .and. lakedepth(i) > 1.0 ) then

! The lake data must say there's a lake here (lakefrac) with a depth (lakedepth)
if (lakefrac(i) > lakefrac_threshold .and. lakedepth(i) > lakedepth_threshold ) then
! This is a lake point. Inform the other schemes to use a lake model, and possibly nsst (lkm)
use_lake_model(i) = lkm
cycle
else
! Not a valid lake point.
use_lake_model(i) = 0
endif
enddo
else
! Lake model is disabled or settings are invalid.
use_lake_model = 0
endif

is_initialized = .true.

contains
Expand Down
67 changes: 67 additions & 0 deletions physics/GFS_phys_time_vary.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,73 @@
dimensions = ()
type = integer
intent = in
[lkm]
standard_name = control_for_lake_model_execution_method
long_name = control for lake model execution: 0=no lake, 1=lake, 2=lake+nsst
units = flag
dimensions = ()
type = integer
intent = in
[use_lake_model]
standard_name = flag_for_using_lake_model
long_name = flag indicating lake points using a lake model
units = flag
dimensions = (horizontal_dimension)
type = integer
intent = inout
[lakefrac]
standard_name = lake_area_fraction
long_name = fraction of horizontal grid area occupied by lake
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
[lakedepth]
standard_name = lake_depth
long_name = lake depth
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
[iopt_lake]
standard_name = control_for_lake_model_selection
long_name = control for lake model selection
units = 1
dimensions = ()
type = integer
intent = in
[iopt_lake_clm]
standard_name = clm_lake_model_control_selection_value
long_name = value that indicates clm lake model in the control for lake model selection
units = 1
dimensions = ()
type = integer
intent = in
[iopt_lake_flake]
standard_name = flake_model_control_selection_value
long_name = value that indicates flake model in the control for lake model selection
units = 1
dimensions = ()
type = integer
intent = in
[lakefrac_threshold]
standard_name = lakefrac_threshold_for_enabling_lake_model
long_name = fraction of horizontal grid area occupied by lake must be greater than this value to enable a lake model
units = frac
dimensions = ()
type = real
kind = kind_phys
intent = in
[lakedepth_threshold]
standard_name = lake_depth_threshold_for_enabling_lake_model
long_name = lake depth must be greater than this value to enable a lake model
units = m
dimensions = ()
type = real
kind = kind_phys
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
6 changes: 3 additions & 3 deletions physics/GFS_radiation_surface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ subroutine GFS_radiation_surface_run ( &
lsm_ruc, xlat, xlon, slmsk, lndp_type, n_var_lndp, sfc_alb_pert,&
lndp_var_list, lndp_prt_list, landfrac, snodl, snodi, sncovr, &
sncovr_ice, fice, zorl, hprime, tsfg, tsfa, tisfc, coszen, &
cplice, min_seaice, min_lakeice, lakefrac, use_flake, &
cplice, min_seaice, min_lakeice, lakefrac, use_lake_model, &
alvsf, alnsf, alvwf, alnwf, facsf, facwf, &
semis_lnd, semis_ice, semis_wat, snoalb, use_cice_alb, con_ttp, &
albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, &
Expand All @@ -69,7 +69,7 @@ subroutine GFS_radiation_surface_run ( &
logical, intent(in) :: frac_grid, lslwr, lsswr, use_cice_alb, cplice
integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc, lndp_type, n_var_lndp
real(kind=kind_phys), intent(in) :: min_seaice, min_lakeice, con_ttp
logical, dimension(:), intent(in) :: use_flake
integer, dimension(:), intent(in) :: use_lake_model

real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, slmsk, &
sfc_alb_pert, lndp_prt_list, &
Expand Down Expand Up @@ -154,7 +154,7 @@ subroutine GFS_radiation_surface_run ( &
!> - Call module_radiation_surface::setemis(),to set up surface
!! emissivity for LW radiation.
call setemis (lsm, lsm_noahmp, lsm_ruc, frac_grid, cplice, &
use_flake, lakefrac, xlon, xlat, slmsk, &
use_lake_model, lakefrac, xlon, xlat, slmsk, &
! frac_grid, min_seaice, xlon, xlat, slmsk, &
snodl, snodi, sncovr, sncovr_ice, zorl, tsfg, &
tsfa, hprime, semis_lnd, semis_ice, semis_wat,&
Expand Down
8 changes: 4 additions & 4 deletions physics/GFS_radiation_surface.meta
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@
type = real
kind = kind_phys
intent = in
[use_flake]
standard_name = flag_for_using_flake
long_name = flag indicating lake points using flake model
[use_lake_model]
standard_name = flag_for_using_lake_model
long_name = flag indicating lake points using a lake model
units = flag
dimensions = (horizontal_loop_extent)
type = logical
type = integer
intent = inout
[alvsf]
standard_name = vis_albedo_strong_cosz
Expand Down
8 changes: 5 additions & 3 deletions physics/GFS_surface_composites_inter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ module GFS_surface_composites_inter
!!
subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis_lnd, semis_ice, &
adjsfcdlw, gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat,&
adjsfcusw, adjsfcdsw, adjsfcnsw, errmsg, errflg)
adjsfcusw, adjsfcdsw, adjsfcnsw, use_lake_model, errmsg, errflg)

implicit none

! Interface variables
integer, intent(in ) :: im
logical, dimension(:), intent(in ) :: dry, icy, wet
logical, dimension(:), intent(in ) :: dry, icy
logical, dimension(:), intent(inout) :: wet
real(kind=kind_phys), dimension(:), intent(in ) :: semis_wat, semis_lnd, semis_ice, &
adjsfcdlw, adjsfcdsw, adjsfcnsw
real(kind=kind_phys), dimension(:), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat
real(kind=kind_phys), dimension(:), intent(out) :: adjsfcusw
integer, dimension(:), intent(in) :: use_lake_model

! CCPP error handling
character(len=*), intent(out) :: errmsg
Expand Down Expand Up @@ -68,4 +70,4 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis

end subroutine GFS_surface_composites_inter_run

end module GFS_surface_composites_inter
end module GFS_surface_composites_inter
11 changes: 9 additions & 2 deletions physics/GFS_surface_composites_inter.meta
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
units = flag
dimensions = (horizontal_loop_extent)
type = logical
intent = in
intent = inout
[semis_wat]
standard_name = surface_longwave_emissivity_over_water
long_name = surface lw emissivity in fraction over water
Expand Down Expand Up @@ -116,6 +116,13 @@
type = real
kind = kind_phys
intent = in
[use_lake_model]
standard_name = flag_for_using_lake_model
long_name = flag indicating lake points using a lake model
units = flag
dimensions = (horizontal_loop_extent)
type = integer
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand All @@ -130,4 +137,4 @@
units = 1
dimensions = ()
type = integer
intent = out
intent = out
Loading