Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
325 changes: 151 additions & 174 deletions Makefile

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@
#endif
#ifdef DO_PHYSICS
<var name="isltyp"/>
<var name="isctyp"/>
<var name="ivgtyp"/>
<var name="mminlu"/>
<var name="isice_lu"/>
Expand Down Expand Up @@ -4462,7 +4463,10 @@
<!-- ================================================================================================== -->

<var name="isltyp" type="integer" dimensions="nCells" units="unitless"
description="dominant soil category"/>
description="dominant soil texture category"/>

<var name="isctyp" type="integer" dimensions="nCells" units="unitless"
description="dominant soil colour category"/>

<var name="ivgtyp" type="integer" dimensions="nCells" units="unitless"
description="dominant vegetation category"/>
Expand Down
9 changes: 7 additions & 2 deletions src/core_atmosphere/physics/mpas_atmphys_driver_lsm.F
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ subroutine allocate_lsm
if(.not.allocated(cpm_p) ) allocate(cpm_p(ims:ime,jms:jme) )
if(.not.allocated(cqs2_p) ) allocate(cqs2_p(ims:ime,jms:jme) )
if(.not.allocated(isltyp_p) ) allocate(isltyp_p(ims:ime,jms:jme) )
if(.not.allocated(isctyp_p) ) allocate(isctyp_p(ims:ime,jms:jme) )
if(.not.allocated(ivgtyp_p) ) allocate(ivgtyp_p(ims:ime,jms:jme) )
if(.not.allocated(glw_p) ) allocate(glw_p(ims:ime,jms:jme) )
if(.not.allocated(grdflx_p) ) allocate(grdflx_p(ims:ime,jms:jme) )
Expand Down Expand Up @@ -216,6 +217,7 @@ subroutine deallocate_lsm
if(allocated(gsw_p) ) deallocate(gsw_p )
if(allocated(hfx_p) ) deallocate(hfx_p )
if(allocated(isltyp_p) ) deallocate(isltyp_p )
if(allocated(isctyp_p) ) deallocate(isctyp_p )
if(allocated(ivgtyp_p) ) deallocate(ivgtyp_p )
if(allocated(lai_p) ) deallocate(lai_p )
if(allocated(lh_p) ) deallocate(lh_p )
Expand Down Expand Up @@ -279,7 +281,7 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
character(len=StrKIND),pointer:: config_microp_scheme, &
config_convection_scheme

integer,dimension(:),pointer:: isltyp,ivgtyp
integer,dimension(:),pointer:: isltyp,isctyp,ivgtyp

real(kind=RKIND),dimension(:),pointer :: acsnom,acsnow,canwat,chs,chs2,chklowq,cpm,cqs2,glw, &
grdflx,gsw,hfx,lai,lh,noahres,potevp,qfx,qgh,qsfc, &
Expand Down Expand Up @@ -336,6 +338,7 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
call mpas_pool_get_array(diag_physics,'znt' ,znt )

call mpas_pool_get_array(sfc_input,'isltyp' ,isltyp )
call mpas_pool_get_array(sfc_input,'isctyp' ,isctyp )
call mpas_pool_get_array(sfc_input,'ivgtyp' ,ivgtyp )
call mpas_pool_get_array(sfc_input,'shdmin' ,shdmin )
call mpas_pool_get_array(sfc_input,'shdmax' ,shdmax )
Expand Down Expand Up @@ -409,6 +412,7 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
znt_p(i,j) = znt(i)

isltyp_p(i,j) = isltyp(i)
isctyp_p(i,j) = isctyp(i)
ivgtyp_p(i,j) = ivgtyp(i)
shdmin_p(i,j) = shdmin(i)
shdmax_p(i,j) = shdmax(i)
Expand Down Expand Up @@ -490,7 +494,7 @@ subroutine lsm_to_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
!local pointers:
character(len=StrKIND),pointer:: config_microp_scheme

integer,dimension(:),pointer:: isltyp,ivgtyp
integer,dimension(:),pointer:: isltyp,isctyp,ivgtyp

real(kind=RKIND),dimension(:),pointer :: acsnom,acsnow,canwat,chs,chs2,chklowq,cpm,cqs2,glw, &
grdflx,gsw,hfx,lai,lh,noahres,potevp,qfx,qgh,qsfc, &
Expand Down Expand Up @@ -544,6 +548,7 @@ subroutine lsm_to_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
call mpas_pool_get_array(diag_physics,'znt' ,znt )

call mpas_pool_get_array(sfc_input,'isltyp' ,isltyp )
call mpas_pool_get_array(sfc_input,'isctyp' ,isctyp )
call mpas_pool_get_array(sfc_input,'ivgtyp' ,ivgtyp )
call mpas_pool_get_array(sfc_input,'shdmin' ,shdmin )
call mpas_pool_get_array(sfc_input,'shdmax' ,shdmax )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ subroutine lsm_noahmp_fromMPAS(configs,mesh,diag,diag_physics,diag_physics_noahm

integer:: i,its,ite
integer:: n,ns,nsoil,nsnow,nzsnow
integer,dimension(:),pointer:: isltyp,ivgtyp
integer,dimension(:),pointer:: isltyp,isctyp,ivgtyp

real(kind=RKIND),dimension(:),pointer:: latCell,lonCell
real(kind=RKIND),dimension(:),pointer:: shdmax,shdmin,vegfra,tmn,xice,xland
Expand Down
17 changes: 16 additions & 1 deletion src/core_atmosphere/physics/mpas_atmphys_lsm_noahinit.F
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ subroutine lsminit(dminfo,mesh,configs,diag_physics,sfc_input)
character(len=StrKIND),pointer:: mminlu,mminsl

integer,pointer:: nCells,nSoilLevels
integer,dimension(:),pointer:: ivgtyp,isltyp
integer,dimension(:),pointer:: ivgtyp,isltyp,isctyp

real(kind=RKIND),dimension(:),pointer:: snoalb,snow,snowh
real(kind=RKIND),dimension(:,:),pointer:: tslb,smois,sh2o
Expand All @@ -118,6 +118,7 @@ subroutine lsminit(dminfo,mesh,configs,diag_physics,sfc_input)
call mpas_pool_get_dimension(mesh,'nSoilLevels',nSoilLevels)

call mpas_pool_get_array(sfc_input,'isltyp', isltyp)
call mpas_pool_get_array(sfc_input,'isctyp', isctyp)
call mpas_pool_get_array(sfc_input,'ivgtyp', ivgtyp)
call mpas_pool_get_array(sfc_input,'sh2o' , sh2o )
call mpas_pool_get_array(sfc_input,'smois' , smois )
Expand Down Expand Up @@ -149,6 +150,20 @@ subroutine lsminit(dminfo,mesh,configs,diag_physics,sfc_input)
call physics_error_fatal("module_sf_noahlsm.F: lsminit: out of range value "// &
"of ISLTYP. Is this field in the input?" )

! Make sure all cells have reasonable soil colour indices.
errflag = 0
do iCell = 1, nCells
if(isctyp(iCell) < 1) then
errflag = 1
write(err_message,*) "module_sf_noahlsm.F: lsminit: out of range ISCTYP ", &
iCell,isctyp(iCell),isltyp(iCell),ivgtyp(iCell)
call physics_message(err_message)
endif
end do
if (errflag == 1) &
call physics_error_fatal("module_sf_noahlsm.F: lsminit: out of range value "// &
"of ISCTYP. Is this field in the input?" )

!initializes soil liquid water content SH2O:
do iCell = 1, nCells
bx = bb(isltyp(iCell))
Expand Down
5 changes: 4 additions & 1 deletion src/core_atmosphere/physics/mpas_atmphys_lsm_noahmpinit.F
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ subroutine noahmp_init(configs,mesh,clock,diag_physics,diag_physics_noahmp,outpu
logical,pointer:: urban_physics

integer,pointer:: nsoilcomps
integer,dimension(:),pointer:: isltyp,ivgtyp
integer,dimension(:),pointer:: isltyp,isctyp,ivgtyp
integer,dimension(:),pointer:: isnowxy
integer,dimension(:),pointer:: irnumsi,irnummi,irnumfi

Expand Down Expand Up @@ -322,11 +322,14 @@ subroutine noahmp_init(configs,mesh,clock,diag_physics,diag_physics_noahmp,outpu
!--- initialization of time-invariant surface variables needed in subroutine NoahmpInitMain:
call mpas_pool_get_array(sfc_input,'dzs' ,dzs )
call mpas_pool_get_array(sfc_input,'isltyp',isltyp)
call mpas_pool_get_array(sfc_input,'isctyp',isctyp)
call mpas_pool_get_array(sfc_input,'ivgtyp',ivgtyp)

do i = its, ite
mpas_noahmp%isltyp(i) = isltyp(i)
mpas_noahmp%isctyp(i) = isctyp(i)
mpas_noahmp%ivgtyp(i) = ivgtyp(i)

enddo
do ns = 1, nsoil
mpas_noahmp%dzs(ns) = dzs(ns,its)
Expand Down
2 changes: 1 addition & 1 deletion src/core_atmosphere/physics/mpas_atmphys_update_surface.F
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ subroutine physics_update_sst(dminfo,config_frac_seaice,mesh,sfc_input,diag_phys

call mpas_pool_get_array(sfc_input,'isice' ,isice )
call mpas_pool_get_array(sfc_input,'iswater' ,iswater )
call mpas_pool_get_array(sfc_input,'isltyp' ,isltyp )
call mpas_pool_get_array(sfc_input,'isltyp' ,isltyp )
call mpas_pool_get_array(sfc_input,'ivgtyp' ,ivgtyp )
call mpas_pool_get_array(sfc_input,'landmask' ,landmask )
call mpas_pool_get_array(sfc_input,'vegfra' ,vegfra )
Expand Down
1 change: 1 addition & 0 deletions src/core_atmosphere/physics/mpas_atmphys_vars.F
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ module mpas_atmphys_vars

integer,dimension(:,:),allocatable:: &
isltyp_p, &!dominant soil type category [-]
isctyp_p, &!dominant soil colour category [-]
ivgtyp_p !dominant vegetation category [-]

real(kind=RKIND),dimension(:),allocatable:: &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@

- but in the file listed in the namelist as: HRLDAS_SETUP_FILE = "
- The initialization fields are: SNOW,CANWAT,TSK,TSLB,SMOIS
- This file also contains the static grid/domain information: XLAT,XLONG,TMN,HGT,SEAICE,MAPFAC_MX,MAPFAC_MY,SHDMAX,SHDMIN,XLAND,IVGTYP,ISLTYP,DZS,ZS
- This file also contains the static grid/domain information: XLAT,XLONG,TMN,HGT,SEAICE,MAPFAC_MX,MAPFAC_MY,SHDMAX,SHDMIN,XLAND,IVGTYP,ISLTYP,ISCTYP,DZS,ZS
- This file can also contains some optional fields: LAI
- NOTE: a WRF input file can be used as a HRLDAS_SETUP_FILE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO)
! config domain variable
noahmp%config%domain%SurfaceType = 1
noahmp%config%domain%NumSwRadBand = 2
noahmp%config%domain%SoilColor = 4
noahmp%config%domain%SoilColor = NoahmpIO%ISCTYP(I)
noahmp%config%domain%NumCropGrowStage = 8
noahmp%config%domain%FlagSoilProcess = NoahmpIO%calculate_soil
noahmp%config%domain%NumSoilTimeStep = NoahmpIO%soil_update_steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ subroutine NoahmpIOVarFinalizeDefault(NoahmpIO)
if ( allocated (NoahmpIO%zsoil) ) deallocate ( NoahmpIO%zsoil ) ! depth to soil interfaces [m]
if ( allocated (NoahmpIO%ivgtyp) ) deallocate ( NoahmpIO%ivgtyp ) ! vegetation type
if ( allocated (NoahmpIO%isltyp) ) deallocate ( NoahmpIO%isltyp ) ! soil type
if ( allocated (NoahmpIO%isctyp) ) deallocate ( NoahmpIO%isctyp ) ! soil colour class
if ( allocated (NoahmpIO%vegfra) ) deallocate ( NoahmpIO%vegfra ) ! vegetation fraction []
if ( allocated (NoahmpIO%tmn) ) deallocate ( NoahmpIO%tmn ) ! deep soil temperature [K]
if ( allocated (NoahmpIO%xland) ) deallocate ( NoahmpIO%xland ) ! =2 ocean; =1 land/seaice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO)
if ( .not. allocated (NoahmpIO%zsoil) ) allocate ( NoahmpIO%zsoil (1:nsoil ) ) ! depth to soil interfaces [m]
if ( .not. allocated (NoahmpIO%ivgtyp) ) allocate ( NoahmpIO%ivgtyp (its:ite ) ) ! vegetation type
if ( .not. allocated (NoahmpIO%isltyp) ) allocate ( NoahmpIO%isltyp (its:ite ) ) ! soil type
if ( .not. allocated (NoahmpIO%isctyp) ) allocate ( NoahmpIO%isctyp (its:ite ) ) ! soil colour class
if ( .not. allocated (NoahmpIO%vegfra) ) allocate ( NoahmpIO%vegfra (its:ite ) ) ! vegetation fraction []
if ( .not. allocated (NoahmpIO%tmn) ) allocate ( NoahmpIO%tmn (its:ite ) ) ! deep soil temperature [K]
if ( .not. allocated (NoahmpIO%xland) ) allocate ( NoahmpIO%xland (its:ite ) ) ! =2 ocean; =1 land/seaice
Expand Down Expand Up @@ -469,6 +470,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO)
NoahmpIO%ice = undefined_int
NoahmpIO%ivgtyp = undefined_int
NoahmpIO%isltyp = undefined_int
NoahmpIO%isctyp = undefined_int
NoahmpIO%isnowxy = undefined_int
NoahmpIO%coszen = undefined_real
NoahmpIO%xlat = undefined_real
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ module NoahmpIOVarType
integer :: soil_update_steps ! number of model time steps to update soil process
integer, allocatable, dimension(:) :: ivgtyp ! vegetation type
integer, allocatable, dimension(:) :: isltyp ! soil type
integer, allocatable, dimension(:) :: isctyp ! soil colour class
real(kind=kind_noahmp), allocatable, dimension(:) :: coszen ! cosine zenith angle
real(kind=kind_noahmp), allocatable, dimension(:) :: xlat ! latitude [rad]
real(kind=kind_noahmp), allocatable, dimension(:,:) :: dz8w ! thickness of atmo layers [m]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subroutine NoahmpReadTable(NoahmpIO)
!-------------------------------------------------------
integer, parameter :: MVT = 27 ! number of vegetation types
integer, parameter :: MBAND = 2 ! number of radiation bands
integer, parameter :: MSC = 8 ! number of soil texture
integer, parameter :: MSC = 21 ! number of soil colour types
integer, parameter :: MAX_SOILTYP = 30 ! max number of soil types
integer, parameter :: NCROP = 5 ! number of crop types
integer, parameter :: NSTAGE = 8 ! number of crop growth stages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,19 @@
/

&noahmp_rad_parameters
!------------------------------------------------------------------------------
! soil color: 1 2 3 4 5 6 7 8 soil color index for soil albedo
!------------------------------------------------------------------------------
ALBSAT_VIS = 0.15, 0.11, 0.10, 0.09, 0.08, 0.07, 0.06, 0.05 ! saturated soil albedo at visible band
ALBSAT_NIR = 0.30, 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10 ! saturated soil albedo at NIR band
ALBDRY_VIS = 0.27, 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10 ! dry soil albedo at visible band
ALBDRY_NIR = 0.54, 0.44, 0.40, 0.36, 0.32, 0.28, 0.24, 0.20 ! dry soil albedo at NIR band
!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
! soil color index for soil albedo
! soil color: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
! saturated soil albedo at visible band
ALBSAT_VIS = 0.25, 0.23, 0.21, 0.20, 0.19, 0.18, 0.17, 0.16, 0.15, 0.14, 0.13, 0.12, 0.11, 0.10, 0.09, 0.08, 0.07, 0.06, 0.05, 0.04, 0.00
! saturated soil albedo at NIR band
ALBSAT_NIR = 0.50, 0.46, 0.42, 0.40, 0.38, 0.36, 0.34, 0.32, 0.30, 0.28, 0.26, 0.24, 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 0.08, 0.00
! dry soil albedo at visible band
ALBDRY_VIS = 0.36, 0.34, 0.32, 0.31, 0.30, 0.29, 0.28, 0.27, 0.26, 0.25, 0.24, 0.23, 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 0.08, 0.00
! dry soil albedo at NIR band
ALBDRY_NIR = 0.61, 0.57, 0.53, 0.51, 0.49, 0.48, 0.45, 0.43, 0.41, 0.39, 0.37, 0.35, 0.33, 0.31, 0.29, 0.27, 0.25, 0.23, 0.21, 0.16, 0.00
!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ALBICE = 0.80, 0.55 ! albedo land ice: 1=vis, 2=nir
ALBLAK = 0.60, 0.40 ! albedo frozen lakes: 1=vis, 2=nir
OMEGAS = 0.8 , 0.4 ! two-stream parameter omega for snow
Expand Down
5 changes: 5 additions & 0 deletions src/core_init_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@
<var name="iswater_lu" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
<var name="ivgtyp" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
<var name="isltyp" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
<var name="isctyp" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
<var name="snoalb" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
<var name="soiltemp" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
<var name="greenfrac" packages="gwd_stage_in;vertical_stage_in;met_stage_in"/>
Expand Down Expand Up @@ -547,6 +548,7 @@
<var name="iswater_lu"/>
<var name="ivgtyp"/>
<var name="isltyp"/>
<var name="isctyp"/>
<var name="snoalb"/>
<var name="soiltemp"/>
<var name="greenfrac"/>
Expand Down Expand Up @@ -847,6 +849,9 @@
<var name="isltyp" name_in_code="soilcat_top" type="integer" dimensions="nCells" units="unitless"
description="dominate soil category"/>

<var name="isctyp" name_in_code="soilcol_idx" type="integer" dimensions="nCells" units="unitless"
description="dominant soil colour category"/>

<var name="snoalb" type="real" dimensions="nCells" units="unitless"
description="annual maximum snow albedo"/>

Expand Down
11 changes: 9 additions & 2 deletions src/core_init_atmosphere/mpas_geotile_manager.F
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ module mpas_geotile_manager
!> * isice = 24
!> * isurban = 1
!> * isoilwater = 14
!> * islcolwater = 21
!
!-----------------------------------------------------------------------
function mpas_geotile_mgr_init(mgr, path) result(ierr)
Expand All @@ -119,7 +120,7 @@ function mpas_geotile_mgr_init(mgr, path) result(ierr)
integer, pointer :: tile_z_start, tile_z_end
integer, pointer :: signed
integer, pointer :: tile_bdr
integer, pointer :: iswater, islake, isice, isurban, isoilwater
integer, pointer :: iswater, islake, isice, isurban, isoilwater, islcolwater
integer, pointer :: category_min, category_max
integer :: err_level
real (kind=RKIND), pointer :: dx ! Grid spacing in the x-direction
Expand Down Expand Up @@ -188,7 +189,7 @@ function mpas_geotile_mgr_init(mgr, path) result(ierr)

!
! If this is a categorical field, then check to see if it has category_max and category_min,
! and then set the defaults of iswater, islake, isice, isurban and isoilwater
! and then set the defaults of iswater, islake, isice, isurban, isoilwater and islcolwater
!
call mpas_pool_get_config(mgr % pool, 'type', fieldType)
if (fieldType == 'categorical') then
Expand Down Expand Up @@ -219,12 +220,14 @@ function mpas_geotile_mgr_init(mgr, path) result(ierr)
isice => null()
isurban => null()
isoilwater => null()
islcolwater => null()

call mpas_pool_get_config(mgr % pool, 'iswater', iswater)
call mpas_pool_get_config(mgr % pool, 'islake', islake)
call mpas_pool_get_config(mgr % pool, 'isice', isice)
call mpas_pool_get_config(mgr % pool, 'isurban', isurban)
call mpas_pool_get_config(mgr % pool, 'isoilwater', isoilwater)
call mpas_pool_get_config(mgr % pool, 'islcolwater', islcolwater)

if (.not. associated(iswater)) then
call mpas_pool_add_config(mgr % pool, 'iswater', 16)
Expand All @@ -245,6 +248,10 @@ function mpas_geotile_mgr_init(mgr, path) result(ierr)
if (.not. associated(isoilwater)) then
call mpas_pool_add_config(mgr % pool, 'isoilwater', 14)
endif

if (.not. associated(isoilwater)) then
call mpas_pool_add_config(mgr % pool, 'islcolwater', 21)
end if
endif

!
Expand Down
Loading