Skip to content

Commit

Permalink
Merge pull request #8 from GEOS-ESM/feature/donifan/s2sv3_cstN
Browse files Browse the repository at this point in the history
Added support for constant hydrometeor concentratrion
  • Loading branch information
amolod authored Oct 29, 2024
2 parents dabb6aa + 4ea1614 commit 4507e55
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 57 deletions.
3 changes: 3 additions & 0 deletions src/Applications/GEOSgcm_App/gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -2770,8 +2770,10 @@ endif

if ( -e $CLONEDIR/field_table ) then
set OGCM = TRUE
set AODAS = TRUE
else
set OGCM = FALSE
set AODAS = FALSE
endif

if ( -e $CLONEDIR/fvcore_layout.rc ) then
Expand Down Expand Up @@ -2855,6 +2857,7 @@ HOMDIR/fvcore_layout.rc
EOF
endif


if($AODAS == "TRUE") then
cat >> $FILES_TO_PROCESS << EOF
HOMDIR/ocean_das_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ module CLDPARAMS
real :: DISP_FACTOR_LIQ ! 63
real :: DISP_FACTOR_ICE ! 63
real :: SCLM_SHW ! 63
real :: NO_CNV_AIC
endtype CLDPARAM_TYPE

end module CLDPARAMS

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module RASPARAMS
real :: FDROP_SOOT ! 30
real :: RASAL_SLOPE
real :: CCNFRAC
real :: NO_CNV_AIC
endtype RASPARAM_TYPE

end module RASPARAMS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ PrimaryExports%%
# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|

WSUB_NATURE 'm2 s2' Y N 0 0.0 1.0 w_var_masked ExtData/g5gcm/moist/L72/Wvar_positive_05hrdeg_2006%m2.nc4
NCPL_CLIM 'm-3' Y N 0 0.0 1.0 NCPL_VOL /discover/nobackup/dbarahon/S2Sanalysis/Nclim/L72/Nclim_2005%m2.nc4
NCPI_CLIM 'm-3' Y N 0 0.0 1.0 NCPI_VOL /discover/nobackup/dbarahon/S2Sanalysis/Nclim/L72/Nclim_2005%m2.nc4
%%

DerivedExports%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ module cldmacro
real :: disp_factor_liq
real :: disp_factor_ice
real :: sclm_shw
real :: NO_CNV_AIC


real, parameter :: T_ICE_MAX = MAPL_TICE ! -7.0+MAPL_TICE
real, parameter :: RHO_W = 1.0e3 ! Density of liquid water in kg/m^3
Expand Down Expand Up @@ -337,6 +339,7 @@ subroutine macro_cloud( &
DISP_FACTOR_LIQ = CLDPARAMS%DISP_FACTOR_LIQ
DISP_FACTOR_ICE = CLDPARAMS%DISP_FACTOR_ICE
sclm_shw = CLDPARAMS%SCLM_SHW
NO_CNV_AIC = CLDPARAMS%NO_CNV_AIC

turnrhcrit_upper = CLDPARAMS%TURNRHCRIT_UP
sloperhcrit= CLDPARAMS%SLOPERHCRIT
Expand Down Expand Up @@ -1771,21 +1774,32 @@ subroutine cnvsrc( DT , &



if (NO_CNV_AIC .gt. 0.0) then ! disable aerosol-cloud-interactions Donif 2024

fQi= ICE_FRACTION(TE)
CNVNDROP = ((1.0-fQi)*TEND)/(1.333 * MAPL_PI *RL*RL*RL*997.0*disp_factor_liq)
CNVNICE = (fQi*TEND)/( 1.333 * MAPL_PI *RI*RI*RI*800.0*disp_factor_ice)

NL= max(NL + CNVNDROP*iMASS*DT, 0.0) !number source DONIF
NI = max(NI + CNVNICE*iMASS*DT, 0.0)

else

! Check that N and Q are consistent
if ( ( (1.0-fQi)*DCF .gt. 0.0) .and. (CNVNDROP .le. 0.0)) then
CNVNDROP = (1.0-fQi)*DCF/( 1.333 * MAPL_PI *RL_cub*997.0)
end if

! Check that N and Q are consistent
if ( ( (1.0-fQi)*DCF .gt. 0.0) .and. (CNVNDROP .le. 0.0)) then
CNVNDROP = (1.0-fQi)*DCF/( 1.333 * MAPL_PI *RL_cub*997.0)
end if
if ((fQi*DCF .gt. 0.0) .and. (CNVNICE .le. 0.0)) then
CNVNICE = fQi*DCF/( 1.333 * MAPL_PI *RI_cub*500.0)
end if

if ((fQi*DCF .gt. 0.0) .and. (CNVNICE .le. 0.0)) then
CNVNICE = fQi*DCF/( 1.333 * MAPL_PI *RI_cub*500.0)
end if
fact = 1.333 * MAPL_PI *RL*RL*RL*997.0*disp_factor_liq
NL= max(NL + CNVNDROP*iMASS*DT + (DCLFshlw*iMASS*DT/fact) , 0.0) !number source DONIF

fact = 1.333 * MAPL_PI *RL*RL*RL*997.0*disp_factor_liq
NL= max(NL + CNVNDROP*iMASS*DT + (DCLFshlw*iMASS*DT/fact) , 0.0) !number source DONIF

fact = 1.333 * MAPL_PI *RI*RI*RI*800.0*disp_factor_ice
NI = max(NI + CNVNICE*iMASS*DT + (fQi*TEND+ DCIFshlw*iMASS*DT/fact), 0.0)
fact = 1.333 * MAPL_PI *RI*RI*RI*800.0*disp_factor_ice
NI = max(NI + CNVNICE*iMASS*DT + (fQi*TEND+ DCIFshlw*iMASS*DT/fact), 0.0)
end if



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ subroutine mmicro_pcond ( &
nsoot, rnsoot, ui_scale, dcrit, mtimesc, &
nnuccdo, nnuccco, nsacwio, nsubio, nprcio, &
npraio, npccno, npsacwso, nsubco, nprao, nprc1o, tlataux, nbincontactdust, &
ts_auto_ice, ktrop_min, rflx, sflx, dep_scale &
ts_auto_ice, ktrop_min, rflx, sflx, dep_scale, nccons, nicons &
#endif
)

Expand All @@ -500,8 +500,8 @@ subroutine mmicro_pcond ( &
use wv_saturation, only: vqsatd, vqsatd_water
#ifndef GEOS5
use constituents, only: pcnst
real(r8), parameter :: ncnst = 100.0e6 ! specified value (m-3) droplet num concentration (in-cloud not grid-mean) DONIF
real(r8), parameter :: ninst = 0.10e6
! real(r8), parameter :: ncnst = 100.0e6 ! specified value (m-3) droplet num concentration (in-cloud not grid-mean) DONIF
! real(r8), parameter :: ninst = 0.10e6

#endif

Expand All @@ -510,8 +510,8 @@ subroutine mmicro_pcond ( &
! input arguments
#ifdef GEOS5
integer, intent (in) :: pcols, pver
real(r8), intent (in) :: ncnst ! specified value (m-3) droplet num concentration (in-cloud not grid-mean) DONIF
real(r8), intent (in) :: ninst ! specified value (m-3) ice num concentration (in-cloud not grid-mean)
real(r8), intent (in) :: ncnst(pcols, pver) ! specified value (m-3) droplet num concentration (in-cloud not grid-mean) DONIF
real(r8), intent (in) :: ninst(pcols, pver) ! specified value (m-3) ice num concentration (in-cloud not grid-mean)
real(r8), intent (in) :: nimm (pcols,pver) ! immersion ice nuclei concentration tendency (kg-1 s-1)
real(r8), intent (in) :: miu_disp , ui_scale, dcrit, mtimesc, ts_auto_ice, dep_scale ! miu value in Liu autoconversion. Ui scale is used to tune olrcf by decreasing uised
real(r8), intent (in) :: nsoot (pcols,pver) , rnsoot (pcols,pver)
Expand Down Expand Up @@ -986,8 +986,8 @@ subroutine mmicro_pcond ( &
! nccons = true to specify constant cloud droplet number
! ncicons = true to specify constant cloud ice number

nccons=.false.
nicons=.false.
!nccons=.false.
!nicons=.false.

!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

Expand Down Expand Up @@ -1293,7 +1293,7 @@ subroutine mmicro_pcond ( &

! hm add 6/2/11 switch for specification of cloud ice number
if (nicons) then
niic(i,k)=ninst/rho(i,k)
niic(i,k)=ninst(i, k)/rho(i,k)
end if


Expand Down Expand Up @@ -1747,12 +1747,12 @@ subroutine mmicro_pcond ( &

! hm add 6/2/11 specify droplet concentration
if (nccons) then
ncic(i,k)=ncnst/rho(i,k)
ncic(i,k)=ncnst(i, k)/rho(i,k)
end if

! hm add 6/2/11 switch for specification of cloud ice number
if (nicons) then
niic(i,k)=ninst/rho(i,k)
niic(i,k)=ninst(i, k)/rho(i,k)
end if


Expand Down Expand Up @@ -3385,12 +3385,12 @@ subroutine mmicro_pcond ( &

! hm add 6/2/11 switch for specification of droplet and crystal number
if (nccons) then
dumnc(i,k)=ncnst/rho(i,k)
dumnc(i,k)=ncnst(i, k)/rho(i,k)
end if

! hm add 6/2/11 switch for specification of cloud ice number
if (nicons) then
dumni(i,k)=ninst/rho(i,k)
dumni(i,k)=ninst(i, k)/rho(i,k)
end if

! obtain new slope parameter to avoid possible singularity
Expand Down Expand Up @@ -3636,12 +3636,12 @@ subroutine mmicro_pcond ( &

! hm add 6/2/11 switch for specification of droplet and crystal number
if (nccons) then
dumnc(i,k)=ncnst/rho(i,k)*lcldm(i,k)
dumnc(i,k)=ncnst(i, k)/rho(i,k)*lcldm(i,k)
end if

! hm add 6/2/11 switch for specification of cloud ice number
if (nicons) then
dumni(i,k)=ninst/rho(i,k)*icldm(i,k)
dumni(i,k)=ninst(i, k)/rho(i,k)*icldm(i,k)
end if


Expand Down Expand Up @@ -3797,12 +3797,12 @@ subroutine mmicro_pcond ( &

! hm add 6/2/11 switch for specification of droplet and crystal number
if (nccons) then
dumnc(i,k)=ncnst/rho(i,k)
dumnc(i,k)=ncnst(i, k)/rho(i,k)
end if

! hm add 6/2/11 switch for specification of cloud ice number
if (nicons) then
dumni(i,k)=ninst/rho(i,k)
dumni(i,k)=ninst(i, k)/rho(i,k)
end if


Expand Down Expand Up @@ -3878,7 +3878,7 @@ subroutine mmicro_pcond ( &
! note that nctend may be further adjusted below if mean droplet size is
! out of bounds

nctend(i,k)=(ncnst/rho(i,k)*lcldm(i,k)-nc(i,k))/deltat
nctend(i,k)=(ncnst(i, k)/rho(i,k)*lcldm(i,k)-nc(i,k))/deltat
end if


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ SUBROUTINE RASE(IDIM, IRUN, K0, ICMIN, DT , &
REAL RASAL1, RASAL2, RASAL2i, CO_T, RASNCL,FRICLAMBDA,SDQVT1,SDQV2
REAL LAMBDA_FAC,STRAPPING,ACRITFAC,HMINTRIGGER,LLDISAGGXP
REAL LAMBMX_FAC, DIAMMN_MIN,RDTLEXPON, CLI_CRIT,SDQV3, MAXDALLOWED_D, MAXDALLOWED_S, MAXDALLOWED_E
REAL RHMN, RHMX, CLDMICRO, FDROP_DUST, FDROP_SOOT, RASAL_SLOPE, CCNFRAC
REAL RHMN, RHMX, CLDMICRO, FDROP_DUST, FDROP_SOOT, RASAL_SLOPE, CCNFRAC, NO_CNV_AIC
INTEGER KSTRAP

real cld_radius, areal_frac, spect_mflx, cvw_cbase
Expand Down Expand Up @@ -396,6 +396,8 @@ SUBROUTINE RASE(IDIM, IRUN, K0, ICMIN, DT , &
CCNFRAC = RASPARAMS%CCNFRAC


NO_CNV_AIC = RASPARAMS%NO_CNV_AIC ! no aerosol-cloud interactions

IF ( STRAPPING <= 0.0 ) THEN
DYNA_STRAPPING = .TRUE.
ELSE
Expand Down Expand Up @@ -977,7 +979,7 @@ SUBROUTINE CLOUDE(IC)


!=====================================================================
if (CLDMICRO .gt. 0.0) then !AER_CLOUD MIcrophysics considering activation and nucleation
if ((CLDMICRO .gt. 0.0) .and. (NO_CNV_AIC .le. 0.0)) then !AER_CLOUD MIcrophysics considering activation and nucleation
!recompute vertical velocity

Tparcel = TE_A
Expand Down

0 comments on commit 4507e55

Please sign in to comment.