Unified Noah LSM code at NCAR - NCAR Research Applications

Download Report

Transcript Unified Noah LSM code at NCAR - NCAR Research Applications

Unified Noah LSM Code at
NCAR
Kevin W. Manning
Fei Chen
National Center for Atmospheric Research
Boulder, CO
Goals


Enhance communication and coordination
between NCEP and NCAR LSM groups
Better serve the community of users



Developmental code base(s) maintained via CVS
Documented developmental effort
Maintain compatibility between coupled and
uncoupled applications of Noah LSM
CVS Repository


Allow NCEP and NCAR easy access to each
other’s development code
Currently limited to NCAR and NCEP groups



Simple repository structure


Not a public CVS repository
Regularly-updated repository to be made
available to the community via web site or ftp site
CVS can get complicated
Regular backup and archival of CVS
repository
CVS Repository

NCAR development tree




NCEP development tree



NOAHLSM_NCARDEV
HRLDAS
HRLDAS_COLLECT_DATA
NOAHLSM_NCEPDEV
Other?
Official release

NOAHLSM_x. x. x
NCAR development efforts

Code organization



Fortran modules
Noah LSM in WRF-ARW (NCAR’s coupled
implementation)
Noah LSM in HRLDAS (NCAR’s uncoupled
implementation)
Noah LSM code organization
module_sf_noahlsm.F
module_noahlsm_globals
use module_model_constants (WRF module)
declare soil, veg, general parameters
define constants
Vegetation parameters:
ALB
SHDFAC
RSMIN
HS
XLAI
EMISSI
CMCMAX
RSMAX
Z0BRD
NROOT
RGL
SNUP
SNOALB_NOAH
TOPT
CFACTR
RTDIS
Soil parameters
BEXP
F1
SMCREF
DKSAT
SMCWLT
SMCDRY
SMCMAX
PSISAT
DWSAT
QUARTZ
“General” parameters
SLOPE
FXEXP
SALP
REFKDT
CZIL
KDT
FRZFACT
SBETA
CSOIL
REFDK
ZBOT
PTU
module_sfc_noahlsm
use module_noahlsm_globals
subroutine lsm
used exclusively in WRF
call redprm
call sflx
subroutine lsminit
used exclusively in WRF
use module_sf_noahlsm_param_init
call soil_veg_gen_parm
call frh2o
subroutine redprm
use module_sf_noahlsm_param_init
assign point soil, vegetation, and
general parameters
subroutine sfcdif_off
used exclusively in uncoupled mode
(HRLDAS)
subroutine SFLX
Noah LSM core physics
calls many subroutines
see the SFLX calling tree
module_sf_noahlsm_param_init
call soil_veg_gen_parm
subroutine soil_veg_gen_parm
read VEGPARM, SOILPARM,
and GENPARM
Assign table array of soil,
vegetation, and general
parameters
Fortran modules

Why?





Organized related tasks and routines
Wider scope for widely-used variables
Simplify subroutine argument lists
Modules already used extensively in WRF
Difficulties?


Wider scope of variables is not obvious in the
code
Compile-time dependencies
Module variables




Vegetation parameters
Soil parameters
“General” parameters
Physical constants


Many inherited from WRF module
module_model_constants
“Other”
Noah LSM
subroutine
SFLX
and sub-routines
SFLX -- Noah LSM
CALL REDPRM
CSNOW – Compute snow thermal conductivity
SNOW_NEW – Compute snow depth and density to account for new snowfall
SNFRAC – Compute the snow fraction (0-1)
ALCALC – compute albedo including snow effect
TDFCND – Compute soil thermal diffusivity and conductivity
SNOWZ0 – Compute total roughness length over snow
PENMAN – Compute potential evaporation and “various partial sums”
CANRES – compute the canopy resistance, F(SW,T,Q,SMC)
NOPAC/SNOPAC – Compute soil moisture and heat fluxes and update SMC and STC
EVAPO
Calculate
evapotranspiration
DEVAP
Calculate direct
soil evaporation
TRANSP
Compute transpiration
according to
vegetation class
SMFLX
Calculate soil moisture
flux. Update SMC, CMC,
SH2O
TDFCND (NOPAC only)
Compute thermal diffusivity
and conductivity of soil
SRT
RHS of time tendency
term for soil water
diffusion equation
WDFCND
Compute soil water
diffusivity and soil
hydraulic conductivity
SSTEP
Update SMC and
CMC
ROSR12
Solve a tri-diagonal
matrix problem
(to what end?)
SHFLX
Update soil T based on
thermal diffusion eqn, and
update frozen SMC based on T
HRTICE
RHS of time dend. term of
soil thermal diffusion eqn
in the case of sea ice
HSTEP
Update the soil
temperature field
ROSR12
Solve a tri-diagonal
matrix problem
(to what end?)
SNOWPACK (SNOPAC only)
Compute compaction
of snow
HRT
RHS of time tendency
term of the soil thermal
diffusion equation
TBND
Compute T on the
boundary of a layer by
interp. from layer T's
TMPAVG
Compute soil-layer avg T in
a freezing or thawing layer
TDFCND
Compute thermal diffusivity
and conductivity of soil
SNKSRC
compute sink/source term
of thermal diffusion eqn
FRH20
Compute liquid SMC
in ground colder than
273.15 K
Call REDPRM

Formerly inside SFLX, moved to before call
to SFLX


Easier for use in uncoupled applications
Easier for user to override default values of soil
and vegetation parameters with values from a 2D
“map”
Uncoupled
Coupled
implementation
implementation
example, as in WRFexample,ARW
as in
Noah_hrldas_driver.F
WRF-ARW
subroutine
Main routine
LSM
NCAR HRLDAS
Initialization tasks
LSM_PARM_INIT (Noah_code/module_Noahlsm_param_init.F)
MODULE module_sf_Noahlsm_param_init
reads tables GENPARM
SOILPARM, and VEGPARM
READLAND_HRLDAS (IO_code/module_hrldas_netcdf_io.F)
MODULE module_hrldas_netcdf_io
reads geographic information: Terrain, lat/lon, veg/soil maps
READINIT_HRLDAS (IO_code/module_hrldas_netcdf_io.F)
MODULE module_hrldas_netcdf_io
read initial soil conditions: Soil moisture, Soil T,
Canopy water, Snow depth, Skin T
READVEG_HRLDAS (IO_code/module_hrldas_netcdf_io.F)
MODULE module_hrldas_netcdf_io
read vegetation conditions: FPAR, LAI
Time Loop
READFORC_HRLDAS (IO_code/module_hrldas_netcdf_io.F)
MODULE module_hrldas_netcdf_io
reads the forcing fields
P,T,Q,U,V,LW,SW,PCP,LAI,FPAR
I,J Loop
REDPRM (Noah_code/module_Noahlsm.F)
MODULE module_sf_Noahlsm
Assign values of soil/veg parameters from the tables
according to soil/veg categories of this particular (I,J) point
CALTMP (Noah_code/module_Noahlsm_utility.F)
MODULE module_Noahlsm_utility
compute some termerature variables for use in CALHUM and SFLX
CALHUM (Noah_code/module_Noahlsm_utility.F)
MODULE module_Noahlsm_utility
compute saturation mixing ratio Qsat and d/dT of Qsat
Key:
<SUBROUTINE NAME> (<source code file>)
MODULE <F90 module name>
<description>
SFCDIF_OFF (Noah_code/module_Noahlsm.F)
MODULE module_sf_Noahlsm
Calculate surface exchange coefficients CM and CH
WRF Noah LSM code
SFLX (Noah_code/module_Noahlsm.F)
MODULE module_sf_noahlsm
Noah LSM code
HRLDAS I/O tasks
Special offline computations
OUTPUT_HRLDAS (IO_code/module_hrldas_netcdf_io.F)
MODULE module_hrldas_netcdf_io
write out LSM output
New


Improved urban treatment
2-season tables


Date or season information needed in Noah LSM
code
In progress

Water routing