Skip to content

Commit

Permalink
Add snow Age parameter for tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-peano committed Oct 6, 2023
1 parent 5249cc9 commit 9bf40a4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,11 @@ Perturbation limit when doing error growth test
If FALSE, don't write any restart files.
</entry>

<entry id="snoage_scl" type="real" category="clm_physics"
group="clm_inparm" valid_values="" >
If greater than zero it activates the snow aging scaling factor using the provided value.
</entry>

<entry id="urban_hac" type="char*16" category="clm_physics"
group="clmu_inparm" valid_values="OFF,ON,ON_WASTEHEAT" >
Turn urban air conditioning/heating ON or OFF and add wasteheat:
Expand Down
6 changes: 3 additions & 3 deletions src/biogeophys/SnowSnicarMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ subroutine SnowAge_grain(bounds, &
use clm_varpar , only : nlevsno
use clm_varcon , only : spval
use shr_const_mod , only : SHR_CONST_RHOICE, SHR_CONST_PI
use clm_varctl , only : snoage_scl
!
! !ARGUMENTS:
type(bounds_type) , intent(in) :: bounds
Expand Down Expand Up @@ -1228,11 +1229,10 @@ subroutine SnowAge_grain(bounds, &
!********** 3. SNOWAGE SCALING (TURNED OFF BY DEFAULT) *************
!
! Multiply rate of change of effective radius by some constant, xdrdt
if (flg_snoage_scl) then
dr = dr*params_inst%xdrdt
if (snoage_scl .gt. 0._r8) then
dr = dr*snoage_scl
endif


!
!********** 4. INCREMENT EFFECTIVE RADIUS, ACCOUNTING FOR: ***********
! DRY AGING
Expand Down
5 changes: 4 additions & 1 deletion src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ module clm_varctl
logical, public :: use_noio = .false.

logical, public :: use_nguardrail = .false.

!----------------------------------------------------------
! scaling of the snow aging rate (tuning option)
!----------------------------------------------------------
real(r8), public :: snoage_scl = 0.0_r8 ! arbitrary factor applied to snow aging rate if greater than 0
!----------------------------------------------------------
! To retrieve namelist
!----------------------------------------------------------
Expand Down
8 changes: 6 additions & 2 deletions src/main/controlMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ subroutine control_init(dtime)
use_grainproduct, use_snicar_frc, use_vancouver, use_mexicocity, use_noio, &
use_nguardrail

! Scaling of snow aging rate
namelist /clm_inparm/ snoage_scl

! ----------------------------------------------------------------------
! Default values
Expand Down Expand Up @@ -336,7 +338,8 @@ subroutine control_init(dtime)
else
call endrun(msg='ERROR finding clm_nitrogen namelist'//errMsg(sourcefile, __LINE__))
end if

write(iulog,*) "# CLM clm_inparm :"
write(iulog,*) 'SNOAGE_SCL is set to: ', snoage_scl
call relavu( unitn )

! ----------------------------------------------------------------------
Expand Down Expand Up @@ -838,7 +841,8 @@ subroutine control_spmd()

call mpi_bcast (clump_pproc, 1, MPI_INTEGER, 0, mpicom, ier)


! scaling of the snow aging rate (tuning option)
call mpi_bcast (snoage_scl, 1, MPI_REAL8, 0, mpicom, ier)
end subroutine control_spmd

!------------------------------------------------------------------------
Expand Down

0 comments on commit 9bf40a4

Please sign in to comment.