Skip to content

Commit 4f2a977

Browse files
committed
Merge branch 'ufs/dev' into feature/rad-fix
2 parents 8a96ec2 + db19a6d commit 4f2a977

File tree

12 files changed

+388
-93
lines changed

12 files changed

+388
-93
lines changed

physics/CONV/Grell_Freitas/cu_gf_driver.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ end subroutine cu_gf_driver_init
5656
!! \htmlinclude cu_gf_driver_run.html
5757
!!
5858
!>\section gen_gf_driver Grell-Freitas Cumulus Scheme Driver General Algorithm
59-
subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
59+
subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_coldstart, &
6060
cactiv,cactiv_m,g,cp,xlv,r_v,forcet,forceqv_spechum,phil,raincv, &
6161
qv_spechum,t,cld1d,us,vs,t2di,w,qv2di_spechum,p2di,psuri, &
6262
hbot,htop,kcnv,xland,hfx2,qfx2,aod_gf,cliw,clcw, &
@@ -97,7 +97,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
9797
integer :: its,ite, jts,jte, kts,kte
9898
integer, intent(in ) :: im,km,ntracer,nchem,kdt
9999
integer, intent(in ) :: ichoice_in,ichoicem_in,ichoice_s_in
100-
logical, intent(in ) :: flag_init, flag_restart, do_mynnedmf
100+
logical, intent(in ) :: flag_init, flag_restart, do_mynnedmf, gf_coldstart
101101
logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend
102102
real (kind=kind_phys), intent(in) :: g,cp,xlv,r_v
103103
logical, intent(in ) :: ldiag3d
@@ -431,7 +431,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
431431
ccn_m(i) = 0.
432432

433433
! set aod and ccn
434-
if (flag_init .and. .not.flag_restart) then
434+
if ((flag_init .and. .not.flag_restart) .or. gf_coldstart) then
435435
aod_gf(i)=aodc0
436436
else
437437
if((cactiv(i).eq.0) .and. (cactiv_m(i).eq.0))then

physics/CONV/Grell_Freitas/cu_gf_driver.meta

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,13 @@
588588
dimensions = ()
589589
type = logical
590590
intent = in
591+
[gf_coldstart]
592+
standard_name = flag_for_cold_start_gf
593+
long_name = flag to cold start G-F
594+
units = flag
595+
dimensions = ()
596+
type = logical
597+
intent = in
591598
[ichoice_in]
592599
standard_name = identifier_for_c3_or_gf_deep_convection_closure
593600
long_name = flag for C3 or GF deep convection closure

physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module cu_gf_driver_pre
1515
!> \section arg_table_cu_gf_driver_pre_run Argument Table
1616
!! \htmlinclude cu_gf_driver_pre_run.html
1717
!!
18-
subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q, prevst, prevsq, &
18+
subroutine cu_gf_driver_pre_run (flag_init, flag_restart, gf_coldstart, kdt, fhour, dtp, t, q, prevst, prevsq, &
1919
forcet, forceq, cactiv, cactiv_m, conv_act, conv_act_m, &
2020
rrfs_sd, ntsmoke, ntdust, ntcoarsepm, chem3d, gq0, &
2121
errmsg, errflg)
@@ -26,6 +26,7 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q,
2626

2727
logical, intent(in) :: flag_init
2828
logical, intent(in) :: flag_restart
29+
logical, intent(in) :: gf_coldstart
2930
logical, intent(in) :: rrfs_sd
3031
integer, intent(in) :: kdt
3132
real(kind_phys), intent(in) :: fhour
@@ -59,7 +60,7 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q,
5960
! For restart runs, can assume that prevst and prevsq
6061
! are read from the restart files beforehand, same
6162
! for conv_act.
62-
if(flag_init .and. .not.flag_restart) then
63+
if((flag_init .and. .not.flag_restart) .or. gf_coldstart) then
6364
!$acc kernels
6465
forcet(:,:)=0.0
6566
forceq(:,:)=0.0

physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@
130130
kind = kind_phys
131131
intent = in
132132
optional = True
133+
[gf_coldstart]
134+
standard_name = flag_for_cold_start_gf
135+
long_name = flag to cold start G-F
136+
units = flag
137+
dimensions = ()
138+
type = logical
139+
intent = in
133140
[rrfs_sd]
134141
standard_name = do_smoke_coupling
135142
long_name = flag controlling rrfs_sd collection

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ module GFS_phys_time_vary
4444

4545
private
4646

47-
public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_timestep_finalize, GFS_phys_time_vary_finalize
48-
49-
logical :: is_initialized = .false.
47+
public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize
5048

5149
real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys
5250
real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys
@@ -95,7 +93,8 @@ subroutine GFS_phys_time_vary_init (
9593
smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, &
9694
slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, &
9795
lkm, use_lake_model, lakefrac, lakedepth, iopt_lake, iopt_lake_clm, iopt_lake_flake, &
98-
lakefrac_threshold, lakedepth_threshold, ozphys, h2ophys, errmsg, errflg)
96+
lakefrac_threshold, lakedepth_threshold, ozphys, h2ophys, is_initialized, errmsg, &
97+
errflg)
9998

10099
implicit none
101100

@@ -193,6 +192,7 @@ subroutine GFS_phys_time_vary_init (
193192
real(kind_phys), intent(in) :: con_t0c
194193

195194
integer, intent(in) :: nthrds
195+
logical, intent(inout) :: is_initialized
196196
character(len=*), intent(out) :: errmsg
197197
integer, intent(out) :: errflg
198198

@@ -713,7 +713,8 @@ subroutine GFS_phys_time_vary_timestep_init (
713713
tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, &
714714
zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype,scolor, shdmin, shdmax, snowd, &
715715
cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, ozphys, h2ophys, &
716-
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg)
716+
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, is_initialized, &
717+
errmsg, errflg)
717718

718719
implicit none
719720

@@ -762,6 +763,7 @@ subroutine GFS_phys_time_vary_timestep_init (
762763
real(kind_phys), intent(inout), optional :: smois(:,:), sh2o(:,:), tslb(:,:), tref(:)
763764
integer, intent(inout) :: vtype(:), stype(:),scolor(:), slope(:)
764765

766+
logical, intent(in) :: is_initialized
765767
character(len=*), intent(out) :: errmsg
766768
integer, intent(out) :: errflg
767769

@@ -931,36 +933,17 @@ subroutine GFS_phys_time_vary_timestep_init (
931933
end subroutine GFS_phys_time_vary_timestep_init
932934
!> @}
933935

934-
!> \section arg_table_GFS_phys_time_vary_timestep_finalize Argument Table
935-
!! \htmlinclude GFS_phys_time_vary_timestep_finalize.html
936-
!!
937-
!>\section gen_GFS_phys_time_vary_timestep_finalize GFS_phys_time_vary_timestep_finalize General Algorithm
938-
!> @{
939-
subroutine GFS_phys_time_vary_timestep_finalize (errmsg, errflg)
940-
941-
implicit none
942-
943-
! Interface variables
944-
character(len=*), intent(out) :: errmsg
945-
integer, intent(out) :: errflg
946-
947-
! Initialize CCPP error handling variables
948-
errmsg = ''
949-
errflg = 0
950-
951-
end subroutine GFS_phys_time_vary_timestep_finalize
952-
!> @}
953-
954936
!> \section arg_table_GFS_phys_time_vary_finalize Argument Table
955937
!! \htmlinclude GFS_phys_time_vary_finalize.html
956938
!!
957-
subroutine GFS_phys_time_vary_finalize(errmsg, errflg)
939+
subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg)
958940

959941
implicit none
960942

961943
! Interface variables
962-
character(len=*), intent(out) :: errmsg
963-
integer, intent(out) :: errflg
944+
logical, intent(inout) :: is_initialized
945+
character(len=*), intent(out) :: errmsg
946+
integer, intent(out) :: errflg
964947

965948
! Initialize CCPP error handling variables
966949
errmsg = ''

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,13 @@
10421042
dimensions = ()
10431043
type = ty_h2ophys
10441044
intent = in
1045+
[is_initialized]
1046+
standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization
1047+
long_name = flag carrying interstitial initialization status
1048+
units = flag
1049+
dimensions = ()
1050+
type = logical
1051+
intent = inout
10451052
[errmsg]
10461053
standard_name = ccpp_error_message
10471054
long_name = error message for error handling in CCPP
@@ -1062,6 +1069,13 @@
10621069
[ccpp-arg-table]
10631070
name = GFS_phys_time_vary_finalize
10641071
type = scheme
1072+
[is_initialized]
1073+
standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization
1074+
long_name = flag carrying interstitial initialization status
1075+
units = flag
1076+
dimensions = ()
1077+
type = logical
1078+
intent = inout
10651079
[errmsg]
10661080
standard_name = ccpp_error_message
10671081
long_name = error message for error handling in CCPP
@@ -2055,26 +2069,13 @@
20552069
dimensions = ()
20562070
type = ty_h2ophys
20572071
intent = in
2058-
[errmsg]
2059-
standard_name = ccpp_error_message
2060-
long_name = error message for error handling in CCPP
2061-
units = none
2062-
dimensions = ()
2063-
type = character
2064-
kind = len=*
2065-
intent = out
2066-
[errflg]
2067-
standard_name = ccpp_error_code
2068-
long_name = error code for error handling in CCPP
2069-
units = 1
2072+
[is_initialized]
2073+
standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization
2074+
long_name = flag carrying interstitial initialization status
2075+
units = flag
20702076
dimensions = ()
2071-
type = integer
2072-
intent = out
2073-
2074-
########################################################################
2075-
[ccpp-arg-table]
2076-
name = GFS_phys_time_vary_timestep_finalize
2077-
type = scheme
2077+
type = logical
2078+
intent = in
20782079
[errmsg]
20792080
standard_name = ccpp_error_message
20802081
long_name = error message for error handling in CCPP

physics/MP/Thompson/module_mp_thompson.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module module_mp_thompson
9393
!.. droplet number concentration.
9494
!real(wp), parameter :: Nt_c = 100.e6
9595
real(wp), parameter :: Nt_c_o = 50.e6
96-
real(wp), parameter :: Nt_c_l = 100.e6
96+
real(wp), parameter :: Nt_c_l = 150.e6
9797
real(wp), parameter, private :: Nt_c_max = 1999.e6
9898

9999
!..Declaration of constants for assumed CCN/IN aerosols when none in

physics/Radiation/radiation_clouds.f

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ module module_radiation_clouds
200200
real (kind=kind_phys), parameter :: reice_def = 50.0 !< default ice radius to 50 micron
201201
real (kind=kind_phys), parameter :: rrain_def = 1000.0 !< default rain radius to 1000 micron
202202
real (kind=kind_phys), parameter :: rsnow_def = 250.0 !< default snow radius to 250 micron
203+
real (kind=kind_phys), parameter :: creice_def = 25.0 !< default convective ice radius to 25 micron overland
203204

204205
real (kind=kind_phys), parameter :: cldssa_def = 0.99 !< default cld single scat albedo
205206
real (kind=kind_phys), parameter :: cldasy_def = 0.84 !< default cld asymmetry factor
@@ -2164,8 +2165,13 @@ subroutine progcld_thompson_wsm6 &
21642165
cip(i,k) = max(0.0, (clw(i,k,ntiw) +
21652166
& snow2ice*clw(i,k,ntsw) + tem2) *
21662167
& gfac * delp(i,k))
2167-
if(tem2 > 1.e-12 .and. clw(i,k,ntiw) < 1.e-12)
2168-
& rei(i,k)=reice_def
2168+
if(tem2 > 1.e-12 .and. clw(i,k,ntiw) < 1.e-12) then
2169+
if(nint(slmsk(i))==1) then
2170+
rei(i,k)=creice_def
2171+
else
2172+
rei(i,k)=reice_def
2173+
endif
2174+
endif
21692175
crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k))
21702176
csp(i,k) = max(0.0, (1.-snow2ice)*clw(i,k,ntsw) *
21712177
& gfac * delp(i,k))

physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,12 +842,14 @@ subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in
842842

843843
! snow albedos: age even when sun is not present
844844

845+
if(cosz > 0) then
845846
if(opt_alb == 1) &
846847
call snowalb_bats_glacier (nband,cosz,fage,albsnd,albsni)
847848
if(opt_alb == 2) then
848849
call snowalb_class_glacier(nband,qsnow,dt,alb,albold,albsnd,albsni)
849850
albold = alb
850851
end if
852+
end if
851853

852854
! zero summed solar fluxes
853855

physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,7 +2511,19 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso ,
25112511
real (kind=kind_phys), dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k)
25122512
real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice content
25132513
real (kind=kind_phys), parameter :: sbeta = -2.0
2514+
real (kind=kind_phys), dimension(4,20) :: soil_carbon ! soil carbon content [kg/m3]
2515+
real (kind=kind_phys), parameter :: soil_carbon_df = 0.25 ! soil carbon therm cond (Lawrence and Slater)
2516+
real (kind=kind_phys), parameter :: soil_carbon_hcpct = 2.5e6 ! soil carbon heat capacity (Lawrence and Slater)
25142517
! --------------------------------------------------------------------------------------------------
2518+
! soil carbon [kg/m3] by vegetation type estimated from global PNNL soil carbon dataset
2519+
! and VIIRS surface type
2520+
2521+
soil_carbon(1,:) = (/90,65,90,65,90,40,50,50,40,50,90,60,60,60,0,20,0,90,90,60/)
2522+
soil_carbon(2,:) = (/40,30,40,30,40,25,30,30,25,30,40,30,30,30,0,15,0,60,60,40/)
2523+
soil_carbon(3,:) = (/20,15,20,15,20,15,20,15,15,15,25,20,20,20,0,10,0,40,40,30/)
2524+
soil_carbon(4,:) = (/15,10,15,10,15,10,15,10,10,10,20,10,10,10,0,10,0,40,30,20/)
2525+
2526+
soil_carbon = soil_carbon / 130.0 ! convert to soil carbon relative to peat
25152527

25162528
! compute snow thermal conductivity and heat capacity
25172529

@@ -2530,6 +2542,11 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso ,
25302542
hcpct(iz) = sh2o(iz)*cwat + (1.0-parameters%smcmax(iz))*parameters%csoil &
25312543
+ (parameters%smcmax(iz)-smc(iz))*cpair + sice(iz)*cice
25322544
call tdfcnd (parameters,iz,df(iz), smc(iz), sh2o(iz))
2545+
2546+
! adjust for soil carbon organic content
2547+
2548+
! hcpct(iz) = (1.0 - soil_carbon(iz,vegtyp)) * hcpct(iz) + soil_carbon(iz,vegtyp) * soil_carbon_hcpct
2549+
df(iz) = (1.0 - soil_carbon(iz,vegtyp)) * df(iz) + soil_carbon(iz,vegtyp) * soil_carbon_df
25332550
end do
25342551

25352552
if ( parameters%urban_flag ) then
@@ -3003,7 +3020,11 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in
30033020
if (ib.eq.1) fsun = 0.
30043021
end do
30053022

3006-
if(cosz <= 0) goto 100
3023+
! snow age
3024+
3025+
call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage)
3026+
3027+
if(cosz > 0) then
30073028

30083029
! weight reflectance/transmittance by lai and sai
30093030

@@ -3015,10 +3036,6 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in
30153036
tau(ib) = max(parameters%taul(ib)*wl+parameters%taus(ib)*ws, mpe)
30163037
end do
30173038

3018-
! snow age
3019-
3020-
call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage)
3021-
30223039
! snow albedos: only if cosz > 0 and fsno > 0
30233040

30243041
if(opt_alb == 1) &
@@ -3067,8 +3084,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in
30673084
wl = ext
30683085
end if
30693086
fsun = wl
3070-
3071-
100 continue
3087+
end if
30723088

30733089
end subroutine albedo
30743090

@@ -9126,9 +9142,7 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in
91269142

91279143
! recharge rate qin to groundwater
91289144

9129-
! ka = hk(iwt)
9130-
! harmonic average, c.he changed based on gy niu's update
9131-
ka = 2.0*(hk(iwt)*parameters%dksat(iwt)*1.0e3) / (hk(iwt)+parameters%dksat(iwt)*1.0e3)
9145+
ka = 0.5*(hk(iwt)+parameters%dksat(iwt)*1.0e3)
91329146

91339147
wh_zwt = - zwt * 1.e3 !(mm)
91349148
wh = smpfz - znode(iwt)*1.e3 !(mm)

0 commit comments

Comments
 (0)