diff --git a/.github/workflows/datm_noahmp.yaml b/.github/workflows/datm_noahmp.yaml index cdf62676..7ffdfe7a 100644 --- a/.github/workflows/datm_noahmp.yaml +++ b/.github/workflows/datm_noahmp.yaml @@ -20,6 +20,7 @@ jobs: matrix: os: [ubuntu-22.04] test: [test_datm_lnd] + esmf: [8.4.2] env: # set token to access gh command @@ -34,7 +35,7 @@ jobs: steps: # test component - name: Test Component - uses: esmf-org/nuopc-comp-testing@v1.0.0 + uses: esmf-org/nuopc-comp-testing@feature/v1.2 with: app_install_dir: ${{ env.APP_INSTALL_DIR }} artifacts_files: | @@ -61,9 +62,8 @@ jobs: component_module_name: lnd_comp_nuopc data_component_name: datm dependencies: | - zlib@1.2.12 - fms@2022.04 - esmf@8.4.0b15+parallelio - parallelio@2.5.8+pnetcdf + fms@2022.04 precision=32,64 + esmf@${{ matrix.esmf }}+external-parallelio dependencies_install_dir: ${{ env.DEP_INSTALL_DIR }} + mpirun_args: --oversubscribe -np 6 --mca btl_tcp_if_include eth0 test_definition: ${{ env.APP_INSTALL_DIR }}/noahmp/.github/workflows/tests/${{ matrix.test }}.yaml diff --git a/.github/workflows/tests/test_datm_lnd/lnd.yaml b/.github/workflows/tests/test_datm_lnd/lnd.yaml index 7d593a3f..7b5b79f5 100644 --- a/.github/workflows/tests/test_datm_lnd/lnd.yaml +++ b/.github/workflows/tests/test_datm_lnd/lnd.yaml @@ -22,6 +22,12 @@ input: - input-data-20221101/FV3_fix_tiled/C96/C96.soil_type.tile4.nc - input-data-20221101/FV3_fix_tiled/C96/C96.soil_type.tile5.nc - input-data-20221101/FV3_fix_tiled/C96/C96.soil_type.tile6.nc + - input-data-20221101/FV3_fix_tiled/C96/C96.soil_color.tile1.nc + - input-data-20221101/FV3_fix_tiled/C96/C96.soil_color.tile2.nc + - input-data-20221101/FV3_fix_tiled/C96/C96.soil_color.tile3.nc + - input-data-20221101/FV3_fix_tiled/C96/C96.soil_color.tile4.nc + - input-data-20221101/FV3_fix_tiled/C96/C96.soil_color.tile5.nc + - input-data-20221101/FV3_fix_tiled/C96/C96.soil_color.tile6.nc - input-data-20221101/FV3_fix_tiled/C96/C96.substrate_temperature.tile1.nc - input-data-20221101/FV3_fix_tiled/C96/C96.substrate_temperature.tile2.nc - input-data-20221101/FV3_fix_tiled/C96/C96.substrate_temperature.tile3.nc diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bae3f18..bfba716b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ list(APPEND _noahmp_ccpp_files drivers/ccpp/noahmpdrv.F90 drivers/ccpp/physcons.F90) # NoahMP -list(APPEND _noahmp_files src/module_sf_noahmplsm.f90 - src/module_sf_noahmp_glacier.f90) +list(APPEND _noahmp_files src/module_sf_noahmplsm.F90 + src/module_sf_noahmp_glacier.F90) #------------------------------------------------------------------------------ # Build options diff --git a/drivers/ccpp/noahmp_tables.f90 b/drivers/ccpp/noahmp_tables.f90 index 2e3e2920..3b06d7f5 100644 --- a/drivers/ccpp/noahmp_tables.f90 +++ b/drivers/ccpp/noahmp_tables.f90 @@ -8,983 +8,250 @@ !! only the data in the noah_mp_modis_parameters section of MPTABLE.TBL and the STAS section of !! SOILPARM.TBL are included in this module. module noahmp_tables - +use machine , only : kind_phys implicit none integer, private, parameter :: mvt = 30 ! use 30 instead of 27 integer, private, parameter :: mband = 2 - integer, private, parameter :: msc = 8 + integer, private, parameter :: msc = 20 integer, private, parameter :: max_soiltyp = 30 integer, private, parameter :: ncrop = 5 integer, private, parameter :: nstage = 8 - - integer :: i - integer, private, parameter :: slcats = 30 + integer, private, parameter :: num_slope = 9 ! mptable.tbl vegetation parameters - integer :: isurban_table = 13 - integer :: iswater_table = 17 - integer :: isbarren_table = 16 - integer :: isice_table = 15 - integer :: iscrop_table = 12 - integer :: eblforest_table = 2 - integer :: natural_table = 14 - integer :: low_density_residential_table = 31 - integer :: high_density_residential_table = 32 - integer :: high_intensity_industrial_table = 33 - -! - real :: ch2op_table(mvt) !< maximum intercepted h2o per unit lai+sai (mm) - - data ( ch2op_table(i),i=1,mvt) / 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & - & 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & - & 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & - & 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: dleaf_table(mvt) !< characteristic leaf dimension (m) - data ( dleaf_table(i),i=1,mvt) / 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & - & 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & - & 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & - & 0.04, 0.04, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: z0mvt_table(mvt) !< momentum roughness length (m) - data ( z0mvt_table(i),i=1,mvt) / 1.09, 1.10, 0.85, 0.80, 0.80, 0.20, & - & 0.06, 0.60, 0.50, 0.12, 0.30, 0.15, & - & 1.00, 0.14, 0.00, 0.00, 0.00, 0.30, & - & 0.20, 0.03, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - -! - - real :: hvt_table(mvt) !< top of canopy (m) - data ( hvt_table(i),i=1,mvt) / 20.0, 20.0, 18.0, 16.0, 16.0, 1.10, & - & 1.10, 13.0, 10.0, 1.00, 5.00, 2.00, & - & 15.0, 1.50, 0.00, 0.00, 0.00, 4.00, & - & 2.00, 0.50, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: hvb_table(mvt) !< bottom of canopy (m) - data ( hvb_table(i),i=1,mvt) / 8.50, 8.00, 7.00, 11.5, 10.0, 0.10, & - & 0.10, 0.10, 0.10, 0.05, 0.10, 0.10, & - & 1.00, 0.10, 0.00, 0.00, 0.00, 0.30, & - & 0.20, 0.10, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: den_table(mvt) !< tree density (no. of trunks per m2) - data ( den_table (i),i=1,mvt) / 0.28, 0.02, 0.28, 0.10, 0.10, 10.0, & - & 10.0, 10.0, 0.02, 100., 5.05, 25.0, & - & 0.01, 25.0, 0.00, 0.01, 0.01, 1.00, & - & 1.00, 1.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / -! - real :: rc_table(mvt) !< tree crown radius (m) - - data ( rc_table (i),i=1,mvt) / 1.20, 3.60, 1.20, 1.40, 1.40, 0.12, & - & 0.12, 0.12, 3.00, 0.03, 0.75, 0.08, & - & 1.00, 0.08, 0.00, 0.01, 0.01, 0.30, & - & 0.30, 0.30, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: mfsno_table(mvt) !< snowmelt curve parameter () - data ( mfsno_table(i),i=1,mvt) / 1.00, 1.00, 1.00, 1.00, 1.00, 2.00, & - & 2.00, 2.00, 2.00, 2.00, 3.00, 3.00, & - & 4.00, 4.00, 2.50, 3.00, 3.00, 3.50, & - & 3.50, 3.50, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: scffac_table(mvt) !< snow cover factor (m) - data (scffac_table(i),i=1,mvt) / 0.005, 0.005, 0.005, 0.005, 0.005, & - & 0.008, 0.008, 0.010, 0.010, 0.010, & - & 0.010, 0.007, 0.021, 0.013, 0.015, & - & 0.008, 0.015, 0.015, 0.015, 0.015, & - & 0.000, 0.000, 0.000, 0.000, 0.000, & - & 0.000, 0.000, 0.000, 0.000, 0.000 / - -! - - real :: saim_table(mvt,12) !< monthly stem area index, one-sided - - data (saim_table (i,1),i=1,mvt) / 0.4, 0.5, 0.3, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, & - & 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - -! &_______________________________________________________________________& - - data (saim_table (i,2),i=1,mvt) / 0.4, 0.5, 0.3, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, & - & 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,3),i=1,mvt) / 0.4, 0.5, 0.3, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, & - & 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,4),i=1,mvt) / 0.3, 0.5, 0.4, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, & - & 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (saim_table (i,5),i=1,mvt) / 0.4, 0.5, 0.4, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, & - & 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,6),i=1,mvt) / 0.5, 0.5, 0.7, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.4, 0.4, 0.4, 0.3, & - & 0.0, 0.4, 0.0, 0.0, 0.0, 0.2, & - & 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,7),i=1,mvt) / 0.5, 0.5, 1.3, 0.9, 0.7, 0.6, & - & 0.4, 0.7, 0.8, 0.8, 0.6, 0.4, & - & 0.0, 0.6, 0.0, 0.0, 0.0, 0.4, & - & 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (saim_table (i,8),i=1,mvt) / 0.6, 0.5, 1.2, 1.2, 0.8, 0.9, & - & 0.6, 1.2, 1.2, 1.3, 0.9, 0.5, & - & 0.0, 0.9, 0.0, 0.0, 0.0, 0.6, & - & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,9),i=1,mvt) / 0.6, 0.5, 1.0, 1.6, 1.0, 1.2, & - & 0.8, 1.4, 1.3, 1.1, 0.9, 0.4, & - & 0.0, 0.7, 0.0, 0.0, 0.0, 0.8, & - & 0.7, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,10),i=1,mvt) / 0.7, 0.5, 0.8, 1.4, 1.0, 0.9, & - & 0.7, 1.1, 0.7, 0.4, 0.6, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.7, & - & 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (saim_table (i,11),i=1,mvt) / 0.6, 0.5, 0.6, 0.6, 0.5, 0.4, & - & 0.3, 0.5, 0.4, 0.4, 0.4, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.3, & - & 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (saim_table (i,12),i=1,mvt) / 0.5, 0.5, 0.5, 0.4, 0.4, 0.3, & - & 0.2, 0.4, 0.4, 0.4, 0.3, 0.3, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, & - & 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -!! lai - real :: laim_table(mvt,12) !< monthly leaf area index, one-sided - - data (laim_table (i,1),i=1,mvt) / 4.0, 4.5, 0.0, 0.0, 2.0, 0.0, & - & 0.0, 0.2, 0.3, 0.4, 0.2, 0.0, & - & 0.0, 0.2, 0.0, 0.0, 0.0, 1.0, & - & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (laim_table (i,2),i=1,mvt) / 4.0, 4.5, 0.0, 0.0, 2.0, 0.0, & - & 0.0, 0.2, 0.3, 0.5, 0.3, 0.0, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 1.0, & - & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,3),i=1,mvt) / 4.0, 4.5, 0.0, 0.3, 2.2, 0.3, & - & 0.2, 0.4, 0.5, 0.6, 0.3, 0.0, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 1.1, & - & 0.7, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,4),i=1,mvt) / 4.0, 4.5, 0.6, 1.2, 2.6, 0.9, & - & 0.6, 1.0, 0.8, 0.7, 0.5, 0.0, & - & 0.0, 0.4, 0.0, 0.0, 0.0, 1.3, & - & 0.8, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (laim_table (i,5),i=1,mvt) / 4.0, 4.5, 1.2, 3.0, 3.5, 2.2, & - & 1.5, 2.4, 1.8, 1.2, 1.5, 1.0, & - & 0.0, 1.1, 0.0, 0.0, 0.0, 1.7, & - & 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,6),i=1,mvt) / 4.0, 4.5, 2.0, 4.7, 4.3, 3.5, & - & 2.3, 4.1, 3.6, 3.0, 2.9, 2.0, & - & 0.0, 2.5, 0.0, 0.0, 0.0, 2.1, & - & 1.8, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,7),i=1,mvt) / 4.0, 4.5, 2.6, 4.5, 4.3, 3.5, & - & 2.3, 4.1, 3.8, 3.5, 3.5, 3.0, & - & 0.0, 3.2, 0.0, 0.0, 0.0, 2.1, & - & 1.8, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (laim_table (i,8),i=1,mvt) / 4.0, 4.5, 1.7, 3.4, 3.7, 2.5, & - & 1.7, 2.7, 2.1, 1.5, 2.7, 3.0, & - & 0.0, 2.2, 0.0, 0.0, 0.0, 1.8, & - & 1.3, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,9),i=1,mvt) / 4.0, 4.5, 1.0, 1.2, 2.6, 0.9, & - & 0.6, 1.0, 0.9, 0.7, 1.2, 1.5, & - & 0.0, 1.1, 0.0, 0.0, 0.0, 1.3, & - & 0.8, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,10),i=1,mvt) / 4.0, 4.5, 0.5, 0.3, 2.2, 0.3, & - & 0.2, 0.4, 0.5, 0.6, 0.3, 0.0, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 1.1, & - & 0.7, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - data (laim_table (i,11),i=1,mvt) / 4.0, 4.5, 0.2, 0.0, 2.0, 0.0, & - & 0.0, 0.2, 0.3, 0.5, 0.3, 0.0, & - & 0.0, 0.3, 0.0, 0.0, 0.0, 1.0, & - & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - data (laim_table (i,12),i=1,mvt) / 4.0, 4.5, 0.0, 0.0, 2.0, 0.0, & - & 0.0, 0.2, 0.3, 0.4, 0.2, 0.0, & - & 0.0, 0.2, 0.0, 0.0, 0.0, 1.0, & - & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: sla_table(mvt) !< single-side leaf area per kg [m2/kg] - data ( sla_table (i),i=1,mvt) / 80, 80, 80, 80, 80, 60, & - & 60, 60, 50, 60, 80, 80, & - & 60, 80, 0, 0, 0, 80, & - & 80, 80, 0, 0, 0, 0, & - & 0, 0, 0, 0, 0, 0 / - - real :: dilefc_table(mvt) !< coeficient for leaf stress death [1/s] - data (dilefc_table (i),i=1,mvt) / 1.20, 0.50, 1.80, 0.60, 0.80, 0.20, & - & 0.20, 0.20, 0.50, 0.20, 0.4, 0.50, & - & 0.00, 0.35, 0.00, 0.00, 0.00, 0.30, & - & 0.40, 0.30, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: dilefw_table(mvt) !< coeficient for leaf stress death [1/s] - data (dilefw_table(i),i=1,mvt) / 0.20, 4.00, 0.20, 0.20, 0.20, 0.20, & - & 0.20, 0.20, 0.50, 0.10, 0.2, 0.20, & - & 0.00, 0.20, 0.00, 0.00, 0.00, 0.20, & - & 0.20, 0.20, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: fragr_table(mvt) !< fraction of growth respiration !original was 0.3 - data ( fragr_table(i),i=1,mvt) / 0.10, 0.20, 0.10, 0.20, 0.10, 0.20, & - & 0.20, 0.20, 0.20, 0.20, 0.1, 0.20, & - & 0.00, 0.20, 0.00, 0.10, 0.00, 0.10, & - & 0.10, 0.10, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: ltovrc_table(mvt) !< leaf turnover [1/s] - data ( ltovrc_table(i),i=1,mvt) / 0.5, 0.55, 0.2, 0.55, 0.5, 0.65, & - & 0.65, 0.65, 0.65, 0.50, 1.4, 1.6, & - & 0.0, 1.2, 0.0, 0.0, 0.0, 1.3, & - & 1.4, 1.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -! - real :: c3psn_table(mvt) !< photosynthetic pathway: 0. = c4, 1. = c3 - data ( c3psn_table (i),i=1,mvt) / 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & - & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & - & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & - & 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: kc25_table(mvt) !< co2 michaelis-menten constant at 25c (pa) - data ( kc25_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & - & 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & - & 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & - & 30.0, 30.0, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: akc_table(mvt) !< q10 for kc25 - data ( akc_table (i),i=1,mvt) / 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & - & 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & - & 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & - & 2.1, 2.1, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - - real :: ko25_table(mvt) !< o2 michaelis-menten constant at 25c (pa) - data ( ko25_table (i),i=1,mvt) / 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & - & 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & - & 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & - & 3.e4, 3.e4, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - - real :: ako_table(mvt) !< q10 for ko25 - data ( ako_table (i),i=1,mvt) / 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & - & 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & - & 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & - & 1.2, 1.2, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: vcmx25_table(mvt) !< maximum rate of carboxylation at 25c (umol co2/m**2/s) - data ( vcmx25_table(i),i=1,mvt) / 50.0, 60.0, 60.0, 60.0, 55.0, 40.0, & - & 40.0, 40.0, 40.0, 40.0, 50.0, 80.0, & - & 0.00, 60.0, 0.00, 0.00, 0.00, 50.0, & - & 50.0, 50.0, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - - real :: avcmx_table(mvt) !< q10 for vcmx25 - data ( avcmx_table (i),i=1,mvt) / 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & - & 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & - & 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & - & 2.4, 2.4, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - - - real :: bp_table(mvt) !< minimum leaf conductance (umol/m**2/s) - data ( bp_table (i),i=1,mvt) / 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, & - & 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, & - & 1.e15, 2.e3,1.e15, 2.e3,1.e15, 2.e3, & - & 2.e3, 2.e3, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: mp_table(mvt) !< slope of conductance-to-photosynthesis relationship - data ( mp_table (i),i=1,mvt) / 6., 9., 6., 9., 9., 9., & - & 9., 9., 9., 9., 9., 9., & - & 9., 9., 9., 9., 9., 9., & - & 9., 9., 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: qe25_table(mvt) !< quantum efficiency at 25c (umol co2 / umo photon) - data ( qe25_table (i),i=1,mvt) / 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, & - & 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, & - & 0.00, 0.06, 0.00, 0.06, 0.00, 0.06, & - & 0.06, 0.06, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: aqe_table(mvt) !< q10 for qe25 - data ( aqe_table (i),i=1,mvt) / 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & - & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & - & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & - & 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: rmf25_table(mvt) !< leaf maintenance respiration at 25c (umol co2/m**2/s) - data ( rmf25_table (i),i=1,mvt) / 3.00, 0.65, 4.00, 3.00, 3.00, 0.26, & - & 0.26, 0.26, 0.80, 1.80, 3.2, 1.00, & - & 0.00, 1.45, 0.00, 0.00, 0.00, 3.00, & - & 3.00, 3.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: rms25_table(mvt) !< stem maintenance respiration at 25c (umol co2/kg bio/s) - data ( rms25_table (i),i=1,mvt) / 0.90, 0.30, 0.64, 0.10, 0.80, 0.10, & - & 0.10, 0.10, 0.32, 0.10, 0.10, 0.10, & - & 0.00, 0.10, 0.00, 0.00, 0.00, 0.10, & - & 0.10, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: rmr25_table(mvt) !< root maintenance respiration at 25c (umol co2/kg bio/s) - data ( rmr25_table (i),i=1,mvt) / 0.36, 0.05, 0.05, 0.01, 0.03, 0.00, & - & 0.00, 0.00, 0.01, 1.20, 0.0, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 2.11, & - & 2.11, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: arm_table(mvt) !< q10 for maintenance respiration - data ( arm_table (i),i=1,mvt) / 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & - & 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & - & 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & - & 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: folnmx_table(mvt) !< foliage nitrogen concentration when f(n)=1 (%) - data (folnmx_table (i),i=1,mvt) / 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, & - & 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, & - & 0.00, 1.5, 0.00, 1.5, 0.00, 1.5, & - & 1.5, 1.5, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: tmin_table(mvt) !< minimum temperature for photosynthesis (k) - data ( tmin_table (i),i=1,mvt) / 265, 273, 268, 273, 268, 273, & - & 273, 273, 273, 273, 268, 273, & - & 0, 273, 0, 0, 0, 268, & - & 268, 268, 0, 0, 0, 0, & - & 0, 0, 0, 0, 0, 0 / - - -! - real :: xl_table(mvt) !< leaf/stem orientation index - data ( xl_table (i),i=1,mvt) / 0.010,0.010,0.010,0.250,0.250,0.010, & - & 0.010, 0.010, 0.010, -0.30, -0.025, -0.30, & - & 0.000, -0.30, 0.000, 0.000, 0.000, 0.250, & - & 0.250, 0.250, 0.000, 0.000, 0.000, 0.000, & - & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / -! - real :: rhol_table(mvt,mband) !< leaf reflectance: 1=vis, 2=nir - - data ( rhol_table (i,1),i=1,mvt) / 0.07, 0.10, 0.07, 0.10, 0.10, 0.07, & - & 0.07, 0.07, 0.10, 0.11, 0.105, 0.11, & - & 0.00, 0.11, 0.00, 0.00, 0.00, 0.10, & - & 0.10, 0.10, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - -! &_______________________________________________________________________& - - data ( rhol_table (i,2),i=1,mvt) / 0.35, 0.45, 0.35, 0.45, 0.45, 0.35, & - & 0.35, 0.35, 0.45, 0.58, 0.515, 0.58, & - & 0.00, 0.58, 0.00, 0.00, 0.00, 0.45, & - & 0.45, 0.45, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: rhos_table(mvt,mband) !< stem reflectance: 1=vis, 2=nir - - data ( rhos_table (i,1),i=1,mvt) / 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, & - & 0.16, 0.16, 0.16, 0.36, 0.26, 0.36, & - & 0.00, 0.36, 0.00, 0.00, 0.00, 0.16, & - & 0.16,0.16, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - data ( rhos_table (i,2),i=1,mvt) / 0.39, 0.39, 0.39, 0.39, 0.39, 0.39, & - & 0.39, 0.39, 0.39, 0.58, 0.485, 0.58, & - & 0.00, 0.58, 0.00, 0.00, 0.00, 0.39, & - & 0.39, 0.39, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - -! &_______________________________________________________________________& - - real :: taul_table(mvt,mband) !< leaf transmittance: 1=vis, 2=nir -! - data ( taul_table (i,1),i=1,mvt) / 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, & - & 0.05, 0.05, 0.05, 0.07, 0.06, 0.07, & - & 0.00, 0.07, 0.00, 0.00, 0.00, 0.05, & - & 0.05, 0.05,0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - data ( taul_table (i,2),i=1,mvt) / 0.10, 0.25, 0.10, 0.25, 0.25, 0.10, & - & 0.10, 0.10, 0.25, 0.25, 0.25, 0.25, & - & 0.00, 0.25, 0.00, 0.00, 0.00, 0.25, & - & 0.25, 0.25, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: taus_table(mvt,mband) !< stem transmittance: 1=vis, 2=nir - data(taus_table (i,1),i=1,mvt) / 0.001,0.001,0.001,0.001,0.001, 0.001, & - & 0.001, 0.001, 0.001, 0.220, 0.1105,0.220, & - & 0.000, 0.220, 0.000, 0.000, 0.000, 0.001, & - & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000, & - & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / - - - data(taus_table (i,2),i=1,mvt) / 0.001,0.001,0.001,0.001,0.001, 0.001, & - & 0.001, 0.001, 0.001, 0.380, 0.1905, 0.380, & - & 0.000, 0.380, 0.000, 0.000, 0.000, 0.001, & - & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000, & - & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / - - - real :: mrp_table(mvt) !< microbial respiration parameter (umol co2 /kg c/ s) - data ( mrp_table (i),i=1,mvt) / 0.37, 0.23, 0.37, 0.40, 0.30, 0.19, & - & 0.19, 0.19, 0.40, 0.17,0.285, 0.23, & - & 0.00, 0.23, 0.00, 0.00, 0.00, 0.23, & - & 0.20, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - -! - real :: cwpvt_table(mvt) !< empirical canopy wind parameter - data ( cwpvt_table (i),i=1,mvt) / 0.09, 0.335, 0.09, 0.335, 0.145, 0.50, & - & 1.00, 0.65, 0.50, 2.50, 0.585, 0.835, & - & 0.835, 0.835, 0.09, 0.09, 0.09, 0.335, & - & 0.50, 0.09, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - - real :: wrrat_table(mvt) !< wood to non-wood ratio - data ( wrrat_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 3.00, & - & 3.00, 3.00, 3.00, 0.00, 15.0, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 3.00, & - & 3.00, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: wdpool_table(mvt) !< wood pool (switch 1 or 0) depending on woody or not [-] - data ( wdpool_table(i),i=1,mvt) / 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, & - & 1.00, 1.00, 1.00, 0.00, 0.5, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 1.00, & - & 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: tdlef_table(mvt) !< characteristic t for leaf freezing [k] - data ( tdlef_table (i),i=1,mvt) / 278, 278, 268, 278, 268, 278, & - & 278, 278, 278, 278, 268, 278, & - & 278, 278, 0, 0, 0, 268, & - & 268, 268, 0, 0, 0, 0, & - & 0, 0, 0, 0, 0, 0 / - - - real :: nroot_table(mvt) !< number of soil layers with root present - data ( nroot_table (i),i=1,mvt) / 4, 4, 4, 4, 4, 3, & - & 3, 3, 3, 3, 2, 3, & - & 1, 3, 1, 1, 0, 3, & - & 3, 2, 0, 0, 0, 0, & - & 0, 0, 0, 0, 0, 0 / - - real :: rgl_table(mvt) !< parameter used in radiation stress function - data ( rgl_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 100.0,& - & 100.0, 100.0, 65.0, 100.0, 65.0, 100.0, & - & 999.0, 100.0, 999.0, 999.0, 30.0, 100.0, & - & 100.0, 100.0, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: rs_table(mvt) !< minimum stomatal resistance [s m-1] - data ( rs_table (i),i=1,mvt) / 125.0, 150.0,150.0,100.0,125.0,300.0,& - & 170.0,300.0, 70.0, 40.0, 70.0, 40.0, & - & 200.0, 40.0, 999.0,999.0,100.0,150.0, & - & 150.0, 200.0,0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: hs_table(mvt) !< parameter used in vapor pressure deficit function - data ( hs_table (i),i=1,mvt) / 47.35,41.69,47.35,54.53,51.93,42.00, & - & 39.18, 42.00, 54.53, 36.35, 55.97, 36.25, & - & 999.0, 36.25, 999.0, 999.0, 51.75, 42.00, & - & 42.00, 42.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - - real :: topt_table(mvt) !< optimum transpiration air temperature [k] - data ( topt_table (i),i=1,mvt) / 298.0,298.0,298.0,298.0,298.0,298.0, & - & 298.0, 298.0, 298.0, 298.0, 298.0, 298.0, & - & 298.0, 298.0, 298.0, 298.0, 298.0, 298.0, & - & 298.0, 298.0, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: rsmax_table(mvt) !< maximal stomatal resistance [s m-1] - data ( rsmax_table (i),i=1,mvt) / 5000., 5000.,5000.,5000.,5000.,5000.,& - & 5000., 5000., 5000., 5000., 5000., 5000., & - & 5000., 5000., 5000., 5000., 5000., 5000., & - & 5000., 5000., 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - -!!!!!!!!!!!!!! Wield not defined but read !!!!!!!!!!!!!!!!1 - - real :: slarea_table(mvt) - - data (slarea_table (i),i=1,mvt) / 0.0090,0.0200,0.0200,0.0258,0.0223, & - & 0.0227, 0.0188, 0.0227, 0.0236, 0.0060, & - & 0.0295, 0.0200, 0.0228, 0.0223, 0.02, & - & 0.02, 0.0422, 0.02, 0.02, 0.02, & - & 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0 / - -! &_______________________________________________________________________& - - real :: esp1_table(mvt) - - data (esp1_table (i),i=1,mvt) / 0.46, 0.00, 0.00,46.86,30.98, 21.62, & - & 0.11, 21.62, 22.80, 0.02, 0.815, 0.00, & - & 41.87, 0.04, 0.0, 0.0, 2.31, 0.0, & - & 0.0, 0.0,0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - real :: esp2_table(mvt) - - data (esp2_table (i),i=1,mvt) / 3.34, 0.00, 0.00, 0.38, 0.96, 0.92, & - & 0.22, 0.92, 0.59, 0.05, 0.535, 0.00, & - & 0.98, 0.09, 0.0, 0.0, 1.47, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - - real :: esp3_table(mvt) - - data (esp3_table (i),i=1,mvt) / 1.85, 0.00, 0.00, 1.84, 1.84, 1.73, & - & 1.26, 1.73, 1.37, 0.03, 0.605, 0.00, & - & 1.82, 0.05, 0.0, 0.0, 1.70, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - - -! &_______________________________________________________________________& - - real :: esp4_table(mvt) - - data (esp4_table (i),i=1,mvt) / 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: esp5_table(mvt) - - data (esp5_table (i),i=1,mvt) / 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & - & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - -!!!!!!!!!!!!!!!!!!! what are the tables used for !!!!!!!!!!!!!! + integer :: isurban_table + integer :: iswater_table + integer :: isbarren_table + integer :: isice_table + integer :: iscrop_table + integer :: eblforest_table + integer :: natural_table + integer :: lcz_1_table + integer :: lcz_2_table + integer :: lcz_3_table + integer :: lcz_4_table + integer :: lcz_5_table + integer :: lcz_6_table + integer :: lcz_7_table + integer :: lcz_8_table + integer :: lcz_9_table + integer :: lcz_10_table + integer :: lcz_11_table + real (kind=kind_phys) :: ch2op_table(mvt) !< maximum intercepted h2o per unit lai+sai (mm) + real (kind=kind_phys) :: dleaf_table(mvt) !< characteristic leaf dimension (m) + real (kind=kind_phys) :: z0mvt_table(mvt) !< momentum roughness length (m) + real (kind=kind_phys) :: hvt_table(mvt) !< top of canopy (m) + real (kind=kind_phys) :: hvb_table(mvt) !< bottom of canopy (m) + real (kind=kind_phys) :: z0mhvt_table(mvt) !< ratio of z0m to hvt + real (kind=kind_phys) :: den_table(mvt) !< tree density (no. of trunks per m2) + real (kind=kind_phys) :: rc_table(mvt) !< tree crown radius (m) + real (kind=kind_phys) :: mfsno_table(mvt) !< snowmelt curve parameter () + real (kind=kind_phys) :: scffac_table(mvt) !< snow cover factor (m) + real (kind=kind_phys) :: cbiom_table(mvt) !< canopy biomass heat capacity parameter (m) + real (kind=kind_phys) :: saim_table(mvt,12) !< monthly stem area index, one-sided + real (kind=kind_phys) :: laim_table(mvt,12) !< monthly leaf area index, one-sided + real (kind=kind_phys) :: sla_table(mvt) !< single-side leaf area per kg [m2/kg] + real (kind=kind_phys) :: dilefc_table(mvt) !< coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: dilefw_table(mvt) !< coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: fragr_table(mvt) !< fraction of growth respiration !original was 0.3 + real (kind=kind_phys) :: ltovrc_table(mvt) !< leaf turnover [1/s] + + real (kind=kind_phys) :: c3psn_table(mvt) !< photosynthetic pathway: 0. = c4, 1. = c3 + real (kind=kind_phys) :: kc25_table(mvt) !< co2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: akc_table(mvt) !< q10 for kc25 + real (kind=kind_phys) :: ko25_table(mvt) !< o2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: ako_table(mvt) !< q10 for ko25 + real (kind=kind_phys) :: vcmx25_table(mvt) !< maximum rate of carboxylation at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: avcmx_table(mvt) !< q10 for vcmx25 + real (kind=kind_phys) :: bp_table(mvt) !< minimum leaf conductance (umol/m**2/s) + real (kind=kind_phys) :: mp_table(mvt) !< slope of conductance-to-photosynthesis relationship + real (kind=kind_phys) :: qe25_table(mvt) !< quantum efficiency at 25c (umol co2 / umo photon) + real (kind=kind_phys) :: aqe_table(mvt) !< q10 for qe25 + real (kind=kind_phys) :: rmf25_table(mvt) !< leaf maintenance respiration at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: rms25_table(mvt) !< stem maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: rmr25_table(mvt) !< root maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: arm_table(mvt) !< q10 for maintenance respiration + real (kind=kind_phys) :: folnmx_table(mvt) !< foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: tmin_table(mvt) !< minimum temperature for photosynthesis (k) + + real (kind=kind_phys) :: xl_table(mvt) !< leaf/stem orientation index + real (kind=kind_phys) :: rhol_table(mvt,mband) !< leaf reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: rhos_table(mvt,mband) !< stem reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: taul_table(mvt,mband) !< leaf transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: taus_table(mvt,mband) !< stem transmittance: 1=vis, 2=nir + + real (kind=kind_phys) :: mrp_table(mvt) !< microbial respiration parameter (umol co2 /kg c/ s) + real (kind=kind_phys) :: cwpvt_table(mvt) !< empirical canopy wind parameter + + real (kind=kind_phys) :: wrrat_table(mvt) !< wood to non-wood ratio + real (kind=kind_phys) :: wdpool_table(mvt) !< wood pool (switch 1 or 0) depending on woody or not [-] + real (kind=kind_phys) :: tdlef_table(mvt) !< characteristic t for leaf freezing [k] + + real (kind=kind_phys) :: nroot_table(mvt) !< number of soil layers with root present + real (kind=kind_phys) :: rgl_table(mvt) !< parameter used in radiation stress function + real (kind=kind_phys) :: rs_table(mvt) !< minimum stomatal resistance [s m-1] + real (kind=kind_phys) :: hs_table(mvt) !< parameter used in vapor pressure deficit function + real (kind=kind_phys) :: topt_table(mvt) !< optimum transpiration air temperature [k] + real (kind=kind_phys) :: rsmax_table(mvt) !< maximal stomatal resistance [s m-1] ! soilparm.tbl parameters - real :: bexp_table(max_soiltyp) - - data (bexp_table(i), i=1,slcats) /2.79, 4.26, 4.74, 5.33, 3.86, 5.25,& - & 6.77, 8.72, 8.17, 10.73, 10.39, 11.55, & - & 5.25, 0.0, 2.79, 4.26, 11.55, 2.79, & - & 2.79, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: smcdry_table(max_soiltyp) - data (smcdry_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.061,& - & 0.066, 0.069, 0.120, 0.103, 0.100, 0.126, 0.138, & - & 0.066, 0.0, 0.006, 0.028, 0.030, 0.006, & - & 0.010, 0.000, 0.000, 0.000, 0.000, 0.000, & - & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - - real :: f1_table(max_soiltyp) - - data (f1_table(i), i=1,slcats) /-0.472, -1.044, -0.569, 0.162, 0.162, & - & -0.327, -1.491, -1.118, -1.297, -3.209, -1.916, -2.138, & - & -0.327, 0.000, -1.111, -1.044, -10.472, -0.472, & - & -0.472, 0.000, 0.000, 0.000, 0.000, 0.000, & - & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - - real :: smcmax_table(max_soiltyp) - - data (smcmax_table(i), i=1,slcats) /0.339, 0.421, 0.434, 0.476, 0.484,& - & 0.439, 0.404, 0.464, 0.465, 0.406, 0.468, 0.468, & - & 0.439, 1.000, 0.200, 0.421, 0.468, 0.200, & - & 0.339, 0.339, 0.000, 0.000, 0.000, 0.000, & - & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - - real :: smcref_table(max_soiltyp) - - data (smcref_table(i), i=1,slcats) /0.192, 0.283, 0.312, 0.360, 0.347, & - & 0.329, 0.315, 0.387, 0.382, 0.338, 0.404, 0.412, & - & 0.329, 0.000, 0.170, 0.283, 0.454, 0.170, & - & 0.192, 0.000, 0.000, 0.000, 0.000, 0.000, & - & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - - real :: psisat_table(max_soiltyp) - - data (psisat_table(i), i=1,slcats) /0.069, 0.036, 0.141, 0.759, 0.955, & - & 0.355, 0.135, 0.617, 0.263, 0.098, 0.324, 0.468, & - & 0.355, 0.00, 0.069, 0.036, 0.468, 0.069, & - & 0.069, 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: dksat_table(max_soiltyp) - - data (dksat_table(i), i=1,slcats) /4.66e-5, 1.41e-5, 5.23e-6, 2.81e-6, & - & 2.18e-6, 3.38e-6, 4.45e-6, 2.03e-6, 2.45e-6,7.22e-6, & - & 1.34e-6, 9.74e-7, 3.38e-6, 0.00, 1.41e-4, & - & 1.41e-5, 9.74e-7, 1.41e-4, 4.66e-5,0.0, & - & 0.00, 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: dwsat_table(max_soiltyp) - - data (dwsat_table(i), i=1,slcats) / 2.65e-5, 5.14e-6, 8.05e-6, & - & 2.39e-5, 1.66e-5, 1.43e-5, 1.01e-5, 2.35e-5, 1.13e-5, 1.87e-5, & - & 9.64e-6, 1.12e-5, 1.43e-5, 0.00, 1.36e-4, 5.14e-6, & - & 1.12e-5, 1.36e-4, 2.65e-5, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00 / - - real :: smcwlt_table(max_soiltyp) - - data (smcwlt_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.061,& - & 0.066, 0.069, 0.120, 0.103, 0.100, 0.126, 0.138, & - & 0.066, 0.000, 0.006, 0.028, 0.030, 0.006, & - & 0.010, 0.000, 0.000, 0.000, 0.000, 0.000, & - & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - - real :: quartz_table(max_soiltyp) - - data (quartz_table(i), i=1,slcats) /0.92, 0.82, 0.60, 0.25, 0.10, & - & 0.40, 0.60, 0.10, 0.35, 0.52, 0.10, & - & 0.25, 0.05, 0.60, 0.07, 0.25, 0.60, & - & 0.52, 0.92, 0.00, 0.00, 0.00, 0.00,0.00, & - & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - + integer :: slcats + + real (kind=kind_phys) :: bexp_table(max_soiltyp) + real (kind=kind_phys) :: smcdry_table(max_soiltyp) + real (kind=kind_phys) :: f1_table(max_soiltyp) + real (kind=kind_phys) :: smcmax_table(max_soiltyp) + real (kind=kind_phys) :: smcref_table(max_soiltyp) + real (kind=kind_phys) :: psisat_table(max_soiltyp) + real (kind=kind_phys) :: dksat_table(max_soiltyp) + real (kind=kind_phys) :: dwsat_table(max_soiltyp) + real (kind=kind_phys) :: smcwlt_table(max_soiltyp) + real (kind=kind_phys) :: quartz_table(max_soiltyp) + real (kind=kind_phys) :: bvic_table(max_soiltyp) !vic model infiltration parameter (-) for opt_run=6 + real (kind=kind_phys) :: axaj_table(max_soiltyp) !Xinanjiang: Tension water distribution inflection parameter [-] for opt_run=7 + real (kind=kind_phys) :: bxaj_table(max_soiltyp) !Xinanjiang: Tension water distribution shape parameter [-] for opt_run=7 + real (kind=kind_phys) :: xxaj_table(max_soiltyp) !Xinanjiang: Free water distribution shape parameter [-] for opt_run=7 + real (kind=kind_phys) :: bdvic_table(max_soiltyp) !VIC model infiltration parameter (-) + real (kind=kind_phys) :: gdvic_table(max_soiltyp) !mean capilary drive (m) + real (kind=kind_phys) :: bbvic_table(max_soiltyp) !heterogeniety parameter for DVIC infiltration [-] ! genparm.tbl parameters - real :: slope_table(9) !< slope factor for soil drainage - data (slope_table(i), i=1,9) /0.1, 0.6, 1.0, 0.35, 0.55, 0.8, & - & 0.63, 0.0, 0.0 / + real (kind=kind_phys) :: slope_table(num_slope) !< slope factor for soil drainage - real :: csoil_table = 2.00e+6 !< soil heat capacity [j m-3 k-1] - real :: refdk_table = 2.0e-6 !< parameter in the surface runoff parameterization - real :: refkdt_table = 3.0 !< parameter in the surface runoff parameterization - real :: frzk_table =0.15 !< frozen ground parameter - real :: zbot_table = -8.0 !< depth [m] of lower boundary soil temperature - real :: czil_table = 0.1 !< parameter used in the calculation of the roughness length for heat + real (kind=kind_phys) :: csoil_table !< soil heat capacity [j m-3 k-1] + real (kind=kind_phys) :: refdk_table !< parameter in the surface runoff parameterization + real (kind=kind_phys) :: refkdt_table !< parameter in the surface runoff parameterization + real (kind=kind_phys) :: frzk_table !< frozen ground parameter + real (kind=kind_phys) :: zbot_table !< depth [m] of lower boundary soil temperature + real (kind=kind_phys) :: czil_table !< parameter used in the calculation of the roughness length for heat ! mptable.tbl radiation parameters -! &_______________________________________________________________________& - real :: albsat_table(msc,mband) !< saturated soil albedos: 1=vis, 2=nir - data(albsat_table(i,1),i=1,8)/0.15,0.11,0.10,0.09,0.08,0.07,0.06,0.05/ - data(albsat_table(i,2),i=1,8)/0.30,0.22,0.20,0.18,0.16,0.14,0.12,0.10/ - - real :: albdry_table(msc,mband) !< dry soil albedos: 1=vis, 2=nir - data(albdry_table(i,1),i=1,8)/0.27,0.22,0.20,0.18,0.16,0.14,0.12,0.10/ - data(albdry_table(i,2),i=1,8)/0.54,0.44,0.40,0.36,0.32,0.28,0.24,0.20/ - - real :: albice_table(mband) !< albedo land ice: 1=vis, 2=nir - data (albice_table(i),i=1,mband) /0.80, 0.55/ - - real :: alblak_table(mband) !< albedo frozen lakes: 1=vis, 2=nir - data (alblak_table(i),i=1,mband) /0.60, 0.40/ - - real :: omegas_table(mband) !< two-stream parameter omega for snow - data (omegas_table(i),i=1,mband) /0.8, 0.4/ - - real :: betads_table = 0.5 !< two-stream parameter betad for snow - real :: betais_table = 0.5 !< two-stream parameter betad for snow - - real :: eg_table(2) !< emissivity - data eg_table /0.97, 0.98 / - - real :: betads, betais - data betads, betais /0.5, 0.5/ - + real (kind=kind_phys) :: albsat_table(msc,mband) !< saturated soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albdry_table(msc,mband) !< dry soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albice_table(mband) !< albedo land ice: 1=vis, 2=nir + real (kind=kind_phys) :: alblak_table(mband) !< albedo frozen lakes: 1=vis, 2=nir + real (kind=kind_phys) :: omegas_table(mband) !< two-stream parameter omega for snow + real (kind=kind_phys) :: betads_table !< two-stream parameter betad for snow + real (kind=kind_phys) :: betais_table !< two-stream parameter betad for snow + real (kind=kind_phys) :: eg_table(2) !< emissivity ! mptable.tbl global parameters - real :: co2_table = 395.e-06 !< co2 partial pressure - real :: o2_table = 0.209 !< o2 partial pressure - real :: timean_table = 10.5 !< gridcell mean topgraphic index (global mean) - real :: fsatmx_table = 0.38 !< maximum surface saturated fraction (global mean) - - real :: z0sno_table = 0.002 !< snow surface roughness length (m) (0.002) - real :: ssi_table = 0.03 !< liquid water holding capacity for snowpack (m3/m3) (0.03) - real :: snow_ret_fac_table = 5.e-5 !< snowpack water release timescale factor (1/s) - real :: swemx_table = 1.00 !< new snow mass to fully cover old snow (mm) - - real :: tau0_table = 1.e6 !< tau0 from yang97 eqn. 10a - real :: grain_growth_table = 5000. !< growth from vapor diffusion yang97 eqn. 10b - real :: extra_growth_table = 10. !< extra growth near freezing yang97 eqn. 10c - real :: dirt_soot_table = 0.3 !< dirt and soot term yang97 eqn. 10d - real :: bats_cosz_table = 2.0 !< zenith angle snow albedo adjustment; b in yang97 eqn. 15 - real :: bats_vis_new_table = 0.95 !< new snow visible albedo - real :: bats_nir_new_table = 0.65 !< new snow nir albedo - real :: bats_vis_age_table = 0.2 !< age factor for diffuse visible snow albedo yang97 eqn. 17 - real :: bats_nir_age_table = 0.5 !< age factor for diffuse nir snow albedo yang97 eqn. 18 - real :: bats_vis_dir_table = 0.4 !< cosz factor for direct visible snow albedo yang97 eqn. 15 - real :: bats_nir_dir_table = 0.4 !< cosz factor for direct nir snow albedo yang97 eqn. 16 - real :: rsurf_snow_table = 50.0 !< surface resistance for snow(s/m) - real :: rsurf_exp_table = 5.0 !< exponent in the shape parameter for soil resistance option 1 - real :: snow_emis_table = 0.95 !< surface emissivity - - -! Noah mp crops -! mptable.tbl crop parameters -! ! NCROP = 5 -! 1: Corn -! 2: Soybean -! 3: Sorghum -! 4: Rice -! 5: Winter wheat + real (kind=kind_phys) :: co2_table !< co2 partial pressure + real (kind=kind_phys) :: o2_table !< o2 partial pressure + real (kind=kind_phys) :: timean_table !< gridcell mean topgraphic index (global mean) + real (kind=kind_phys) :: fsatmx_table !< maximum surface saturated fraction (global mean) + real (kind=kind_phys) :: z0sno_table !< snow surface roughness length (m) (0.002) + real (kind=kind_phys) :: ssi_table !< liquid water holding capacity for snowpack (m3/m3) (0.03) + real (kind=kind_phys) :: snow_ret_fac_table !< snowpack water release timescale factor (1/s) + real (kind=kind_phys) :: snow_emis_table !< surface emissivity + real (kind=kind_phys) :: swemx_table !< new snow mass to fully cover old snow (mm) + real (kind=kind_phys) :: tau0_table !< tau0 from yang97 eqn. 10a + real (kind=kind_phys) :: grain_growth_table !< growth from vapor diffusion yang97 eqn. 10b + real (kind=kind_phys) :: extra_growth_table !< extra growth near freezing yang97 eqn. 10c + real (kind=kind_phys) :: dirt_soot_table !< dirt and soot term yang97 eqn. 10d + real (kind=kind_phys) :: bats_cosz_table !< zenith angle snow albedo adjustment; b in yang97 eqn. 15 + real (kind=kind_phys) :: bats_vis_new_table !< new snow visible albedo + real (kind=kind_phys) :: bats_nir_new_table !< new snow nir albedo + real (kind=kind_phys) :: bats_vis_age_table !< age factor for diffuse visible snow albedo yang97 eqn. 17 + real (kind=kind_phys) :: bats_nir_age_table !< age factor for diffuse nir snow albedo yang97 eqn. 18 + real (kind=kind_phys) :: bats_vis_dir_table !< cosz factor for direct visible snow albedo yang97 eqn. 15 + real (kind=kind_phys) :: bats_nir_dir_table !< cosz factor for direct nir snow albedo yang97 eqn. 16 + real (kind=kind_phys) :: rsurf_snow_table !< surface resistance for snow(s/m) + real (kind=kind_phys) :: rsurf_exp_table !< exponent in the shape parameter for soil resistance option 1 + +! mptable.tbl irrigation parameters + + real (kind=kind_phys) :: irr_frac_table ! irrigation Fraction + integer :: irr_har_table ! number of days before harvest date to stop irrigation + real (kind=kind_phys) :: irr_lai_table ! Minimum lai to trigger irrigation + real (kind=kind_phys) :: irr_mad_table ! management allowable deficit (0-1) + real (kind=kind_phys) :: filoss_table ! fraction of flood irrigation loss (0-1) + real (kind=kind_phys) :: sprir_rate_table ! mm/h, sprinkler irrigation rate + real (kind=kind_phys) :: micir_rate_table ! mm/h, micro irrigation rate + real (kind=kind_phys) :: firtfac_table ! flood application rate factor + real (kind=kind_phys) :: ir_rain_table ! maximum precipitation to stop irrigation trigger +! mptable.tbl crop parameters -! &_______________________________________________________________________& + integer :: default_crop_table ! Default crop index integer :: pltday_table(ncrop) !< planting date - data (pltday_table(i), i=1,5) /130,111,111,111,111/ - integer :: hsday_table(ncrop) !< harvest date - data (hsday_table(i),i=1,5) /280,300,300,300,300/ - - real :: plantpop_table(ncrop) !< plant density [per ha] - used? - data (plantpop_table(i),i=1,5) /78.0,78.0,78.0,78.0,78.0/ - - real :: irri_table(ncrop) !< irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) - data (irri_table(i),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: gddtbase_table(ncrop) !< base temperature for gdd accumulation [c] - data (gddtbase_table(i),i=1,5) /10.0,10.0,10.0,10.0,10.0/ - - real :: gddtcut_table(ncrop) !< upper temperature for gdd accumulation [c] - data (gddtcut_table(i),i=1,5) /30.0,30.0,30.0,30.0,30.0/ - - real :: gdds1_table(ncrop) !< gdd from seeding to emergence - data (gdds1_table(i),i=1,5) /60.0,50.0,50.0,50.0,50.0/ - - real :: gdds2_table(ncrop) !< gdd from seeding to initial vegetative - data (gdds2_table(i),i=1,5) /675.0,718.0,718.0,718.0,718.0/ - - real :: gdds3_table(ncrop) !< gdd from seeding to post vegetative - data (gdds3_table(i),i=1,5) /1183.0,933.0,933.0,933.0,933.0/ - - real :: gdds4_table(ncrop) !< gdd from seeding to intial reproductive - data (gdds4_table(i),i=1,5) /1253.0,1103.0,1103.0,1103.0,1103.0/ - - real :: gdds5_table(ncrop) !< gdd from seeding to pysical maturity - data (gdds5_table(i),i=1,5) /1605.0,1555.0,1555.0,1555.0,1555.0/ + real (kind=kind_phys) :: plantpop_table(ncrop) !< plant density [per ha] - used? + real (kind=kind_phys) :: irri_table(ncrop) !< irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) + + real (kind=kind_phys) :: gddtbase_table(ncrop) !< base temperature for gdd accumulation [c] + real (kind=kind_phys) :: gddtcut_table(ncrop) !< upper temperature for gdd accumulation [c] + real (kind=kind_phys) :: gdds1_table(ncrop) !< gdd from seeding to emergence + real (kind=kind_phys) :: gdds2_table(ncrop) !< gdd from seeding to initial vegetative + real (kind=kind_phys) :: gdds3_table(ncrop) !< gdd from seeding to post vegetative + real (kind=kind_phys) :: gdds4_table(ncrop) !< gdd from seeding to intial reproductive + real (kind=kind_phys) :: gdds5_table(ncrop) !< gdd from seeding to pysical maturity + + real (kind=kind_phys) :: c3psni_table(ncrop) !photosynthetic pathway: 0. = c4, 1. = c3 ! Zhe Zhang 2020-07-03 + real (kind=kind_phys) :: kc25i_table(ncrop) !co2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: akci_table(ncrop) !q10 for kc25 + real (kind=kind_phys) :: ko25i_table(ncrop) !o2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: akoi_table(ncrop) !q10 for ko25 + real (kind=kind_phys) :: vcmx25i_table(ncrop) !maximum rate of carboxylation at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: avcmxi_table(ncrop) !q10 for vcmx25 + real (kind=kind_phys) :: bpi_table(ncrop) !minimum leaf conductance (umol/m**2/s) + real (kind=kind_phys) :: mpi_table(ncrop) !slope of conductance-to-photosynthesis relationship + real (kind=kind_phys) :: qe25i_table(ncrop) !quantum efficiency at 25c (umol co2 / umol photon) + real (kind=kind_phys) :: folnmxi_table(ncrop) !foliage nitrogen concentration when integer :: c3c4_table(ncrop) !< photosynthetic pathway: 1. = c3 2. = c4 - data (c3c4_table(i),i=1,5) /2.0,1.0,2.0,2.0,2.0/ - - real :: aref_table(ncrop) !< reference maximum co2 assimulation rate - data (aref_table(i),i=1,5) /7.0,7.0,7.0,7.0,7.0/ - - real :: psnrf_table(ncrop) !< co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) - data (psnrf_table(i),i=1,5) /0.85,0.85,0.85,0.85,0.85/ - - real :: i2par_table(ncrop) !< fraction of incoming solar radiation to photosynthetically active radiation - data (i2par_table(i),i=1,5) / 0.5,0.5,0.5,0.5,0.5/ - - real :: tassim0_table(ncrop) !< minimum temperature for co2 assimulation [c] - data (tassim0_table(i),i=1,5) /8.0,8.0,8.0,8.0,8.0/ - - real :: tassim1_table(ncrop) !< co2 assimulation linearly increasing until temperature reaches t1 [c] - data (tassim1_table(i),i=1,5) /18.0,18.0,18.0,18.0,18.0/ - - real :: tassim2_table(ncrop) !< co2 assmilation rate remain at aref until temperature reaches t2 [c] - data (tassim2_table(i),i=1,5) /30.0,30.0,30.0,30.0,30.0/ - - real :: k_table(ncrop) !< light extinction coefficient - data ( k_table(i),i=1,5) /0.55,0.55,0.55,0.55,0.55/ - - real :: epsi_table(ncrop) !< initial light use efficiency - data (epsi_table(i),i=1,5) /12.5,12.5,12.5,12.5,12.5/ - - real :: q10mr_table(ncrop) !< q10 for maintainance respiration - data (q10mr_table(i),i=1,5) /2.0,2.0,2.0,2.0,2.0/ - - real :: foln_mx_table(ncrop) !< foliage nitrogen concentration when f(n)=1 (%) - data (foln_mx_table(i),i=1,5) /1.5,1.5,1.5,1.5,1.5/ - - real :: lefreez_table(ncrop) !< characteristic t for leaf freezing [k] - data (lefreez_table(i),i=1,5) /268,268,268,268,268/ - - - real :: dile_fc_table(ncrop,nstage) !< coeficient for temperature leaf stress death [1/s] - data (dile_fc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fc_table(i,4),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fc_table(i,5),i=1,5) /0.5,0.5,0.5,0.5,0.5/ - data (dile_fc_table(i,6),i=1,5) /0.5,0.5,0.5,0.5,0.5/ - data (dile_fc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: dile_fw_table(ncrop,nstage) !< coeficient for water leaf stress death [1/s] - data (dile_fw_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fw_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fw_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fw_table(i,4),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fw_table(i,5),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - data (dile_fw_table(i,6),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - data (dile_fw_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (dile_fw_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: fra_gr_table(ncrop) !< fraction of growth respiration - data (fra_gr_table(i),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - - real :: lf_ovrc_table(ncrop,nstage) !< fraction of leaf turnover [1/s] - data (lf_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lf_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lf_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lf_ovrc_table(i,4),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lf_ovrc_table(i,5),i=1,5) /0.2,0.48,0.48,0.48,0.48/ - data (lf_ovrc_table(i,6),i=1,5) /0.3,0.48,0.48,0.48,0.48/ - data (lf_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lf_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: st_ovrc_table(ncrop,nstage) !< fraction of stem turnover [1/s] - data (st_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (st_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (st_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (st_ovrc_table(i,4),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (st_ovrc_table(i,5),i=1,5) /0.12,0.12,0.12,0.12,0.12/ - data (st_ovrc_table(i,6),i=1,5) /0.06,0.06,0.06,0.06,0.06/ - data (st_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (st_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: rt_ovrc_table(ncrop,nstage) !< fraction of root tunrover [1/s] - data (rt_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rt_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rt_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rt_ovrc_table(i,4),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rt_ovrc_table(i,5),i=1,5) /0.12,0.12,0.12,0.12,0.12/ - data (rt_ovrc_table(i,6),i=1,5) /0.06,0.06,0.06,0.06,0.06/ - data (rt_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rt_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: lfmr25_table(ncrop) !< leaf maintenance respiration at 25c [umol co2/m**2 /s] - data (lfmr25_table(i),i=1,5) /1.0,1.0,1.0,1.0,1.0/ - - real :: stmr25_table(ncrop) !< stem maintenance respiration at 25c [umol co2/kg bio/s] - data (stmr25_table(i),i=1,5) /0.05,0.1,0.1,0.1,0.1/ - - real :: rtmr25_table(ncrop) !< root maintenance respiration at 25c [umol co2/kg bio/s] - data (rtmr25_table(i),i=1,5) /0.05,0.0,0.0,0.0,0.0/ - - real :: grainmr25_table(ncrop) !< grain maintenance respiration at 25c [umol co2/kg bio/s] - data (grainmr25_table(i),i=1,5) /0.0,0.1,0.1,0.1,0.1/ - - real :: lfpt_table(ncrop,nstage) !< fraction of carbohydrate flux to leaf - data (lfpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lfpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lfpt_table(i,3),i=1,5) /0.4,0.4,0.4,0.4,0.4/ - data (lfpt_table(i,4),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - data (lfpt_table(i,5),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lfpt_table(i,6),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lfpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (lfpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - - real :: stpt_table(ncrop,nstage) !< fraction of carbohydrate flux to stem - data (stpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (stpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (stpt_table(i,3),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - data (stpt_table(i,4),i=1,5) /0.5,0.5,0.5,0.5,0.5/ - data (stpt_table(i,5),i=1,5) /0.0,0.15,0.15,0.15,0.15/ - data (stpt_table(i,6),i=1,5) /0.0,0.05,0.05,0.05,0.05/ - data (stpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (stpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - - real :: rtpt_table(ncrop,nstage) !< fraction of carbohydrate flux to root - data (rtpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rtpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rtpt_table(i,3),i=1,5) /0.34,0.4,0.4,0.4,0.4/ - data (rtpt_table(i,4),i=1,5) /0.3,0.3,0.3,0.3,0.3/ - data (rtpt_table(i,5),i=1,5) /0.05,0.05,0.05,0.05,0.05/ - data (rtpt_table(i,6),i=1,5) /0.0,0.05,0.05,0.05,0.05/ - data (rtpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (rtpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: grainpt_table(ncrop,nstage) !< fraction of carbohydrate flux to grain - data (grainpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (grainpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (grainpt_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (grainpt_table(i,4),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (grainpt_table(i,5),i=1,5) /0.95,0.8,0.8,0.8,0.8/ - data (grainpt_table(i,6),i=1,5) /1.0,0.9,0.9,0.9,0.9/ - data (grainpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - data (grainpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - - real :: bio2lai_table(ncrop) !< leaf are per living leaf biomass [m^2/kg] - data (bio2lai_table(i),i=1,5) /0.035,0.015,0.015,0.015,0.015/ + real (kind=kind_phys) :: aref_table(ncrop) !< reference maximum co2 assimulation rate + real (kind=kind_phys) :: psnrf_table(ncrop) !< co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) + real (kind=kind_phys) :: i2par_table(ncrop) !< fraction of incoming solar radiation to photosynthetically active radiation + real (kind=kind_phys) :: tassim0_table(ncrop) !< minimum temperature for co2 assimulation [c] + real (kind=kind_phys) :: tassim1_table(ncrop) !< co2 assimulation linearly increasing until temperature reaches t1 [c] + real (kind=kind_phys) :: tassim2_table(ncrop) !< co2 assmilation rate remain at aref until temperature reaches t2 [c] + real (kind=kind_phys) :: k_table(ncrop) !< light extinction coefficient + real (kind=kind_phys) :: epsi_table(ncrop) !< initial light use efficiency + + real (kind=kind_phys) :: q10mr_table(ncrop) !< q10 for maintainance respiration + real (kind=kind_phys) :: foln_mx_table(ncrop) !< foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: lefreez_table(ncrop) !< characteristic t for leaf freezing [k] + + real (kind=kind_phys) :: dile_fc_table(ncrop,nstage) !< coeficient for temperature leaf stress death [1/s] + real (kind=kind_phys) :: dile_fw_table(ncrop,nstage) !< coeficient for water leaf stress death [1/s] + real (kind=kind_phys) :: fra_gr_table(ncrop) !< fraction of growth respiration + + real (kind=kind_phys) :: lf_ovrc_table(ncrop,nstage) !< fraction of leaf turnover [1/s] + real (kind=kind_phys) :: st_ovrc_table(ncrop,nstage) !< fraction of stem turnover [1/s] + real (kind=kind_phys) :: rt_ovrc_table(ncrop,nstage) !< fraction of root tunrover [1/s] + real (kind=kind_phys) :: lfmr25_table(ncrop) !< leaf maintenance respiration at 25c [umol co2/m**2 /s] + real (kind=kind_phys) :: stmr25_table(ncrop) !< stem maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: rtmr25_table(ncrop) !< root maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: grainmr25_table(ncrop) !< grain maintenance respiration at 25c [umol co2/kg bio/s] + + real (kind=kind_phys) :: lfpt_table(ncrop,nstage) !< fraction of carbohydrate flux to leaf + real (kind=kind_phys) :: stpt_table(ncrop,nstage) !< fraction of carbohydrate flux to stem + real (kind=kind_phys) :: rtpt_table(ncrop,nstage) !< fraction of carbohydrate flux to root + real (kind=kind_phys) :: grainpt_table(ncrop,nstage) !< fraction of carbohydrate flux to grain + real (kind=kind_phys) :: lfct_table(ncrop,nstage) ! fraction of carbohydrate translocation from leaf to grain ! Zhe Zhang 2020-07-13 + real (kind=kind_phys) :: stct_table(ncrop,nstage) ! stem to grain + real (kind=kind_phys) :: rtct_table(ncrop,nstage) ! root to grain + real (kind=kind_phys) :: bio2lai_table(ncrop) !< leaf are per living leaf biomass [m^2/kg] + +! tile drainage parameters + real (kind=kind_phys) :: tdsmc_fac_table(max_soiltyp) + real (kind=kind_phys) :: td_dc_table(max_soiltyp) + integer :: td_depth_table(max_soiltyp) + integer :: drain_layer_opt_table + real (kind=kind_phys) :: td_dcoef_table(max_soiltyp) + real (kind=kind_phys) :: td_d_table(max_soiltyp) + real (kind=kind_phys) :: td_adepth_table(max_soiltyp) + real (kind=kind_phys) :: td_radi_table(max_soiltyp) + real (kind=kind_phys) :: td_spac_table(max_soiltyp) + real (kind=kind_phys) :: td_ddrain_table(max_soiltyp) + real (kind=kind_phys) :: klat_fac_table(max_soiltyp) ! mptable.tbl optional parameters @@ -992,55 +259,1076 @@ module noahmp_tables ! Saxton and Rawls 2006 Pedo-transfer function coefficients !------------------------------------------------------------------------------ - real :: sr2006_theta_1500t_a = -0.024 !< sand coefficient - real :: sr2006_theta_1500t_b = 0.487 !< clay coefficient - real :: sr2006_theta_1500t_c = 0.006 !< orgm coefficient - real :: sr2006_theta_1500t_d = 0.005 !< sand*orgm coefficient - real :: sr2006_theta_1500t_e = -0.013 !< clay*orgm coefficient - real :: sr2006_theta_1500t_f = 0.068 !< sand*clay coefficient - real :: sr2006_theta_1500t_g = 0.031 !< constant adjustment - - real :: sr2006_theta_1500_a = 0.14 !< theta_1500t coefficient - real :: sr2006_theta_1500_b = -0.02 !< constant adjustment - - real :: sr2006_theta_33t_a = -0.251 !< sand coefficient - real :: sr2006_theta_33t_b = 0.195 !< clay coefficient - real :: sr2006_theta_33t_c = 0.011 !< orgm coefficient - real :: sr2006_theta_33t_d = 0.006 !< sand*orgm coefficient - real :: sr2006_theta_33t_e = -0.027 !< clay*orgm coefficient - real :: sr2006_theta_33t_f = 0.452 !< sand*clay coefficient - real :: sr2006_theta_33t_g = 0.299 !< constant adjustment - - real :: sr2006_theta_33_a = 1.283 !< theta_33t*theta_33t coefficient - real :: sr2006_theta_33_b = -0.374 !< theta_33t coefficient - real :: sr2006_theta_33_c = -0.015 !< constant adjustment - - real :: sr2006_theta_s33t_a = 0.278 !< sand coefficient - real :: sr2006_theta_s33t_b = 0.034 !< clay coefficient - real :: sr2006_theta_s33t_c = 0.022 !< orgm coefficient - real :: sr2006_theta_s33t_d = -0.018 !< sand*orgm coefficient - real :: sr2006_theta_s33t_e = -0.027 !< clay*orgm coefficient - real :: sr2006_theta_s33t_f = -0.584 !< sand*clay coefficient - real :: sr2006_theta_s33t_g = 0.078 !< constant adjustment - - real :: sr2006_theta_s33_a = 0.636 !< theta_s33t coefficient - real :: sr2006_theta_s33_b = -0.107 !< constant adjustment - - real :: sr2006_psi_et_a = -21.67 !< sand coefficient - real :: sr2006_psi_et_b = -27.93 !< clay coefficient - real :: sr2006_psi_et_c = -81.97 !< theta_s33 coefficient - real :: sr2006_psi_et_d = 71.12 !< sand*theta_s33 coefficient - real :: sr2006_psi_et_e = 8.29 !< clay*theta_s33 coefficient - real :: sr2006_psi_et_f = 14.05 !< sand*clay coefficient - real :: sr2006_psi_et_g = 27.16 !< constant adjustment - - real :: sr2006_psi_e_a = 0.02 !< psi_et*psi_et coefficient - real :: sr2006_psi_e_b = -0.113 !< psi_et coefficient - real :: sr2006_psi_e_c = -0.7 !< constant adjustment - - real :: sr2006_smcmax_a = -0.097 !< sand adjustment - real :: sr2006_smcmax_b = 0.043 !< constant adjustment + real (kind=kind_phys) :: sr2006_theta_1500t_a !< sand coefficient + real (kind=kind_phys) :: sr2006_theta_1500t_b !< clay coefficient + real (kind=kind_phys) :: sr2006_theta_1500t_c !< orgm coefficient + real (kind=kind_phys) :: sr2006_theta_1500t_d !< sand*orgm coefficient + real (kind=kind_phys) :: sr2006_theta_1500t_e !< clay*orgm coefficient + real (kind=kind_phys) :: sr2006_theta_1500t_f !< sand*clay coefficient + real (kind=kind_phys) :: sr2006_theta_1500t_g !< constant adjustment + + real (kind=kind_phys) :: sr2006_theta_1500_a !< theta_1500t coefficient + real (kind=kind_phys) :: sr2006_theta_1500_b !< constant adjustment + + real (kind=kind_phys) :: sr2006_theta_33t_a !< sand coefficient + real (kind=kind_phys) :: sr2006_theta_33t_b !< clay coefficient + real (kind=kind_phys) :: sr2006_theta_33t_c !< orgm coefficient + real (kind=kind_phys) :: sr2006_theta_33t_d !< sand*orgm coefficient + real (kind=kind_phys) :: sr2006_theta_33t_e !< clay*orgm coefficient + real (kind=kind_phys) :: sr2006_theta_33t_f !< sand*clay coefficient + real (kind=kind_phys) :: sr2006_theta_33t_g !< constant adjustment + + real (kind=kind_phys) :: sr2006_theta_33_a !< theta_33t*theta_33t coefficient + real (kind=kind_phys) :: sr2006_theta_33_b !< theta_33t coefficient + real (kind=kind_phys) :: sr2006_theta_33_c !< constant adjustment + + real (kind=kind_phys) :: sr2006_theta_s33t_a !< sand coefficient + real (kind=kind_phys) :: sr2006_theta_s33t_b !< clay coefficient + real (kind=kind_phys) :: sr2006_theta_s33t_c !< orgm coefficient + real (kind=kind_phys) :: sr2006_theta_s33t_d !< sand*orgm coefficient + real (kind=kind_phys) :: sr2006_theta_s33t_e !< clay*orgm coefficient + real (kind=kind_phys) :: sr2006_theta_s33t_f !< sand*clay coefficient + real (kind=kind_phys) :: sr2006_theta_s33t_g !< constant adjustment + + real (kind=kind_phys) :: sr2006_theta_s33_a !< theta_s33t coefficient + real (kind=kind_phys) :: sr2006_theta_s33_b !< constant adjustment + + real (kind=kind_phys) :: sr2006_psi_et_a !< sand coefficient + real (kind=kind_phys) :: sr2006_psi_et_b !< clay coefficient + real (kind=kind_phys) :: sr2006_psi_et_c !< theta_s33 coefficient + real (kind=kind_phys) :: sr2006_psi_et_d !< sand*theta_s33 coefficient + real (kind=kind_phys) :: sr2006_psi_et_e !< clay*theta_s33 coefficient + real (kind=kind_phys) :: sr2006_psi_et_f !< sand*clay coefficient + real (kind=kind_phys) :: sr2006_psi_et_g !< constant adjustment + + real (kind=kind_phys) :: sr2006_psi_e_a !< psi_et*psi_et coefficient + real (kind=kind_phys) :: sr2006_psi_e_b !< psi_et coefficient + real (kind=kind_phys) :: sr2006_psi_e_c !< constant adjustment + + real (kind=kind_phys) :: sr2006_smcmax_a !< sand adjustment + real (kind=kind_phys) :: sr2006_smcmax_b !< constant adjustment + +contains + + subroutine read_mp_table_parameters(errmsg, errflg) + implicit none + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! vegetation parameters + character(len=256) :: dataset_identifier + character(len=256) :: veg_dataset_description + logical :: file_named + integer :: ierr, ik, im + integer :: nveg, isurban, iswater, isbarren, isice, iscrop, eblforest, natural + integer :: lcz_1, lcz_2, lcz_3, lcz_4, lcz_5, lcz_6, lcz_7, lcz_8, lcz_9, lcz_10, lcz_11 + real (kind=kind_phys), dimension(mvt) :: sai_jan, sai_feb, sai_mar, sai_apr, sai_may, sai_jun, sai_jul, sai_aug, & + sai_sep, sai_oct, sai_nov, sai_dec, lai_jan, lai_feb, lai_mar, lai_apr, & + lai_may, lai_jun, lai_jul, lai_aug, lai_sep, lai_oct, lai_nov, lai_dec, & + rhol_vis, rhol_nir, rhos_vis, rhos_nir, taul_vis, taul_nir, taus_vis, taus_nir,& + ch2op, dleaf, z0mvt, hvt, hvb, z0mhvt, & + den, rc, mfsno, scffac, cbiom, xl, cwpvt, c3psn, kc25, & + akc, ko25, ako, avcmx, aqe, ltovrc, dilefc, dilefw, rmf25, sla, fragr, tmin, & + vcmx25, tdlef, bp, mp, qe25, rms25, rmr25, arm, folnmx, wdpool, wrrat, mrp, & + nroot, rgl, rs, hs, topt, rsmax, rtovrc, rswoodc, bf, wstrc, laimin, & + xsamin, eps1, eps2, eps3, eps4, eps5 + namelist / noahmp_usgs_veg_categories / veg_dataset_description, nveg + namelist / noahmp_usgs_parameters / isurban, iswater, isbarren, isice, iscrop, eblforest, natural, & + lcz_1, lcz_2, lcz_3, lcz_4, lcz_5, lcz_6, lcz_7, lcz_8, lcz_9, lcz_10, lcz_11, & + ch2op, dleaf, z0mvt, hvt, hvb, z0mhvt, & + den, rc, mfsno, scffac, cbiom, xl, cwpvt, c3psn, kc25, & + akc, ko25, ako, avcmx, aqe, ltovrc, dilefc, dilefw, rmf25, sla, fragr, tmin, & + vcmx25, tdlef, bp, mp, qe25, rms25, rmr25, arm, folnmx, wdpool, wrrat, mrp, & + nroot, rgl, rs, hs, topt, rsmax, rtovrc, rswoodc, bf, wstrc, laimin, & + xsamin, sai_jan, sai_feb, sai_mar, sai_apr, sai_may, & + sai_jun, sai_jul, sai_aug, sai_sep, sai_oct, sai_nov, sai_dec, lai_jan, & + lai_feb, lai_mar, lai_apr, lai_may, lai_jun, lai_jul, lai_aug, lai_sep, & + lai_oct, lai_nov, lai_dec, rhol_vis, rhol_nir, rhos_vis, rhos_nir, taul_vis, & + taul_nir, taus_vis, taus_nir, eps1, eps2, eps3, eps4, eps5 + namelist / noahmp_modis_veg_categories / veg_dataset_description, nveg + namelist / noahmp_modis_parameters / isurban, iswater, isbarren, isice, iscrop, eblforest, natural, & + lcz_1, lcz_2, lcz_3, lcz_4, lcz_5, lcz_6, lcz_7, lcz_8, lcz_9, lcz_10, lcz_11, & + ch2op, dleaf, z0mvt, hvt, hvb, z0mhvt, & + den, rc, mfsno, scffac, cbiom, xl, cwpvt, c3psn, kc25, & + akc, ko25, ako, avcmx, aqe, ltovrc, dilefc, dilefw, rmf25, sla, fragr, tmin, & + vcmx25, tdlef, bp, mp, qe25, rms25, rmr25, arm, folnmx, wdpool, wrrat, mrp, & + nroot, rgl, rs, hs, topt, rsmax, rtovrc, rswoodc, bf, wstrc, laimin, & + xsamin, sai_jan, sai_feb, sai_mar, sai_apr, sai_may, & + sai_jun, sai_jul, sai_aug, sai_sep, sai_oct, sai_nov, sai_dec, lai_jan, & + lai_feb, lai_mar, lai_apr, lai_may, lai_jun, lai_jul, lai_aug, lai_sep, & + lai_oct, lai_nov, lai_dec, rhol_vis, rhol_nir, rhos_vis, rhos_nir, taul_vis, & + taul_nir, taus_vis, taus_nir, eps1, eps2, eps3, eps4, eps5 + ! soil parameters + character(len=256) :: message + character(len=10) :: sltype + integer :: slcats + real (kind=kind_phys), dimension(max_soiltyp) :: bb, drysmc, maxsmc, refsmc, satpsi, satdk, satdw, wltsmc, qtz, & + bvic, axaj, bxaj, xxaj, bdvic, bbvic, gdvic, hc + namelist / noahmp_stas_soil_categories / sltype, slcats + namelist / noahmp_soil_stas_parameters / bb, drysmc, maxsmc, refsmc, satpsi, satdk, satdw, wltsmc, qtz, & + bvic, axaj, bxaj, xxaj, bdvic, bbvic, gdvic + namelist / noahmp_soil_stas_ruc_parameters / bb, drysmc, hc, maxsmc, refsmc, satpsi, satdk, satdw, wltsmc, qtz, & + bvic, axaj, bxaj, xxaj, bdvic, bbvic, gdvic + + ! general parameters + real (kind=kind_phys) :: csoil_data, refdk_data, refkdt_data, frzk_data, zbot_data, czil_data + real (kind=kind_phys), dimension(num_slope) :: slope_data + namelist / noahmp_general_parameters / slope_data, csoil_data, refdk_data, refkdt_data, frzk_data, zbot_data, & + czil_data + + ! radiation parameters + real (kind=kind_phys) :: betads, betais, eice + real (kind=kind_phys), dimension(mband) :: albice, alblak, omegas + real (kind=kind_phys), dimension(2) :: eg + real (kind=kind_phys), dimension(msc) :: albsat_vis, albsat_nir, albdry_vis, albdry_nir + namelist / noahmp_rad_parameters / albsat_vis, albsat_nir, albdry_vis, albdry_nir, albice, alblak, omegas, & + betads, betais, eg, eice + + ! global parameters + real (kind=kind_phys) :: co2, o2, timean, fsatmx, z0sno, ssi, snow_ret_fac ,snow_emis, swemx, tau0, & + grain_growth, extra_growth, dirt_soot, bats_cosz, bats_vis_new, & + bats_nir_new, bats_vis_age, bats_nir_age, bats_vis_dir, bats_nir_dir, & + rsurf_snow, rsurf_exp, c2_snowcompact, c3_snowcompact, c4_snowcompact, & + c5_snowcompact, dm_snowcompact, eta0_snowcompact, snliqmaxfrac, swemaxgla, & + wslmax, rous, cmic, snowden_max, class_alb_ref, class_sno_age, class_alb_new,& + psiwlt, z0soil, z0lake + namelist / noahmp_global_parameters / co2, o2, timean, fsatmx, z0sno, ssi, snow_ret_fac ,snow_emis, swemx, tau0, & + grain_growth, extra_growth, dirt_soot, bats_cosz, bats_vis_new, & + bats_nir_new, bats_vis_age, bats_nir_age, bats_vis_dir, bats_nir_dir, & + rsurf_snow, rsurf_exp, c2_snowcompact, c3_snowcompact, c4_snowcompact, & + c5_snowcompact, dm_snowcompact, eta0_snowcompact, snliqmaxfrac, swemaxgla, & + wslmax, rous, cmic, snowden_max, class_alb_ref, class_sno_age, class_alb_new,& + psiwlt, z0soil, z0lake + + ! irrigation parameters + integer :: irr_har + real (kind=kind_phys) :: irr_frac, irr_lai, irr_mad, filoss, sprir_rate, micir_rate, firtfac, ir_rain + namelist / noahmp_irrigation_parameters / irr_frac, irr_har, irr_lai, irr_mad, filoss, sprir_rate, micir_rate, firtfac,& + ir_rain + + ! crop parameters + integer :: default_crop + integer , dimension(ncrop) :: pltday, hsday + real (kind=kind_phys), dimension(ncrop) :: plantpop, irri, gddtbase, gddtcut, gdds1, gdds2, gdds3, gdds4, gdds5, c3psni,& + kc25i, akci, ko25i, akoi, avcmxi, vcmx25i, bpi, mpi, folnmxi, qe25i, aref, & + psnrf, i2par, tassim0, tassim1, tassim2, k, epsi, q10mr, lefreez, & + dile_fc_s1, dile_fc_s2, dile_fc_s3, dile_fc_s4, dile_fc_s5, dile_fc_s6, & + dile_fc_s7, dile_fc_s8, dile_fw_s1, dile_fw_s2, dile_fw_s3, dile_fw_s4, & + dile_fw_s5, dile_fw_s6, dile_fw_s7, dile_fw_s8, fra_gr, lf_ovrc_s1, & + lf_ovrc_s2, lf_ovrc_s3, lf_ovrc_s4, lf_ovrc_s5, lf_ovrc_s6, lf_ovrc_s7, & + lf_ovrc_s8, st_ovrc_s1, st_ovrc_s2, st_ovrc_s3, st_ovrc_s4, st_ovrc_s5, & + st_ovrc_s6, st_ovrc_s7, st_ovrc_s8, rt_ovrc_s1, rt_ovrc_s2, rt_ovrc_s3, & + rt_ovrc_s4, rt_ovrc_s5, rt_ovrc_s6, rt_ovrc_s7, rt_ovrc_s8, lfmr25, stmr25, & + rtmr25, grainmr25, lfpt_s1, lfpt_s2, lfpt_s3, lfpt_s4, lfpt_s5, lfpt_s6, & + lfpt_s7, lfpt_s8, stpt_s1, stpt_s2, stpt_s3, stpt_s4, stpt_s5, stpt_s6, & + stpt_s7, stpt_s8, rtpt_s1, rtpt_s2, rtpt_s3, rtpt_s4, rtpt_s5, rtpt_s6, & + rtpt_s7, rtpt_s8, grainpt_s1, grainpt_s2, grainpt_s3, grainpt_s4, grainpt_s5,& + grainpt_s6, grainpt_s7, grainpt_s8, lfct_s1, lfct_s2, lfct_s3, lfct_s4, & + lfct_s5, lfct_s6, lfct_s7, lfct_s8, stct_s1, stct_s2, stct_s3, stct_s4, & + stct_s5, stct_s6, stct_s7, stct_s8, rtct_s1, rtct_s2, rtct_s3, rtct_s4, & + rtct_s5, rtct_s6, rtct_s7, rtct_s8, bio2lai + namelist / noahmp_crop_parameters / default_crop, pltday, hsday, plantpop, irri, gddtbase, gddtcut, gdds1, gdds2,& + gdds3, gdds4, gdds5, c3psni, kc25i, akci, ko25i, akoi, avcmxi, vcmx25i, bpi, & + mpi, folnmxi, qe25i, aref, psnrf, i2par, tassim0, tassim1, tassim2, k, & + epsi,q10mr, lefreez, dile_fc_s1, dile_fc_s2, dile_fc_s3, dile_fc_s4, & + dile_fc_s5, dile_fc_s6, dile_fc_s7, dile_fc_s8, dile_fw_s1, dile_fw_s2, & + dile_fw_s3, dile_fw_s4, dile_fw_s5, dile_fw_s6, dile_fw_s7, dile_fw_s8, & + fra_gr, lf_ovrc_s1, lf_ovrc_s2, lf_ovrc_s3, lf_ovrc_s4, lf_ovrc_s5, & + lf_ovrc_s6, lf_ovrc_s7, lf_ovrc_s8, st_ovrc_s1, st_ovrc_s2, st_ovrc_s3, & + st_ovrc_s4, st_ovrc_s5, st_ovrc_s6, st_ovrc_s7, st_ovrc_s8, rt_ovrc_s1, & + rt_ovrc_s2, rt_ovrc_s3, rt_ovrc_s4, rt_ovrc_s5, rt_ovrc_s6, rt_ovrc_s7, & + rt_ovrc_s8, lfmr25, stmr25, rtmr25, grainmr25, lfpt_s1, lfpt_s2, lfpt_s3, & + lfpt_s4, lfpt_s5, lfpt_s6, lfpt_s7, lfpt_s8, stpt_s1, stpt_s2, stpt_s3, & + stpt_s4, stpt_s5, stpt_s6, stpt_s7, stpt_s8, rtpt_s1, rtpt_s2, rtpt_s3, & + rtpt_s4, rtpt_s5, rtpt_s6, rtpt_s7, rtpt_s8, grainpt_s1, grainpt_s2, & + grainpt_s3, grainpt_s4, grainpt_s5, grainpt_s6, grainpt_s7, grainpt_s8, & + lfct_s1, lfct_s2, lfct_s3, lfct_s4, lfct_s5, lfct_s6, lfct_s7, lfct_s8, & + stct_s1, stct_s2, stct_s3, stct_s4, stct_s5, stct_s6, stct_s7, stct_s8, & + rtct_s1, rtct_s2, rtct_s3, rtct_s4, rtct_s5, rtct_s6, rtct_s7, rtct_s8, & + bio2lai + + ! tile drainage parameters + integer :: nsoiltype, drain_layer_opt + integer , dimension(max_soiltyp) :: td_depth + real (kind=kind_phys), dimension(max_soiltyp) :: tdsmc_fac, td_dc, td_dcoef, td_d, td_adepth, td_radi, td_spac, & + td_ddrain, klat_fac + namelist / noahmp_tiledrain_parameters / nsoiltype, drain_layer_opt, tdsmc_fac, td_depth, td_dc, td_dcoef, td_d,& + td_adepth, td_radi, td_spac, td_ddrain, klat_fac + + ! optional parameters + real (kind=kind_phys) :: sr2006_theta_1500t_a, sr2006_theta_1500t_b, sr2006_theta_1500t_c, & + sr2006_theta_1500t_d, sr2006_theta_1500t_e, sr2006_theta_1500t_f, & + sr2006_theta_1500t_g, sr2006_theta_1500_a , sr2006_theta_1500_b, & + sr2006_theta_33t_a, sr2006_theta_33t_b, sr2006_theta_33t_c, & + sr2006_theta_33t_d, sr2006_theta_33t_e, sr2006_theta_33t_f, & + sr2006_theta_33t_g, sr2006_theta_33_a, sr2006_theta_33_b, & + sr2006_theta_33_c, sr2006_theta_s33t_a, sr2006_theta_s33t_b, & + sr2006_theta_s33t_c, sr2006_theta_s33t_d, sr2006_theta_s33t_e, & + sr2006_theta_s33t_f, sr2006_theta_s33t_g, sr2006_theta_s33_a, & + sr2006_theta_s33_b, sr2006_psi_et_a, sr2006_psi_et_b, sr2006_psi_et_c, & + sr2006_psi_et_d, sr2006_psi_et_e, sr2006_psi_et_f, sr2006_psi_et_g, & + sr2006_psi_e_a, sr2006_psi_e_b, sr2006_psi_e_c, sr2006_smcmax_a, & + sr2006_smcmax_b + namelist / noahmp_optional_parameters / sr2006_theta_1500t_a, sr2006_theta_1500t_b, sr2006_theta_1500t_c, & + sr2006_theta_1500t_d, sr2006_theta_1500t_e, sr2006_theta_1500t_f, & + sr2006_theta_1500t_g, sr2006_theta_1500_a, sr2006_theta_1500_b, & + sr2006_theta_33t_a, sr2006_theta_33t_b, sr2006_theta_33t_c, & + sr2006_theta_33t_d, sr2006_theta_33t_e, sr2006_theta_33t_f, & + sr2006_theta_33t_g, sr2006_theta_33_a, sr2006_theta_33_b, & + sr2006_theta_33_c, sr2006_theta_s33t_a, sr2006_theta_s33t_b, & + sr2006_theta_s33t_c, sr2006_theta_s33t_d, sr2006_theta_s33t_e, & + sr2006_theta_s33t_f, sr2006_theta_s33t_g, sr2006_theta_s33_a, & + sr2006_theta_s33_b, sr2006_psi_et_a, sr2006_psi_et_b, sr2006_psi_et_c, & + sr2006_psi_et_d, sr2006_psi_et_e, sr2006_psi_et_f, sr2006_psi_et_g, & + sr2006_psi_e_a, sr2006_psi_e_b, sr2006_psi_e_c, sr2006_smcmax_a, & + sr2006_smcmax_b + + ! initialize our variables to bad values, so that if the namelist read fails, we come to a screeching halt as soon as we try to use anything. + ! vegetation parameters + isurban_table = -99999 + iswater_table = -99999 + isbarren_table = -99999 + isice_table = -99999 + iscrop_table = -99999 + eblforest_table = -99999 + natural_table = -99999 + lcz_1_table = -99999 + lcz_2_table = -99999 + lcz_3_table = -99999 + lcz_4_table = -99999 + lcz_5_table = -99999 + lcz_6_table = -99999 + lcz_7_table = -99999 + lcz_8_table = -99999 + lcz_9_table = -99999 + lcz_10_table = -99999 + lcz_11_table = -99999 + ch2op_table = -1.0e36 + dleaf_table = -1.0e36 + z0mvt_table = -1.0e36 + hvt_table = -1.0e36 + hvb_table = -1.0e36 + z0mhvt_table = -1.0e36 + den_table = -1.0e36 + rc_table = -1.0e36 + mfsno_table = -1.0e36 + scffac_table = -1.0e36 + cbiom_table = -1.0e36 + rhol_table = -1.0e36 + rhos_table = -1.0e36 + taul_table = -1.0e36 + taus_table = -1.0e36 + xl_table = -1.0e36 + cwpvt_table = -1.0e36 + c3psn_table = -1.0e36 + kc25_table = -1.0e36 + akc_table = -1.0e36 + ko25_table = -1.0e36 + ako_table = -1.0e36 + avcmx_table = -1.0e36 + aqe_table = -1.0e36 + ltovrc_table = -1.0e36 + dilefc_table = -1.0e36 + dilefw_table = -1.0e36 + rmf25_table = -1.0e36 + sla_table = -1.0e36 + fragr_table = -1.0e36 + tmin_table = -1.0e36 + vcmx25_table = -1.0e36 + tdlef_table = -1.0e36 + bp_table = -1.0e36 + mp_table = -1.0e36 + qe25_table = -1.0e36 + rms25_table = -1.0e36 + rmr25_table = -1.0e36 + arm_table = -1.0e36 + folnmx_table = -1.0e36 + wdpool_table = -1.0e36 + wrrat_table = -1.0e36 + mrp_table = -1.0e36 + saim_table = -1.0e36 + laim_table = -1.0e36 + nroot_table = -1.0e36 + rgl_table = -1.0e36 + rs_table = -1.0e36 + hs_table = -1.0e36 + topt_table = -1.0e36 + rsmax_table = -1.0e36 + ! not used in the current ufs version +! rtovrc_table = -1.0e36 +! rswoodc_table = -1.0e36 +! bf_table = -1.0e36 +! wstrc_table = -1.0e36 +! laimin_table = -1.0e36 +! xsamin_table = -1.0e36 + + ! soil parameters + + bexp_table = -1.0e36 + smcdry_table = -1.0e36 + f1_table = -1.0e36 + smcmax_table = -1.0e36 + smcref_table = -1.0e36 + psisat_table = -1.0e36 + dksat_table = -1.0e36 + dwsat_table = -1.0e36 + smcwlt_table = -1.0e36 + quartz_table = -1.0e36 + bvic_table = -1.0e36 + axaj_table = -1.0e36 + bxaj_table = -1.0e36 + xxaj_table = -1.0e36 + bdvic_table = -1.0e36 + gdvic_table = -1.0e36 + bbvic_table = -1.0e36 + + ! general parameters + slope_table = -1.0e36 + csoil_table = -1.0e36 + refdk_table = -1.0e36 + refkdt_table = -1.0e36 + frzk_table = -1.0e36 + zbot_table = -1.0e36 + czil_table = -1.0e36 + + ! radiation parameters + albsat_table = -1.0e36 + albdry_table = -1.0e36 + albice_table = -1.0e36 + alblak_table = -1.0e36 + omegas_table = -1.0e36 + betads_table = -1.0e36 + betais_table = -1.0e36 + eg_table = -1.0e36 +! eice_table = -1.0e36 + + ! global parameters + co2_table = -1.0e36 + o2_table = -1.0e36 + timean_table = -1.0e36 + fsatmx_table = -1.0e36 + z0sno_table = -1.0e36 + ssi_table = -1.0e36 +snow_ret_fac_table = -1.0e36 + snow_emis_table = -1.0e36 + swemx_table = -1.0e36 + tau0_table = -1.0e36 +grain_growth_table = -1.0e36 +extra_growth_table = -1.0e36 + dirt_soot_table = -1.0e36 + bats_cosz_table = -1.0e36 +bats_vis_new_table = -1.0e36 +bats_nir_new_table = -1.0e36 +bats_vis_age_table = -1.0e36 +bats_nir_age_table = -1.0e36 +bats_vis_dir_table = -1.0e36 +bats_nir_dir_table = -1.0e36 +rsurf_snow_table = -1.0e36 + rsurf_exp_table = -1.0e36 + +! c2_snowcompact_table = -1.0e36 +! c3_snowcompact_table = -1.0e36 +! c4_snowcompact_table = -1.0e36 +! c5_snowcompact_table = -1.0e36 +! dm_snowcompact_table = -1.0e36 +! eta0_snowcompact_table = -1.0e36 +! snliqmaxfrac_table = -1.0e36 +! swemaxgla_table = -1.0e36 +! wslmax_table = -1.0e36 +! rous_table = -1.0e36 +! cmic_table = -1.0e36 +! snowden_max_table = -1.0e36 +! class_alb_ref_table = -1.0e36 +! class_sno_age_table = -1.0e36 +! class_alb_new_table = -1.0e36 +! psiwlt_table = -1.0e36 +! z0soil_table = -1.0e36 +! z0lake_table = -1.0e36 + + ! irrigation parameters + irr_har_table = -99999 ! number of days before harvest date to stop irrigation + irr_frac_table = -1.0e36 ! irrigation fraction + irr_lai_table = -1.0e36 ! minimum lai to trigger irrigation + irr_mad_table = -1.0e36 ! management allowable deficit (0-1) + filoss_table = -1.0e36 ! fraction of flood irrigation loss (0-1) + sprir_rate_table = -1.0e36 ! mm/h, sprinkler irrigation rate + micir_rate_table = -1.0e36 ! mm/h, micro irrigation rate + firtfac_table = -1.0e36 ! flood application rate factor + ir_rain_table = -1.0e36 ! maximum precipitation to stop irrigation trigger + + ! crop parameters + default_crop_table = -99999 + pltday_table = -99999 + hsday_table = -99999 + plantpop_table = -1.0e36 + irri_table = -1.0e36 + gddtbase_table = -1.0e36 + gddtcut_table = -1.0e36 + gdds1_table = -1.0e36 + gdds2_table = -1.0e36 + gdds3_table = -1.0e36 + gdds4_table = -1.0e36 + gdds5_table = -1.0e36 + c3psni_table = -1.0e36 ! parameter from psn copied from stomata ! zhe zhang 2020-07-13 + kc25i_table = -1.0e36 + akci_table = -1.0e36 + ko25i_table = -1.0e36 + akoi_table = -1.0e36 + avcmxi_table = -1.0e36 + vcmx25i_table = -1.0e36 + bpi_table = -1.0e36 + mpi_table = -1.0e36 + folnmxi_table = -1.0e36 + qe25i_table = -1.0e36 ! ends here +!??? c3c4_table = -99999 + aref_table = -1.0e36 + psnrf_table = -1.0e36 + i2par_table = -1.0e36 + tassim0_table = -1.0e36 + tassim1_table = -1.0e36 + tassim2_table = -1.0e36 + k_table = -1.0e36 + epsi_table = -1.0e36 + q10mr_table = -1.0e36 + foln_mx_table = -1.0e36 + lefreez_table = -1.0e36 + dile_fc_table = -1.0e36 + dile_fw_table = -1.0e36 + fra_gr_table = -1.0e36 + lf_ovrc_table = -1.0e36 + st_ovrc_table = -1.0e36 + rt_ovrc_table = -1.0e36 + lfmr25_table = -1.0e36 + stmr25_table = -1.0e36 + rtmr25_table = -1.0e36 + grainmr25_table = -1.0e36 + lfpt_table = -1.0e36 + stpt_table = -1.0e36 + rtpt_table = -1.0e36 + grainpt_table = -1.0e36 + lfct_table = -1.0e36 ! convert start + stct_table = -1.0e36 + rtct_table = -1.0e36 ! convert end + bio2lai_table = -1.0e36 + + ! tile drainage parameters + + drain_layer_opt_table = -99999 + td_depth_table = -99999 + tdsmc_fac_table = -1.0e36 + td_dc_table = -1.0e36 + td_dcoef_table = -1.0e36 + td_d_table = -1.0e36 + td_adepth_table = -1.0e36 + td_radi_table = -1.0e36 + td_spac_table = -1.0e36 + td_ddrain_table = -1.0e36 + klat_fac_table = -1.0e36 + + ! optional parameters +! sr2006_theta_1500t_a_table = -1.0e36 +! sr2006_theta_1500t_b_table = -1.0e36 +! sr2006_theta_1500t_c_table = -1.0e36 +! sr2006_theta_1500t_d_table = -1.0e36 +! sr2006_theta_1500t_e_table = -1.0e36 +! sr2006_theta_1500t_f_table = -1.0e36 +! sr2006_theta_1500t_g_table = -1.0e36 +! sr2006_theta_1500_a_table = -1.0e36 +! sr2006_theta_1500_b_table = -1.0e36 +! sr2006_theta_33t_a_table = -1.0e36 +! sr2006_theta_33t_b_table = -1.0e36 +! sr2006_theta_33t_c_table = -1.0e36 +! sr2006_theta_33t_d_table = -1.0e36 +! sr2006_theta_33t_e_table = -1.0e36 +! sr2006_theta_33t_f_table = -1.0e36 +! sr2006_theta_33t_g_table = -1.0e36 +! sr2006_theta_33_a_table = -1.0e36 +! sr2006_theta_33_b_table = -1.0e36 +! sr2006_theta_33_c_table = -1.0e36 +! sr2006_theta_s33t_a_table = -1.0e36 +! sr2006_theta_s33t_b_table = -1.0e36 +! sr2006_theta_s33t_c_table = -1.0e36 +! sr2006_theta_s33t_d_table = -1.0e36 +! sr2006_theta_s33t_e_table = -1.0e36 +! sr2006_theta_s33t_f_table = -1.0e36 +! sr2006_theta_s33t_g_table = -1.0e36 +! sr2006_theta_s33_a_table = -1.0e36 +! sr2006_theta_s33_b_table = -1.0e36 +! sr2006_psi_et_a_table = -1.0e36 +! sr2006_psi_et_b_table = -1.0e36 +! sr2006_psi_et_c_table = -1.0e36 +! sr2006_psi_et_d_table = -1.0e36 +! sr2006_psi_et_e_table = -1.0e36 +! sr2006_psi_et_f_table = -1.0e36 +! sr2006_psi_et_g_table = -1.0e36 +! sr2006_psi_e_a_table = -1.0e36 +! sr2006_psi_e_b_table = -1.0e36 +! sr2006_psi_e_c_table = -1.0e36 +! sr2006_smcmax_a_table = -1.0e36 +! sr2006_smcmax_b_table = -1.0e36 + + !--------------------------------------------------------------- + ! transfer values from table to input variables + !--------------------------------------------------------------- + + !---------------- noahmptable.tbl vegetation parameters + + dataset_identifier = "modified_igbp_modis_noah" + + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if ( ierr /= 0 ) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + + if ( trim(dataset_identifier) == "usgs" ) then + read(15, noahmp_usgs_veg_categories) + read(15, noahmp_usgs_parameters) + elseif ( trim(dataset_identifier) == "modified_igbp_modis_noah" ) then + read(15,noahmp_modis_veg_categories) + read(15,noahmp_modis_parameters) + else + write(*,'("warning: unrecognized dataset_identifier in subroutine readnoahmptable")') + write(*,'("warning: dataset_identifier = ''", a, "''")') trim(dataset_identifier) + endif + close(15) + + + ! assign values + isurban_table = isurban + iswater_table = iswater + isbarren_table = isbarren + isice_table = isice + iscrop_table = iscrop + eblforest_table = eblforest + natural_table = natural + lcz_1_table = lcz_1 + lcz_2_table = lcz_2 + lcz_3_table = lcz_3 + lcz_4_table = lcz_4 + lcz_5_table = lcz_5 + lcz_6_table = lcz_6 + lcz_7_table = lcz_7 + lcz_8_table = lcz_8 + lcz_9_table = lcz_9 + lcz_10_table = lcz_10 + lcz_11_table = lcz_11 + ch2op_table (1:nveg) = ch2op (1:nveg) + dleaf_table (1:nveg) = dleaf (1:nveg) + z0mvt_table (1:nveg) = z0mvt (1:nveg) + hvt_table (1:nveg) = hvt (1:nveg) + hvb_table (1:nveg) = hvb (1:nveg) + z0mhvt_table (1:nveg) = z0mhvt (1:nveg) + den_table (1:nveg) = den (1:nveg) + rc_table (1:nveg) = rc (1:nveg) + mfsno_table (1:nveg) = mfsno (1:nveg) + scffac_table (1:nveg) = scffac (1:nveg) + cbiom_table (1:nveg) = cbiom (1:nveg) + xl_table (1:nveg) = xl (1:nveg) + cwpvt_table (1:nveg) = cwpvt (1:nveg) + c3psn_table (1:nveg) = c3psn (1:nveg) + kc25_table (1:nveg) = kc25 (1:nveg) + akc_table (1:nveg) = akc (1:nveg) + ko25_table (1:nveg) = ko25 (1:nveg) + ako_table (1:nveg) = ako (1:nveg) + avcmx_table (1:nveg) = avcmx (1:nveg) + aqe_table (1:nveg) = aqe (1:nveg) + ltovrc_table (1:nveg) = ltovrc (1:nveg) + dilefc_table (1:nveg) = dilefc (1:nveg) + dilefw_table (1:nveg) = dilefw (1:nveg) + rmf25_table (1:nveg) = rmf25 (1:nveg) + sla_table (1:nveg) = sla (1:nveg) + fragr_table (1:nveg) = fragr (1:nveg) + tmin_table (1:nveg) = tmin (1:nveg) + vcmx25_table (1:nveg) = vcmx25 (1:nveg) + tdlef_table (1:nveg) = tdlef (1:nveg) + bp_table (1:nveg) = bp (1:nveg) + mp_table (1:nveg) = mp (1:nveg) + qe25_table (1:nveg) = qe25 (1:nveg) + rms25_table (1:nveg) = rms25 (1:nveg) + rmr25_table (1:nveg) = rmr25 (1:nveg) + arm_table (1:nveg) = arm (1:nveg) + folnmx_table (1:nveg) = folnmx (1:nveg) + wdpool_table (1:nveg) = wdpool (1:nveg) + wrrat_table (1:nveg) = wrrat (1:nveg) + mrp_table (1:nveg) = mrp (1:nveg) + nroot_table (1:nveg) = nroot (1:nveg) + rgl_table (1:nveg) = rgl (1:nveg) + rs_table (1:nveg) = rs (1:nveg) + hs_table (1:nveg) = hs (1:nveg) + topt_table (1:nveg) = topt (1:nveg) + rsmax_table (1:nveg) = rsmax (1:nveg) +! rtovrc_table (1:nveg) = rtovrc (1:nveg) +! rswoodc_table(1:nveg) = rswoodc(1:nveg) +! bf_table (1:nveg) = bf (1:nveg) +! wstrc_table (1:nveg) = wstrc (1:nveg) +! laimin_table (1:nveg) = laimin (1:nveg) +! xsamin_table (1:nveg) = xsamin (1:nveg) + + saim_table(1:nveg, 1) = sai_jan(1:nveg) + saim_table(1:nveg, 2) = sai_feb(1:nveg) + saim_table(1:nveg, 3) = sai_mar(1:nveg) + saim_table(1:nveg, 4) = sai_apr(1:nveg) + saim_table(1:nveg, 5) = sai_may(1:nveg) + saim_table(1:nveg, 6) = sai_jun(1:nveg) + saim_table(1:nveg, 7) = sai_jul(1:nveg) + saim_table(1:nveg, 8) = sai_aug(1:nveg) + saim_table(1:nveg, 9) = sai_sep(1:nveg) + saim_table(1:nveg,10) = sai_oct(1:nveg) + saim_table(1:nveg,11) = sai_nov(1:nveg) + saim_table(1:nveg,12) = sai_dec(1:nveg) + laim_table(1:nveg, 1) = lai_jan(1:nveg) + laim_table(1:nveg, 2) = lai_feb(1:nveg) + laim_table(1:nveg, 3) = lai_mar(1:nveg) + laim_table(1:nveg, 4) = lai_apr(1:nveg) + laim_table(1:nveg, 5) = lai_may(1:nveg) + laim_table(1:nveg, 6) = lai_jun(1:nveg) + laim_table(1:nveg, 7) = lai_jul(1:nveg) + laim_table(1:nveg, 8) = lai_aug(1:nveg) + laim_table(1:nveg, 9) = lai_sep(1:nveg) + laim_table(1:nveg,10) = lai_oct(1:nveg) + laim_table(1:nveg,11) = lai_nov(1:nveg) + laim_table(1:nveg,12) = lai_dec(1:nveg) + rhol_table(1:nveg,1) = rhol_vis(1:nveg) !leaf reflectance: 1=vis, 2=nir + rhol_table(1:nveg,2) = rhol_nir(1:nveg) !leaf reflectance: 1=vis, 2=nir + rhos_table(1:nveg,1) = rhos_vis(1:nveg) !stem reflectance: 1=vis, 2=nir + rhos_table(1:nveg,2) = rhos_nir(1:nveg) !stem reflectance: 1=vis, 2=nir + taul_table(1:nveg,1) = taul_vis(1:nveg) !leaf transmittance: 1=vis, 2=nir + taul_table(1:nveg,2) = taul_nir(1:nveg) !leaf transmittance: 1=vis, 2=nir + taus_table(1:nveg,1) = taus_vis(1:nveg) !stem transmittance: 1=vis, 2=nir + taus_table(1:nveg,2) = taus_nir(1:nveg) !stem transmittance: 1=vis, 2=nir + + !---------------- noahmptable.tbl soil parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if ( ierr /= 0 ) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15, noahmp_stas_soil_categories) + if ( trim(sltype) == "stas" ) then + read(15, noahmp_soil_stas_parameters) + elseif ( trim(sltype) == "stas_ruc" ) then + read(15, noahmp_soil_stas_ruc_parameters) + else + write(*,'("warning: unrecognized soiltype in subroutine readnoahmptable")') + write(*,'("warning: dataset_identifier = ''", a, "''")') trim(sltype) + endif + close(15) + + ! assign values +! slcats_table = slcats + bexp_table (1:slcats) = bb (1:slcats) + smcdry_table(1:slcats) = drysmc(1:slcats) + smcmax_table(1:slcats) = maxsmc(1:slcats) + smcref_table(1:slcats) = refsmc(1:slcats) + psisat_table(1:slcats) = satpsi(1:slcats) + dksat_table (1:slcats) = satdk (1:slcats) + dwsat_table (1:slcats) = satdw (1:slcats) + smcwlt_table(1:slcats) = wltsmc(1:slcats) + quartz_table(1:slcats) = qtz (1:slcats) + bvic_table (1:slcats) = bvic (1:slcats) + axaj_table (1:slcats) = axaj (1:slcats) + bxaj_table (1:slcats) = bxaj (1:slcats) + xxaj_table (1:slcats) = xxaj (1:slcats) + bdvic_table (1:slcats) = bdvic (1:slcats) + gdvic_table (1:slcats) = gdvic (1:slcats) + bbvic_table (1:slcats) = bbvic (1:slcats) + + !---------------- noahmptable.tbl general parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if ( ierr /= 0 ) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15, noahmp_general_parameters) + close(15) + + ! assign values + slope_table(1:num_slope) = slope_data(1:num_slope) + csoil_table = csoil_data + refdk_table = refdk_data + refkdt_table = refkdt_data + frzk_table = frzk_data + zbot_table = zbot_data + czil_table = czil_data + + !---------------- noahmptable.tbl radiation parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15,noahmp_rad_parameters) + close(15) + + ! assign values + albsat_table(:,1) = albsat_vis ! saturated soil albedos: 1=vis, 2=nir + albsat_table(:,2) = albsat_nir ! saturated soil albedos: 1=vis, 2=nir + albdry_table(:,1) = albdry_vis ! dry soil albedos: 1=vis, 2=nir + albdry_table(:,2) = albdry_nir ! dry soil albedos: 1=vis, 2=nir + albice_table = albice + alblak_table = alblak + omegas_table = omegas + betads_table = betads + betais_table = betais + eg_table = eg +! eice_table = eice + + !---------------- noahmptable.tbl global parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15,noahmp_global_parameters) + close(15) + + ! assign values + co2_table = co2 + o2_table = o2 + timean_table = timean + fsatmx_table = fsatmx + z0sno_table = z0sno + ssi_table = ssi + snow_ret_fac_table = snow_ret_fac + snow_emis_table = snow_emis + swemx_table = swemx + tau0_table = tau0 + grain_growth_table = grain_growth + extra_growth_table = extra_growth + dirt_soot_table = dirt_soot + bats_cosz_table = bats_cosz + bats_vis_new_table = bats_vis_new + bats_nir_new_table = bats_nir_new + bats_vis_age_table = bats_vis_age + bats_nir_age_table = bats_nir_age + bats_vis_dir_table = bats_vis_dir + bats_nir_dir_table = bats_nir_dir + rsurf_snow_table = rsurf_snow + rsurf_exp_table = rsurf_exp +! c2_snowcompact_table = c2_snowcompact +! c3_snowcompact_table = c3_snowcompact +! c4_snowcompact_table = c4_snowcompact +! c5_snowcompact_table = c5_snowcompact +! dm_snowcompact_table = dm_snowcompact +! eta0_snowcompact_table = eta0_snowcompact +! snliqmaxfrac_table = snliqmaxfrac +! swemaxgla_table = swemaxgla +! wslmax_table = wslmax +! rous_table = rous +! cmic_table = cmic +! snowden_max_table = snowden_max +! class_alb_ref_table = class_alb_ref +! class_sno_age_table = class_sno_age +! class_alb_new_table = class_alb_new +! psiwlt_table = psiwlt +! z0soil_table = z0soil +! z0lake_table = z0lake + + !---------------- noahmptable.tbl irrigation parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15,noahmp_irrigation_parameters) + close(15) + + ! assign values + irr_frac_table = irr_frac + irr_har_table = irr_har + irr_lai_table = irr_lai + irr_mad_table = irr_mad + filoss_table = filoss + sprir_rate_table = sprir_rate + micir_rate_table = micir_rate + firtfac_table = firtfac + ir_rain_table = ir_rain + + !---------------- noahmptable.tbl crop parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15,noahmp_crop_parameters) + close(15) + + ! assign values + default_crop_table = default_crop + pltday_table = pltday + hsday_table = hsday + plantpop_table = plantpop + irri_table = irri + gddtbase_table = gddtbase + gddtcut_table = gddtcut + gdds1_table = gdds1 + gdds2_table = gdds2 + gdds3_table = gdds3 + gdds4_table = gdds4 + gdds5_table = gdds5 + c3psni_table (1:5) = c3psni (1:5) + kc25i_table (1:5) = kc25i (1:5) + akci_table (1:5) = akci (1:5) + ko25i_table (1:5) = ko25i (1:5) + akoi_table (1:5) = akoi (1:5) + avcmxi_table (1:5) = avcmxi (1:5) + vcmx25i_table(1:5) = vcmx25i(1:5) + bpi_table (1:5) = bpi (1:5) + mpi_table (1:5) = mpi (1:5) + folnmxi_table(1:5) = folnmxi(1:5) + qe25i_table (1:5) = qe25i (1:5) + aref_table = aref + psnrf_table = psnrf + i2par_table = i2par + tassim0_table = tassim0 + tassim1_table = tassim1 + tassim2_table = tassim2 + k_table = k + epsi_table = epsi + q10mr_table = q10mr + lefreez_table = lefreez + fra_gr_table = fra_gr + lfmr25_table = lfmr25 + stmr25_table = stmr25 + rtmr25_table = rtmr25 + grainmr25_table = grainmr25 + bio2lai_table = bio2lai + dile_fc_table(:,1) = dile_fc_s1 + dile_fc_table(:,2) = dile_fc_s2 + dile_fc_table(:,3) = dile_fc_s3 + dile_fc_table(:,4) = dile_fc_s4 + dile_fc_table(:,5) = dile_fc_s5 + dile_fc_table(:,6) = dile_fc_s6 + dile_fc_table(:,7) = dile_fc_s7 + dile_fc_table(:,8) = dile_fc_s8 + dile_fw_table(:,1) = dile_fw_s1 + dile_fw_table(:,2) = dile_fw_s2 + dile_fw_table(:,3) = dile_fw_s3 + dile_fw_table(:,4) = dile_fw_s4 + dile_fw_table(:,5) = dile_fw_s5 + dile_fw_table(:,6) = dile_fw_s6 + dile_fw_table(:,7) = dile_fw_s7 + dile_fw_table(:,8) = dile_fw_s8 + lf_ovrc_table(:,1) = lf_ovrc_s1 + lf_ovrc_table(:,2) = lf_ovrc_s2 + lf_ovrc_table(:,3) = lf_ovrc_s3 + lf_ovrc_table(:,4) = lf_ovrc_s4 + lf_ovrc_table(:,5) = lf_ovrc_s5 + lf_ovrc_table(:,6) = lf_ovrc_s6 + lf_ovrc_table(:,7) = lf_ovrc_s7 + lf_ovrc_table(:,8) = lf_ovrc_s8 + st_ovrc_table(:,1) = st_ovrc_s1 + st_ovrc_table(:,2) = st_ovrc_s2 + st_ovrc_table(:,3) = st_ovrc_s3 + st_ovrc_table(:,4) = st_ovrc_s4 + st_ovrc_table(:,5) = st_ovrc_s5 + st_ovrc_table(:,6) = st_ovrc_s6 + st_ovrc_table(:,7) = st_ovrc_s7 + st_ovrc_table(:,8) = st_ovrc_s8 + rt_ovrc_table(:,1) = rt_ovrc_s1 + rt_ovrc_table(:,2) = rt_ovrc_s2 + rt_ovrc_table(:,3) = rt_ovrc_s3 + rt_ovrc_table(:,4) = rt_ovrc_s4 + rt_ovrc_table(:,5) = rt_ovrc_s5 + rt_ovrc_table(:,6) = rt_ovrc_s6 + rt_ovrc_table(:,7) = rt_ovrc_s7 + rt_ovrc_table(:,8) = rt_ovrc_s8 + lfpt_table (:,1) = lfpt_s1 + lfpt_table (:,2) = lfpt_s2 + lfpt_table (:,3) = lfpt_s3 + lfpt_table (:,4) = lfpt_s4 + lfpt_table (:,5) = lfpt_s5 + lfpt_table (:,6) = lfpt_s6 + lfpt_table (:,7) = lfpt_s7 + lfpt_table (:,8) = lfpt_s8 + stpt_table (:,1) = stpt_s1 + stpt_table (:,2) = stpt_s2 + stpt_table (:,3) = stpt_s3 + stpt_table (:,4) = stpt_s4 + stpt_table (:,5) = stpt_s5 + stpt_table (:,6) = stpt_s6 + stpt_table (:,7) = stpt_s7 + stpt_table (:,8) = stpt_s8 + rtpt_table (:,1) = rtpt_s1 + rtpt_table (:,2) = rtpt_s2 + rtpt_table (:,3) = rtpt_s3 + rtpt_table (:,4) = rtpt_s4 + rtpt_table (:,5) = rtpt_s5 + rtpt_table (:,6) = rtpt_s6 + rtpt_table (:,7) = rtpt_s7 + rtpt_table (:,8) = rtpt_s8 + grainpt_table(:,1) = grainpt_s1 + grainpt_table(:,2) = grainpt_s2 + grainpt_table(:,3) = grainpt_s3 + grainpt_table(:,4) = grainpt_s4 + grainpt_table(:,5) = grainpt_s5 + grainpt_table(:,6) = grainpt_s6 + grainpt_table(:,7) = grainpt_s7 + grainpt_table(:,8) = grainpt_s8 + lfct_table (:,1) = lfct_s1 + lfct_table (:,2) = lfct_s2 + lfct_table (:,3) = lfct_s3 + lfct_table (:,4) = lfct_s4 + lfct_table (:,5) = lfct_s5 + lfct_table (:,6) = lfct_s6 + lfct_table (:,7) = lfct_s7 + lfct_table (:,8) = lfct_s8 + stct_table (:,1) = stct_s1 + stct_table (:,2) = stct_s2 + stct_table (:,3) = stct_s3 + stct_table (:,4) = stct_s4 + stct_table (:,5) = stct_s5 + stct_table (:,6) = stct_s6 + stct_table (:,7) = stct_s7 + stct_table (:,8) = stct_s8 + rtct_table (:,1) = rtct_s1 + rtct_table (:,2) = rtct_s2 + rtct_table (:,3) = rtct_s3 + rtct_table (:,4) = rtct_s4 + rtct_table (:,5) = rtct_s5 + rtct_table (:,6) = rtct_s6 + rtct_table (:,7) = rtct_s7 + rtct_table (:,8) = rtct_s8 + + !---------------- noahmptable.tbl tile drainage parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15,noahmp_tiledrain_parameters) + close(15) + + ! assign values + drain_layer_opt_table = drain_layer_opt + tdsmc_fac_table(1:nsoiltype) = tdsmc_fac(1:nsoiltype) + td_depth_table (1:nsoiltype) = td_depth (1:nsoiltype) + td_dc_table (1:nsoiltype) = td_dc (1:nsoiltype) + td_dcoef_table (1:nsoiltype) = td_dcoef (1:nsoiltype) + td_d_table (1:nsoiltype) = td_d (1:nsoiltype) + td_adepth_table(1:nsoiltype) = td_adepth(1:nsoiltype) + td_radi_table (1:nsoiltype) = td_radi (1:nsoiltype) + td_spac_table (1:nsoiltype) = td_spac (1:nsoiltype) + td_ddrain_table(1:nsoiltype) = td_ddrain(1:nsoiltype) + klat_fac_table (1:nsoiltype) = klat_fac (1:nsoiltype) + + !---------------- noahmptable.tbl optional parameters + inquire( file='noahmptable.tbl', exist=file_named ) + if ( file_named ) then + open(15, file="noahmptable.tbl", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + errmsg = 'warning: cannot find file noahmptable.tb' + errflg = 1 + return +! write(*,'("warning: cannot find file noahmptable.tbl")') + endif + read(15,noahmp_optional_parameters) + close(15) + + ! assign values +! sr2006_theta_1500t_a_table = sr2006_theta_1500t_a +! sr2006_theta_1500t_b_table = sr2006_theta_1500t_b +! sr2006_theta_1500t_c_table = sr2006_theta_1500t_c +! sr2006_theta_1500t_d_table = sr2006_theta_1500t_d +! sr2006_theta_1500t_e_table = sr2006_theta_1500t_e +! sr2006_theta_1500t_f_table = sr2006_theta_1500t_f +! sr2006_theta_1500t_g_table = sr2006_theta_1500t_g +! sr2006_theta_1500_a_table = sr2006_theta_1500_a +! sr2006_theta_1500_b_table = sr2006_theta_1500_b +! sr2006_theta_33t_a_table = sr2006_theta_33t_a +! sr2006_theta_33t_b_table = sr2006_theta_33t_b +! sr2006_theta_33t_c_table = sr2006_theta_33t_c +! sr2006_theta_33t_d_table = sr2006_theta_33t_d +! sr2006_theta_33t_e_table = sr2006_theta_33t_e +! sr2006_theta_33t_f_table = sr2006_theta_33t_f +! sr2006_theta_33t_g_table = sr2006_theta_33t_g +! sr2006_theta_33_a_table = sr2006_theta_33_a +! sr2006_theta_33_b_table = sr2006_theta_33_b +! sr2006_theta_33_c_table = sr2006_theta_33_c +! sr2006_theta_s33t_a_table = sr2006_theta_s33t_a +! sr2006_theta_s33t_b_table = sr2006_theta_s33t_b +! sr2006_theta_s33t_c_table = sr2006_theta_s33t_c +! sr2006_theta_s33t_d_table = sr2006_theta_s33t_d +! sr2006_theta_s33t_e_table = sr2006_theta_s33t_e +! sr2006_theta_s33t_f_table = sr2006_theta_s33t_f +! sr2006_theta_s33t_g_table = sr2006_theta_s33t_g +! sr2006_theta_s33_a_table = sr2006_theta_s33_a +! sr2006_theta_s33_b_table = sr2006_theta_s33_b +! sr2006_psi_et_a_table = sr2006_psi_et_a +! sr2006_psi_et_b_table = sr2006_psi_et_b +! sr2006_psi_et_c_table = sr2006_psi_et_c +! sr2006_psi_et_d_table = sr2006_psi_et_d +! sr2006_psi_et_e_table = sr2006_psi_et_e +! sr2006_psi_et_f_table = sr2006_psi_et_f +! sr2006_psi_et_g_table = sr2006_psi_et_g +! sr2006_psi_e_a_table = sr2006_psi_e_a +! sr2006_psi_e_b_table = sr2006_psi_e_b +! sr2006_psi_e_c_table = sr2006_psi_e_c +! sr2006_smcmax_a_table = sr2006_smcmax_a +! sr2006_smcmax_b_table = sr2006_smcmax_b + + end subroutine read_mp_table_parameters - end module noahmp_tables diff --git a/drivers/ccpp/noahmpdrv.F90 b/drivers/ccpp/noahmpdrv.F90 index 64ea269e..4500d51a 100644 --- a/drivers/ccpp/noahmpdrv.F90 +++ b/drivers/ccpp/noahmpdrv.F90 @@ -37,6 +37,7 @@ subroutine noahmpdrv_init(lsm, lsm_noahmp, me, isot, ivegsrc, & use machine, only: kind_phys use set_soilveg_mod, only: set_soilveg use namelist_soilveg + use noahmp_tables implicit none integer, intent(in) :: lsm @@ -77,13 +78,6 @@ subroutine noahmpdrv_init(lsm, lsm_noahmp, me, isot, ivegsrc, & return end if - if (.not. do_mynnsfclay .and. do_mynnedmf) then - errmsg = 'Problem : do_mynnsfclay = .false.' // & - 'but mynnpbl is .true.. Exiting ...' - errflg = 1 - return - end if - if ( do_mynnsfclay .and. .not. do_mynnedmf) then errmsg = 'Problem : do_mynnsfclay = .true.' // & 'but mynnpbl is .false.. Exiting ...' @@ -93,8 +87,10 @@ subroutine noahmpdrv_init(lsm, lsm_noahmp, me, isot, ivegsrc, & !--- initialize soil vegetation - call set_soilveg(me, isot, ivegsrc, nlunit) + call set_soilveg(me, isot, ivegsrc, nlunit, errmsg, errflg) + !--- read in noahmp table + call read_mp_table_parameters(errmsg, errflg) ! initialize psih and psim @@ -131,14 +127,14 @@ end subroutine noahmpdrv_init subroutine noahmpdrv_run & !................................... ! --- inputs: - ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp, & + ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp,soilcol,& vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & - prsl1, prslk1, prslki, prsik1, zf,pblh, dry, wind, slopetyp, & + prsl1, prslk1, prslki, prsik1, zf,pblh, dry, wind, slopetyp,& shdmin, shdmax, snoalb, sfalb, flag_iter,con_g, & idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, & - iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot, & - iopt_stc, iopt_trs,xlatin, xcoszin, iyrlen, julian, garea, & - rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp,rhonewsn1, & + iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot,iopt_stc,& + iopt_trs,iopt_diag,xlatin, xcoszin, iyrlen, julian, garea, & + rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, rhonewsn1,& con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, & con_fvirt, con_rd, con_hfus, thsfc_loc, & @@ -161,18 +157,55 @@ subroutine noahmpdrv_run & sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, & cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc,& stm, snohf,smcwlt2, smcref2, wet1, t2mmp, q2mp,zvfun, & - ztmax, errmsg, errflg) + ztmax, errmsg, errflg, & + canopy_heat_storage_ccpp, & + rainfall_ccpp, & + sw_absorbed_total_ccpp, & + sw_reflected_total_ccpp, & + lw_absorbed_total_ccpp, & + temperature_bare_grd_ccpp, & + temperature_veg_grd_ccpp, & + temperature_veg_2m_ccpp, & + temperature_bare_2m_ccpp, & + spec_humidity_veg_2m_ccpp, & + spec_humidity_bare_2m_ccpp, & + sw_absorbed_veg_ccpp, & + sw_absorbed_ground_ccpp, & + snowmelt_out_ccpp, & + snowmelt_shallow_ccpp, & + albedo_direct_snow_ccpp, & + albedo_diffuse_snow_ccpp, & + ch_vegetated_ccpp, & + ch_bare_ground_ccpp, & + sensible_heat_grd_veg_ccpp, & + sensible_heat_leaf_ccpp, & + sensible_heat_grd_bar_ccpp, & + latent_heat_grd_veg_ccpp, & + latent_heat_grd_bare_ccpp, & + ground_heat_veg_ccpp, & + ground_heat_bare_ccpp, & + lw_absorbed_grd_veg_ccpp, & + lw_absorbed_leaf_ccpp, & + lw_absorbed_grd_bare_ccpp, & + latent_heat_trans_ccpp, & + latent_heat_leaf_ccpp, & + ch_leaf_ccpp, & + ch_below_canopy_ccpp, & + ch_vegetated_2m_ccpp, & + ch_bare_ground_2m_ccpp, & + precip_adv_heat_veg_ccpp, & + precip_adv_heat_grd_v_ccpp, & + precip_adv_heat_grd_b_ccpp, & + spec_humid_sfc_veg_ccpp, & + spec_humid_sfc_bare_ccpp & + ) use machine , only : kind_phys use funcphys, only : fpvs - use sfc_diff, only : stability -! use module_sf_noahmplsm + use module_sf_noahmplsm, only : gfs_stability use module_sf_noahmp_glacier - use noahmp_tables, only : isice_table, co2_table, o2_table, & - isurban_table, smcref_table, smcdry_table, & - smcmax_table, co2_table, o2_table, & - saim_table, laim_table + use noahmp_tables implicit none @@ -206,6 +239,7 @@ subroutine noahmpdrv_run & real(kind=kind_phys), dimension(:) , intent(in) :: t1 ! layer 1 temperature [K] real(kind=kind_phys), dimension(:) , intent(in) :: q1 ! layer 1 specific humidity [kg/kg] integer , dimension(:) , intent(in) :: soiltyp ! soil type (integer index) + integer , dimension(:) , intent(in) :: soilcol ! soil color (integer index) integer , dimension(:) , intent(in) :: vegtype ! vegetation type (integer index) real(kind=kind_phys), dimension(:) , intent(in) :: sigmaf ! areal fractional cover of green vegetation real(kind=kind_phys), dimension(:) , intent(in) :: dlwflx ! downward longwave radiation [W/m2] @@ -252,6 +286,7 @@ subroutine noahmpdrv_run & integer , intent(in) :: iopt_tbot ! option for lower boundary condition of soil temperature integer , intent(in) :: iopt_stc ! option for snow/soil temperature time scheme (only layer 1) integer , intent(in) :: iopt_trs ! option for thermal roughness scheme + integer , intent(in) :: iopt_diag ! option for surface diagnose approach real(kind=kind_phys), dimension(:) , intent(in) :: xlatin ! latitude real(kind=kind_phys), dimension(:) , intent(in) :: xcoszin ! cosine of zenith angle integer , intent(in) :: iyrlen ! year length [days] @@ -365,6 +400,47 @@ subroutine noahmpdrv_run & character(len=*) , intent(out) :: errmsg integer , intent(out) :: errflg + real(kind=kind_phys), dimension(:) , intent(out), optional :: canopy_heat_storage_ccpp ! within-canopy heat [W/m2] + real(kind=kind_phys), dimension(:) , intent(out), optional :: rainfall_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sw_absorbed_total_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sw_reflected_total_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: lw_absorbed_total_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: temperature_bare_grd_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: temperature_veg_grd_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: temperature_veg_2m_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: temperature_bare_2m_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: spec_humidity_veg_2m_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: spec_humidity_bare_2m_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sw_absorbed_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sw_absorbed_ground_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: snowmelt_out_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: snowmelt_shallow_ccpp + real(kind=kind_phys), dimension(:,:), intent(out), optional :: albedo_direct_snow_ccpp + real(kind=kind_phys), dimension(:,:), intent(out), optional :: albedo_diffuse_snow_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ch_vegetated_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ch_bare_ground_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sensible_heat_grd_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sensible_heat_leaf_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: sensible_heat_grd_bar_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: latent_heat_grd_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: latent_heat_grd_bare_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ground_heat_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ground_heat_bare_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: lw_absorbed_grd_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: lw_absorbed_leaf_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: lw_absorbed_grd_bare_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: latent_heat_trans_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: latent_heat_leaf_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ch_leaf_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ch_below_canopy_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ch_vegetated_2m_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: ch_bare_ground_2m_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: precip_adv_heat_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: precip_adv_heat_grd_v_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: precip_adv_heat_grd_b_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: spec_humid_sfc_veg_ccpp + real(kind=kind_phys), dimension(:) , intent(out), optional :: spec_humid_sfc_bare_ccpp + ! ! --- some new options, hard code for now ! @@ -374,6 +450,7 @@ subroutine noahmpdrv_run & integer :: iopt_pedo = 1 ! option for pedotransfer function integer :: iopt_crop = 0 ! option for crop model integer :: iopt_gla = 2 ! option for glacier treatment + integer :: iopt_z0m = 2 ! option for z0m treatment ! ! --- local inputs to noah-mp and glacier subroutines; listed in order in noah-mp call @@ -540,6 +617,10 @@ subroutine noahmpdrv_run & real (kind=kind_phys) :: lai_shaded ! out | shaded leaf area index [m2/m2] real (kind=kind_phys) :: leaf_air_resistance ! out | leaf boundary layer resistance [s/m] + real (kind=kind_phys) :: canopy_heat_storage ! out | within-canopy heat [W/m2] + real (kind=kind_phys) :: spec_humid_sfc_veg ! out | surface specific humidty over vegetation [kg/kg] + real (kind=kind_phys) :: spec_humid_sfc_bare ! out | surface specific humidty over bare soil [kg/kg] + real (kind=kind_phys) :: ustarx ! inout |surface friction velocity real (kind=kind_phys) :: prslkix ! in exner function real (kind=kind_phys) :: prsik1x ! in exner function @@ -563,6 +644,7 @@ subroutine noahmpdrv_run & integer :: soil_category(nsoil) integer :: slope_category integer :: soil_color_category + character(len=256) :: dataset_identifier real (kind=kind_phys) :: spec_humidity_sat ! saturation specific humidity real (kind=kind_phys) :: vapor_pressure_sat ! saturation vapor pressure @@ -620,6 +702,8 @@ subroutine noahmpdrv_run & ! --- noah-mp input variables (except snow_ice_frac_old done later) ! + dataset_identifier = "modified_igbp_modis_noah" + i_location = i j_location = -9999 latitude = xlatin(i) @@ -754,7 +838,9 @@ subroutine noahmpdrv_run & soil_category = soiltyp(i) slope_category = slopetyp(i) - soil_color_category = 4 + soil_color_category = soilcol(i) +! soil_color_category = 4 + call transfer_mp_parameters(vegetation_category, soil_category, & slope_category, soil_color_category, crop_type,parameters) @@ -762,7 +848,8 @@ subroutine noahmpdrv_run & call noahmp_options(idveg ,iopt_crs, iopt_btr , iopt_run, iopt_sfc, & iopt_frz, iopt_inf , iopt_rad, iopt_alb, & iopt_snf, iopt_tbot, iopt_stc, iopt_rsf, & - iopt_soil,iopt_pedo, iopt_crop,iopt_trs ) + iopt_soil,iopt_pedo, iopt_crop,iopt_trs, & + iopt_diag,iopt_z0m) if ( vegetation_category == isice_table ) then @@ -787,7 +874,7 @@ subroutine noahmpdrv_run & thsfc_loc ,prslkix ,prsik1x ,prslk1x , & air_pressure_surface ,pblhx ,iz0tlnd ,itime , & vegetation_frac ,area_grid ,psi_opt , & - con_fvirt ,con_eps ,con_cp , & + con_fvirt ,con_eps ,con_epsm1 ,con_cp , & snowfall ,snow_water_equiv_old ,snow_albedo_old , & cm_noahmp ,ch_noahmp ,snow_levels ,snow_water_equiv , & soil_moisture_vol ,interface_depth ,snow_depth ,snow_level_ice , & @@ -852,6 +939,7 @@ subroutine noahmpdrv_run & vegetation_fraction = vegetation_frac ch_vegetated = 0.0 ch_bare_ground = ch_noahmp + canopy_heat_storage = 0.0 else ! not glacier @@ -876,7 +964,7 @@ subroutine noahmpdrv_run & precip_graupel ,precip_hail ,temperature_soil_bot , & co2_air ,o2_air ,foliage_nitrogen , & snow_ice_frac_old ,forcing_height , & - con_fvirt ,con_eps ,con_cp , & + con_fvirt ,con_eps, con_epsm1 ,con_cp , & snow_albedo_old ,snow_water_equiv_old , & temperature_snow_soil ,soil_liquid_vol ,soil_moisture_vol , & temperature_canopy_air,vapor_pres_canopy_air ,canopy_wet_fraction , & @@ -916,12 +1004,13 @@ subroutine noahmpdrv_run & latent_heat_leaf ,ch_leaf ,ch_below_canopy , & ch_vegetated_2m ,ch_bare_ground_2m ,precip_frozen_frac , & precip_adv_heat_veg ,precip_adv_heat_grd_v ,precip_adv_heat_grd_b , & - precip_adv_heat_total ,snow_sublimation ,lai_sunlit , & + precip_adv_heat_total ,snow_sublimation ,canopy_heat_storage , & + lai_sunlit ,lai_shaded ,leaf_air_resistance , & #ifdef CCPP - lai_shaded ,leaf_air_resistance , & + spec_humid_sfc_veg ,spec_humid_sfc_bare , & errmsg ,errflg ) #else - lai_shaded ,leaf_air_resistance ) + spec_humid_sfc_veg ,spec_humid_sfc_bare ) #endif #ifdef CCPP @@ -1011,6 +1100,47 @@ subroutine noahmpdrv_run & zsnsoxy (i,:) = interface_depth + if(present(canopy_heat_storage_ccpp )) canopy_heat_storage_ccpp (i) = canopy_heat_storage + if(present(rainfall_ccpp )) rainfall_ccpp (i) = rainfall + if(present(sw_absorbed_total_ccpp )) sw_absorbed_total_ccpp (i) = sw_absorbed_total + if(present(sw_reflected_total_ccpp )) sw_reflected_total_ccpp (i) = sw_reflected_total + if(present(lw_absorbed_total_ccpp )) lw_absorbed_total_ccpp (i) = lw_absorbed_total + if(present(temperature_bare_grd_ccpp )) temperature_bare_grd_ccpp (i) = temperature_bare_grd + if(present(temperature_veg_grd_ccpp )) temperature_veg_grd_ccpp (i) = temperature_veg_grd + if(present(temperature_veg_2m_ccpp )) temperature_veg_2m_ccpp (i) = temperature_veg_2m + if(present(temperature_bare_2m_ccpp )) temperature_bare_2m_ccpp (i) = temperature_bare_2m + if(present(spec_humidity_veg_2m_ccpp )) spec_humidity_veg_2m_ccpp (i) = spec_humidity_veg_2m + if(present(spec_humidity_bare_2m_ccpp)) spec_humidity_bare_2m_ccpp(i) = spec_humidity_bare_2m + if(present(sw_absorbed_veg_ccpp )) sw_absorbed_veg_ccpp (i) = sw_absorbed_veg + if(present(sw_absorbed_ground_ccpp )) sw_absorbed_ground_ccpp (i) = sw_absorbed_ground + if(present(snowmelt_out_ccpp )) snowmelt_out_ccpp (i) = snowmelt_out + if(present(snowmelt_shallow_ccpp )) snowmelt_shallow_ccpp (i) = snowmelt_shallow + if(present(albedo_direct_snow_ccpp )) albedo_direct_snow_ccpp (i,:) = albedo_direct_snow + if(present(albedo_diffuse_snow_ccpp )) albedo_diffuse_snow_ccpp (i,:) = albedo_diffuse_snow + if(present(ch_vegetated_ccpp )) ch_vegetated_ccpp (i) = ch_vegetated + if(present(ch_bare_ground_ccpp )) ch_bare_ground_ccpp (i) = ch_bare_ground + if(present(sensible_heat_grd_veg_ccpp)) sensible_heat_grd_veg_ccpp(i) = sensible_heat_grd_veg + if(present(sensible_heat_leaf_ccpp )) sensible_heat_leaf_ccpp (i) = sensible_heat_leaf + if(present(sensible_heat_grd_bar_ccpp)) sensible_heat_grd_bar_ccpp(i) = sensible_heat_grd_bar + if(present(latent_heat_grd_veg_ccpp )) latent_heat_grd_veg_ccpp (i) = latent_heat_grd_veg + if(present(latent_heat_grd_bare_ccpp )) latent_heat_grd_bare_ccpp (i) = latent_heat_grd_bare + if(present(ground_heat_veg_ccpp )) ground_heat_veg_ccpp (i) = ground_heat_veg + if(present(ground_heat_bare_ccpp )) ground_heat_bare_ccpp (i) = ground_heat_bare + if(present(lw_absorbed_grd_veg_ccpp )) lw_absorbed_grd_veg_ccpp (i) = lw_absorbed_grd_veg + if(present(lw_absorbed_leaf_ccpp )) lw_absorbed_leaf_ccpp (i) = lw_absorbed_leaf + if(present(lw_absorbed_grd_bare_ccpp )) lw_absorbed_grd_bare_ccpp (i) = lw_absorbed_grd_bare + if(present(latent_heat_trans_ccpp )) latent_heat_trans_ccpp (i) = latent_heat_trans + if(present(latent_heat_leaf_ccpp )) latent_heat_leaf_ccpp (i) = latent_heat_leaf + if(present(ch_leaf_ccpp )) ch_leaf_ccpp (i) = ch_leaf + if(present(ch_below_canopy_ccpp )) ch_below_canopy_ccpp (i) = ch_below_canopy + if(present(ch_vegetated_2m_ccpp )) ch_vegetated_2m_ccpp (i) = ch_vegetated_2m + if(present(ch_bare_ground_2m_ccpp )) ch_bare_ground_2m_ccpp (i) = ch_bare_ground_2m + if(present(precip_adv_heat_veg_ccpp )) precip_adv_heat_veg_ccpp (i) = precip_adv_heat_veg + if(present(precip_adv_heat_grd_v_ccpp)) precip_adv_heat_grd_v_ccpp(i) = precip_adv_heat_grd_v + if(present(precip_adv_heat_grd_b_ccpp)) precip_adv_heat_grd_b_ccpp(i) = precip_adv_heat_grd_b + if(present(spec_humid_sfc_veg_ccpp )) spec_humid_sfc_veg_ccpp (i) = spec_humid_sfc_veg + if(present(spec_humid_sfc_bare_ccpp )) spec_humid_sfc_bare_ccpp (i) = spec_humid_sfc_bare + wslakexy (i) = lake_water ! not active fwetxy (i) = canopy_wet_fraction taussxy (i) = snow_age @@ -1058,7 +1188,7 @@ subroutine noahmpdrv_run & ! if ( .not. do_mynnsfclay) then !GFS sfcdiff if ( iopt_sfc .ne. 4 ) then !GFS sfcdiff - call stability & + call gfs_stability & (zf(i), zvfun(i), gdx, virtual_temperature, vptemp,wind(i), z0_total, z0h_total, & tvs1, con_g, thsfc_loc, & rb1(i), fm1(i), fh1(i), fm101(i), fh21(i), cm(i), ch(i), stress1(i), ustar1(i)) @@ -1205,10 +1335,12 @@ subroutine transfer_mp_parameters (vegtype,soiltype,slopetype, & parameters%z0mvt = z0mvt_table(vegtype) !momentum roughness length (m) parameters%hvt = hvt_table(vegtype) !top of canopy (m) parameters%hvb = hvb_table(vegtype) !bottom of canopy (m) + parameters%z0mhvt = z0mhvt_table(vegtype) !momentum roughness length (m) parameters%den = den_table(vegtype) !tree density (no. of trunks per m2) parameters%rc = rc_table(vegtype) !tree crown radius (m) parameters%mfsno = mfsno_table(vegtype) !snowmelt m parameter () parameters%scffac = scffac_table(vegtype) !snow cover factor + parameters%cbiom = cbiom_table(vegtype) !canopy biomass heat capacity parameter (m) parameters%saim = saim_table(vegtype,:) !monthly stem area index, one-sided parameters%laim = laim_table(vegtype,:) !monthly leaf area index, one-sided parameters%sla = sla_table(vegtype) !single-side leaf area per kg [m2/kg] diff --git a/drivers/ccpp/physcons.F90 b/drivers/ccpp/physcons.F90 index 41d37491..e7ec8fb7 100644 --- a/drivers/ccpp/physcons.F90 +++ b/drivers/ccpp/physcons.F90 @@ -53,8 +53,8 @@ module physcons real(kind=kind_phys),parameter:: con_omega =7.2921e-5_kind_phys !< ang vel of earth (\f$s^{-1}\f$) real(kind=kind_phys),parameter:: con_p0 =1.01325e5_kind_phys !< standard atmospheric pressure (\f$Pa\f$) ! real(kind=kind_phys),parameter:: con_solr =1.36822e+3_kind_phys ! solar constant (W/m2)-aer(2001) - real(kind=kind_phys),parameter:: con_solr_old =1.3660e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-Liu(2002) - real(kind=kind_phys),parameter:: con_solr =1.3608e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) + real(kind=kind_phys),parameter:: con_solr_2002 =1.3660e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-Liu(2002) + real(kind=kind_phys),parameter:: con_solr_2008 =1.3608e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) ! real(kind=kind_phys),parameter:: con_solr =1.36742732e+3_kind_phys ! solar constant (W/m2)-gfdl(1989) - OPR as of Jan 2006 ! Selected geophysics/astronomy constants with kind=kind_dyn real(kind=kind_dyn), parameter:: con_g_dyn =9.80665e+0_kind_dyn !< gravity (\f$m/s^{2}\f$) @@ -139,6 +139,7 @@ module physcons real(kind=kind_phys),parameter:: rhowater = 1000._kind_phys !< density of water (kg/m^3) real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys !< density of snow (kg/m^3) real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys !< density of air near surface (kg/m^3) + real(kind=kind_phys),parameter:: rholakeice = 0.917e3_kind_phys !< density of ice on lake (kg/m^3) ! Decorrelation length constant (km) for iovr = 4 or 5 and idcor = 0 real(kind=kind_phys),parameter:: decorr_con = 2.50_kind_phys diff --git a/drivers/ccpp/set_soilveg.f b/drivers/ccpp/set_soilveg.f index efef0f24..37f2c2a7 100644 --- a/drivers/ccpp/set_soilveg.f +++ b/drivers/ccpp/set_soilveg.f @@ -13,11 +13,13 @@ module set_soilveg_mod !> \ingroup Noah_LSM !! This subroutine initializes soil and vegetation. - subroutine set_soilveg(me,isot,ivet,nlunit) + subroutine set_soilveg(me,isot,ivet,nlunit,errmsg,errflg) use namelist_soilveg implicit none integer, intent(in) :: me,isot,ivet,nlunit + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg !my begin locals !for 20 igbp veg type and 19 stasgo soil type integer i @@ -385,16 +387,22 @@ subroutine set_soilveg(me,isot,ivet,nlunit) ! CLOSE(59) IF (DEFINED_SOIL .GT. MAX_SOILTYP) THEN - WRITE(0,*) 'Warning: DEFINED_SOIL too large in namelist' - STOP 222 + errflg = 222 + errmsg = 'ERROR(set_soilveg): DEFINED_SOIL too large in '// & + & 'namelist' + return ENDIF IF (DEFINED_VEG .GT. MAX_VEGTYP) THEN - WRITE(0,*) 'Warning: DEFINED_VEG too large in namelist' - STOP 222 + errflg = 222 + errmsg = 'ERROR(set_soilveg): DEFINED_VEG too large in '// & + & 'namelist' + return ENDIF IF (DEFINED_SLOPE .GT. MAX_SLOPETYP) THEN - WRITE(0,*) 'Warning: DEFINED_SLOPE too large in namelist' - STOP 222 + errflg = 222 + errmsg = 'ERROR(set_soilveg): DEFINED_SLOPE too large in '//& + & 'namelist' + return ENDIF SMLOW = SMLOW_DATA diff --git a/drivers/ccpp/sfc_diff.f b/drivers/ccpp/sfc_diff.f index 9bc7e6d0..6e834537 100644 --- a/drivers/ccpp/sfc_diff.f +++ b/drivers/ccpp/sfc_diff.f @@ -89,7 +89,8 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) integer, dimension(:), intent(in) :: vegtype logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) - logical, dimension(:), intent(in) :: flag_iter, wet, dry, icy + logical, dimension(:), intent(in) :: flag_iter, dry, icy + logical, dimension(:), intent(inout) :: wet logical, intent(in) :: thsfc_loc ! Flag for reference pressure in theta calculation @@ -164,7 +165,6 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! ps is in pascals, wind is wind speed, ! surface roughness length is converted to m from cm ! - ! write(0,*)'in sfc_diff, sfc_z0_type=',sfc_z0_type do i=1,im @@ -376,7 +376,9 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) call znot_t_v7(wind10m, ztmax_wat(i)) ! 10-m wind,m/s, ztmax(m) else if (sfc_z0_type > 0) then write(0,*)'no option for sfc_z0_type=',sfc_z0_type - stop + errflg = 1 + errmsg = 'ERROR(sfc_diff_run): no option for sfc_z0_type' + return endif ! call stability diff --git a/drivers/ccpp/update.sh b/drivers/ccpp/update.sh index 29e3c14a..ed54b2fa 100755 --- a/drivers/ccpp/update.sh +++ b/drivers/ccpp/update.sh @@ -7,7 +7,7 @@ do md5sum ../../../../FV3/ccpp/physics/physics/$i $i done -cp -f ../../../../FV3/ccpp/physics/physics/module_sf_noahmp_glacier.f90 ../../src/. -md5sum ../../../../FV3/ccpp/physics/physics/module_sf_noahmp_glacier.f90 ../../src/module_sf_noahmp_glacier.f90 -cp -f ../../../../FV3/ccpp/physics/physics/module_sf_noahmplsm.f90 ../../src/. -md5sum ../../../../FV3/ccpp/physics/physics/module_sf_noahmplsm.f90 ../../src/module_sf_noahmplsm.f90 +cp -f ../../../../FV3/ccpp/physics/physics/module_sf_noahmp_glacier.F90 ../../src/. +md5sum ../../../../FV3/ccpp/physics/physics/module_sf_noahmp_glacier.F90 ../../src/module_sf_noahmp_glacier.F90 +cp -f ../../../../FV3/ccpp/physics/physics/module_sf_noahmplsm.F90 ../../src/. +md5sum ../../../../FV3/ccpp/physics/physics/module_sf_noahmplsm.F90 ../../src/module_sf_noahmplsm.F90 diff --git a/drivers/nuopc/lnd_comp_driver.F90 b/drivers/nuopc/lnd_comp_driver.F90 index 5086fc8a..1c92a1d6 100644 --- a/drivers/nuopc/lnd_comp_driver.F90 +++ b/drivers/nuopc/lnd_comp_driver.F90 @@ -557,6 +557,7 @@ subroutine drv_run(gcomp, noahmp, rc) noahmp%static%itime , & noahmp%forc%ps , noahmp%model%u1 , noahmp%model%v1 , & noahmp%forc%t1 , noahmp%forc%q1 , noahmp%model%soiltyp , & + noahmp%model%soilcol , & noahmp%model%vegtype , noahmp%model%sigmaf , noahmp%forc%dlwflx , & noahmp%forc%dswsfc , noahmp%model%snet , noahmp%static%delt , & noahmp%model%tg3 , noahmp%model%cm , noahmp%model%ch , & @@ -569,7 +570,7 @@ subroutine drv_run(gcomp, noahmp, rc) noahmp%static%iopt_run, noahmp%static%iopt_sfc , noahmp%static%iopt_frz , & noahmp%static%iopt_inf, noahmp%static%iopt_rad , noahmp%static%iopt_alb , & noahmp%static%iopt_snf, noahmp%static%iopt_tbot, noahmp%static%iopt_stc , & - noahmp%static%iopt_trs, & + noahmp%static%iopt_trs, noahmp%static%iopt_diag, & noahmp%model%xlatin , noahmp%model%xcoszin , noahmp%model%iyrlen , & noahmp%model%julian , noahmp%domain%garea , & noahmp%model%rainn_mp , noahmp%model%rainc_mp , & diff --git a/drivers/nuopc/lnd_comp_io.F90 b/drivers/nuopc/lnd_comp_io.F90 index 1938d47c..353a13f3 100644 --- a/drivers/nuopc/lnd_comp_io.F90 +++ b/drivers/nuopc/lnd_comp_io.F90 @@ -1790,6 +1790,20 @@ subroutine read_static(noahmp, rc) call ESMF_FieldDestroy(field, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + !---------------------- + ! Soil color + !---------------------- + + write(filename, fmt="(A,I0,A)") trim(noahmp%nmlist%input_dir)//'C', maxval(noahmp%domain%nit), '.soil_color.tile' + call read_tiled_file(filename, 'soil_color', noahmp, field, numrec=1, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + call ESMF_FieldGet(field, localDe=0, farrayPtr=ptr, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + noahmp%model%soilcol(:) = int(ptr(:,1,1)) + nullify(ptr) + call ESMF_FieldDestroy(field, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + !---------------------- ! Set land-sea mask (dry) !---------------------- @@ -2128,6 +2142,7 @@ subroutine write_mosaic_output(filename, noahmp, now_time, rc) call fld_add("t1" ,"forcing air temperature" ,"K" ,ptr2d=ptr2d, v1r8=noahmp%forc%t1) call fld_add("q1" ,"forcing specific humidity" ,"kg/kg" ,ptr2d=ptr2d, v1r8=noahmp%forc%q1) call fld_add("soiltyp" ,"soil type" ,"1" ,ptr2d=ptr2d, v1i4=noahmp%model%soiltyp) + call fld_add("soilcol" ,"soil color" ,"1" ,ptr2d=ptr2d, v1i4=noahmp%model%soilcol) call fld_add("vegtype" ,"vegetation type" ,"1" ,ptr2d=ptr2d, v1i4=noahmp%model%vegtype) call fld_add("sigmaf" ,"green vegetation fraction" ,"1" ,ptr2d=ptr2d, v1r8=noahmp%model%sigmaf) call fld_add("dlwflx" ,"forcing longwave downward flux" ,"W/m2" ,ptr2d=ptr2d, v1r8=noahmp%forc%dlwflx) diff --git a/drivers/nuopc/lnd_comp_shr.F90 b/drivers/nuopc/lnd_comp_shr.F90 index 5f2c173a..70eb046b 100644 --- a/drivers/nuopc/lnd_comp_shr.F90 +++ b/drivers/nuopc/lnd_comp_shr.F90 @@ -757,6 +757,17 @@ subroutine read_namelist(gcomp, noahmp, rc) call ESMF_LogWrite(trim(subname)//' : surface_thermal_roughness_option = '//trim(cvalue), ESMF_LOGMSG_INFO) noahmp%static%iopt_trs = noahmp%nmlist%surface_thermal_roughness_option + ! get surface_diagnose_approach_option + call NUOPC_CompAttributeGet(gcomp, name='surface_diagnose_approach_option', value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc) + if (chkerr(rc,__LINE__,u_FILE_u)) return + if (isPresent .and. isSet) then + read(cvalue,*) noahmp%nmlist%surface_diagnose_approach_option + else + noahmp%nmlist%surface_diagnose_approach_option = 2 + end if + call ESMF_LogWrite(trim(subname)//' : surface_diagnose_approach_option = '//trim(cvalue), ESMF_LOGMSG_INFO) + noahmp%static%iopt_diag = noahmp%nmlist%surface_diagnose_approach_option + ! output frequency call NUOPC_CompAttributeGet(gcomp, name='output_freq', value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return diff --git a/drivers/nuopc/lnd_comp_types.F90 b/drivers/nuopc/lnd_comp_types.F90 index 2e0b5b87..77e31df3 100644 --- a/drivers/nuopc/lnd_comp_types.F90 +++ b/drivers/nuopc/lnd_comp_types.F90 @@ -72,6 +72,7 @@ module lnd_comp_types integer :: iopt_rsf ! option for surface resistent to evaporation/sublimation integer :: iopt_gla ! option for glacier treatment integer :: iopt_trs ! option for surface thermal roughness option + integer :: iopt_diag ! option for surface diagnose approach logical :: do_mynnedmf ! option for MYNN-EDMF logical :: do_mynnsfclay ! option for MYNN surface layer scheme character(len=128) :: errmsg ! error message @@ -89,6 +90,7 @@ module lnd_comp_types real(kind=kp), allocatable :: u1 (:) ! u-component of wind (m/s) real(kind=kp), allocatable :: v1 (:) ! v-component of wind (m/s) integer , allocatable :: soiltyp (:) ! soil type (integer index) + integer , allocatable :: soilcol (:) ! soil color (integer index) integer , allocatable :: vegtype (:) ! vegetation type (integer index) real(kind=kp), allocatable :: sigmaf (:) ! areal fractional cover of green vegetation real(kind=kp), allocatable :: emiss (:) ! sfc lw emissivity (fraction) @@ -278,6 +280,7 @@ module lnd_comp_types integer :: surface_evap_resistance_option integer :: glacier_option integer :: surface_thermal_roughness_option + integer :: surface_diagnose_approach_option ! option for surface diagnose approach integer :: output_freq ! model output interval logical :: has_export ! enable/disable export fields logical :: calc_snet ! enable/disable calculating net shortwave rad. internally @@ -370,6 +373,7 @@ subroutine InitializeAllocate(this, begl, endl, km, lsnowl) allocate(this%model%u1 (begl:endl)) allocate(this%model%v1 (begl:endl)) allocate(this%model%soiltyp (begl:endl)) + allocate(this%model%soilcol (begl:endl)) allocate(this%model%vegtype (begl:endl)) allocate(this%model%sigmaf (begl:endl)) allocate(this%model%emiss (begl:endl)) @@ -536,6 +540,7 @@ subroutine InitializeDefault(this) this%model%u1 = 0.0_kp this%model%v1 = 0.0_kp this%model%soiltyp = 0 + this%model%soilcol = 0 this%model%vegtype = 0 this%model%sigmaf = 0.0_kp this%model%emiss = 0.0_kp diff --git a/src/module_sf_noahmp_glacier.f90 b/src/module_sf_noahmp_glacier.F90 similarity index 98% rename from src/module_sf_noahmp_glacier.f90 rename to src/module_sf_noahmp_glacier.F90 index 1c144c99..6e34c43a 100644 --- a/src/module_sf_noahmp_glacier.f90 +++ b/src/module_sf_noahmp_glacier.F90 @@ -1,5 +1,5 @@ #define CCPP -!> \file module_sf_noahmp_glacier.f90 +!> \file module_sf_noahmp_glacier.F90 !! This file contains the NoahMP Glacier scheme. !>\ingroup NoahMP_LSM @@ -126,7 +126,7 @@ subroutine noahmp_glacier (& thsfc_loc ,prslkix ,prsik1x ,prslk1x , & psfc ,pblhx ,iz0tlnd ,itime , & sigmaf1 ,garea1 ,psi_opt , & ! in : - ep_1 ,ep_2 ,cp , & + ep_1 ,ep_2 ,epsm1 ,cp , & qsnow ,sneqvo ,albold ,cm ,ch ,isnow , & ! in/out : sneqv ,smc ,zsnso ,snowh ,snice ,snliq , & ! in/out : tg ,stc ,sh2o ,tauss ,qsfc , & ! in/out : @@ -177,6 +177,7 @@ subroutine noahmp_glacier (& real (kind=kind_phys) , intent(in) :: pblhx ! pbl height real (kind=kind_phys) , intent(in) :: ep_1 real (kind=kind_phys) , intent(in) :: ep_2 + real (kind=kind_phys) , intent(in) :: epsm1 real (kind=kind_phys) , intent(in) :: cp integer , intent(in) :: iz0tlnd ! integer , intent(in) :: itime !< timestep @@ -267,7 +268,7 @@ subroutine noahmp_glacier (& ! -------------------------------------------------------------------------------------------------- ! re-process atmospheric forcing - call atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & + call atm_glacier (ep_2, epsm1,sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & qair ,eair ,rhoair ,solad ,solai ,swdown ) beg_wb = sneqv @@ -290,7 +291,7 @@ subroutine noahmp_glacier (& tbot ,zbot ,zsnso ,dzsnso ,sigmaf1 ,garea1 , & !in thsfc_loc ,prslkix ,prsik1x ,prslk1x , & !in psfc ,pblhx ,iz0tlnd ,itime ,psi_opt , & - ep_1, ep_2, cp, & + ep_1, ep_2, epsm1, cp, & tg ,stc ,snowh ,sneqv ,sneqvo ,sh2o , & !inout smc ,snice ,snliq ,albold ,cm ,ch , & !inout #ifdef CCPP @@ -363,7 +364,7 @@ end subroutine noahmp_glacier ! ================================================================================================== !>\ingroup NoahMP_LSM !! re-process atmospheric forcing - subroutine atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & + subroutine atm_glacier (ep_2, epsm1, sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & qair ,eair ,rhoair ,solad ,solai , & swdown ) ! -------------------------------------------------------------------------------------------------- @@ -373,6 +374,8 @@ subroutine atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & ! -------------------------------------------------------------------------------------------------- ! inputs + real (kind=kind_phys) , intent(in) :: ep_2 + real (kind=kind_phys) , intent(in) :: epsm1 real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) real (kind=kind_phys) , intent(in) :: sfctmp !< surface air temperature [k] real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) @@ -399,8 +402,8 @@ subroutine atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & ! qair = q2 / (1.0+q2) ! mixing ratio to specific humidity [kg/kg] qair = q2 ! in wrf, driver converts to specific humidity - eair = qair*sfcprs / (0.622+0.378*qair) - rhoair = (sfcprs-0.378*eair) / (rair*sfctmp) + eair = qair*sfcprs / (ep_2-epsm1*qair) + rhoair = (sfcprs+epsm1*eair) / (rair*sfctmp) if(cosz <= 0.) then swdown = 0. @@ -417,14 +420,14 @@ end subroutine atm_glacier ! ================================================================================================== ! -------------------------------------------------------------------------------------------------- !>\ingroup NoahMP_LSM -!! This subroutine +!! Compute energy budget (momentum & energy fluxes and phase changes). subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !in eair ,sfcprs ,qair ,sfctmp ,lwdn ,uu , & !in vv ,solad ,solai ,cosz ,zref , & !in tbot ,zbot ,zsnso ,dzsnso ,sigmaf1 ,garea1 , & !in thsfc_loc ,prslkix ,prsik1x ,prslk1x , & !in psfc ,pblhx ,iz0tlnd ,itime ,psi_opt , & - ep_1, ep_2, cp, & + ep_1, ep_2, epsm1, cp, & tg ,stc ,snowh ,sneqv ,sneqvo ,sh2o , & !inout smc ,snice ,snliq ,albold ,cm ,ch , & !inout #ifdef CCPP @@ -478,6 +481,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair real (kind=kind_phys) , intent(in) :: psfc !< surface pressure real (kind=kind_phys) , intent(in) :: ep_1 real (kind=kind_phys) , intent(in) :: ep_2 + real (kind=kind_phys) , intent(in) :: epsm1 real (kind=kind_phys) , intent(in) :: cp integer , intent(in) :: iz0tlnd !< z0t option integer , intent(in) :: itime !< integration time @@ -507,7 +511,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair #endif ! outputs - integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !< phase change index [1-melt; 2-freeze] + integer, dimension(-nsnow+1:nsoil) , intent(out) :: imelt !< phase change index [1-melt; 2-freeze] real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snicev !< partial volume ice [m3/m3] real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snliqv !< partial volume liq. water [m3/m3] real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: epore !< effective porosity [m3/m3] @@ -584,7 +588,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair ! set psychrometric constant lathea = hsub - gamma = cpair*sfcprs/(0.622*lathea) + gamma = cpair*sfcprs/(ep_2*lathea) ! surface temperatures of the ground and energy fluxes @@ -594,7 +598,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair eair ,stc ,sag ,snowh ,lathea ,sh2o , & !in thsfc_loc ,prslkix ,prsik1x ,prslk1x , & psfc ,pblhx ,iz0tlnd ,itime ,uu ,vv , & - sigmaf1 ,garea1 ,psi_opt ,ep_1, ep_2, cp, & !in + sigmaf1 ,garea1 ,psi_opt ,ep_1, ep_2, epsm1, cp, & !in #ifdef CCPP cm ,ch ,tg ,qsfc ,errmsg ,errflg , & !inout #else @@ -650,6 +654,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair end subroutine energy_glacier ! ================================================================================================== !>\ingroup NoahMP_LSM +!! calculate thermal properties of soil, snow, lake, and frozen soil. subroutine thermoprop_glacier (nsoil ,nsnow ,isnow ,dzsnso , & !in dt ,snowh ,snice ,snliq , & !in df ,hcpct ,snicev ,snliqv ,epore , & !out @@ -782,6 +787,7 @@ subroutine csnow_glacier (isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso , end subroutine csnow_glacier !=================================================================================================== !>\ingroup NoahMP_LSM +!! Compute solar radiation: absorbed & reflected by the ground. subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in qsnow ,solad ,solai , & !in albold ,tauss , & !inout @@ -1032,7 +1038,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso eair ,stc ,sag ,snowh ,lathea ,sh2o , & !in thsfc_loc ,prslkix ,prsik1x ,prslk1x , & psfc ,pblhx ,iz0tlnd ,itime ,uu ,vv , & - sigmaf1 ,garea1 ,psi_opt ,ep_1, ep_2, cp, & !in + sigmaf1 ,garea1 ,psi_opt ,ep_1, ep_2, epsm1, cp, & !in #ifdef CCPP cm ,ch ,tgb ,qsfc ,errmsg ,errflg , & !inout #else @@ -1090,6 +1096,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso real (kind=kind_phys) , intent(in) :: psfc !< real (kind=kind_phys) , intent(in) :: ep_1 real (kind=kind_phys) , intent(in) :: ep_2 + real (kind=kind_phys) , intent(in) :: epsm1 real (kind=kind_phys) , intent(in) :: cp integer , intent(in) :: iz0tlnd !< integer , intent(in) :: itime !< integration time @@ -1264,11 +1271,11 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso call sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in qair ,sfctmp ,h ,rhoair ,mpe ,ur , & !in #ifdef CCPP - & moz ,mozsgn ,fm ,fh ,fm2 ,fh2 ,errmsg, errflg, & !inout + & moz ,mozsgn ,fm ,fh ,fm2 ,fh2,fv, errmsg, errflg, & !inout #else - & moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , & !inout + & moz ,mozsgn ,fm ,fh ,fm2 ,fh2,fv , & !inout #endif - & fv ,cm ,ch ,ch2) !out + & cm ,ch ,ch2) !out #ifdef CCPP if (errflg /= 0) return @@ -1362,7 +1369,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso else estg = esati end if - qsfc = 0.622*(estg*rhsur)/(sfcprs-0.378*(estg*rhsur)) + qsfc = ep_2*(estg*rhsur)/(sfcprs+epsm1*(estg*rhsur)) qfx = (qsfc-qair)*cev*gamma/cpair end do loop3 ! end stability iteration @@ -1435,7 +1442,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso else estg = esati end if - qsfc = 0.622*(estg*rhsur)/(sfcprs-0.378*(estg*rhsur)) + qsfc = ep_2*(estg*rhsur)/(sfcprs+epsm1*(estg*rhsur)) end do !sfc_diff3 iter end if !sfc_diff3 @@ -1451,7 +1458,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso t = tdc(tgb) ! mb: recalculate estg call esat(t, esatw, esati, dsatw, dsati) estg = esati - qsfc = 0.622*(estg*rhsur)/(sfcprs-0.378*(estg*rhsur)) + qsfc = ep_2*(estg*rhsur)/(sfcprs+epsm1*(estg*rhsur)) irb = cir * tgb**4 - emg*lwdn shb = csh * (tgb - sfctmp) evb = cev * (estg*rhsur - eair ) !estg reevaluate ? @@ -1462,6 +1469,11 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ! 2m air temperature ehb2 = fv*vkc/(log((2.+z0h)/z0h)-fh2) cq2b = ehb2 +! for opt_sfc 3 + if (opt_sfc ==3) then + ehb2 = fv*vkc/fh2 + cq2b = ehb2 + endif if (opt_sfc == 4) then ehb2 = ch2 * wspd1i ! need conductance,z0h from sfcdif4 @@ -1538,12 +1550,12 @@ end subroutine esat subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in qair ,sfctmp ,h ,rhoair ,mpe ,ur , & !in #ifdef CCPP - & moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , & !inout - & errmsg ,errflg , & !inout + & moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , fv, & !inout + & errmsg ,errflg , & !inout #else - & moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , & !inout + & moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , fv, & !inout #endif - & fv ,cm ,ch ,ch2 ) !out + & cm ,ch ,ch2 ) !out ! ------------------------------------------------------------------------------------------------- ! computing surface drag coefficient cm for momentum and ch for heat ! ------------------------------------------------------------------------------------------------- @@ -1569,6 +1581,7 @@ subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in real (kind=kind_phys), intent(inout) :: fh !< sen heat stability correction, weighted by prior iters real (kind=kind_phys), intent(inout) :: fm2 !< sen heat stability correction, weighted by prior iters real (kind=kind_phys), intent(inout) :: fh2 !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fv !< friction velocity (m/s) #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -1576,7 +1589,6 @@ subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in #endif ! outputs - real (kind=kind_phys), intent(out) :: fv !< friction velocity (m/s) real (kind=kind_phys), intent(out) :: cm !< drag coefficient for momentum real (kind=kind_phys), intent(out) :: ch !< drag coefficient for heat real (kind=kind_phys), intent(out) :: ch2 !< drag coefficient for heat @@ -2596,6 +2608,7 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in ! local integer :: iz real (kind=kind_phys) :: bdsnow !< bulk density of snow (kg/m3) + real (kind=kind_phys),parameter :: mwd = 100. !< maximum water depth (mm) ! ---------------------------------------------------------------------- snoflow = 0.0 ponding1 = 0.0 @@ -2639,9 +2652,9 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in !to obtain equilibrium state of snow in glacier region - if(sneqv > 2000.) then ! 2000 mm -> maximum water depth + if(sneqv > mwd) then ! 100 mm -> maximum water depth bdsnow = snice(0) / dzsnso(0) - snoflow = (sneqv - 2000.) + snoflow = (sneqv - mwd) snice(0) = snice(0) - snoflow dzsnso(0) = dzsnso(0) - snoflow/bdsnow snoflow = snoflow / dt @@ -3446,6 +3459,7 @@ end subroutine error_glacier ! ================================================================================================== !>\ingroup NoahMP_LSM +!! subroutine noahmp_options_glacier(iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc, iopt_gla,& iopt_sfc, iopt_trs) diff --git a/src/module_sf_noahmplsm.f90 b/src/module_sf_noahmplsm.F90 similarity index 83% rename from src/module_sf_noahmplsm.f90 rename to src/module_sf_noahmplsm.F90 index 49491661..273343d4 100644 --- a/src/module_sf_noahmplsm.f90 +++ b/src/module_sf_noahmplsm.F90 @@ -1,5 +1,5 @@ #define CCPP -!> \file module_sf_noahmplsm.f90 +!> \file module_sf_noahmplsm.F90 !! This file contains the NoahMP land surface model. !>\ingroup NoahMP_LSM @@ -8,7 +8,6 @@ module module_sf_noahmplsm use module_wrf_utl #endif use machine , only : kind_phys -use sfc_diff, only : stability implicit none @@ -163,10 +162,19 @@ module module_sf_noahmplsm ! 1 -> liu, et al. 2016 integer :: opt_trs !< options for thermal roughness scheme - ! **1 -> z0h=z0 - ! 2 -> czil - ! 3 -> ec style - ! 4 -> kb inversed + ! **1 -> z0h=z0m + ! 2 -> czil = f(canopy height) from Chen09 + ! 3 -> ec style from TESSEL + ! 4 -> kb inverse from Blumel99 + integer :: opt_diag !< options for surface 2m/q diagnostic approach + ! 1 -> external GFS sfc_diag + ! **2 -> original NoahMP 2-title + ! 3 -> NoahMP 2-title + internal GFS sfc_diag + + integer :: opt_z0m !< options for momentum roughness length + ! **1 -> use z0m from MPTABLE + ! 2 -> z0m = f(canopy height, LAI/SAI) + !------------------------------------------------------------------------------------------! ! physical constants: ! !------------------------------------------------------------------------------------------! @@ -211,14 +219,16 @@ module module_sf_noahmplsm real (kind=kind_phys) :: z0mvt !< momentum roughness length (m) real (kind=kind_phys) :: hvt !< top of canopy (m) real (kind=kind_phys) :: hvb !< bottom of canopy (m) + real (kind=kind_phys) :: z0mhvt !< ratio of z0m to hvt real (kind=kind_phys) :: den !< tree density (no. of trunks per m2) real (kind=kind_phys) :: rc !< tree crown radius (m) real (kind=kind_phys) :: mfsno !< snowmelt m parameter () real (kind=kind_phys) :: scffac !< snow cover factor (m) + real (kind=kind_phys) :: cbiom !< canopy biomass heat capacity parameter (m) real (kind=kind_phys) :: saim(12) !< monthly stem area index, one-sided real (kind=kind_phys) :: laim(12) !< monthly leaf area index, one-sided real (kind=kind_phys) :: sla !< single-side leaf area per kg [m2/kg] - real (kind=kind_phys) :: prcpiceden !< precipitation ice density [kg/m^3] + real (kind=kind_phys) :: prcpiceden !< precipitation ice density [kg/m^3] real (kind=kind_phys) :: dilefc !< coeficient for leaf stress death [1/s] real (kind=kind_phys) :: dilefw !< coeficient for leaf stress death [1/s] real (kind=kind_phys) :: fragr !< fraction of growth respiration !original was 0.3 @@ -405,6 +415,7 @@ module module_sf_noahmplsm !== begin noahmp_sflx ============================================================================== !>\ingroup NoahMP_LSM +!! subroutine noahmp_sflx (parameters, & iloc , jloc , lat , yearlen , julian , cosz , & ! in : time/space-related dt , dx , dz8w , nsoil , zsoil , nsnow , & ! in : model configuration @@ -415,7 +426,7 @@ subroutine noahmp_sflx (parameters, & pblhx , iz0tlnd , itime ,psi_opt ,& prcpconv, prcpnonc, prcpshcv, prcpsnow, prcpgrpl, prcphail, & ! in : forcing tbot , co2air , o2air , foln , ficeold , zlvl , & ! in : forcing - ep_1 , ep_2 , cp , & ! in : constants + ep_1 , ep_2 , epsm1 , cp , & ! in : constants albold , sneqvo , & ! in/out : stc , sh2o , smc , tah , eah , fwet , & ! in/out : canliq , canice , tv , tg , qsfc, qsnow, qrain, & ! in/out : @@ -437,7 +448,8 @@ subroutine noahmp_sflx (parameters, & shg , shc , shb , evg , evb , ghv , & ! out : ghb , irg , irc , irb , tr , evc , & ! out : chleaf , chuc , chv2 , chb2 , fpice , pahv , & - pahg , pahb , pah , esnow , laisun , laisha , rb & + pahg , pahb , pah , esnow , canhs , laisun , & + laisha , rb , qsfcveg , qsfcbare & #ifdef CCPP ,errmsg, errflg) #else @@ -461,9 +473,10 @@ subroutine noahmp_sflx (parameters, & integer , intent(in) :: nsoil !< no. of soil layers integer , intent(in) :: iloc !< grid index integer , intent(in) :: jloc !< grid index - real (kind=kind_phys) , intent(in) :: ep_1 - real (kind=kind_phys) , intent(in) :: ep_2 - real (kind=kind_phys) , intent(in) :: cp + real (kind=kind_phys) , intent(in) :: ep_1 !< + real (kind=kind_phys) , intent(in) :: ep_2 !< + real (kind=kind_phys) , intent(in) :: epsm1 !< + real (kind=kind_phys) , intent(in) :: cp !< real (kind=kind_phys) , intent(in) :: dt !< time step [sec] real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< layer-bottom depth from soil surf (m) real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) lowest model layer @@ -474,13 +487,13 @@ subroutine noahmp_sflx (parameters, & real (kind=kind_phys) , intent(in) :: lwdn !< downward longwave radiation (w/m2) real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) - logical , intent(in) :: thsfc_loc - real (kind=kind_phys) , intent(in) :: prslkix ! in exner function - real (kind=kind_phys) , intent(in) :: prsik1x ! in exner function - real (kind=kind_phys) , intent(in) :: prslk1x ! in exner function - real (kind=kind_phys) , intent(in) :: garea1 ! in exner function + logical , intent(in) :: thsfc_loc !< + real (kind=kind_phys) , intent(in) :: prslkix !< in exner function + real (kind=kind_phys) , intent(in) :: prsik1x !< in exner function + real (kind=kind_phys) , intent(in) :: prslk1x !< in exner function + real (kind=kind_phys) , intent(in) :: garea1 !< in exner function - real (kind=kind_phys) , intent(in) :: pblhx ! pbl height + real (kind=kind_phys) , intent(in) :: pblhx !< pbl height integer , intent(in) :: iz0tlnd !< z0t option integer , intent(in) :: itime !< integer , intent(in) :: psi_opt !< @@ -581,6 +594,8 @@ subroutine noahmp_sflx (parameters, & real (kind=kind_phys) , intent(out) :: rb !< leaf boundary layer resistance (s/m) real (kind=kind_phys) , intent(out) :: laisun !< sunlit leaf area index (m2/m2) real (kind=kind_phys) , intent(out) :: laisha !< shaded leaf area index (m2/m2) + real (kind=kind_phys) , intent(out) :: qsfcveg !< effective spec humid over vegetation + real (kind=kind_phys) , intent(out) :: qsfcbare !< effective spec humid over bare soil !jref:start; output real (kind=kind_phys) , intent(out) :: t2mv !< 2-m air temperature over vegetated part [k] @@ -718,7 +733,7 @@ subroutine noahmp_sflx (parameters, & logical :: dveg_active !< flag to run dynamic vegetation logical :: crop_active !< flag to run crop model ! add canopy heat storage (C.He added based on GY Niu's communication) - real (kind=kind_phys) :: canhs ! canopy heat storage change w/m2 + real (kind=kind_phys) , intent(out) :: canhs ! canopy heat storage change w/m2 ! intent (out) variables need to be assigned a value. these normally get assigned values ! only if dveg == 2. @@ -734,7 +749,7 @@ subroutine noahmp_sflx (parameters, & ! -------------------------------------------------------------------------------------------------- ! re-process atmospheric forcing - call atm (parameters,sfcprs ,sfctmp ,q2 , & + call atm (parameters,ep_2, epsm1, sfcprs ,sfctmp ,q2 , & prcpconv, prcpnonc,prcpshcv,prcpsnow,prcpgrpl,prcphail, & soldn ,cosz ,thair ,qair , & eair ,rhoair ,qprecc ,qprecl ,solad ,solai , & @@ -817,7 +832,7 @@ subroutine noahmp_sflx (parameters, & fveg ,shdfac, pahv ,pahg ,pahb , & !in qsnow ,dzsnso ,lat ,canliq ,canice ,iloc, jloc , & !in thsfc_loc, prslkix,prsik1x,prslk1x,garea1, & !in - pblhx ,iz0tlnd, itime ,psi_opt, ep_1, ep_2, cp, & + pblhx ,iz0tlnd, itime ,psi_opt, ep_1, ep_2, epsm1,cp, & z0wrf ,z0hwrf , & !out imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out @@ -841,7 +856,9 @@ subroutine noahmp_sflx (parameters, & emissi ,pah ,canhs, & shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out - qsfc = q1 ! + qsfcveg = eah*ep_2/(sfcprs + epsm1*eah) + qsfcbare = qsfc + qsfc = q1 !jref:end #ifdef CCPP if (errflg /= 0) return @@ -943,7 +960,7 @@ end subroutine noahmp_sflx !>\ingroup NoahMP_LSM !! re-precess atmospheric forcing. - subroutine atm (parameters,sfcprs ,sfctmp ,q2 , & + subroutine atm (parameters,ep_2,epsm1,sfcprs ,sfctmp ,q2 , & prcpconv,prcpnonc ,prcpshcv,prcpsnow,prcpgrpl,prcphail , & soldn ,cosz ,thair ,qair , & eair ,rhoair ,qprecc ,qprecl ,solad , solai , & @@ -956,35 +973,37 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , ! inputs type (noahmp_parameters), intent(in) :: parameters - real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) - real (kind=kind_phys) , intent(in) :: sfctmp !surface air temperature [k] - real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) - real (kind=kind_phys) , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 - real (kind=kind_phys) , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 - real (kind=kind_phys) , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 - real (kind=kind_phys) , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 - real (kind=kind_phys) , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 - real (kind=kind_phys) , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 - real (kind=kind_phys) , intent(in) :: soldn !downward shortwave radiation (w/m2) - real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: ep_2 !< + real (kind=kind_phys) , intent(in) :: epsm1 !< + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) + real (kind=kind_phys) , intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: prcpconv !< convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpnonc !< non-convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpshcv !< shallow convective precip entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpsnow !< snow entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpgrpl !< graupel entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcphail !< hail entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: soldn !< downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !< cosine solar zenith angle [0-1] ! outputs - real (kind=kind_phys) , intent(out) :: thair !potential temperature (k) - real (kind=kind_phys) , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real (kind=kind_phys) , intent(out) :: eair !vapor pressure air (pa) - real (kind=kind_phys) , intent(out) :: rhoair !density air (kg/m3) - real (kind=kind_phys) , intent(out) :: qprecc !convective precipitation (mm/s) - real (kind=kind_phys) , intent(out) :: qprecl !large-scale precipitation (mm/s) - real (kind=kind_phys), dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) - real (kind=kind_phys), dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) - real (kind=kind_phys) , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] - real (kind=kind_phys) , intent(out) :: bdfall !!bulk density of snowfall (kg/m3) ajn - real (kind=kind_phys) , intent(out) :: rain !rainfall (mm/s) ajn - real (kind=kind_phys) , intent(out) :: snow !liquid equivalent snowfall (mm/s) ajn - real (kind=kind_phys) , intent(out) :: fp !fraction of area receiving precipitation ajn - real (kind=kind_phys) , intent(out) :: fpice !fraction of ice ajn - real (kind=kind_phys) , intent(out) :: prcp !total precipitation [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(out) :: thair !< potential temperature (k) + real (kind=kind_phys) , intent(out) :: qair !< specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) , intent(out) :: eair !< vapor pressure air (pa) + real (kind=kind_phys) , intent(out) :: rhoair !< density air (kg/m3) + real (kind=kind_phys) , intent(out) :: qprecc !< convective precipitation (mm/s) + real (kind=kind_phys) , intent(out) :: qprecl !< large-scale precipitation (mm/s) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solad !< incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solai !< incoming diffuse solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: swdown !< downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(out) :: bdfall !< bulk density of snowfall (kg/m3) ajn + real (kind=kind_phys) , intent(out) :: rain !< rainfall (mm/s) ajn + real (kind=kind_phys) , intent(out) :: snow !< liquid equivalent snowfall (mm/s) ajn + real (kind=kind_phys) , intent(out) :: fp !< fraction of area receiving precipitation ajn + real (kind=kind_phys) , intent(out) :: fpice !< fraction of ice ajn + real (kind=kind_phys) , intent(out) :: prcp !< total precipitation [mm/s] ! mb/an : v3.7 !locals @@ -1000,8 +1019,8 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , qair = q2 ! in wrf, driver converts to specific humidity - eair = qair*sfcprs / (0.622+0.378*qair) - rhoair = (sfcprs-0.378*eair) / (rair*sfctmp) + eair = qair*sfcprs / (ep_2-epsm1*qair) + rhoair = (sfcprs+epsm1*eair) / (rair*sfctmp) if(cosz <= 0.) then swdown = 0. @@ -1073,8 +1092,8 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , if(prcpnonc > 0. .and. prcp_frozen > 0.) then fpice = min(1.0,prcp_frozen/prcpnonc) fpice = max(0.0,fpice) - if(opt_snf==4) bdfall = bdfall*(prcpsnow/prcp_frozen) + rho_grpl*(prcpgrpl/prcp_frozen) + & - rho_hail*(prcphail/prcp_frozen) + if(opt_snf==4) bdfall = bdfall*(prcpsnow/prcp_frozen) + rho_grpl*(prcpgrpl/prcp_frozen) + & + rho_hail*(prcphail/prcp_frozen) if(opt_snf==5) bdfall = parameters%prcpiceden else fpice = 0.0 @@ -1102,23 +1121,23 @@ subroutine phenology (parameters,vegtyp ,croptype, snowh , tv , lat , yea implicit none ! -------------------------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer , intent(in ) :: vegtyp !vegetation type - integer , intent(in ) :: croptype !vegetation type - real (kind=kind_phys) , intent(in ) :: snowh !snow height [m] - real (kind=kind_phys) , intent(in ) :: tv !vegetation temperature (k) - real (kind=kind_phys) , intent(in ) :: lat !latitude (radians) - integer , intent(in ) :: yearlen!number of days in the particular year - real (kind=kind_phys) , intent(in ) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) - real (kind=kind_phys) , intent(in ) :: troot !root-zone averaged temperature (k) - real (kind=kind_phys) , intent(inout) :: lai !lai, unadjusted for burying by snow - real (kind=kind_phys) , intent(inout) :: sai !sai, unadjusted for burying by snow + type (noahmp_parameters), intent(in) :: parameters !< + integer , intent(in ) :: vegtyp !< vegetation type + integer , intent(in ) :: croptype !< vegetation type + real (kind=kind_phys) , intent(in ) :: snowh !< snow height [m] + real (kind=kind_phys) , intent(in ) :: tv !< vegetation temperature (k) + real (kind=kind_phys) , intent(in ) :: lat !< latitude (radians) + integer , intent(in ) :: yearlen !< number of days in the particular year + real (kind=kind_phys) , intent(in ) :: julian !< julian day of year (fractional) ( 0 <= julian < yearlen ) + real (kind=kind_phys) , intent(in ) :: troot !< root-zone averaged temperature (k) + real (kind=kind_phys) , intent(inout) :: lai !< lai, unadjusted for burying by snow + real (kind=kind_phys) , intent(inout) :: sai !< sai, unadjusted for burying by snow ! outputs - real (kind=kind_phys) , intent(out ) :: elai !leaf area index, after burying by snow - real (kind=kind_phys) , intent(out ) :: esai !stem area index, after burying by snow - real (kind=kind_phys) , intent(out ) :: igs !growing season index (0=off, 1=on) - integer , intent(in ) :: pgs !plant growing stage + real (kind=kind_phys) , intent(out ) :: elai !< leaf area index, after burying by snow + real (kind=kind_phys) , intent(out ) :: esai !< stem area index, after burying by snow + real (kind=kind_phys) , intent(out ) :: igs !< growing season index (0=off, 1=on) + integer , intent(in ) :: pgs !< plant growing stage ! locals @@ -1225,43 +1244,43 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv ! ------------------------ input/output variables -------------------- ! input type (noahmp_parameters), intent(in) :: parameters - integer,intent(in) :: iloc !grid index - integer,intent(in) :: jloc !grid index - integer,intent(in) :: vegtyp !vegetation type - integer,intent(in) :: ist !surface type 1-soil; 2-lake - real (kind=kind_phys), intent(in) :: dt !main time step (s) - real (kind=kind_phys), intent(in) :: uu !u-direction wind speed [m/s] - real (kind=kind_phys), intent(in) :: vv !v-direction wind speed [m/s] - real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow - real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow - real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) - real (kind=kind_phys), intent(in) :: bdfall !bulk density of snowfall (kg/m3) - real (kind=kind_phys), intent(in) :: rain !rainfall (mm/s) - real (kind=kind_phys), intent(in) :: snow !snowfall (mm/s) - real (kind=kind_phys), intent(in) :: fp !fraction of the gridcell that receives precipitation - real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) - real (kind=kind_phys), intent(in) :: sfctmp !model-level temperature (k) - real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + integer,intent(in) :: iloc !< grid index + integer,intent(in) :: jloc !< grid index + integer,intent(in) :: vegtyp !< vegetation type + integer,intent(in) :: ist !< surface type 1-soil; 2-lake + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: uu !< u-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: vv !< v-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: elai !< leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !< stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: fveg !< greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: bdfall !< bulk density of snowfall (kg/m3) + real (kind=kind_phys), intent(in) :: rain !< rainfall (mm/s) + real (kind=kind_phys), intent(in) :: snow !< snowfall (mm/s) + real (kind=kind_phys), intent(in) :: fp !< fraction of the gridcell that receives precipitation + real (kind=kind_phys), intent(in) :: tv !< vegetation temperature (k) + real (kind=kind_phys), intent(in) :: sfctmp !< model-level temperature (k) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) ! input & output - real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) - real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: canliq !< intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !< intercepted ice mass (mm) ! output - real (kind=kind_phys), intent(out) :: qintr !interception rate for rain (mm/s) - real (kind=kind_phys), intent(out) :: qdripr !drip rate for rain (mm/s) - real (kind=kind_phys), intent(out) :: qthror !throughfall for rain (mm/s) - real (kind=kind_phys), intent(out) :: qints !interception (loading) rate for snowfall (mm/s) - real (kind=kind_phys), intent(out) :: qdrips !drip (unloading) rate for intercepted snow (mm/s) - real (kind=kind_phys), intent(out) :: qthros !throughfall of snowfall (mm/s) - real (kind=kind_phys), intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) - real (kind=kind_phys), intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) - real (kind=kind_phys), intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) - real (kind=kind_phys), intent(out) :: qrain !rain at ground srf (mm/s) [+] - real (kind=kind_phys), intent(out) :: qsnow !snow at ground srf (mm/s) [+] - real (kind=kind_phys), intent(out) :: snowhin !snow depth increasing rate (m/s) - real (kind=kind_phys), intent(out) :: fwet !wetted or snowed fraction of the canopy (-) - real (kind=kind_phys), intent(out) :: cmc !intercepted water (mm) + real (kind=kind_phys), intent(out) :: qintr !< interception rate for rain (mm/s) + real (kind=kind_phys), intent(out) :: qdripr !< drip rate for rain (mm/s) + real (kind=kind_phys), intent(out) :: qthror !< throughfall for rain (mm/s) + real (kind=kind_phys), intent(out) :: qints !< interception (loading) rate for snowfall (mm/s) + real (kind=kind_phys), intent(out) :: qdrips !< drip (unloading) rate for intercepted snow (mm/s) + real (kind=kind_phys), intent(out) :: qthros !< throughfall of snowfall (mm/s) + real (kind=kind_phys), intent(out) :: pahv !< precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(out) :: pahg !< precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(out) :: pahb !< precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys), intent(out) :: qrain !< rain at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: qsnow !< snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: snowhin !< snow depth increasing rate (m/s) + real (kind=kind_phys), intent(out) :: fwet !< wetted or snowed fraction of the canopy (-) + real (kind=kind_phys), intent(out) :: cmc !< intercepted water (mm) ! -------------------------------------------------------------------- ! ------------------------ local variables --------------------------- @@ -1458,47 +1477,47 @@ subroutine error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & ! -------------------------------------------------------------------------------------------------- ! inputs type (noahmp_parameters), intent(in) :: parameters - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: nsoil !number of soil layers - integer , intent(in) :: ist !surface type 1->soil; 2->lake - integer , intent(in) :: iloc !grid index - integer , intent(in) :: jloc !grid index - real (kind=kind_phys) , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] - real (kind=kind_phys) , intent(in) :: fsa !total absorbed solar radiation (w/m2) - real (kind=kind_phys) , intent(in) :: fsr !total reflected solar radiation (w/m2) - real (kind=kind_phys) , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] - real (kind=kind_phys) , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] - real (kind=kind_phys) , intent(in) :: fcev !canopy evaporation heat (w/m2) [+ to atm] - real (kind=kind_phys) , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] - real (kind=kind_phys) , intent(in) :: fctr !transpiration heat flux (w/m2) [+ to atm] - real (kind=kind_phys) , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] - real (kind=kind_phys) , intent(in) :: fveg - real (kind=kind_phys) , intent(in) :: sav - real (kind=kind_phys) , intent(in) :: sag - real (kind=kind_phys) , intent(in) :: fsrv - real (kind=kind_phys) , intent(in) :: fsrg - real (kind=kind_phys) , intent(in) :: zwt - - real (kind=kind_phys) , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real (kind=kind_phys) , intent(in) :: ecan !evaporation of intercepted water (mm/s) - real (kind=kind_phys) , intent(in) :: etran !transpiration rate (mm/s) - real (kind=kind_phys) , intent(in) :: edir !soil surface evaporation rate[mm/s] - real (kind=kind_phys) , intent(in) :: runsrf !surface runoff [mm/s] - real (kind=kind_phys) , intent(in) :: runsub !baseflow (saturation excess) [mm/s] - real (kind=kind_phys) , intent(in) :: canliq !intercepted liquid water (mm) - real (kind=kind_phys) , intent(in) :: canice !intercepted ice mass (mm) - real (kind=kind_phys) , intent(in) :: sneqv !snow water eqv. [mm] - real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real (kind=kind_phys) , intent(in) :: wa !water storage in aquifer [mm] - real (kind=kind_phys) , intent(in) :: dt !time step [sec] - real (kind=kind_phys) , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] - real (kind=kind_phys) , intent(out) :: errwat !error in water balance [mm/timestep] - real (kind=kind_phys), intent(in) :: pah !precipitation advected heat - total (w/m2) - real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - total (w/m2) - real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - total (w/m2) - real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - total (w/m2) - real (kind=kind_phys), intent(in) :: canhs !canopy heat storage change (w/m2) C.He added based on GY Niu's communication + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: nsoil !< number of soil layers + integer , intent(in) :: ist !< surface type 1->soil; 2->lake + integer , intent(in) :: iloc !< grid index + integer , intent(in) :: jloc !< grid index + real (kind=kind_phys) , intent(in) :: swdown !< downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(in) :: fsa !< total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fsr !< total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fira !< total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fsh !< total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fcev !< canopy evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fgev !< ground evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fctr !< transpiration heat flux (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: ssoil !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(in) :: fveg !< + real (kind=kind_phys) , intent(in) :: sav !< + real (kind=kind_phys) , intent(in) :: sag !< + real (kind=kind_phys) , intent(in) :: fsrv !< + real (kind=kind_phys) , intent(in) :: fsrg !< + real (kind=kind_phys) , intent(in) :: zwt !< + + real (kind=kind_phys) , intent(in) :: prcp !< precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: ecan !< evaporation of intercepted water (mm/s) + real (kind=kind_phys) , intent(in) :: etran !< transpiration rate (mm/s) + real (kind=kind_phys) , intent(in) :: edir !< soil surface evaporation rate[mm/s] + real (kind=kind_phys) , intent(in) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys) , intent(in) :: runsub !< baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(in) :: canliq !< intercepted liquid water (mm) + real (kind=kind_phys) , intent(in) :: canice !< intercepted ice mass (mm) + real (kind=kind_phys) , intent(in) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !< soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer thickness [m] + real (kind=kind_phys) , intent(in) :: wa !< water storage in aquifer [mm] + real (kind=kind_phys) , intent(in) :: dt !< time step [sec] + real (kind=kind_phys) , intent(in) :: beg_wb !< water storage at begin of a timesetp [mm] + real (kind=kind_phys) , intent(out) :: errwat !< error in water balance [mm/timestep] + real (kind=kind_phys), intent(in) :: pah !< precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahv !< precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahg !< precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahb !< precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: canhs !< canopy heat storage change (w/m2) C.He added based on GY Niu's communication #ifdef CCPP character(len=*) , intent(inout) :: errmsg @@ -1657,7 +1676,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in fveg ,shdfac, pahv ,pahg ,pahb , & !in qsnow ,dzsnso ,lat ,canliq ,canice ,iloc , jloc, & !in thsfc_loc, prslkix,prsik1x,prslk1x,garea1, & !in - pblhx , iz0tlnd, itime,psi_opt,ep_1, ep_2, cp, & + pblhx , iz0tlnd, itime,psi_opt,ep_1, ep_2, epsm1, cp, & z0wrf ,z0hwrf , & !out imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out @@ -1718,157 +1737,158 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in ! -------------------------------------------------------------------------------------------------- ! inputs type (noahmp_parameters), intent(in) :: parameters - integer , intent(in) :: iloc - integer , intent(in) :: jloc - integer , intent(in) :: ice !ice (ice = 1) - integer , intent(in) :: vegtyp !vegetation physiology type - integer , intent(in) :: ist !surface type: 1->soil; 2->lake - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: nsoil !number of soil layers - integer , intent(in) :: isnow !actual no. of snow layers - real (kind=kind_phys) , intent(in) :: dt !time step [sec] - real (kind=kind_phys) , intent(in) :: qsnow !snowfall on the ground (mm/s) - real (kind=kind_phys) , intent(in) :: rhoair !density air (kg/m3) - real (kind=kind_phys) , intent(in) :: eair !vapor pressure air (pa) - real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) - - logical , intent(in) :: thsfc_loc - real (kind=kind_phys) , intent(in) :: prslkix ! in exner function - real (kind=kind_phys) , intent(in) :: prsik1x ! in exner function - real (kind=kind_phys) , intent(in) :: prslk1x ! in exner function - real (kind=kind_phys) , intent(in) :: garea1 - - real (kind=kind_phys) , intent(in) :: pblhx ! pbl height - real (kind=kind_phys) , intent(in) :: ep_1 - real (kind=kind_phys) , intent(in) :: ep_2 - real (kind=kind_phys) , intent(in) :: cp - integer , intent(in) :: iz0tlnd - integer , intent(in) :: itime - integer , intent(in) :: psi_opt - - real (kind=kind_phys) , intent(in) :: qair !specific humidity (kg/kg) - real (kind=kind_phys) , intent(in) :: sfctmp !air temperature (k) - real (kind=kind_phys) , intent(in) :: thair !potential temperature (k) - real (kind=kind_phys) , intent(in) :: lwdn !downward longwave radiation (w/m2) - real (kind=kind_phys) , intent(in) :: uu !wind speed in e-w dir (m/s) - real (kind=kind_phys) , intent(in) :: vv !wind speed in n-s dir (m/s) - real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) - real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) - real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle (0-1) - real (kind=kind_phys) , intent(in) :: elai !lai adjusted for burying by snow - real (kind=kind_phys) , intent(in) :: esai !lai adjusted for burying by snow - real (kind=kind_phys) , intent(in) :: fwet !fraction of canopy that is wet [-] - real (kind=kind_phys) , intent(in) :: fveg !greeness vegetation fraction (-) + integer , intent(in) :: iloc !< + integer , intent(in) :: jloc !< + integer , intent(in) :: ice !< ice (ice = 1) + integer , intent(in) :: vegtyp !< vegetation physiology type + integer , intent(in) :: ist !< surface type: 1->soil; 2->lake + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: nsoil !< number of soil layers + integer , intent(in) :: isnow !< actual no. of snow layers + real (kind=kind_phys) , intent(in) :: dt !< time step [sec] + real (kind=kind_phys) , intent(in) :: qsnow !< snowfall on the ground (mm/s) + real (kind=kind_phys) , intent(in) :: rhoair !< density air (kg/m3) + real (kind=kind_phys) , intent(in) :: eair !< vapor pressure air (pa) + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) + + logical , intent(in) :: thsfc_loc !< + real (kind=kind_phys) , intent(in) :: prslkix !< in exner function + real (kind=kind_phys) , intent(in) :: prsik1x !< in exner function + real (kind=kind_phys) , intent(in) :: prslk1x !< in exner function + real (kind=kind_phys) , intent(in) :: garea1 !< + + real (kind=kind_phys) , intent(in) :: pblhx !< pbl height + real (kind=kind_phys) , intent(in) :: ep_1 !< + real (kind=kind_phys) , intent(in) :: ep_2 !< + real (kind=kind_phys) , intent(in) :: epsm1 !< + real (kind=kind_phys) , intent(in) :: cp !< + integer , intent(in) :: iz0tlnd !< + integer , intent(in) :: itime !< + integer , intent(in) :: psi_opt !< + + real (kind=kind_phys) , intent(in) :: qair !< specific humidity (kg/kg) + real (kind=kind_phys) , intent(in) :: sfctmp !< air temperature (k) + real (kind=kind_phys) , intent(in) :: thair !< potential temperature (k) + real (kind=kind_phys) , intent(in) :: lwdn !< downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: uu !< wind speed in e-w dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !< wind speed in n-s dir (m/s) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solad !< incoming direct solar rad. (w/m2) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solai !< incoming diffuse solar rad. (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !< cosine solar zenith angle (0-1) + real (kind=kind_phys) , intent(in) :: elai !< lai adjusted for burying by snow + real (kind=kind_phys) , intent(in) :: esai !< lai adjusted for burying by snow + real (kind=kind_phys) , intent(in) :: fwet !< fraction of canopy that is wet [-] + real (kind=kind_phys) , intent(in) :: fveg !\ingroup NoahMP_LSM +!! Calculate solar radiation: absorbed & reflected by the ground and canopy. subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in sneqvo ,sneqv ,dt ,cosz ,snowh , & !in tg ,tv ,fsno ,qsnow ,fwet , & !in @@ -2718,52 +2765,52 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in ! -------------------------------------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc - integer, intent(in) :: jloc - integer, intent(in) :: vegtyp !vegetation type - integer, intent(in) :: ist !surface type - integer, intent(in) :: ice !ice (ice = 1) - integer, intent(in) :: nsoil !number of soil layers - - real (kind=kind_phys), intent(in) :: dt !time step [s] - real (kind=kind_phys), intent(in) :: qsnow !snowfall (mm/s) - real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) - real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) - real (kind=kind_phys), intent(in) :: snowh !snow height (mm) - real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) - real (kind=kind_phys), intent(in) :: tg !ground temperature (k) - real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) - real (kind=kind_phys), intent(in) :: elai !lai, one-sided, adjusted for burying by snow - real (kind=kind_phys), intent(in) :: esai !sai, one-sided, adjusted for burying by snow - real (kind=kind_phys), intent(in) :: fwet !fraction of canopy that is wet - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water [m3/m3] - real (kind=kind_phys), dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) - real (kind=kind_phys), dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) - real (kind=kind_phys), intent(in) :: fsno !snow cover fraction (-) - real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] + integer, intent(in) :: iloc !< + integer, intent(in) :: jloc !< + integer, intent(in) :: vegtyp !< vegetation type + integer, intent(in) :: ist !< surface type + integer, intent(in) :: ice !< ice (ice = 1) + integer, intent(in) :: nsoil !< number of soil layers + + real (kind=kind_phys), intent(in) :: dt !< time step [s] + real (kind=kind_phys), intent(in) :: qsnow !< snowfall (mm/s) + real (kind=kind_phys), intent(in) :: sneqvo !< snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !< snow mass (mm) + real (kind=kind_phys), intent(in) :: snowh !< snow height (mm) + real (kind=kind_phys), intent(in) :: cosz !< cosine solar zenith angle (0-1) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(in) :: tv !< vegetation temperature (k) + real (kind=kind_phys), intent(in) :: elai !< lai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: esai !< sai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: fwet !< fraction of canopy that is wet + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !< volumetric soil water [m3/m3] + real (kind=kind_phys), dimension(1:2) , intent(in) :: solad !< incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2) , intent(in) :: solai !< incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), intent(in) :: fsno !< snow cover fraction (-) + real (kind=kind_phys), intent(in) :: fveg !< green vegetation fraction [0.0-1.0] ! inout - real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) - real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age. + real (kind=kind_phys), intent(inout) :: albold !< snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !< non-dimensional snow age. ! output - real (kind=kind_phys), intent(out) :: fsun !sunlit fraction of canopy (-) - real (kind=kind_phys), intent(out) :: laisun !sunlit leaf area (-) - real (kind=kind_phys), intent(out) :: laisha !shaded leaf area (-) - real (kind=kind_phys), intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) - real (kind=kind_phys), intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) - real (kind=kind_phys), intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) - real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) - real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsun !< sunlit fraction of canopy (-) + real (kind=kind_phys), intent(out) :: laisun !< sunlit leaf area (-) + real (kind=kind_phys), intent(out) :: laisha !< shaded leaf area (-) + real (kind=kind_phys), intent(out) :: parsun !< average absorbed par for sunlit leaves (w/m2) + real (kind=kind_phys), intent(out) :: parsha !< average absorbed par for shaded leaves (w/m2) + real (kind=kind_phys), intent(out) :: sav !< solar radiation absorbed by vegetation (w/m2) + real (kind=kind_phys), intent(out) :: sag !< solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsa !< total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsr !< total reflected solar radiation (w/m2) !jref:start - real (kind=kind_phys), intent(out) :: fsrv !veg. reflected solar radiation (w/m2) - real (kind=kind_phys), intent(out) :: fsrg !ground reflected solar radiation (w/m2) - real (kind=kind_phys), intent(out) :: bgap - real (kind=kind_phys), intent(out) :: wgap - real (kind=kind_phys), dimension(1:2), intent(out) :: albsnd !snow albedo (direct) - real (kind=kind_phys), dimension(1:2), intent(out) :: albsni !snow albedo (diffuse) + real (kind=kind_phys), intent(out) :: fsrv !< veg. reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsrg !< ground reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: bgap !< + real (kind=kind_phys), intent(out) :: wgap !< + real (kind=kind_phys), dimension(1:2), intent(out) :: albsnd !< snow albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(out) :: albsni !< snow albedo (diffuse) !jref:end ! local @@ -2853,44 +2900,44 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in implicit none ! -------------------------------------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc - integer, intent(in) :: jloc - integer, intent(in) :: nsoil !number of soil layers - integer, intent(in) :: vegtyp !vegetation type - integer, intent(in) :: ist !surface type - integer, intent(in) :: ice !ice (ice = 1) - - real (kind=kind_phys), intent(in) :: dt !time step [sec] - real (kind=kind_phys), intent(in) :: qsnow !snowfall - real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle for next time step - real (kind=kind_phys), intent(in) :: snowh !snow height (mm) - real (kind=kind_phys), intent(in) :: tg !ground temperature (k) - real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) - real (kind=kind_phys), intent(in) :: elai !lai, one-sided, adjusted for burying by snow - real (kind=kind_phys), intent(in) :: esai !sai, one-sided, adjusted for burying by snow - real (kind=kind_phys), intent(in) :: fsno !fraction of grid covered by snow - real (kind=kind_phys), intent(in) :: fwet !fraction of canopy that is wet - real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) - real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) - real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water (m3/m3) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< + integer, intent(in) :: jloc !< + integer, intent(in) :: nsoil !< number of soil layers + integer, intent(in) :: vegtyp !< vegetation type + integer, intent(in) :: ist !< surface type + integer, intent(in) :: ice !< ice (ice = 1) + + real (kind=kind_phys), intent(in) :: dt !< time step [sec] + real (kind=kind_phys), intent(in) :: qsnow !< snowfall + real (kind=kind_phys), intent(in) :: cosz !< cosine solar zenith angle for next time step + real (kind=kind_phys), intent(in) :: snowh !< snow height (mm) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(in) :: tv !< vegetation temperature (k) + real (kind=kind_phys), intent(in) :: elai !< lai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: esai !< sai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: fsno !< fraction of grid covered by snow + real (kind=kind_phys), intent(in) :: fwet !< fraction of canopy that is wet + real (kind=kind_phys), intent(in) :: sneqvo !< snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !< snow mass (mm) + real (kind=kind_phys), intent(in) :: fveg !< green vegetation fraction [0.0-1.0] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !< volumetric soil water (m3/m3) ! inout - real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) - real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: albold !< snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !< non-dimensional snow age ! output - real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !ground albedo (direct) - real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse) - real (kind=kind_phys), dimension(1: 2), intent(out) :: albd !surface albedo (direct) - real (kind=kind_phys), dimension(1: 2), intent(out) :: albi !surface albedo (diffuse) - real (kind=kind_phys), dimension(1: 2), intent(out) :: fabd !flux abs by veg (per unit direct flux) - real (kind=kind_phys), dimension(1: 2), intent(out) :: fabi !flux abs by veg (per unit diffuse flux) - real (kind=kind_phys), dimension(1: 2), intent(out) :: ftdd !down direct flux below veg (per unit dir flux) - real (kind=kind_phys), dimension(1: 2), intent(out) :: ftid !down diffuse flux below veg (per unit dir flux) - real (kind=kind_phys), dimension(1: 2), intent(out) :: ftii !down diffuse flux below veg (per unit dif flux) - real (kind=kind_phys), intent(out) :: fsun !sunlit fraction of canopy (-) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !< ground albedo (direct) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !< ground albedo (diffuse) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albd !< surface albedo (direct) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albi !< surface albedo (diffuse) + real (kind=kind_phys), dimension(1: 2), intent(out) :: fabd !< flux abs by veg (per unit direct flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: fabi !< flux abs by veg (per unit diffuse flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftdd !< down direct flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftid !< down diffuse flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftii !< down diffuse flux below veg (per unit dif flux) + real (kind=kind_phys), intent(out) :: fsun !< sunlit fraction of canopy (-) !jref:start real (kind=kind_phys), dimension(1: 2), intent(out) :: frevd real (kind=kind_phys), dimension(1: 2), intent(out) :: frevi @@ -3023,6 +3070,7 @@ end subroutine albedo !== begin surrad =================================================================================== !>\ingroup NoahMP_LSM +!! surface raditiation subroutine surrad (parameters,mpe ,fsun ,fsha ,elai ,vai , & !in laisun ,laisha ,solad ,solai ,fabd , & !in fabi ,ftdd ,ftid ,ftii ,albgrd , & !in @@ -3037,45 +3085,45 @@ subroutine surrad (parameters,mpe ,fsun ,fsha ,elai ,vai , & !i ! -------------------------------------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc - integer, intent(in) :: jloc - real (kind=kind_phys), intent(in) :: mpe !prevents underflow errors if division by zero - - real (kind=kind_phys), intent(in) :: fsun !sunlit fraction of canopy - real (kind=kind_phys), intent(in) :: fsha !shaded fraction of canopy - real (kind=kind_phys), intent(in) :: elai !leaf area, one-sided - real (kind=kind_phys), intent(in) :: vai !leaf + stem area, one-sided - real (kind=kind_phys), intent(in) :: laisun !sunlit leaf area index, one-sided - real (kind=kind_phys), intent(in) :: laisha !shaded leaf area index, one-sided - - real (kind=kind_phys), dimension(1:2), intent(in) :: solad !incoming direct solar radiation (w/m2) - real (kind=kind_phys), dimension(1:2), intent(in) :: solai !incoming diffuse solar radiation (w/m2) - real (kind=kind_phys), dimension(1:2), intent(in) :: fabd !flux abs by veg (per unit incoming direct flux) - real (kind=kind_phys), dimension(1:2), intent(in) :: fabi !flux abs by veg (per unit incoming diffuse flux) - real (kind=kind_phys), dimension(1:2), intent(in) :: ftdd !down dir flux below veg (per incoming dir flux) - real (kind=kind_phys), dimension(1:2), intent(in) :: ftid !down dif flux below veg (per incoming dir flux) - real (kind=kind_phys), dimension(1:2), intent(in) :: ftii !down dif flux below veg (per incoming dif flux) - real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !ground albedo (direct) - real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !ground albedo (diffuse) - real (kind=kind_phys), dimension(1:2), intent(in) :: albd !overall surface albedo (direct) - real (kind=kind_phys), dimension(1:2), intent(in) :: albi !overall surface albedo (diffuse) - - real (kind=kind_phys), dimension(1:2), intent(in) :: frevd !overall surface albedo veg (direct) - real (kind=kind_phys), dimension(1:2), intent(in) :: frevi !overall surface albedo veg (diffuse) - real (kind=kind_phys), dimension(1:2), intent(in) :: fregd !overall surface albedo grd (direct) - real (kind=kind_phys), dimension(1:2), intent(in) :: fregi !overall surface albedo grd (diffuse) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< + integer, intent(in) :: jloc !< + real (kind=kind_phys), intent(in) :: mpe !< prevents underflow errors if division by zero + + real (kind=kind_phys), intent(in) :: fsun !< sunlit fraction of canopy + real (kind=kind_phys), intent(in) :: fsha !< shaded fraction of canopy + real (kind=kind_phys), intent(in) :: elai !< leaf area, one-sided + real (kind=kind_phys), intent(in) :: vai !< leaf + stem area, one-sided + real (kind=kind_phys), intent(in) :: laisun !< sunlit leaf area index, one-sided + real (kind=kind_phys), intent(in) :: laisha !< shaded leaf area index, one-sided + + real (kind=kind_phys), dimension(1:2), intent(in) :: solad !< incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2), intent(in) :: solai !< incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2), intent(in) :: fabd !< flux abs by veg (per unit incoming direct flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: fabi !< flux abs by veg (per unit incoming diffuse flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftdd !< down dir flux below veg (per incoming dir flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftid !< down dif flux below veg (per incoming dir flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftii !< down dif flux below veg (per incoming dif flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !< ground albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !< ground albedo (diffuse) + real (kind=kind_phys), dimension(1:2), intent(in) :: albd !< overall surface albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: albi !< overall surface albedo (diffuse) + + real (kind=kind_phys), dimension(1:2), intent(in) :: frevd !< overall surface albedo veg (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: frevi !< overall surface albedo veg (diffuse) + real (kind=kind_phys), dimension(1:2), intent(in) :: fregd !< overall surface albedo grd (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: fregi !< overall surface albedo grd (diffuse) ! output - real (kind=kind_phys), intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) - real (kind=kind_phys), intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) - real (kind=kind_phys), intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) - real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) - real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) - real (kind=kind_phys), intent(out) :: fsrv !reflected solar radiation by vegetation - real (kind=kind_phys), intent(out) :: fsrg !reflected solar radiation by ground + real (kind=kind_phys), intent(out) :: parsun !< average absorbed par for sunlit leaves (w/m2) + real (kind=kind_phys), intent(out) :: parsha !< average absorbed par for shaded leaves (w/m2) + real (kind=kind_phys), intent(out) :: sav !< solar radiation absorbed by vegetation (w/m2) + real (kind=kind_phys), intent(out) :: sag !< solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsa !< total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsr !< total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsrv !< reflected solar radiation by vegetation + real (kind=kind_phys), intent(out) :: fsrg !< reflected solar radiation by ground ! ------------------------ local variables ---------------------------------------------------- integer :: ib !waveband number (1=vis, 2=nir) @@ -3149,6 +3197,7 @@ end subroutine surrad !== begin snow_age ================================================================================= !>\ingroup NoahMP_LSM +!! subroutine snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) ! ---------------------------------------------------------------------- implicit none @@ -3156,17 +3205,17 @@ subroutine snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) ! from bats ! ------------------------ input/output variables -------------------------------------------------- !input - type (noahmp_parameters), intent(in) :: parameters - real (kind=kind_phys), intent(in) :: dt !main time step (s) - real (kind=kind_phys), intent(in) :: tg !ground temperature (k) - real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) - real (kind=kind_phys), intent(in) :: sneqv !snow water per unit ground area (mm) + type (noahmp_parameters), intent(in) :: parameters !< + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !< snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !< snow water per unit ground area (mm) !output - real (kind=kind_phys), intent(out) :: fage !snow age + real (kind=kind_phys), intent(out) :: fage !< snow age !input/output - real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: tauss !< non-dimensional snow age !local real (kind=kind_phys) :: tage !total aging effects real (kind=kind_phys) :: age1 !effects of grain growth due to vapor diffusion @@ -3202,23 +3251,24 @@ end subroutine snow_age !== begin snowalb_bats ============================================================================= !>\ingroup NoahMP_LSM +!! bats snow surface albedo subroutine snowalb_bats (parameters,nband,fsno,cosz,fage,albsnd,albsni) ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer,intent(in) :: nband !number of waveband classes + type (noahmp_parameters), intent(in) :: parameters !< + integer,intent(in) :: nband !< number of waveband classes - real (kind=kind_phys),intent(in) :: cosz !cosine solar zenith angle - real (kind=kind_phys),intent(in) :: fsno !snow cover fraction (-) - real (kind=kind_phys),intent(in) :: fage !snow age correction + real (kind=kind_phys),intent(in) :: cosz !< cosine solar zenith angle + real (kind=kind_phys),intent(in) :: fsno !< snow cover fraction (-) + real (kind=kind_phys),intent(in) :: fage !< snow age correction ! output - real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !< snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !< snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- @@ -3258,6 +3308,7 @@ end subroutine snowalb_bats !== begin snowalb_class ============================================================================ !>\ingroup NoahMP_LSM +!! class snow surface albedo subroutine snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,iloc,jloc) ! ---------------------------------------------------------------------- implicit none @@ -3265,21 +3316,21 @@ subroutine snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,ilo ! input type (noahmp_parameters), intent(in) :: parameters - integer,intent(in) :: iloc !grid index - integer,intent(in) :: jloc !grid index - integer,intent(in) :: nband !number of waveband classes + integer,intent(in) :: iloc !< grid index + integer,intent(in) :: jloc !< grid index + integer,intent(in) :: nband !< number of waveband classes - real (kind=kind_phys),intent(in) :: qsnow !snowfall (mm/s) - real (kind=kind_phys),intent(in) :: dt !time step (sec) - real (kind=kind_phys),intent(in) :: albold !snow albedo at last time step + real (kind=kind_phys),intent(in) :: qsnow !< snowfall (mm/s) + real (kind=kind_phys),intent(in) :: dt !< time step (sec) + real (kind=kind_phys),intent(in) :: albold !< snow albedo at last time step ! in & out - real (kind=kind_phys), intent(inout) :: alb ! + real (kind=kind_phys), intent(inout) :: alb !< ! output - real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !< snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !< snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- @@ -3312,6 +3363,7 @@ end subroutine snowalb_class !== begin groundalb ================================================================================ !>\ingroup NoahMP_LSM +!! ground surface albedo subroutine groundalb (parameters,nsoil ,nband ,ice ,ist , & !in fsno ,smc ,albsnd ,albsni ,cosz , & !in tg ,iloc ,jloc , & !in @@ -3321,24 +3373,24 @@ subroutine groundalb (parameters,nsoil ,nband ,ice ,ist , & !in ! -------------------------------------------------------------------------------------------------- !input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsoil !number of soil layers - integer, intent(in) :: nband !number of solar radiation waveband classes - integer, intent(in) :: ice !value of ist for land ice - integer, intent(in) :: ist !surface type - real (kind=kind_phys), intent(in) :: fsno !fraction of surface covered with snow (-) - real (kind=kind_phys), intent(in) :: tg !ground temperature (k) - real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water content (m3/m3) - real (kind=kind_phys), dimension(1: 2), intent(in) :: albsnd !direct beam snow albedo (vis, nir) - real (kind=kind_phys), dimension(1: 2), intent(in) :: albsni !diffuse snow albedo (vis, nir) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsoil !< number of soil layers + integer, intent(in) :: nband !< number of solar radiation waveband classes + integer, intent(in) :: ice !< value of ist for land ice + integer, intent(in) :: ist !< surface type + real (kind=kind_phys), intent(in) :: fsno !< fraction of surface covered with snow (-) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(in) :: cosz !< cosine solar zenith angle (0-1) + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !< volumetric soil water content (m3/m3) + real (kind=kind_phys), dimension(1: 2), intent(in) :: albsnd !< direct beam snow albedo (vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(in) :: albsni !< diffuse snow albedo (vis, nir) !output - real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !ground albedo (direct beam: vis, nir) - real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse: vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !< ground albedo (direct beam: vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !< ground albedo (diffuse: vis, nir) !local @@ -3399,34 +3451,34 @@ subroutine twostream (parameters,ib ,ic ,vegtyp ,cosz ,vai , & ! ! -------------------------------------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: ist !surface type - integer, intent(in) :: ib !waveband number - integer, intent(in) :: ic !0=unit incoming direct; 1=unit incoming diffuse - integer, intent(in) :: vegtyp !vegetation type - - real (kind=kind_phys), intent(in) :: cosz !cosine of direct zenith angle (0-1) - real (kind=kind_phys), intent(in) :: vai !one-sided leaf+stem area index (m2/m2) - real (kind=kind_phys), intent(in) :: fwet !fraction of lai, sai that is wetted (-) - real (kind=kind_phys), intent(in) :: t !surface temperature (k) - - real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !direct albedo of underlying surface (-) - real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !diffuse albedo of underlying surface (-) - real (kind=kind_phys), dimension(1:2), intent(in) :: rho !leaf+stem reflectance - real (kind=kind_phys), dimension(1:2), intent(in) :: tau !leaf+stem transmittance - real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: ist !< surface type + integer, intent(in) :: ib !< waveband number + integer, intent(in) :: ic !< 0=unit incoming direct; 1=unit incoming diffuse + integer, intent(in) :: vegtyp !< vegetation type + + real (kind=kind_phys), intent(in) :: cosz !< cosine of direct zenith angle (0-1) + real (kind=kind_phys), intent(in) :: vai !< one-sided leaf+stem area index (m2/m2) + real (kind=kind_phys), intent(in) :: fwet !< fraction of lai, sai that is wetted (-) + real (kind=kind_phys), intent(in) :: t !< surface temperature (k) + + real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !< direct albedo of underlying surface (-) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !< diffuse albedo of underlying surface (-) + real (kind=kind_phys), dimension(1:2), intent(in) :: rho !< leaf+stem reflectance + real (kind=kind_phys), dimension(1:2), intent(in) :: tau !< leaf+stem transmittance + real (kind=kind_phys), intent(in) :: fveg !< green vegetation fraction [0.0-1.0] ! output - real (kind=kind_phys), dimension(1:2), intent(out) :: fab !flux abs by veg layer (per unit incoming flux) - real (kind=kind_phys), dimension(1:2), intent(out) :: fre !flux refl above veg layer (per unit incoming flux) - real (kind=kind_phys), dimension(1:2), intent(out) :: ftd !down dir flux below veg layer (per unit in flux) - real (kind=kind_phys), dimension(1:2), intent(out) :: fti !down dif flux below veg layer (per unit in flux) - real (kind=kind_phys), intent(out) :: gdir !projected leaf+stem area in solar direction - real (kind=kind_phys), dimension(1:2), intent(out) :: frev !flux reflected by veg layer (per unit incoming flux) - real (kind=kind_phys), dimension(1:2), intent(out) :: freg !flux reflected by ground (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fab !< flux abs by veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fre !< flux refl above veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: ftd !< down dir flux below veg layer (per unit in flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fti !< down dif flux below veg layer (per unit in flux) + real (kind=kind_phys), intent(out) :: gdir !< projected leaf+stem area in solar direction + real (kind=kind_phys), dimension(1:2), intent(out) :: frev !< flux reflected by veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: freg !< flux reflected by ground (per unit incoming flux) ! local real (kind=kind_phys) :: omega !fraction of intercepted radiation that is scattered @@ -3646,7 +3698,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & foln ,co2air ,o2air ,btran ,sfcprs , & !in rhsur ,iloc ,jloc ,q2 ,pahv ,pahg , & !in thsfc_loc, prslkix,prsik1x,prslk1x, garea1, & !in - pblhx ,iz0tlnd ,itime ,psi_opt ,ep_1, ep_2, cp, & + pblhx ,iz0tlnd ,itime ,psi_opt ,ep_1, ep_2, epsm1, cp, & eah ,tah ,tv ,tg ,cm,ustarx,& !inout #ifdef CCPP ch ,dx ,dz8w ,errmsg ,errflg , & !inout @@ -3668,93 +3720,95 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & ! -sav + irc[tv] + shc[tv] + evc[tv] + tr[tv] + canhs[tv] = 0 ! -sag + irg[tg] + shg[tg] + evg[tg] + gh[tg] = 0 ! -------------------------------------------------------------------------------------------------- + use funcphys, only : fpvs implicit none ! -------------------------------------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - logical, intent(in) :: veg !true if vegetated surface - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !number of soil layers - integer, intent(in) :: isnow !actual no. of snow layers - integer, intent(in) :: vegtyp !vegetation physiology type - real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) - real (kind=kind_phys), intent(in) :: sav !solar rad absorbed by veg (w/m2) - real (kind=kind_phys), intent(in) :: sag !solar rad absorbed by ground (w/m2) - real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) - real (kind=kind_phys), intent(in) :: uu !wind speed in eastward dir (m/s) - real (kind=kind_phys), intent(in) :: vv !wind speed in northward dir (m/s) - real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) - real (kind=kind_phys), intent(in) :: thair !potential temp at reference height (k) - real (kind=kind_phys), intent(in) :: eair !vapor pressure air at zlvl (pa) - real (kind=kind_phys), intent(in) :: qair !specific humidity at zlvl (kg/kg) - real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) - real (kind=kind_phys), intent(in) :: dt !time step (s) - real (kind=kind_phys), intent(in) :: fsno !snow fraction - - real (kind=kind_phys) , intent(in) :: pblhx ! pbl height - real (kind=kind_phys) , intent(in) :: ep_1 - real (kind=kind_phys) , intent(in) :: ep_2 - real (kind=kind_phys) , intent(in) :: cp - integer , intent(in) :: iz0tlnd - integer , intent(in) :: itime - integer , intent(in) :: psi_opt - - - real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] - real (kind=kind_phys), intent(in) :: fwet !wetted fraction of canopy - real (kind=kind_phys), intent(in) :: cwp !canopy wind parameter - - real (kind=kind_phys), intent(in) :: vai !total leaf area index + stem area index - real (kind=kind_phys), intent(in) :: laisun !sunlit leaf area index, one-sided (m2/m2) - real (kind=kind_phys), intent(in) :: laisha !shaded leaf area index, one-sided (m2/m2) - real (kind=kind_phys), intent(in) :: zlvl !reference height (m) - real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) - real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum (m) - real (kind=kind_phys), intent(in) :: z0mg !roughness length, momentum, ground (m) - real (kind=kind_phys), intent(in) :: emv !vegetation emissivity - real (kind=kind_phys), intent(in) :: emg !ground emissivity - - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thinkness of snow/soil layers (m) - real (kind=kind_phys), intent(in) :: canliq !intercepted liquid water (mm) - real (kind=kind_phys), intent(in) :: canice !intercepted ice mass (mm) - real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) -! real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) -! real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) - real (kind=kind_phys), intent(in) :: gammav !psychrometric constant (pa/k) - real (kind=kind_phys), intent(in) :: latheav !latent heat of vaporization/subli (j/kg) - real (kind=kind_phys), intent(in) :: gammag !psychrometric constant (pa/k) - real (kind=kind_phys), intent(in) :: latheag !latent heat of vaporization/subli (j/kg) - real (kind=kind_phys), intent(in) :: parsun !par absorbed per unit sunlit lai (w/m2) - real (kind=kind_phys), intent(in) :: parsha !par absorbed per unit shaded lai (w/m2) - real (kind=kind_phys), intent(in) :: foln !foliage nitrogen (%) - real (kind=kind_phys), intent(in) :: co2air !atmospheric co2 concentration (pa) - real (kind=kind_phys), intent(in) :: o2air !atmospheric o2 concentration (pa) - real (kind=kind_phys), intent(in) :: igs !growing season index (0=off, 1=on) - real (kind=kind_phys), intent(in) :: sfcprs !pressure (pa) - real (kind=kind_phys), intent(in) :: btran !soil water transpiration factor (0 to 1) - real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - - real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio - real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer - real (kind=kind_phys) , intent(in) :: dx !grid spacing - real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) - real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer - real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer - real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - canopy net in (w/m2) - real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - ground net in (w/m2) + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + logical, intent(in) :: veg !< true if vegetated surface + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< number of soil layers + integer, intent(in) :: isnow !< actual no. of snow layers + integer, intent(in) :: vegtyp !< vegetation physiology type + real (kind=kind_phys), intent(in) :: fveg !< greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: sav !< solar rad absorbed by veg (w/m2) + real (kind=kind_phys), intent(in) :: sag !< solar rad absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: lwdn !< atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: ur !< wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: uu !< wind speed in eastward dir (m/s) + real (kind=kind_phys), intent(in) :: vv !< wind speed in northward dir (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !< air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: thair !< potential temp at reference height (k) + real (kind=kind_phys), intent(in) :: eair !< vapor pressure air at zlvl (pa) + real (kind=kind_phys), intent(in) :: qair !< specific humidity at zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: rhoair !< density air (kg/m**3) + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), intent(in) :: fsno !< snow fraction + + real (kind=kind_phys) , intent(in) :: pblhx !< pbl height + real (kind=kind_phys) , intent(in) :: ep_1 !< + real (kind=kind_phys) , intent(in) :: ep_2 !< + real (kind=kind_phys) , intent(in) :: epsm1 !< + real (kind=kind_phys) , intent(in) :: cp !< + integer , intent(in) :: iz0tlnd !< + integer , intent(in) :: itime !< + integer , intent(in) :: psi_opt !< + + + real (kind=kind_phys), intent(in) :: snowh !< actual snow depth [m] + real (kind=kind_phys), intent(in) :: fwet !< wetted fraction of canopy + real (kind=kind_phys), intent(in) :: cwp !< canopy wind parameter + + real (kind=kind_phys), intent(in) :: vai !< total leaf area index + stem area index + real (kind=kind_phys), intent(in) :: laisun !< sunlit leaf area index, one-sided (m2/m2) + real (kind=kind_phys), intent(in) :: laisha !< shaded leaf area index, one-sided (m2/m2) + real (kind=kind_phys), intent(in) :: zlvl !< reference height (m) + real (kind=kind_phys), intent(in) :: zpd !< zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0m !< roughness length, momentum (m) + real (kind=kind_phys), intent(in) :: z0mg !< roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: emv !< vegetation emissivity + real (kind=kind_phys), intent(in) :: emg !< ground emissivity + + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< soil/snow temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< thinkness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: canliq !< intercepted liquid water (mm) + real (kind=kind_phys), intent(in) :: canice !< intercepted ice mass (mm) + real (kind=kind_phys), intent(in) :: rsurf !< ground surface resistance (s/m) +! real (kind=kind_phys), intent(in) :: gamma !< psychrometric constant (pa/k) +! real (kind=kind_phys), intent(in) :: lathea !< latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gammav !< psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: latheav !< latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gammag !< psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: latheag !< latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: parsun !< par absorbed per unit sunlit lai (w/m2) + real (kind=kind_phys), intent(in) :: parsha !< par absorbed per unit shaded lai (w/m2) + real (kind=kind_phys), intent(in) :: foln !< foliage nitrogen (%) + real (kind=kind_phys), intent(in) :: co2air !< atmospheric co2 concentration (pa) + real (kind=kind_phys), intent(in) :: o2air !< atmospheric o2 concentration (pa) + real (kind=kind_phys), intent(in) :: igs !< growing season index (0=off, 1=on) + real (kind=kind_phys), intent(in) :: sfcprs !< pressure (pa) + real (kind=kind_phys), intent(in) :: btran !< soil water transpiration factor (0 to 1) + real (kind=kind_phys), intent(in) :: rhsur !< raltive humidity in surface soil/snow air space (-) + + real (kind=kind_phys) , intent(in) :: qc !< cloud water mixing ratio + real (kind=kind_phys) , intent(in) :: psfc !< pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !< grid spacing + real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: dz8w !< thickness of lowest layer + real (kind=kind_phys) , intent(inout) :: qsfc !< mixing ratio at lowest model layer + real (kind=kind_phys), intent(in) :: pahv !< precipitation advected heat - canopy net in (w/m2) + real (kind=kind_phys), intent(in) :: pahg !< precipitation advected heat - ground net in (w/m2) ! input/output - real (kind=kind_phys), intent(inout) :: eah !canopy air vapor pressure (pa) - real (kind=kind_phys), intent(inout) :: tah !canopy air temperature (k) - real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) - real (kind=kind_phys), intent(inout) :: tg !ground temperature (k) - real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient - real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: eah !< canopy air vapor pressure (pa) + real (kind=kind_phys), intent(inout) :: tah !< canopy air temperature (k) + real (kind=kind_phys), intent(inout) :: tv !< vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(inout) :: cm !< momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !< sensible heat exchange coefficient #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -3763,27 +3817,27 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & ! output ! -fsa + fira + fsh + (fcev + fctr + fgev) + fcst + ssoil + canhs = 0 - real (kind=kind_phys), intent(out) :: tauxv !wind stress: e-w (n/m2) - real (kind=kind_phys), intent(out) :: tauyv !wind stress: n-s (n/m2) - real (kind=kind_phys), intent(out) :: irc !net longwave radiation (w/m2) [+= to atm] - real (kind=kind_phys), intent(out) :: shc !sensible heat flux (w/m2) [+= to atm] - real (kind=kind_phys), intent(out) :: evc !evaporation heat flux (w/m2) [+= to atm] - real (kind=kind_phys), intent(out) :: irg !net longwave radiation (w/m2) [+= to atm] - real (kind=kind_phys), intent(out) :: shg !sensible heat flux (w/m2) [+= to atm] - real (kind=kind_phys), intent(out) :: evg !evaporation heat flux (w/m2) [+= to atm] - real (kind=kind_phys), intent(out) :: tr !transpiration heat flux (w/m2)[+= to atm] - real (kind=kind_phys), intent(out) :: gh !ground heat (w/m2) [+ = to soil] - real (kind=kind_phys), intent(out) :: t2mv !2 m height air temperature (k) - real (kind=kind_phys), intent(out) :: psnsun !sunlit leaf photosynthesis (umolco2/m2/s) - real (kind=kind_phys), intent(out) :: psnsha !shaded leaf photosynthesis (umolco2/m2/s) - real (kind=kind_phys), intent(out) :: chleaf !leaf exchange coefficient - real (kind=kind_phys), intent(out) :: chuc !under canopy exchange coefficient - real (kind=kind_phys), intent(out) :: canhs !canopy heat storage change (w/m2) - real (kind=kind_phys), intent(out) :: q2v - real (kind=kind_phys) :: cah !sensible heat conductance, canopy air to zlvl air (m/s) - real (kind=kind_phys) :: u10v !10 m wind speed in eastward dir (m/s) - real (kind=kind_phys) :: v10v !10 m wind speed in eastward dir (m/s) - real (kind=kind_phys) :: wspd + real (kind=kind_phys), intent(out) :: tauxv !< wind stress: e-w (n/m2) + real (kind=kind_phys), intent(out) :: tauyv !< wind stress: n-s (n/m2) + real (kind=kind_phys), intent(out) :: irc !< net longwave radiation (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: shc !< sensible heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: evc !< evaporation heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: irg !< net longwave radiation (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: shg !< sensible heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: evg !< evaporation heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: tr !< transpiration heat flux (w/m2)[+= to atm] + real (kind=kind_phys), intent(out) :: gh !< ground heat (w/m2) [+ = to soil] + real (kind=kind_phys), intent(out) :: t2mv !< 2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: psnsun !< sunlit leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: psnsha !< shaded leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: chleaf !< leaf exchange coefficient + real (kind=kind_phys), intent(out) :: chuc !< under canopy exchange coefficient + real (kind=kind_phys), intent(out) :: canhs !< canopy heat storage change (w/m2) + real (kind=kind_phys), intent(out) :: q2v !< + real (kind=kind_phys) :: cah !< sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys) :: u10v !< 10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: v10v !< 10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: wspd !< ! ------------------------ local variables ---------------------------------------------------- real (kind=kind_phys) :: gdx !grid dx @@ -3908,6 +3962,10 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 + real(kind=kind_phys) :: evpot ! 0. .and. fwet > 0.) then + if (tv > tfrz) then + cew = min(fwet,canliq*latheav/dt/evpot) * vaie/rb + else + cew = min(fwet,canice*latheav/dt/evpot) * vaie/rb + endif + else + cew= fwet * vaie/rb + endif ctw = (1.-fwet)*(laisune/(rb+rssun) + laishae/(rb+rssha)) cgw = 1./(rawg+rsurf) cond = caw + cew + ctw + cgw @@ -4181,7 +4248,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & end if ! canopy heat capacity - hcv = 0.02*vaie*cwat + canliq*cwat/denh2o + canice*cice/denice !j/m2/k + hcv = fveg*(parameters%cbiom*vaie*cwat + canliq*cwat/denh2o + canice*cice/denice) !j/m2/k b = sav-irc-shc-evc-tr+pahv !additional w/m2 ! a = fveg*(4.*cir*tv**3 + csh + (cev+ctr)*destv) !volumetric heat capacity @@ -4203,7 +4270,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & hg = rhoair*cpair*(tg - tah) /rahg ! consistent specific humidity from canopy air vapor pressure - qsfc = (0.622*eah)/(sfcprs-0.378*eah) + qsfc = (ep_2*eah)/(sfcprs+epsm1*eah) if ( opt_sfc == 4 ) then qfx = (qsfc-qair)*rhoair*caw @@ -4284,13 +4351,19 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & ! qfx = (qsfc-qair)*rhoair*caw !*cpair/gammag ! 2m temperature over vegetation ( corrected for low cq2v values ) - if (opt_sfc == 1 .or. opt_sfc == 2 .or. opt_sfc ==3 ) then + if (opt_sfc == 1 .or. opt_sfc == 2 ) then ! cah2 = fv*1./vkc*log((2.+z0h)/z0h) cah2 = fv*vkc/log((2.+z0h)/z0h) cah2 = fv*vkc/(log((2.+z0h)/z0h)-fh2) cq2v = cah2 endif +! opt_sfc 3: fh2 is the stability + if (opt_sfc ==3) then + cah2 = fv*vkc/fh2 + cq2v = cah2 + endif + if (opt_sfc == 4 ) then rahc2 = max(1.,1./(ch2v*wspdv)) rawc2 = rahc2 @@ -4308,6 +4381,34 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & q2v = qsfc - ((evc+tr)/fveg+evg)/(latheav*rhoair) * 1./cq2v endif +! use sfc_diag to calculate t2mv and q2v for opt_sfc=1&3 + if(opt_diag ==3) then + if(opt_sfc == 1 .or. opt_sfc == 3) then + + fhi = fh2/fh + wrk = 1.0 - fhi + if(thsfc_loc) then ! Use local potential temperature + t2mv = tah*wrk + sfctmp*prslkix*fhi - (grav+grav)/cp + else ! Use potential temperature referenced to 1000 hPa + t2mv = tah*wrk + sfctmp*fhi - (grav+grav)/cp + endif + + if((evc+tr)/fveg+evg >= 0.) then ! for evaporation>0, use inferred qsurf to deduce q2v + q2v = qsfc*wrk + max(qmin,qair)*fhi + else ! for dew formation, use saturated q at tskin + qss = fpvs(tah) + qss = ep_2 * qss / (psfc + epsm1 * qss) + q2v= qss*wrk + max(qmin,qair)*fhi + endif + qss = fpvs(t2mv) + qss = ep_2 * qss / (psfc + epsm1 * qss) + q2v = min(q2v,qss) + else + errmsg = 'Problem :opt_diag=3 is only applied for opt_sfc=1&3' + errflg = 1 + return + endif + endif ! update ch for output ch = cah chleaf = cvh @@ -4327,7 +4428,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & emg ,stc ,df ,rsurf ,lathea , & !in gamma ,rhsur ,iloc ,jloc ,q2 ,pahb , & !in thsfc_loc, prslkix,prsik1x,prslk1x,vegtyp,fveg,shdfac,garea1, & !in - pblhx , iz0tlnd , itime ,psi_opt,ep_1,ep_2,cp ,& + pblhx , iz0tlnd , itime ,psi_opt,ep_1,ep_2,epsm1,cp ,& #ifdef CCPP tgb ,cm ,ch,ustarx,errmsg ,errflg , & !inout #else @@ -4346,64 +4447,66 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & ! bare soil: ! -sab + irb[tg] + shb[tg] + evb[tg] + ghb[tg] = 0 ! ---------------------------------------------------------------------- + use funcphys, only : fpvs implicit none ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer , intent(in) :: iloc !grid index - integer , intent(in) :: jloc !grid index - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !number of soil layers - integer, intent(in) :: isnow !actual no. of snow layers - real (kind=kind_phys), intent(in) :: dt !time step (s) - real (kind=kind_phys), intent(in) :: sag !solar radiation absorbed by ground (w/m2) - real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) - real (kind=kind_phys), intent(in) :: uu !wind speed in eastward dir (m/s) - real (kind=kind_phys), intent(in) :: vv !wind speed in northward dir (m/s) - real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) - real (kind=kind_phys), intent(in) :: thair !potential temperature at height zlvl (k) - real (kind=kind_phys), intent(in) :: qair !specific humidity at height zlvl (kg/kg) - real (kind=kind_phys), intent(in) :: eair !vapor pressure air at height (pa) - real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) - real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) - real (kind=kind_phys), intent(in) :: zlvl !reference height (m) - real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) - real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) - real (kind=kind_phys), intent(in) :: emg !ground emissivity - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) - real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) - real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) - real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - real (kind=kind_phys), intent(in) :: fsno !snow fraction - - real (kind=kind_phys), intent(in) :: pblhx !pbl height (m) - real (kind=kind_phys), intent(in) :: ep_1 - real (kind=kind_phys), intent(in) :: ep_2 - real (kind=kind_phys), intent(in) :: cp - integer, intent(in) :: iz0tlnd - integer, intent(in) :: itime - integer, intent(in) :: psi_opt + type (noahmp_parameters), intent(in) :: parameters !< + integer , intent(in) :: iloc !< grid index + integer , intent(in) :: jloc !< grid index + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< number of soil layers + integer, intent(in) :: isnow !< actual no. of snow layers + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), intent(in) :: sag !< solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: lwdn !< atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: ur !< wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: uu !< wind speed in eastward dir (m/s) + real (kind=kind_phys), intent(in) :: vv !< wind speed in northward dir (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !< air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: thair !< potential temperature at height zlvl (k) + real (kind=kind_phys), intent(in) :: qair !< specific humidity at height zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: eair !< vapor pressure air at height (pa) + real (kind=kind_phys), intent(in) :: rhoair !< density air (kg/m3) + real (kind=kind_phys), intent(in) :: snowh !< actual snow depth [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< thickness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: zlvl !< reference height (m) + real (kind=kind_phys), intent(in) :: zpd !< zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0m !< roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: emg !< ground emissivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< soil/snow temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), intent(in) :: rsurf !< ground surface resistance (s/m) + real (kind=kind_phys), intent(in) :: lathea !< latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gamma !< psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: rhsur !< raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys), intent(in) :: fsno !< snow fraction + + real (kind=kind_phys), intent(in) :: pblhx !< pbl height (m) + real (kind=kind_phys), intent(in) :: ep_1 !< + real (kind=kind_phys), intent(in) :: ep_2 !< + real (kind=kind_phys), intent(in) :: epsm1 !< + real (kind=kind_phys), intent(in) :: cp !< + integer, intent(in) :: iz0tlnd !< + integer, intent(in) :: itime !< + integer, intent(in) :: psi_opt !< !jref:start; in - real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio - real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer - real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer - real (kind=kind_phys) , intent(in) :: sfcprs !pressure at lowest model layer - real (kind=kind_phys) , intent(in) :: dx !horisontal grid spacing - real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) - real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer + real (kind=kind_phys) , intent(in) :: qc !< cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !< mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !< pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !< horisontal grid spacing + real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: dz8w !< thickness of lowest layer !jref:end - real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - ground net in (w/m2) + real (kind=kind_phys), intent(in) :: pahb !< precipitation advected heat - ground net in (w/m2) ! input/output - real (kind=kind_phys), intent(inout) :: tgb !ground temperature (k) - real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient - real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: tgb !< ground temperature (k) + real (kind=kind_phys), intent(inout) :: cm !< momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !< sensible heat exchange coefficient #ifdef CCPP character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg @@ -4412,15 +4515,15 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & ! output ! -sab + irb[tg] + shb[tg] + evb[tg] + ghb[tg] = 0 - real (kind=kind_phys), intent(out) :: tauxb !wind stress: e-w (n/m2) - real (kind=kind_phys), intent(out) :: tauyb !wind stress: n-s (n/m2) - real (kind=kind_phys), intent(out) :: irb !net longwave rad (w/m2) [+ to atm] - real (kind=kind_phys), intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] - real (kind=kind_phys), intent(out) :: evb !latent heat flux (w/m2) [+ to atm] - real (kind=kind_phys), intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] - real (kind=kind_phys), intent(out) :: t2mb !2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: tauxb !< wind stress: e-w (n/m2) + real (kind=kind_phys), intent(out) :: tauyb !< wind stress: n-s (n/m2) + real (kind=kind_phys), intent(out) :: irb !< net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: shb !< sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: evb !< latent heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: ghb !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys), intent(out) :: t2mb !< 2 m height air temperature (k) !jref:start - real (kind=kind_phys), intent(out) :: q2b !bare ground heat conductance + real (kind=kind_phys), intent(out) :: q2b !< bare ground heat conductance real (kind=kind_phys) :: ehb !bare ground heat conductance real (kind=kind_phys) :: u10b !10 m wind speed in eastward dir (m/s) real (kind=kind_phys) :: v10b !10 m wind speed in eastward dir (m/s) @@ -4531,6 +4634,10 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & real (kind=kind_phys) :: temptrs real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 + + real(kind=kind_phys) :: fhi, qss, wrk + real(kind=kind_phys), parameter :: qmin=1.0e-8 + tdc(t) = min( 50., max(-50.,(t-tfrz)) ) ! ----------------------------------------------------------------- @@ -4580,7 +4687,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & ! z0h = z0m !* exp(-czil*0.4*258.2*sqrt(fv*z0m)) ! end if call thermalz0(parameters,fveg,z0m,z0m,zlvl,zpd,zpd,ustarx, & !in - vegtyp,0.0_kind_phys,ur,csigmaf0,csigmaf1,temptrs,temptrs,temptrs,0, & !in + vegtyp,0._kind_phys,ur,csigmaf0,csigmaf1,temptrs,temptrs,temptrs,0, & !in z0mo,z0h) if(opt_sfc == 1) then @@ -4588,11 +4695,11 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & zlvl ,zpd ,z0m ,z0h ,ur , & !in mpe ,iloc ,jloc , & !in #ifdef CCPP - moz ,mozsgn ,fm ,fh ,fm2 ,fh2 ,errmsg ,errflg ,& !inout + moz ,mozsgn ,fm ,fh ,fm2 ,fh2 ,fv,errmsg ,errflg ,& !inout #else - moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , & !inout + moz ,mozsgn ,fm ,fh ,fm2 ,fh2 ,fv, & !inout #endif - cm ,ch ,fv ,ch2 ) !out + cm ,ch ,ch2 ) !out #ifdef CCPP if (errflg /= 0) return #endif @@ -4709,7 +4816,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & else estg = esati end if - qsfc = 0.622*(estg*rhsur)/(psfc-0.378*(estg*rhsur)) + qsfc = ep_2*(estg*rhsur)/(psfc+epsm1*(estg*rhsur)) qfx = (qsfc-qair)*cev*gamma/cpair @@ -4737,7 +4844,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & !jref:start; errors in original equation corrected. ! 2m air temperature - if(opt_sfc == 1 .or. opt_sfc ==2 .or. opt_sfc == 3) then + if(opt_sfc == 1 .or. opt_sfc ==2 ) then ehb2 = fv*vkc/log((2.+z0h)/z0h) ehb2 = fv*vkc/(log((2.+z0h)/z0h)-fh2) cq2b = ehb2 @@ -4751,6 +4858,20 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & if (parameters%urban_flag) q2b = qsfc end if +! opt_sfc 3: fh2 is the stability + if(opt_sfc == 3 ) then + ehb2 = fv*vkc/fh2 + cq2b = ehb2 + if (ehb2.lt.1.e-5 ) then + t2mb = tgb + q2b = qsfc + else + t2mb = tgb - shb/(rhoair*cpair) * 1./ehb2 + q2b = qsfc - evb/(lathea*rhoair)*(1./cq2b + rsurf) + endif + if (parameters%urban_flag) q2b = qsfc + end if + if(opt_sfc == 4) then ! consistent with veg rahb2 = max(1.,1./(ch2b*wspdb)) @@ -4767,6 +4888,34 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & end if endif ! 4 +! use sfc_diag to calculate t2mv and q2v for opt_sfc=1&3 + if(opt_diag ==3) then + if(opt_sfc == 1 .or. opt_sfc == 3) then + + fhi = fh2/fh + wrk = 1.0 - fhi + if(thsfc_loc) then ! Use local potential temperature + t2mb = tgb*wrk + sfctmp*prslkix*fhi - (grav+grav)/cp + else ! Use potential temperature referenced to 1000 hPa + t2mb = tgb*wrk + sfctmp*fhi - (grav+grav)/cp + endif + + if(evb >= 0.) then ! for evaporation>0, use inferred qsurf to deduce q2v + q2b = qsfc*wrk + max(qmin,qair)*fhi + else ! for dew formation, use saturated q at tskin + qss = fpvs(tgb) + qss = ep_2 * qss / (psfc + epsm1 * qss) + q2b= qss*wrk + max(qmin,qair)*fhi + endif + qss = fpvs(t2mb) + qss = ep_2 * qss / (psfc + epsm1 * qss) + q2b = min(q2b,qss) + else + errmsg = 'Problem :opt_diag=3 is only applied for opt_sfc=1&3' + errflg = 1 + return + endif + endif if (parameters%urban_flag) q2b = qsfc ! update ch @@ -4792,37 +4941,37 @@ subroutine ragrb(parameters,iter ,vai ,rhoair ,hg ,tah , & !in ! -------------------------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: iter !iteration index - integer, intent(in) :: vegtyp !vegetation physiology type - real (kind=kind_phys), intent(in) :: vai !total lai + stem area index, one sided - real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) - real (kind=kind_phys), intent(in) :: hg !ground sensible heat flux (w/m2) - real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) - real (kind=kind_phys), intent(in) :: tah !air temperature at height z0h+zpd (k) - real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) - real (kind=kind_phys), intent(in) :: z0mg !roughness length, momentum, ground (m) - real (kind=kind_phys), intent(in) :: hcan !canopy height (m) [note: hcan >= z0mg] - real (kind=kind_phys), intent(in) :: uc !wind speed at top of canopy (m/s) - real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat (m) - real (kind=kind_phys), intent(in) :: z0hg !roughness length, sensible heat, ground (m) - real (kind=kind_phys), intent(in) :: fv !friction velocity (m/s) - real (kind=kind_phys), intent(in) :: cwp !canopy wind parameter - real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: iter !< iteration index + integer, intent(in) :: vegtyp !< vegetation physiology type + real (kind=kind_phys), intent(in) :: vai !< total lai + stem area index, one sided + real (kind=kind_phys), intent(in) :: rhoair !< density air (kg/m3) + real (kind=kind_phys), intent(in) :: hg !< ground sensible heat flux (w/m2) + real (kind=kind_phys), intent(in) :: tv !< vegetation temperature (k) + real (kind=kind_phys), intent(in) :: tah !< air temperature at height z0h+zpd (k) + real (kind=kind_phys), intent(in) :: zpd !< zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0mg !< roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: hcan !< canopy height (m) [note: hcan >= z0mg] + real (kind=kind_phys), intent(in) :: uc !< wind speed at top of canopy (m/s) + real (kind=kind_phys), intent(in) :: z0h !< roughness length, sensible heat (m) + real (kind=kind_phys), intent(in) :: z0hg !< roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: fv !< friction velocity (m/s) + real (kind=kind_phys), intent(in) :: cwp !< canopy wind parameter + real (kind=kind_phys), intent(in) :: mpe !< prevents overflow error if division by zero ! in & out - real (kind=kind_phys), intent(inout) :: mozg !monin-obukhov stability parameter - real (kind=kind_phys), intent(inout) :: fhg !stability correction - real (kind=kind_phys), intent(inout) :: fhgh !stability correction, canopy + real (kind=kind_phys), intent(inout) :: mozg !< monin-obukhov stability parameter + real (kind=kind_phys), intent(inout) :: fhg !< stability correction + real (kind=kind_phys), intent(inout) :: fhgh !< stability correction, canopy ! outputs - real (kind=kind_phys) :: ramg !aerodynamic resistance for momentum (s/m) - real (kind=kind_phys) :: rahg !aerodynamic resistance for sensible heat (s/m) - real (kind=kind_phys) :: rawg !aerodynamic resistance for water vapor (s/m) - real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + real (kind=kind_phys) :: ramg !< aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahg !< aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawg !< aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: rb !< bulk leaf boundary layer resistance (s/m) real (kind=kind_phys) :: kh !turbulent transfer coefficient, sensible heat, (m2/s) @@ -4882,8 +5031,7 @@ subroutine ragrb(parameters,iter ,vai ,rhoair ,hg ,tah , & !in tmprb = cwpc*50. / (1. - exp(-cwpc/2.)) rb = tmprb * sqrt(parameters%dleaf/uc) - rb = max(rb,20.0) -! rb = 200 + rb = min(max(rb, 5.0),50.0) ! limit rb to 5-50, typically rb<50 end subroutine ragrb @@ -4895,11 +5043,11 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in & zlvl ,zpd ,z0m ,z0h ,ur , & !in & mpe ,iloc ,jloc , & !in #ifdef CCPP - & moz ,mozsgn ,fm ,fh ,fm2,fh2,errmsg,errflg, & !inout + & moz ,mozsgn ,fm ,fh ,fm2,fh2,fv,errmsg,errflg, & !inout #else - & moz ,mozsgn ,fm ,fh ,fm2,fh2, & !inout + & moz ,mozsgn ,fm ,fh ,fm2,fh2, fv, & !inout #endif - & cm ,ch ,fv ,ch2 ) !out + & cm ,ch ,ch2 ) !out ! ------------------------------------------------------------------------------------------------- ! computing surface drag coefficient cm for momentum and ch for heat ! ------------------------------------------------------------------------------------------------- @@ -4907,28 +5055,29 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in ! ------------------------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: iter !iteration index - real (kind=kind_phys), intent(in) :: sfctmp !temperature at reference height (k) - real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) - real (kind=kind_phys), intent(in) :: h !sensible heat flux (w/m2) [+ to atm] - real (kind=kind_phys), intent(in) :: qair !specific humidity at reference height (kg/kg) - real (kind=kind_phys), intent(in) :: zlvl !reference height (m) - real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) - real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat, ground (m) - real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) - real (kind=kind_phys), intent(in) :: ur !wind speed (m/s) - real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: iter !< iteration index + real (kind=kind_phys), intent(in) :: sfctmp !< temperature at reference height (k) + real (kind=kind_phys), intent(in) :: rhoair !< density air (kg/m**3) + real (kind=kind_phys), intent(in) :: h !< sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: qair !< specific humidity at reference height (kg/kg) + real (kind=kind_phys), intent(in) :: zlvl !< reference height (m) + real (kind=kind_phys), intent(in) :: zpd !< zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0h !< roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: z0m !< roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: ur !< wind speed (m/s) + real (kind=kind_phys), intent(in) :: mpe !< prevents overflow error if division by zero ! in & out - integer, intent(inout) :: mozsgn !number of times moz changes sign - real (kind=kind_phys), intent(inout) :: moz !monin-obukhov stability (z/l) - real (kind=kind_phys), intent(inout) :: fm !momentum stability correction, weighted by prior iters - real (kind=kind_phys), intent(inout) :: fh !sen heat stability correction, weighted by prior iters - real (kind=kind_phys), intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters - real (kind=kind_phys), intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters + integer, intent(inout) :: mozsgn !< number of times moz changes sign + real (kind=kind_phys), intent(inout) :: moz !< monin-obukhov stability (z/l) + real (kind=kind_phys), intent(inout) :: fm !< momentum stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm2 !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh2 !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fv !< friction velocity (m/s) #ifdef CCPP character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg @@ -4936,10 +5085,9 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in ! outputs - real (kind=kind_phys), intent(out) :: cm !drag coefficient for momentum - real (kind=kind_phys), intent(out) :: ch !drag coefficient for heat - real (kind=kind_phys), intent(out) :: fv !friction velocity (m/s) - real (kind=kind_phys), intent(out) :: ch2 !drag coefficient for heat + real (kind=kind_phys), intent(out) :: cm !< drag coefficient for momentum + real (kind=kind_phys), intent(out) :: ch !< drag coefficient for heat + real (kind=kind_phys), intent(out) :: ch2 !< drag coefficient for heat ! locals real (kind=kind_phys) :: mol !monin-obukhov length (m) @@ -5093,7 +5241,7 @@ subroutine sfcdif2(parameters,iter ,z0 ,thz0 ,thlm ,sfcspd , & !in real (kind=kind_phys), intent(inout) :: akhs real (kind=kind_phys), intent(inout) :: rlmo real (kind=kind_phys), intent(inout) :: wstar2 - real (kind=kind_phys), intent(out) :: ustar + real (kind=kind_phys), intent(inout) :: ustar real (kind=kind_phys) zz, pslmu, pslms, pslhu, pslhs real (kind=kind_phys) xx, pspmu, yy, pspms, psphu, psphs @@ -5293,33 +5441,33 @@ subroutine sfcdif3(parameters,iloc ,jloc ,iter ,sfctmp ,qair ,ur ! ------------------------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in ) :: iloc ! grid index - integer, intent(in ) :: jloc ! grid index - integer, intent(in ) :: iter ! iteration index - real (kind=kind_phys), intent(in ) :: sfctmp ! temperature at reference height [K] - real (kind=kind_phys), intent(in ) :: qair ! specific humidity at reference height [kg/kg] - real (kind=kind_phys), intent(in ) :: ur ! wind speed [m/s] - real (kind=kind_phys), intent(in ) :: zlvl ! reference height [m] - real (kind=kind_phys), intent(in ) :: tgb ! ground temperature [K] - logical, intent(in ) :: thsfc_loc ! flag for using sfc-based theta - real (kind=kind_phys), intent(in ) :: prslkix ! in exner function - real (kind=kind_phys), intent(in ) :: prsik1x ! in exner function - real (kind=kind_phys), intent(in ) :: prslk1x ! in exner function - real (kind=kind_phys), intent(in ) :: z0m ! roughness length, momentum, ground [m] - real (kind=kind_phys), intent(in ) :: z0h ! roughness length, sensible heat, ground [m] - real (kind=kind_phys), intent(in ) :: zpd ! zero plane displacement [m] - real (kind=kind_phys), intent(in ) :: snowh ! snow depth [m] - real (kind=kind_phys), intent(in ) :: fveg ! fractional vegetation cover - real (kind=kind_phys), intent(in ) :: garea1 ! grid area [km2] - real (kind=kind_phys), intent(inout) :: ustarx ! friction velocity [m/s] - real (kind=kind_phys), intent(inout) :: fm ! momentum stability correction, weighted by prior iters - real (kind=kind_phys), intent(inout) :: fh ! sen heat stability correction, weighted by prior iters - real (kind=kind_phys), intent(inout) :: fm2 ! sen heat stability correction, weighted by prior iters - real (kind=kind_phys), intent(inout) :: fh2 ! sen heat stability correction, weighted by prior iters - real (kind=kind_phys), intent( out) :: fv ! friction velocity (m/s) - real (kind=kind_phys), intent( out) :: cm ! drag coefficient for momentum - real (kind=kind_phys), intent( out) :: ch ! drag coefficient for heat + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in ) :: iloc !< grid index + integer, intent(in ) :: jloc !< grid index + integer, intent(in ) :: iter !< iteration index + real (kind=kind_phys), intent(in ) :: sfctmp !< temperature at reference height [K] + real (kind=kind_phys), intent(in ) :: qair !< specific humidity at reference height [kg/kg] + real (kind=kind_phys), intent(in ) :: ur !< wind speed [m/s] + real (kind=kind_phys), intent(in ) :: zlvl !< reference height [m] + real (kind=kind_phys), intent(in ) :: tgb !< ground temperature [K] + logical, intent(in ) :: thsfc_loc !< flag for using sfc-based theta + real (kind=kind_phys), intent(in ) :: prslkix !< in exner function + real (kind=kind_phys), intent(in ) :: prsik1x !< in exner function + real (kind=kind_phys), intent(in ) :: prslk1x !< in exner function + real (kind=kind_phys), intent(in ) :: z0m !< roughness length, momentum, ground [m] + real (kind=kind_phys), intent(in ) :: z0h !< roughness length, sensible heat, ground [m] + real (kind=kind_phys), intent(in ) :: zpd !< zero plane displacement [m] + real (kind=kind_phys), intent(in ) :: snowh !< snow depth [m] + real (kind=kind_phys), intent(in ) :: fveg !< fractional vegetation cover + real (kind=kind_phys), intent(in ) :: garea1 !< grid area [km2] + real (kind=kind_phys), intent(inout) :: ustarx !< friction velocity [m/s] + real (kind=kind_phys), intent(inout) :: fm !< momentum stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm2 !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh2 !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent( out) :: fv !< friction velocity (m/s) + real (kind=kind_phys), intent( out) :: cm !< drag coefficient for momentum + real (kind=kind_phys), intent( out) :: ch !< drag coefficient for heat real (kind=kind_phys) :: snwd ! snow depth [mm] real (kind=kind_phys) :: zlvlb ! reference height - zpd [m] @@ -5355,6 +5503,9 @@ subroutine sfcdif3(parameters,iloc ,jloc ,iter ,sfctmp ,qair ,ur tem2 = max(fveg, 0.1_kind_phys) zvfun1 = sqrt(tem1 * tem2) gdx = sqrt(garea1) + + gdx = 3000.0 ! this will remove gdx effect + zvfun1 = 1.0 ! this will remove zvfun effect if(thsfc_loc) then ! Use local potential temperature tvs = tgb * virtfac @@ -5362,153 +5513,421 @@ subroutine sfcdif3(parameters,iloc ,jloc ,iter ,sfctmp ,qair ,ur tvs = tgb/prsik1x * virtfac endif - call stability (zlvlb, zvfun1, gdx, tv1, thv1, ur, z0m, z0h, tvs, grav, thsfc_loc, & + call gfs_stability (zlvlb, zvfun1, gdx, tv1, thv1, ur, z0m, z0h, tvs, grav, thsfc_loc, & rb1, fm,fh,fm10,fh2,cm,ch,stress1,fv) end subroutine sfcdif3 +!== begin gfs_stability ================================================================================== + +subroutine gfs_stability & +! --- inputs: + ( z1, zvfun, gdx, tv1, thv1, wind, z0max, ztmax, tvs, grav, & + thsfc_loc, & +! --- outputs: + rb, fm, fh, fm10, fh2, cm, ch, stress, ustar) + +! Documentation below refers to UTN and STN which are: +! UTN (Unstable Tech Note) : NCEP Office Note 356 +! STN (Stable Tech Note) : NCEP Office Note 321 + +real (kind=kind_phys), parameter :: ca=0.4_kind_phys ! ca - von karman constant + +real(kind=kind_phys), intent(in) :: z1 ! height model level +real(kind=kind_phys), intent(in) :: zvfun ! vegetation adjustment factor +real(kind=kind_phys), intent(in) :: gdx ! grid spatial dimension +real(kind=kind_phys), intent(in) :: tv1 ! virtual temperature at model level +real(kind=kind_phys), intent(in) :: thv1 ! virtual potential temperature at model level +real(kind=kind_phys), intent(in) :: wind ! wind speed at model level +real(kind=kind_phys), intent(in) :: z0max ! momentum roughness length +real(kind=kind_phys), intent(in) :: ztmax ! thermal roughness length +real(kind=kind_phys), intent(in) :: tvs ! surface virtual temperature +real(kind=kind_phys), intent(in) :: grav ! local gravity +logical, intent(in) :: thsfc_loc ! use local theta reference flag + +real(kind=kind_phys), intent(out) :: rb ! bulk richardson number [-] +real(kind=kind_phys), intent(out) :: fm ! phi momentum function (UTN 1.1) [-] +real(kind=kind_phys), intent(out) :: fh ! phi heat function (UTN 1.2) [-] +real(kind=kind_phys), intent(out) :: fm10 ! 10-meter phi momentum function [-] +real(kind=kind_phys), intent(out) :: fh2 ! 2-meter phi heat function [-] +real(kind=kind_phys), intent(out) :: cm ! momentum exchange coeficient [-] +real(kind=kind_phys), intent(out) :: ch ! heat exchange coeficient [-] +real(kind=kind_phys), intent(out) :: stress ! surface stress [m2/s2] +real(kind=kind_phys), intent(out) :: ustar ! friction velocity [m/s] + +! --- locals: +real(kind=kind_phys), parameter :: a0 = -3.975 ! UTN 2.37 +real(kind=kind_phys), parameter :: a1 = 12.32 ! UTN 2.37 +real(kind=kind_phys), parameter :: b1 = -7.755 ! UTN 2.37 +real(kind=kind_phys), parameter :: b2 = 6.041 ! UTN 2.37 +real(kind=kind_phys), parameter :: a0p = -7.941 ! UTN 2.38 +real(kind=kind_phys), parameter :: a1p = 24.75 ! UTN 2.38 +real(kind=kind_phys), parameter :: b1p = -8.705 ! UTN 2.38 +real(kind=kind_phys), parameter :: b2p = 7.899 ! UTN 2.38 + +real(kind=kind_phys), parameter :: alpha = 5.0 ! alpha in e.g., STN 1.10 +real(kind=kind_phys), parameter :: alpha4 = 4.0 * alpha ! term in aa +real(kind=kind_phys), parameter :: xkrefsqr = 0.3 ! baseline maximum z/L +real(kind=kind_phys), parameter :: xkmin = 0.05 ! min multiplier for grid size and vegetation +real(kind=kind_phys), parameter :: xkgdx = 3000.0 ! critical grid scale for diffusivity[m^0.5] +real(kind=kind_phys), parameter :: zolmin = -10.0 ! minimum z/L +real(kind=kind_phys), parameter :: zero = 0.0 +real(kind=kind_phys), parameter :: one = 1.0 + +real(kind=kind_phys) :: aa +real(kind=kind_phys) :: aa0 +real(kind=kind_phys) :: bb +real(kind=kind_phys) :: bb0 +real(kind=kind_phys) :: dtv +real(kind=kind_phys) :: adtv +real(kind=kind_phys) :: hl1 +real(kind=kind_phys) :: hl12 +real(kind=kind_phys) :: pm +real(kind=kind_phys) :: ph +real(kind=kind_phys) :: pm10 +real(kind=kind_phys) :: ph2 +real(kind=kind_phys) :: z1i +real(kind=kind_phys) :: fms +real(kind=kind_phys) :: fhs +real(kind=kind_phys) :: hl0 +real(kind=kind_phys) :: hl0inf +real(kind=kind_phys) :: hlinf +real(kind=kind_phys) :: hl110 +real(kind=kind_phys) :: hlt +real(kind=kind_phys) :: hltinf +real(kind=kind_phys) :: olinf +real(kind=kind_phys) :: tem1 +real(kind=kind_phys) :: tem2 +real(kind=kind_phys) :: zolmax + +real(kind=kind_phys) xkzo + +z1i = one / z1 ! inverse of model height + +! +! set background diffusivities with one for gdx >= xkgdx and +! as a function of horizontal grid size for gdx < xkgdx +! (i.e., gdx/xkgdx for gdx < xkgdx) +! + +if(gdx >= xkgdx) then + xkzo = one +else + xkzo = gdx / xkgdx +endif + +tem1 = tv1 - tvs +if(tem1 > zero) then ! for stable case, adjust for vegetation cover + tem2 = xkzo * zvfun + xkzo = min(max(tem2, xkmin), xkzo) +endif + +zolmax = xkrefsqr / sqrt(xkzo) ! maximum z/L + +! compute stability indices (rb and hlinf) + + dtv = thv1 - tvs + adtv = max(abs(dtv),0.001_kind_phys) + dtv = sign(1.0_kind_phys,dtv) * adtv + + if(thsfc_loc) then ! Use local potential temperature + rb = max(-5000.0_kind_phys, (grav+grav) * dtv * z1 & + / ((thv1 + tvs) * wind * wind)) + else ! Use potential temperature referenced to 1000 hPa + rb = max(-5000.0_kind_phys, grav * dtv * z1 & + / (tv1 * wind * wind)) + endif + + tem1 = one / z0max ! 1/z0m + tem2 = one / ztmax ! 1/z0t + fm = log((z0max+z1) * tem1) ! neutral phi_m + fh = log((ztmax+z1) * tem2) ! neutral phi_h + fm10 = log((z0max+10.0_kind_phys) * tem1) ! neutral phi_m at 10 meters + fh2 = log((ztmax+2.0_kind_phys) * tem2) ! neutral phi_h at 2 meters + hlinf = rb * fm * fm / fh ! z/L STN 2.7 + hlinf = min(max(hlinf,zolmin),zolmax) ! z/L, xi in STN/UTN +! +! stable case +! + if (dtv >= zero) then + hl1 = hlinf ! z/L, xi in STN + if(hlinf > 0.25_kind_phys) then ! z/L > 0.25, do two iterations + tem1 = hlinf * z1i ! 1/L + hl0inf = z0max * tem1 ! z0m/z1, zi_0 in STN + hltinf = ztmax * tem1 ! z0t/z1, zi_0 in STN + aa = sqrt(one + alpha4 * hlinf) ! sqrt term of STN 2.16 with z + aa0 = sqrt(one + alpha4 * hl0inf) ! sqrt term of STN 2.16 with z0m + bb = aa ! sqrt term of STN 2.16 with z + bb0 = sqrt(one + alpha4 * hltinf) ! sqrt term of STN 2.16 with z0t + pm = aa0 - aa + log( (aa + one)/(aa0 + one) ) ! psi_m STN 3.11 + ph = bb0 - bb + log( (bb + one)/(bb0 + one) ) ! psi_h STN 3.11 + fms = fm - pm ! phi_m STN 3.10 + fhs = fh - ph ! phi_h STN 3.10 + hl1 = fms * fms * rb / fhs ! z/L iteration STN 3.8 + hl1 = min(hl1, zolmax) ! z/L iteration + endif +! +! second iteration +! + tem1 = hl1 * z1i ! 1/L + hl0 = z0max * tem1 ! z0m/z1 + hlt = ztmax * tem1 ! z0t/z1 + aa = sqrt(one + alpha4 * hl1) ! sqrt term of STN 2.16 with z + aa0 = sqrt(one + alpha4 * hl0) ! sqrt term of STN 2.16 with z0m + bb = aa ! sqrt term of STN 2.16 with z + bb0 = sqrt(one + alpha4 * hlt) ! sqrt term of STN 2.16 with z0t + pm = aa0 - aa + log( (one+aa)/(one+aa0) ) ! psi_m STN 3.11 + ph = bb0 - bb + log( (one+bb)/(one+bb0) ) ! psi_h STN 3.11 + hl110 = hl1 * 10.0_kind_phys * z1i ! 10/L + aa = sqrt(one + alpha4 * hl110) ! sqrt term of STN 2.16 with z=10m + pm10 = aa0 - aa + log( (one+aa)/(one+aa0) ) ! psi_m STN 3.11 with z=10m + hl12 = (hl1+hl1) * z1i ! 2/L +! aa = sqrt(one + alpha4 * hl12) + bb = sqrt(one + alpha4 * hl12) ! sqrt term of STN 2.16 with z=2m + ph2 = bb0 - bb + log( (one+bb)/(one+bb0) ) ! psi_m STN 3.11 with z=2m +! +! unstable case - check for unphysical obukhov length +! see steps in UTN Sec. D +! + else ! dtv < 0 case + + olinf = z1 / hlinf ! z/L, xi in UTN + tem1 = 50.0_kind_phys * z0max ! 50 * z0m, z/L limit for calc methods, see UTN Sec. E + if(abs(olinf) <= tem1) then ! + hlinf = -z1 / tem1 ! + hlinf = max(hlinf, zolmin) + endif +! +! get pm and ph +! + if (hlinf >= -0.5_kind_phys) then + hl1 = hlinf + pm = (a0 + a1*hl1) * hl1 / (one+ (b1+b2*hl1) *hl1) ! psi_m UTN 2.37 + ph = (a0p + a1p*hl1) * hl1 / (one+ (b1p+b2p*hl1)*hl1) ! psi_h UTN 2.38 + hl110 = hl1 * 10.0_kind_phys * z1i ! 10/L + pm10 = (a0 + a1*hl110) * hl110/(one+(b1+b2*hl110)*hl110) ! psi_m UTN 2.37 with z=10m + hl12 = (hl1+hl1) * z1i ! 2/L + ph2 = (a0p + a1p*hl12) * hl12/(one+(b1p+b2p*hl12)*hl12) ! psi_h UTN 2.38 with z=2m + else ! z/L < -0.5 + hl1 = -hlinf ! -z/L + tem1 = one / sqrt(hl1) ! sqrt(-z/L) + pm = log(hl1) + 2.0_kind_phys * sqrt(tem1) - 0.8776_kind_phys ! UTN 2.64, first three terms + ph = log(hl1) + 0.5_kind_phys * tem1 + 1.386_kind_phys ! UTN 2.65, first three terms + hl110 = hl1 * 10.0_kind_phys * z1i ! 10/L + pm10 = log(hl110) + 2.0_kind_phys/sqrt(sqrt(hl110)) - 0.8776_kind_phys ! psi_m UTN 2.64 with z=10m + hl12 = (hl1+hl1) * z1i ! 2/L + ph2 = log(hl12) + 0.5_kind_phys / sqrt(hl12) + 1.386_kind_phys ! psi_h UTN 2.65 with z=2m + endif + + endif ! end of if (dtv >= 0 ) then loop +! +! finish the exchange coefficient computation to provide fm and fh +! + fm = fm - pm ! phi_m + fh = fh - ph ! phi_h + fm10 = fm10 - pm10 ! phi_m at 10m + fh2 = fh2 - ph2 ! phi_h at 2m + cm = ca * ca / (fm * fm) ! momentum exchange coef = k^2/phi_m^2 + ch = ca * ca / (fm * fh) ! heat exchange coef = k^2/phi_m/phi_h + tem1 = 0.00001_kind_phys/z1 ! minimum exhange coef (?) + cm = max(cm, tem1) + ch = max(ch, tem1) + stress = cm * wind * wind ! surface stress = Cm*U*U + ustar = sqrt(stress) ! friction velocity + + return +!................................. + end subroutine gfs_stability +!--------------------------------- + !== begin thermalz0 !================================================================================== !>\ingroup NoahMP_LSM ! compute thermal roughness length based on option opt_trs. - subroutine thermalz0(parameters,fveg,z0m,z0mg,zlvl,zpd,ezpd,ustarx, & !in - vegtyp,vaie,ur,csigmaf0,csigmaf1,aone,cdmnv,cdmng,icom, & !in - z0mt,z0ht) !out + + subroutine thermalz0(parameters, fveg, z0m, z0mg, zlvl, zpd, ezpd, & !in + ustarx, vegtyp, vaie, ur, c_sigma_f0, c_sigma_f1, a1, & !in + cdmn_v, cdmn_g, surface_flag, & !in + z0m_out, z0h_out ) !out + ! compute thermal roughness length based on option opt_trs. ! ------------------------------------------------------------------------------------------------- implicit none ! ------------------------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer , intent(in ) :: vegtyp ! vegetation type - integer , intent(in ) :: icom ! 0=bared 1=vege 2=composition - real (kind=kind_phys), intent(in ) :: fveg ! green vegetation fraction [0.0-1.0] - real (kind=kind_phys), intent(in ) :: z0m ! z0 momentum (m) - real (kind=kind_phys), intent(in ) :: z0mg ! z0 momentum, ground (m) - real (kind=kind_phys), intent(in ) :: zlvl ! reference height [m] - real (kind=kind_phys), intent(in ) :: zpd ! zero plane displacement (m) - real (kind=kind_phys), intent(in ) :: ezpd ! zero plane displacement (m) - real (kind=kind_phys), intent(in ) :: ustarx ! friction velocity (m/s) - real (kind=kind_phys), intent(in ) :: vaie ! reference height [m] - real (kind=kind_phys), intent(in ) :: ur ! wind speed [m/s] - real (kind=kind_phys), intent(inout) :: csigmaf0 ! - real (kind=kind_phys), intent(inout) :: csigmaf1 ! - real (kind=kind_phys), intent(in ) :: aone ! - real (kind=kind_phys), intent(in ) :: cdmnv ! - real (kind=kind_phys), intent(in ) :: cdmng ! - real (kind=kind_phys), intent(out ) :: z0mt ! composited z0 momentum (m) - real (kind=kind_phys), intent(out ) :: z0ht ! composited z0 momentum (m) + type (noahmp_parameters),intent(in ) :: parameters ! parameters data structure + integer , intent(in ) :: vegtyp ! vegetation type + integer , intent(in ) :: surface_flag ! 0=bare 1=vegetation 2=composite + real (kind=kind_phys), intent(in ) :: fveg ! vegetation fraction [0.0-1.0] + real (kind=kind_phys), intent(in ) :: z0m ! z0 momentum [m] + real (kind=kind_phys), intent(in ) :: z0mg ! z0 momentum, ground [m] + real (kind=kind_phys), intent(in ) :: zlvl ! reference height [m] + real (kind=kind_phys), intent(in ) :: zpd ! zero plane displacement [m] + real (kind=kind_phys), intent(in ) :: ezpd ! grid zero plane displacement [m] + real (kind=kind_phys), intent(in ) :: ustarx ! friction velocity [m/s] + real (kind=kind_phys), intent(in ) :: vaie ! exposed LAI + SAI [m2/m2] + real (kind=kind_phys), intent(in ) :: ur ! wind speed [m/s] + real (kind=kind_phys), intent(in ) :: a1 ! Blumel 99 eqn 43 + real (kind=kind_phys), intent(in ) :: cdmn_v ! neutral momentum drag coefficient for vegetation + real (kind=kind_phys), intent(in ) :: cdmn_g ! neutral momentum drag coefficient for bare ground + real (kind=kind_phys), intent(inout) :: c_sigma_f0 ! C factor for no vegetation Blumel99 eqn 35 + real (kind=kind_phys), intent(inout) :: c_sigma_f1 ! C factor for full vegetation Blumel99 eqn 39 + real (kind=kind_phys), intent(out ) :: z0m_out ! output z0 momentum [m] + real (kind=kind_phys), intent(out ) :: z0h_out ! output z0 heat [m] ! local - real (kind=kind_phys) :: czil1 ! canopy based czil - real (kind=kind_phys) :: coeffa - real (kind=kind_phys) :: coeffb - real (kind=kind_phys) :: csigmafveg - real (kind=kind_phys) :: gsigma - real (kind=kind_phys) :: sigmaa - real (kind=kind_phys) :: cdmn - real (kind=kind_phys) :: kbsigmafveg - real (kind=kind_phys) :: reyn - real (kind=kind_phys) :: kbsigmaf0 - real (kind=kind_phys) :: kbsigmaf1 + real (kind=kind_phys) :: czil ! Zilitinkevich factor + real (kind=kind_phys) :: coeff_a ! slope of Blumel99 eqn 40 Blumel99 eqn 41 + real (kind=kind_phys) :: coeff_b ! intercept of Blumel99 eqn 40 Blumel99 eqn 42 + real (kind=kind_phys) :: c_sigma_fveg ! estimated C factor Blumel99 eqn 40 + real (kind=kind_phys) :: g_sigma ! weighting function Blumel99 eqn 22 + real (kind=kind_phys) :: sigma_a ! momentum partition factor Blumel99 eqn 8 + real (kind=kind_phys) :: cdmn ! grid neutral momentum drag coefficient Blumel99 eqn 21 + real (kind=kind_phys) :: reyn ! roughness Reynolds number Blumel99 eqn 36c + real (kind=kind_phys) :: kb_sigma_f0 ! bare ground kb^-1 Blumel99 eqn 36ab + real (kind=kind_phys) :: kb_sigma_f1 ! vegetated kb^-1 Blumel99 eqn 38 + real (kind=kind_phys) :: kb_sigma_fveg! grid estimated kb^-1 Blumel99 eqn 34 + + integer, parameter :: bare_flag = 0, vegetated_flag = 1, composite_flag = 2 + integer, parameter :: z0heqz0m = 1, & + chen09 = 2, & + tessel = 3, & + blumel99 = 4 + real (kind=kind_phys), parameter :: blumel_gamma = 0.5, & + blumel_zeta = 1.0, & + viscosity = 1.5e-5 ! ------------------------------------------------------------------------------------------------- - czil1 = 0.5 - coeffa = 0.0 - coeffb = 0.0 - csigmafveg= 0.0 - gsigma = 0.0 - cdmn = 0.0 - reyn = 0.0 - sigmaa = 0.0 - kbsigmafveg = 0.0 - kbsigmaf0 = 0.0 - kbsigmaf1 = 0.0 - if( icom == 2 )then - if (opt_trs == 1) then - z0mt = fveg * z0m + (1.0 - fveg) * z0mg - z0ht = z0mt - elseif (opt_trs == 2) then - z0mt = fveg * z0m + (1.0 - fveg) * z0mg - czil1=10.0 ** (- (0.4) * parameters%hvt) - z0ht = fveg * z0m*exp(-czil1*0.4*258.2*sqrt(ustarx*z0m)) & - +(1.0 - fveg) * z0mg*exp(-czil1*0.4*258.2*sqrt(ustarx*z0mg)) - elseif (opt_trs == 3) then - z0mt = fveg * z0m + (1.0 - fveg) * z0mg - if (vegtyp.le.5) then - z0ht = fveg * z0m + (1.0 - fveg) * z0mg*0.1 + czil = 0.5 + coeff_a = 0.0 + coeff_b = 0.0 + c_sigma_fveg = 0.0 + g_sigma = 0.0 + cdmn = 0.0 + reyn = 0.0 + sigma_a = 0.0 + kb_sigma_fveg = 0.0 + kb_sigma_f0 = 0.0 + kb_sigma_f1 = 0.0 + + surface_flag_select : select case(surface_flag) + + case (composite_flag) ! calculate grid based z0m and z0h + + if (opt_trs == z0heqz0m) then + + z0m_out = exp(fveg * log(z0m) + (1.0 - fveg) * log(z0mg)) + z0h_out = z0m_out + + elseif (opt_trs == chen09) then + + z0m_out = exp(fveg * log(z0m) + (1.0 - fveg) * log(z0mg)) + czil = 10.0 ** (- 0.4 * parameters%hvt) + + reyn = ustarx*z0m_out/viscosity ! Blumel99 eqn 36c + if (reyn > 2.0) then + kb_sigma_f0 = 2.46*reyn**0.25 - log(7.4) ! Blumel99 eqn 36a else - z0ht = fveg * z0m*0.01 + (1.0 - fveg) * z0mg*0.1 + kb_sigma_f0 = - log(0.397) ! Blumel99 eqn 36b endif - elseif (opt_trs == 4) then - coeffa = (csigmaf0 - csigmaf1)/(1.0 - exp(-1.0*aone)) - coeffb = csigmaf0 - coeffa - csigmafveg = coeffa * exp(-1.0*aone*fveg) + coeffb - gsigma = fveg**0.5 + fveg*(1.0-fveg)*1.0 -! -! 0.5 ~ 1.0 for the 0.5 place; 0 ~ 1.0 for the 1.0 place, adjustable empirical + z0h_out = exp( fveg * log(z0m * exp(-czil*0.4*258.2*sqrt(ustarx*z0m))) + & + (1.0 - fveg) * log(max(z0m/exp(kb_sigma_f0),1.0e-6)) ) + + elseif (opt_trs == tessel) then + + z0m_out = exp(fveg * log(z0m) + (1.0 - fveg) * log(z0mg)) + if (vegtyp <= 5) then + z0h_out = fveg * log(z0m) + (1.0 - fveg) * log(z0mg * 0.1) + else + z0h_out = fveg * log(z0m * 0.01) + (1.0 - fveg) * log(z0mg * 0.1) + endif + + elseif (opt_trs == blumel99) then + + coeff_a = (c_sigma_f0 - c_sigma_f1)/(1.0 - exp(-1.0*a1)) ! Blumel99 eqn 41 + coeff_b = c_sigma_f0 - coeff_a ! Blumel99 eqn 42 + c_sigma_fveg = coeff_a * exp(-1.0*a1*fveg) + coeff_b ! Blumel99 eqn 40 + +! blumel_gamma = 0.5 ~ 1.0 and blumel_zeta = 0 ~ 1.0, adjustable empirical ! canopy roughness geometry parameter; currently fveg = 0.78 has the largest ! momentum flux; can test the fveg-based average by setting 0.5 to 1.0 and 1.0 -! to 0.0 ! see Blumel; JAM,1998 -! - - cdmn = gsigma*cdmnv + (1.0-gsigma)*cdmng - z0mt = (zlvl - ezpd)*exp(-0.4/sqrt(cdmn)) +! to 0.0 ! see Blumel; JAM,1999 - kbsigmafveg = csigmafveg/log((zlvl-ezpd)/z0mt) - log((zlvl-ezpd)/z0mt) - z0ht = z0mt/exp(kbsigmafveg) - endif + g_sigma = fveg**blumel_gamma + fveg*(1.0-fveg)*blumel_zeta ! Blumel99 eqn 22 + cdmn = g_sigma*cdmn_v + (1.0-g_sigma)*cdmn_g ! Blumel99 eqn 21 + z0m_out = (zlvl - ezpd)*exp(-0.4/sqrt(cdmn)) ! Blumel99 eqn 24 + kb_sigma_fveg = c_sigma_fveg/log((zlvl-ezpd)/z0m_out) - & + log((zlvl-ezpd)/z0m_out) ! Blumel99 eqn 34 + z0h_out = z0m_out/exp(kb_sigma_fveg) - elseif( icom == 0 )then - - z0mt = z0mg - if (opt_trs == 1) then - z0ht = z0mt - elseif (opt_trs == 2) then - czil1=10.0 ** (- (0.4) * parameters%hvt) - z0ht =z0mt*exp(-czil1*0.4*258.2*sqrt(ustarx*z0mt)) - elseif (opt_trs == 3) then - if (vegtyp.le.5) then - z0ht = z0mt - else - z0ht = z0mt*0.01 endif - elseif (opt_trs == 4) then - reyn = ustarx*z0mt/(1.5e-05) - if (reyn .gt. 2.0) then - kbsigmaf0 = 2.46*reyn**0.25 - log(7.4) - else - kbsigmaf0 = - log(0.397) + + case (bare_flag) ! calculate z0m and z0h over bare tile + + z0m_out = z0mg + + if (opt_trs == z0heqz0m) then + + z0h_out = z0m_out + + elseif (opt_trs == tessel) then + + if (vegtyp <= 5) then + z0h_out = z0m_out + else + z0h_out = z0m_out * 0.01 + endif + + elseif (opt_trs == blumel99 .or. opt_trs == chen09) then + + reyn = ustarx*z0m_out/viscosity ! Blumel99 eqn 36c + if (reyn > 2.0) then + kb_sigma_f0 = 2.46*reyn**0.25 - log(7.4) ! Blumel99 eqn 36a + else + kb_sigma_f0 = - log(0.397) ! Blumel99 eqn 36b + endif + + z0h_out = max(z0m_out/exp(kb_sigma_f0),1.0e-6) + c_sigma_f0 = log((zlvl-zpd)/z0m_out) * & + (log((zlvl-zpd)/z0m_out) + kb_sigma_f0) ! Blumel99 eqn 35 + endif - z0ht = max(z0mt/exp(kbsigmaf0),1.0e-6) - csigmaf0 = log((zlvl-zpd)/z0mt)*(log((zlvl-zpd)/z0mt) + kbsigmaf0) - endif + case (vegetated_flag) ! calculate z0m and z0h over vegetated tile - elseif( icom == 1 )then - - z0mt = z0m - if (opt_trs == 1) then - z0ht = z0mt - elseif (opt_trs == 2) then - czil1= 10.0 ** (- (0.4) * parameters%hvt) - z0ht = z0mt*exp(-czil1*0.4*258.2*sqrt(ustarx*z0mt)) - elseif (opt_trs == 3) then - if (vegtyp.le.5) then - z0ht = z0mt - else - z0ht = z0mt*0.01 - endif - elseif (opt_trs == 4) then - sigmaa = 1.0 - (0.5/(0.5+vaie))*exp(-vaie**2/8.0) - kbsigmaf1 = 16.4*(sigmaa*vaie**3)**(-0.25)*sqrt(parameters%dleaf*ur/log((zlvl-zpd)/z0mt)) - z0ht = z0mt/exp(kbsigmaf1) - csigmaf1 = log((zlvl-zpd)/z0mt)*(log((zlvl-zpd)/z0mt)+kbsigmaf1) ! for output for interpolation + z0m_out = z0m + + if (opt_trs == z0heqz0m) then + + z0h_out = z0m_out + + elseif (opt_trs == chen09) then + + czil = 10.0 ** (- 0.4 * parameters%hvt) + z0h_out = z0m_out * exp(-czil*0.4*258.2*sqrt(ustarx*z0m_out)) + + elseif (opt_trs == tessel) then + + if (vegtyp <= 5) then + z0h_out = z0m_out + else + z0h_out = z0m_out*0.01 endif - endif + + elseif (opt_trs == blumel99) then + + sigma_a = 1.0 - (0.5/(0.5+vaie)) * exp(-vaie**2/8.0) ! Blumel99 eqn 8 + kb_sigma_f1 = 16.4 * (sigma_a*vaie**3)**(-0.25) * & ! Blumel99 eqn 38 + sqrt(parameters%dleaf*ur/log((zlvl-zpd)/z0m_out)) + z0h_out = z0m_out/exp(kb_sigma_f1) + c_sigma_f1 = log((zlvl-zpd)/z0m_out)*(log((zlvl-zpd)/z0m_out)+kb_sigma_f1) ! Blumel99 eqn 39 + + endif + + end select surface_flag_select end subroutine thermalz0 @@ -5525,14 +5944,14 @@ subroutine esat(t, esw, esi, desw, desi) !--------------------------------------------------------------------------------------------------- ! in - real (kind=kind_phys), intent(in) :: t !temperature + real (kind=kind_phys), intent(in) :: t !< temperature !out - real (kind=kind_phys), intent(out) :: esw !saturation vapor pressure over water (pa) - real (kind=kind_phys), intent(out) :: esi !saturation vapor pressure over ice (pa) - real (kind=kind_phys), intent(out) :: desw !d(esat)/dt over water (pa/k) - real (kind=kind_phys), intent(out) :: desi !d(esat)/dt over ice (pa/k) + real (kind=kind_phys), intent(out) :: esw !< saturation vapor pressure over water (pa) + real (kind=kind_phys), intent(out) :: esi !< saturation vapor pressure over ice (pa) + real (kind=kind_phys), intent(out) :: desw !< d(esat)/dt over water (pa/k) + real (kind=kind_phys), intent(out) :: desi !< d(esat)/dt over ice (pa/k) ! local @@ -5571,6 +5990,7 @@ end subroutine esat !== begin stomata ================================================================================== !>\ingroup NoahMP_LSM +!! subroutine stomata (parameters,vegtyp ,mpe ,apar ,foln ,iloc , jloc, & !in tv ,ei ,ea ,sfctmp ,sfcprs , & !in o2 ,co2 ,igs ,btran ,rb , & !in @@ -5579,29 +5999,29 @@ subroutine stomata (parameters,vegtyp ,mpe ,apar ,foln ,iloc , jlo implicit none ! -------------------------------------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer,intent(in) :: iloc !grid index - integer,intent(in) :: jloc !grid index - integer,intent(in) :: vegtyp !vegetation physiology type - - real (kind=kind_phys), intent(in) :: igs !growing season index (0=off, 1=on) - real (kind=kind_phys), intent(in) :: mpe !prevents division by zero errors - - real (kind=kind_phys), intent(in) :: tv !foliage temperature (k) - real (kind=kind_phys), intent(in) :: ei !vapor pressure inside leaf (sat vapor press at tv) (pa) - real (kind=kind_phys), intent(in) :: ea !vapor pressure of canopy air (pa) - real (kind=kind_phys), intent(in) :: apar !par absorbed per unit lai (w/m2) - real (kind=kind_phys), intent(in) :: o2 !atmospheric o2 concentration (pa) - real (kind=kind_phys), intent(in) :: co2 !atmospheric co2 concentration (pa) - real (kind=kind_phys), intent(in) :: sfcprs !air pressure at reference height (pa) - real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) - real (kind=kind_phys), intent(in) :: btran !soil water transpiration factor (0 to 1) - real (kind=kind_phys), intent(in) :: foln !foliage nitrogen concentration (%) - real (kind=kind_phys), intent(in) :: rb !boundary layer resistance (s/m) + type (noahmp_parameters), intent(in) :: parameters !< + integer,intent(in) :: iloc !< grid index + integer,intent(in) :: jloc !< grid index + integer,intent(in) :: vegtyp !< vegetation physiology type + + real (kind=kind_phys), intent(in) :: igs !< growing season index (0=off, 1=on) + real (kind=kind_phys), intent(in) :: mpe !< prevents division by zero errors + + real (kind=kind_phys), intent(in) :: tv !< foliage temperature (k) + real (kind=kind_phys), intent(in) :: ei !< vapor pressure inside leaf (sat vapor press at tv) (pa) + real (kind=kind_phys), intent(in) :: ea !< vapor pressure of canopy air (pa) + real (kind=kind_phys), intent(in) :: apar !< par absorbed per unit lai (w/m2) + real (kind=kind_phys), intent(in) :: o2 !< atmospheric o2 concentration (pa) + real (kind=kind_phys), intent(in) :: co2 !< atmospheric co2 concentration (pa) + real (kind=kind_phys), intent(in) :: sfcprs !< air pressure at reference height (pa) + real (kind=kind_phys), intent(in) :: sfctmp !< air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: btran !< soil water transpiration factor (0 to 1) + real (kind=kind_phys), intent(in) :: foln !< foliage nitrogen concentration (%) + real (kind=kind_phys), intent(in) :: rb !< boundary layer resistance (s/m) ! output - real (kind=kind_phys), intent(out) :: rs !leaf stomatal resistance (s/m) - real (kind=kind_phys), intent(out) :: psn !foliage photosynthesis (umol co2 /m2/ s) [always +] + real (kind=kind_phys), intent(out) :: rs !< leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: psn !< foliage photosynthesis (umol co2 /m2/ s) [always +] ! in&out real (kind=kind_phys) :: rlb !boundary layer resistance (s m2 / umol) @@ -5709,7 +6129,7 @@ end subroutine stomata !! air temperature, atmospheric water vapor pressure deficit at the lowest !! model level, and soil moisture (preferably unfrozen soil moisture rather !! than total). - subroutine canres (parameters,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in + subroutine canres (parameters,ep_2,epsm1,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in rc ,psn ,iloc ,jloc ) !out ! -------------------------------------------------------------------------------------------------- @@ -5728,19 +6148,21 @@ subroutine canres (parameters,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in ! -------------------------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - real (kind=kind_phys), intent(in) :: par !par absorbed per unit sunlit lai (w/m2) - real (kind=kind_phys), intent(in) :: sfctmp !canopy air temperature - real (kind=kind_phys), intent(in) :: sfcprs !surface pressure (pa) - real (kind=kind_phys), intent(in) :: eah !water vapor pressure (pa) - real (kind=kind_phys), intent(in) :: rcsoil !soil moisture stress factor + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + real (kind=kind_phys), intent(in) :: ep_2 !< + real (kind=kind_phys), intent(in) :: epsm1 !< + real (kind=kind_phys), intent(in) :: par !< par absorbed per unit sunlit lai (w/m2) + real (kind=kind_phys), intent(in) :: sfctmp !< canopy air temperature + real (kind=kind_phys), intent(in) :: sfcprs !< surface pressure (pa) + real (kind=kind_phys), intent(in) :: eah !< water vapor pressure (pa) + real (kind=kind_phys), intent(in) :: rcsoil !< soil moisture stress factor !outputs - real (kind=kind_phys), intent(out) :: rc !canopy resistance per unit lai - real (kind=kind_phys), intent(out) :: psn !foliage photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: rc !< canopy resistance per unit lai + real (kind=kind_phys), intent(out) :: psn !< foliage photosynthesis (umolco2/m2/s) !local @@ -5763,8 +6185,8 @@ subroutine canres (parameters,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in ! compute q2 and q2sat - q2 = 0.622 * eah / (sfcprs - 0.378 * eah) !specific humidity [kg/kg] - q2 = q2 / (1.0 + q2) !mixing ratio [kg/kg] + q2 = ep_2 * eah / (sfcprs + epsm1 * eah) !specific humidity [kg/kg] + q2 = q2 / (1.0 - q2) !mixing ratio [kg/kg] call calhum(parameters,sfctmp, sfcprs, q2sat, dqsdt2) @@ -5794,6 +6216,7 @@ end subroutine canres !== begin calhum =================================================================================== !>\ingroup NoahMP_LSM +!! subroutine calhum(parameters,sfctmp, sfcprs, q2sat, dqsdt2) implicit none @@ -5848,29 +6271,29 @@ subroutine tsnosoi (parameters,ice ,nsoil ,nsnow ,isnow ,ist , & ! ! -------------------------------------------------------------------------------------------------- !input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc - integer, intent(in) :: jloc - integer, intent(in) :: ice ! - integer, intent(in) :: nsoil !no of soil layers (4) - integer, intent(in) :: nsnow !maximum no of snow layers (3) - integer, intent(in) :: isnow !actual no of snow layers - integer, intent(in) :: ist !surface type - - real (kind=kind_phys), intent(in) :: dt !time step (s) - real (kind=kind_phys), intent(in) :: tbot ! - real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) - real (kind=kind_phys), intent(in) :: sag !solar rad. absorbed by ground (w/m2) - real (kind=kind_phys), intent(in) :: snowh !snow depth (m) - real (kind=kind_phys), intent(in) :: tg !ground temperature (k) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness (m) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< + integer, intent(in) :: jloc !< + integer, intent(in) :: ice !< + integer, intent(in) :: nsoil !< no of soil layers (4) + integer, intent(in) :: nsnow !< maximum no of snow layers (3) + integer, intent(in) :: isnow !< actual no of snow layers + integer, intent(in) :: ist !< surface type + + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), intent(in) :: tbot !< + real (kind=kind_phys), intent(in) :: ssoil !< ground heat flux (w/m2) + real (kind=kind_phys), intent(in) :: sag !< solar rad. absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: snowh !< snow depth (m) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !< layer-bot. depth from snow surf.(m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer thickness (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !< heat capacity (j/m3/k) !input and output - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< #ifdef CCPP character(len=*) , intent(inout) :: errmsg integer , intent(inout) :: errflg @@ -5984,28 +6407,28 @@ subroutine hrt (parameters,nsnow ,nsoil ,isnow ,zsnso , & ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: nsoil !no of soil layers (4) - integer, intent(in) :: nsnow !maximum no of snow layers (3) - integer, intent(in) :: isnow !actual no of snow layers - real (kind=kind_phys), intent(in) :: tbot !bottom soil temp. at zbot (k) - real (kind=kind_phys), intent(in) :: zbot !depth of lower boundary condition (m) - !from soil surface not snow surface - real (kind=kind_phys), intent(in) :: dt !time step (s) - real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: nsoil !< no of soil layers (4) + integer, intent(in) :: nsnow !< maximum no of snow layers (3) + integer, intent(in) :: isnow !, actual no of snow layers + real (kind=kind_phys), intent(in) :: tbot !< bottom soil temp. at zbot (k) + real (kind=kind_phys), intent(in) :: zbot !< depth of lower boundary condition (m) + !! from soil surface not snow surface + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), intent(in) :: ssoil !< ground heat flux (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !< depth of layer-bottom of snow/soil (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< snow/soil temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !< heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: phi !< light through water (w/m2) ! output - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient - real (kind=kind_phys), intent(out) :: botflx !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: rhsts !< right-hand side of the matrix + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ai !< left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: bi !< left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ci !< left-hand side coefficient + real (kind=kind_phys), intent(out) :: botflx !< energy influx from soil bottom (w/m2) ! local @@ -6131,6 +6554,7 @@ end subroutine hstep !== begin rosr12 =================================================================================== !>\ingroup NoahMP_LSM +!! solve the tri-diagonal matrix equation subroutine rosr12 (p,a,b,c,d,delta,ntop,nsoil,nsnow) ! ---------------------------------------------------------------------- ! subroutine rosr12 @@ -6210,32 +6634,32 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , ! ---------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsnow !maximum no. of snow layers [=3] - integer, intent(in) :: nsoil !no. of soil layers [=4] - integer, intent(in) :: isnow !actual no. of snow layers [<=3] - integer, intent(in) :: ist !surface type: 1->soil; 2->lake - real (kind=kind_phys), intent(in) :: dt !land model time step (sec) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsnow !< maximum no. of snow layers [=3] + integer, intent(in) :: nsoil !< no. of soil layers [=4] + integer, intent(in) :: isnow !< actual no. of snow layers [<=3] + integer, intent(in) :: ist !< surface type: 1->soil; 2->lake + real (kind=kind_phys), intent(in) :: dt !< land model time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: fact !< temporary + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !< heat capacity (j/m3/k) ! outputs integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index - real (kind=kind_phys), intent(out) :: qmelt !snowmelt rate [mm/s] - real (kind=kind_phys), intent(out) :: ponding!snowmelt when snow has no layer [mm] + real (kind=kind_phys), intent(out) :: qmelt !< snowmelt rate [mm/s] + real (kind=kind_phys), intent(out) :: ponding!< snowmelt when snow has no layer [mm] ! inputs and outputs - real (kind=kind_phys), intent(inout) :: sneqv - real (kind=kind_phys), intent(inout) :: snowh - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] - real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: sneqv !< + real (kind=kind_phys), intent(inout) :: snowh !< + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow/soil layer temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !< total soil water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snliq !< snow layer liquid water [mm] #ifdef CCPP character(len=*) , intent(inout) :: errmsg integer , intent(inout) :: errflg @@ -6583,6 +7007,7 @@ end subroutine frh2o !== begin water ==================================================================================== !>\ingroup NoahMP_LSM +!! compute water budgets (water storages, et components, and runoff) subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & !in vv ,fcev ,fctr ,qprecc ,qprecl ,elai , & !in esai ,sfctmp ,qvap ,qdew ,zsoil ,btrani , & !in @@ -6603,83 +7028,83 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & implicit none ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: vegtyp !vegetation type - integer, intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: ist !surface type 1-soil; 2-lake - integer, intent(in) :: nsoil !no. of soil layers - integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [1-melt; 2-freeze] - real (kind=kind_phys), intent(in) :: dt !main time step (s) - real (kind=kind_phys), intent(in) :: uu !u-direction wind speed [m/s] - real (kind=kind_phys), intent(in) :: vv !v-direction wind speed [m/s] - real (kind=kind_phys), intent(in) :: fcev !canopy evaporation (w/m2) [+ to atm ] - real (kind=kind_phys), intent(in) :: fctr !transpiration (w/m2) [+ to atm] - real (kind=kind_phys), intent(in) :: qprecc !convective precipitation (mm/s) - real (kind=kind_phys), intent(in) :: qprecl !large-scale precipitation (mm/s) - real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow - real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow - real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] - real (kind=kind_phys), intent(in) :: qvap !soil surface evaporation rate[mm/s] - real (kind=kind_phys), intent(in) :: qdew !soil surface dew rate[mm/s] - real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: btrani !soil water stress factor (0 to 1) - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep -! real (kind=kind_phys) , intent(in) :: ponding ![mm] - real (kind=kind_phys) , intent(in) :: tg !ground temperature (k) - real (kind=kind_phys) , intent(in) :: fveg !greeness vegetation fraction (-) - real (kind=kind_phys) , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 - real (kind=kind_phys) , intent(in) :: fp !fraction of the gridcell that receives precipitation ! mb/an: v3.7 - real (kind=kind_phys) , intent(in) :: rain !rainfall (mm/s) ! mb/an: v3.7 - real (kind=kind_phys) , intent(in) :: snow !snowfall (mm/s) ! mb/an: v3.7 - real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] (used in m-m&f groundwater dynamics) - real (kind=kind_phys) , intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real (kind=kind_phys) , intent(in) :: qrain !rain at ground srf (mm) [+] - real (kind=kind_phys) , intent(in) :: snowhin !snow depth increasing rate (m/s) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: vegtyp !< vegetation type + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: ist !< surface type 1-soil; 2-lake + integer, intent(in) :: nsoil !< no. of soil layers + integer, dimension(-nsnow+1:0) , intent(in) :: imelt !< melting state index [1-melt; 2-freeze] + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: uu !< u-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: vv !< v-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: fcev !\ingroup NoahMP_LSM +!! subroutine snowwater (parameters,nsnow ,nsoil ,imelt ,dt ,zsoil , & !in sfctmp ,snowhin,qsnow ,qsnfro ,qsnsub , & !in qrain ,ficeold,iloc ,jloc , & !in @@ -6959,39 +7385,39 @@ subroutine snowwater (parameters,nsnow ,nsoil ,imelt ,dt ,zsoil , & !in implicit none ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !no. of soil layers - integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real (kind=kind_phys), intent(in) :: dt !time step (s) - real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] - real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) - real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] - real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] - real (kind=kind_phys), dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< no. of soil layers + integer, dimension(-nsnow+1:0) , intent(in) :: imelt !< melting state index [0-no melt;1-melt] + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< depth of layer-bottom from soil surface + real (kind=kind_phys), intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys), intent(in) :: snowhin!< snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: qsnow !< snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: qsnfro !< snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !< snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !< snow surface rain rate[mm/s] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(in) :: ficeold!< ice fraction at last timestep ! input & output - integer, intent(inout) :: isnow !actual no. of snow layers - real (kind=kind_phys), intent(inout) :: snowh !snow height [m] - real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !< depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow/soil layer thickness [m] ! output - real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real (kind=kind_phys), intent(out) :: snoflow!glacier flow [mm] - real (kind=kind_phys), intent(out) :: ponding1 - real (kind=kind_phys), intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: qsnbot !< melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: snoflow!< glacier flow [mm] + real (kind=kind_phys), intent(out) :: ponding1 !< + real (kind=kind_phys), intent(out) :: ponding2 !< ! local integer :: iz,i @@ -7099,25 +7525,25 @@ subroutine snowfall (parameters,nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsoil !no. of soil layers - integer, intent(in) :: nsnow !maximum no. of snow layers - real (kind=kind_phys), intent(in) :: dt !main time step (s) - real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) - real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsoil !< no. of soil layers + integer, intent(in) :: nsnow !< maximum no. of snow layers + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: qsnow !< snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: snowhin!< snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !< surface air temperature [k] ! input and output - integer, intent(inout) :: isnow !actual no. of snow layers - real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] - real (kind=kind_phys), intent(inout) :: sneqv !swow water equivalent [m] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), intent(inout) :: snowh !< snow depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !< swow water equivalent [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< thickness of snow/soil layers (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] ! local @@ -7158,6 +7584,7 @@ end subroutine snowfall !== begin combine ================================================================================== !>\ingroup NoahMP_LSM +!! subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in isnow ,sh2o ,stc ,snice ,snliq , & !inout dzsnso ,sice ,snowh ,sneqv , & !inout @@ -7167,25 +7594,25 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc - integer, intent(in) :: jloc - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !no. of soil layers + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< + integer, intent(in) :: jloc !< + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< no. of soil layers ! input and output - integer, intent(inout) :: isnow !actual no. of snow layers - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] - real (kind=kind_phys), intent(inout) :: sneqv !snow water equivalent [m] - real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] - real (kind=kind_phys), intent(out) :: ponding1 - real (kind=kind_phys), intent(out) :: ponding2 + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!< snow layer depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water equivalent [m] + real (kind=kind_phys), intent(inout) :: snowh !< snow depth [m] + real (kind=kind_phys), intent(out) :: ponding1 !< + real (kind=kind_phys), intent(out) :: ponding2 !< ! local variables: @@ -7347,6 +7774,7 @@ end subroutine combine !== begin divide =================================================================================== !>\ingroup NoahMP_LSM +!! subroutine divide (parameters,nsnow ,nsoil , & !in isnow ,stc ,snice ,snliq ,dzsnso ) !inout ! ---------------------------------------------------------------------- @@ -7354,17 +7782,17 @@ subroutine divide (parameters,nsnow ,nsoil , & !in ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] - integer, intent(in) :: nsoil !no. of soil layers [ =4] + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: nsnow !< maximum no. of snow layers [ =3] + integer, intent(in) :: nsoil !< no. of soil layers [ =4] ! input and output - integer , intent(inout) :: isnow !actual no. of snow layers - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + integer , intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!< snow layer depth [m] ! local variables: @@ -7476,6 +7904,7 @@ end subroutine divide !== begin combo ==================================================================================== !>\ingroup NoahMP_LSM +!! subroutine combo(parameters,dz, wliq, wice, t, dz2, wliq2, wice2, t2) ! ---------------------------------------------------------------------- implicit none @@ -7484,15 +7913,15 @@ subroutine combo(parameters,dz, wliq, wice, t, dz2, wliq2, wice2, t2) ! ----------------------------------------------------------------------s ! input - type (noahmp_parameters), intent(in) :: parameters - real (kind=kind_phys), intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] - real (kind=kind_phys), intent(in) :: wliq2 !liquid water of element 2 [kg/m2] - real (kind=kind_phys), intent(in) :: wice2 !ice of element 2 [kg/m2] - real (kind=kind_phys), intent(in) :: t2 !nodal temperature of element 2 [k] - real (kind=kind_phys), intent(inout) :: dz !nodal thickness of 1 elements being combined [m] - real (kind=kind_phys), intent(inout) :: wliq !liquid water of element 1 - real (kind=kind_phys), intent(inout) :: wice !ice of element 1 [kg/m2] - real (kind=kind_phys), intent(inout) :: t !node temperature of element 1 [k] + type (noahmp_parameters), intent(in) :: parameters !< + real (kind=kind_phys), intent(in) :: dz2 !< nodal thickness of 2 elements being combined [m] + real (kind=kind_phys), intent(in) :: wliq2 !< liquid water of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: wice2 !< ice of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: t2 !< nodal temperature of element 2 [k] + real (kind=kind_phys), intent(inout) :: dz !< nodal thickness of 1 elements being combined [m] + real (kind=kind_phys), intent(inout) :: wliq !< liquid water of element 1 + real (kind=kind_phys), intent(inout) :: wice !< ice of element 1 [kg/m2] + real (kind=kind_phys), intent(inout) :: t !< node temperature of element 1 [k] ! local @@ -7531,6 +7960,7 @@ end subroutine combo !== begin compact ================================================================================== !>\ingroup NoahMP_LSM +!! subroutine compact (parameters,nsnow ,nsoil ,dt ,stc ,snice , & !in snliq ,zsoil ,imelt ,ficeold,iloc , jloc , & !in isnow ,dzsnso ,zsnso ) !inout @@ -7538,23 +7968,23 @@ subroutine compact (parameters,nsnow ,nsoil ,dt ,stc ,snice , & !in implicit none ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsoil !no. of soil layers [ =4] - integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] - integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real (kind=kind_phys), intent(in) :: dt !time step (sec) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] - real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil srf - real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsoil !< no. of soil layers [ =4] + integer, intent(in) :: nsnow !< maximum no. of snow layers [ =3] + integer, dimension(-nsnow+1:0) , intent(in) :: imelt !< melting state index [0-no melt;1-melt] + real (kind=kind_phys), intent(in) :: dt !< time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< depth of layer-bottom from soil srf + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!< ice fraction at last timestep ! input and output - integer, intent(inout) :: isnow ! actual no. of snow layers - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso ! depth of snow/soil layer-bottom + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !< depth of snow/soil layer-bottom ! local real (kind=kind_phys), parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 @@ -7653,31 +8083,31 @@ subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsnow !maximum no. of snow layers[=3] - integer, intent(in) :: nsoil !no. of soil layers[=4] - real (kind=kind_phys), intent(in) :: dt !time step - real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] - real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsnow !< maximum no. of snow layers[=3] + integer, intent(in) :: nsoil !< no. of soil layers[=4] + real (kind=kind_phys), intent(in) :: dt !< time step + real (kind=kind_phys), intent(in) :: qsnfro !< snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !< snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !< snow surface rain rate[mm/s] ! output - real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: qsnbot !< melting water out of snow bottom [mm/s] ! input and output - integer, intent(inout) :: isnow !actual no. of snow layers - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] - real (kind=kind_phys), intent(inout) :: snowh !snow height [m] - real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] - real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] - real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow layer depth [m] + real (kind=kind_phys), intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] ! local variables: @@ -7804,34 +8234,34 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in implicit none ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: iloc !grid index - integer, intent(in) :: jloc !grid index - integer, intent(in) :: nsoil !no. of soil layers - integer, intent(in) :: nsnow !maximum no. of snow layers - real (kind=kind_phys), intent(in) :: dt !time step (sec) - real (kind=kind_phys), intent(in) :: qinsur !water input on soil surface [mm/s] - real (kind=kind_phys), intent(in) :: qseva !evap from soil surface [mm/s] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: etrani !evapotranspiration from soil layers [mm/s] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: iloc !< grid index + integer, intent(in) :: jloc !< grid index + integer, intent(in) :: nsoil !< no. of soil layers + integer, intent(in) :: nsnow !< maximum no. of snow layers + real (kind=kind_phys), intent(in) :: dt !< time step (sec) + real (kind=kind_phys), intent(in) :: qinsur !< water input on soil surface [mm/s] + real (kind=kind_phys), intent(in) :: qseva !< evap from soil surface [mm/s] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !< depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: etrani !< evapotranspiration from soil layers [mm/s] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !< soil ice content [m3/m3] integer, intent(in) :: vegtyp ! input & output - real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real (kind=kind_phys), intent(inout) :: zwt !water table depth [m] - real (kind=kind_phys), intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] - real (kind=kind_phys) , intent(inout) :: deeprech + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: sh2o !< soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: smc !< total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !< water table depth [m] + real (kind=kind_phys), intent(inout) :: smcwtd !< soil moisture between bottom of the soil and the water table [m3/m3] + real (kind=kind_phys) , intent(inout) :: deeprech !< ! output - real (kind=kind_phys), intent(out) :: qdrain !soil-bottom free drainage [mm/s] - real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] - real (kind=kind_phys), intent(out) :: runsub !subsurface runoff [mm/s] - real (kind=kind_phys), intent(out) :: fcrmax !maximum of fcr (-) - real (kind=kind_phys), dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), intent(out) :: qdrain !< soil-bottom free drainage [mm/s] + real (kind=kind_phys), intent(out) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !< subsurface runoff [mm/s] + real (kind=kind_phys), intent(out) :: fcrmax !< maximum of fcr (-) + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: wcnd !< hydraulic conductivity (m/s) ! local integer :: k,iz !do-loop index @@ -8073,16 +8503,16 @@ subroutine zwteq (parameters,nsoil ,nsnow ,zsoil ,dzsnso ,sh2o ,zwt) ! ---------------------------------------------------------------------- ! input - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: nsoil !no. of soil layers - integer, intent(in) :: nsnow !maximum no. of snow layers - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: nsoil !< no. of soil layers + integer, intent(in) :: nsnow !< maximum no. of snow layers + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !< depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !< soil liquid water content [m3/m3] ! output - real (kind=kind_phys), intent(out) :: zwt !water table depth [m] + real (kind=kind_phys), intent(out) :: zwt !< water table depth [m] ! locals @@ -8132,18 +8562,18 @@ subroutine infil (parameters,nsoil ,dt ,zsoil ,sh2o ,sice , & !in implicit none ! -------------------------------------------------------------------------------- ! inputs - type (noahmp_parameters), intent(in) :: parameters - integer, intent(in) :: nsoil !no. of soil layers - real (kind=kind_phys), intent(in) :: dt !time step (sec) - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] - real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] - real (kind=kind_phys), intent(in) :: qinsur !water input on soil surface [mm/s] - real (kind=kind_phys), intent(in) :: sicemax!maximum soil ice content (m3/m3) + type (noahmp_parameters), intent(in) :: parameters !< + integer, intent(in) :: nsoil !< no. of soil layers + real (kind=kind_phys), intent(in) :: dt !< time step (sec) + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !< depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !< soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !< soil ice content [m3/m3] + real (kind=kind_phys), intent(in) :: qinsur !< water input on soil surface [mm/s] + real (kind=kind_phys), intent(in) :: sicemax!< maximum soil ice content (m3/m3) ! outputs - real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] - real (kind=kind_phys), intent(out) :: pddum !infiltration rate at surface + real (kind=kind_phys), intent(out) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: pddum !< infiltration rate at surface ! locals integer :: ialp1, j, jj, k @@ -8212,7 +8642,7 @@ subroutine infil (parameters,nsoil ,dt ,zsoil ,sh2o ,sice , & !in call wdfcnd2 (parameters,wdf,wcnd,sh2o(1),sicemax,1) infmax = max (infmax,wcnd) - infmax = min (infmax,px) + infmax = min (infmax,px/dt) runsrf= max(0., qinsur - infmax) pddum = qinsur - runsrf @@ -8577,6 +9007,7 @@ end subroutine wdfcnd2 !== begin groundwater ============================================================================== !>\ingroup NoahMP_LSM +!! subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in stc ,wcnd ,fcrmax ,iloc ,jloc , & !in sh2o ,zwt ,wa ,wt , & !inout @@ -8678,7 +9109,8 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in fff = parameters%bexp(iwt) / 3.0 ! calibratable, c.he changed based on gy niu's update rsbmx = hk(iwt) * 1.0e3 * exp(3.0) ! mm/s, calibratable, c.he changed based on gy niu's update - qdis = (1.0-fcrmax)*rsbmx*exp(-parameters%timean)*exp(-fff*(zwt-2.0)) +! qdis = (1.0-fcrmax)*rsbmx*exp(-parameters%timean)*exp(-fff*(zwt-2.0)) + qdis = (1.0-fcrmax)*rsbmx*exp(-parameters%timean)*exp(-fff*zwt) ! c.he changed based on gy niu's update ! matric potential at the layer above the water table @@ -8689,7 +9121,9 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in ! recharge rate qin to groundwater - ka = hk(iwt) +! ka = hk(iwt) +! harmonic average, c.he changed based on gy niu's update + ka = 2.0*(hk(iwt)*parameters%dksat(iwt)*1.0e3) / (hk(iwt)+parameters%dksat(iwt)*1.0e3) wh_zwt = - zwt * 1.e3 !(mm) wh = smpfz - znode(iwt)*1.e3 !(mm) @@ -8914,6 +9348,7 @@ end subroutine shallowwatertable !== begin carbon =================================================================================== !>\ingroup NoahMP_LSM +!! subroutine carbon (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil , & !in dzsnso ,stc ,smc ,tv ,tg ,psn , & !in foln ,btran ,apar ,fveg ,igs , & !in @@ -9705,6 +10140,7 @@ end subroutine co2flux_crop !== begin growing_gdd ============================================================================== !>\ingroup NoahMP_LSM +!! subroutine growing_gdd (parameters, & !in t2m , dt, julian, & !in gdd , & !inout @@ -9714,19 +10150,19 @@ subroutine growing_gdd (parameters, & !in ! input type (noahmp_parameters), intent(in) :: parameters - real (kind=kind_phys) , intent(in) :: t2m !air temperature - real (kind=kind_phys) , intent(in) :: dt !time step (s) - real (kind=kind_phys) , intent(in) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) + real (kind=kind_phys) , intent(in) :: t2m !< air temperature + real (kind=kind_phys) , intent(in) :: dt !< time step (s) + real (kind=kind_phys) , intent(in) :: julian !< julian day of year (fractional) ( 0 <= julian < yearlen ) ! input and output - real (kind=kind_phys) , intent(inout) :: gdd !growing degress days + real (kind=kind_phys) , intent(inout) :: gdd !< growing degress days ! output - integer , intent(out) :: ipa !planting index index(0=off, 1=on) - integer , intent(out) :: iha !havestindex(0=on,1=off) - integer , intent(out) :: pgs !plant growth stage(1=s1,2=s2,3=s3) + integer , intent(out) :: ipa !< planting index index(0=off, 1=on) + integer , intent(out) :: iha !< havestindex(0=on,1=off) + integer , intent(out) :: pgs !< plant growth stage(1=s1,2=s2,3=s3) !local @@ -9802,6 +10238,7 @@ end subroutine growing_gdd !== begin psn_crop ================================================================================= !>\ingroup NoahMP_LSM +!! subroutine psn_crop ( parameters, & !in soldn, xlai,t2m, & !in psncrop ) !out @@ -9810,10 +10247,10 @@ subroutine psn_crop ( parameters, & !in ! input type (noahmp_parameters), intent(in) :: parameters - real (kind=kind_phys) , intent(in) :: soldn ! downward solar radiation - real (kind=kind_phys) , intent(in) :: xlai ! lai - real (kind=kind_phys) , intent(in) :: t2m ! air temp - real (kind=kind_phys) , intent(out) :: psncrop ! + real (kind=kind_phys) , intent(in) :: soldn !< downward solar radiation + real (kind=kind_phys) , intent(in) :: xlai !< lai + real (kind=kind_phys) , intent(in) :: t2m !< air temp + real (kind=kind_phys) , intent(out) :: psncrop !< !local @@ -9982,31 +10419,35 @@ end subroutine psn_crop !== begin noahmp_options =========================================================================== !>\ingroup NoahMP_LSM - subroutine noahmp_options(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc ,iopt_frz , & - iopt_inf ,iopt_rad ,iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc, & - iopt_rsf , iopt_soil, iopt_pedo, iopt_crop ,iopt_trs ) +!! + subroutine noahmp_options(idveg , iopt_crs , iopt_btr , iopt_run , iopt_sfc , iopt_frz , & + iopt_inf, iopt_rad , iopt_alb , iopt_snf , iopt_tbot, iopt_stc , & + iopt_rsf, iopt_soil, iopt_pedo, iopt_crop, iopt_trs , iopt_diag, & + iopt_z0m ) implicit none - integer, intent(in) :: idveg !dynamic vegetation (1 -> off ; 2 -> on) with opt_crs = 1 - integer, intent(in) :: iopt_crs !canopy stomatal resistance (1-> ball-berry; 2->jarvis) - integer, intent(in) :: iopt_btr !soil moisture factor for stomatal resistance (1-> noah; 2-> clm; 3-> ssib) - integer, intent(in) :: iopt_run !runoff and groundwater (1->simgm; 2->simtop; 3->schaake96; 4->bats) - integer, intent(in) :: iopt_sfc !surface layer drag coeff (ch & cm) (1->m-o; 2->chen97) - integer, intent(in) :: iopt_frz !supercooled liquid water (1-> ny06; 2->koren99) - integer, intent(in) :: iopt_inf !frozen soil permeability (1-> ny06; 2->koren99) - integer, intent(in) :: iopt_rad !radiation transfer (1->gap=f(3d,cosz); 2->gap=0; 3->gap=1-fveg) - integer, intent(in) :: iopt_alb !snow surface albedo (1->bats; 2->class) - integer, intent(in) :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) - integer, intent(in) :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah) - - integer, intent(in) :: iopt_stc !snow/soil temperature time scheme (only layer 1) - ! 1 -> semi-implicit; 2 -> full implicit (original noah) - integer, intent(in) :: iopt_rsf !surface resistance (1->sakaguchi/zeng; 2->seller; 3->mod sellers; 4->1+snow) - integer, intent(in) :: iopt_soil !soil parameters set-up option - integer, intent(in) :: iopt_pedo !pedo-transfer function (1->saxton and rawls) - integer, intent(in) :: iopt_crop !crop model option (0->none; 1->liu et al.) - integer, intent(in) :: iopt_trs !thermal roughness scheme option (1->z0h=z0; 2->rb reversed) + integer, intent(in) :: idveg !< dynamic vegetation (1 -> off ; 2 -> on) with opt_crs = 1 + integer, intent(in) :: iopt_crs !< canopy stomatal resistance (1-> ball-berry; 2->jarvis) + integer, intent(in) :: iopt_btr !< soil moisture factor for stomatal resistance (1-> noah; 2-> clm; 3-> ssib) + integer, intent(in) :: iopt_run !< runoff and groundwater (1->simgm; 2->simtop; 3->schaake96; 4->bats) + integer, intent(in) :: iopt_sfc !< surface layer drag coeff (ch & cm) (1->m-o; 2->chen97) + integer, intent(in) :: iopt_frz !< supercooled liquid water (1-> ny06; 2->koren99) + integer, intent(in) :: iopt_inf !< frozen soil permeability (1-> ny06; 2->koren99) + integer, intent(in) :: iopt_rad !< radiation transfer (1->gap=f(3d,cosz); 2->gap=0; 3->gap=1-fveg) + integer, intent(in) :: iopt_alb !< snow surface albedo (1->bats; 2->class) + integer, intent(in) :: iopt_snf !< rainfall & snowfall (1-jordan91; 2->bats; 3->noah) + integer, intent(in) :: iopt_tbot !< lower boundary of soil temperature (1->zero-flux; 2->noah) + + integer, intent(in) :: iopt_stc !< snow/soil temperature time scheme (only layer 1) + !! 1 -> semi-implicit; 2 -> full implicit (original noah) + integer, intent(in) :: iopt_rsf !< surface resistance (1->sakaguchi/zeng; 2->seller; 3->mod sellers; 4->1+snow) + integer, intent(in) :: iopt_soil !< soil parameters set-up option + integer, intent(in) :: iopt_pedo !< pedo-transfer function (1->saxton and rawls) + integer, intent(in) :: iopt_crop !< crop model option (0->none; 1->liu et al.) + integer, intent(in) :: iopt_trs !< thermal roughness scheme option (1->z0h=z0; 2->rb reversed) + integer, intent(in) :: iopt_diag !< surface 2m t/q diagnostic approach + integer, intent(in) :: iopt_z0m !< momentum roughness length option ! ------------------------------------------------------------------------------------------------- @@ -10028,9 +10469,13 @@ subroutine noahmp_options(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc opt_pedo = iopt_pedo opt_crop = iopt_crop opt_trs = iopt_trs + opt_diag = iopt_diag + opt_z0m = iopt_z0m end subroutine noahmp_options +!>\ingroup NoahMP_LSM +!! subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & p1d ,psfcpa,pblhx ,dx ,znt , & ep_1, ep_2, cp, & @@ -10038,55 +10483,55 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & tsk ,qx ,zlvl ,iz0tlnd,qsfc , & hfx ,qfx ,cm ,chs ,chs2 , & cqs2 , & - rmolx ,ust , rbx, fmx, fhx,stressx,& + rmolx ,ust , rbx, fmx, fhx,stressx,& fm10x, fh2x, wspdx,flhcx,flqcx) -!------------------------------------------------------------------- - implicit none -!------------------------------------------------------------------- - -! input +!------------------------------------------------------------------- + implicit none +!------------------------------------------------------------------- + +! input - integer,intent(in ) :: iloc - integer,intent(in ) :: jloc + integer,intent(in ) :: iloc + integer,intent(in ) :: jloc integer, intent(in) :: itime integer, intent(in) :: psi_opt - integer, intent(in) :: isice ! for the glacier/snowh > 0.1m - - real(kind=kind_phys), intent(in ) :: pblhx ! planetary boundary layer height - real(kind=kind_phys), intent(in ) :: tsk ! skin temperature - real(kind=kind_phys), intent(in ) :: psfcpa ! pressure in pascal - real(kind=kind_phys), intent(in ) :: p1d !lowest model layer pressure (pa) - real(kind=kind_phys), intent(in ) :: t1d !lowest model layer temperature - real(kind=kind_phys), intent(in ) :: qx !water vapor specific humidity (kg/kg) from input - real(kind=kind_phys), intent(in ) :: zlvl ! thickness of lowest full level layer - real(kind=kind_phys), intent(in ) :: hfx ! sensible heat flux - real(kind=kind_phys), intent(in ) :: qfx ! moisture flux - real(kind=kind_phys), intent(in ) :: dx ! horisontal grid spacing - real(kind=kind_phys), intent(in ) :: ux ! u and v winds - real(kind=kind_phys), intent(in ) :: vx - real(kind=kind_phys), intent(in ) :: znt ! z0m in m or inout - real(kind=kind_phys), intent(in ) :: snwh ! in mm + integer, intent(in) :: isice !< for the glacier/snowh > 0.1m + + real(kind=kind_phys), intent(in ) :: pblhx !< planetary boundary layer height + real(kind=kind_phys), intent(in ) :: tsk !< skin temperature + real(kind=kind_phys), intent(in ) :: psfcpa !< pressure in pascal + real(kind=kind_phys), intent(in ) :: p1d !< lowest model layer pressure (pa) + real(kind=kind_phys), intent(in ) :: t1d !< lowest model layer temperature + real(kind=kind_phys), intent(in ) :: qx !< water vapor specific humidity (kg/kg) from input + real(kind=kind_phys), intent(in ) :: zlvl !< thickness of lowest full level layer + real(kind=kind_phys), intent(in ) :: hfx !< sensible heat flux + real(kind=kind_phys), intent(in ) :: qfx !< moisture flux + real(kind=kind_phys), intent(in ) :: dx !< horisontal grid spacing + real(kind=kind_phys), intent(in ) :: ux !< u and v winds + real(kind=kind_phys), intent(in ) :: vx !< + real(kind=kind_phys), intent(in ) :: znt !< z0m in m or inout + real(kind=kind_phys), intent(in ) :: snwh !< in mm real(kind=kind_phys), intent(in ) :: ep_1 real(kind=kind_phys), intent(in ) :: ep_2 real(kind=kind_phys), intent(in ) :: cp -! optional vars +! optional vars - integer,optional,intent(in ) :: iz0tlnd + integer,optional,intent(in ) :: iz0tlnd real(kind=kind_phys), intent(inout) :: qsfc - real(kind=kind_phys), intent(inout) :: ust - real(kind=kind_phys), intent(inout) :: chs - real(kind=kind_phys), intent(inout) :: chs2 - real(kind=kind_phys), intent(inout) :: cqs2 - real(kind=kind_phys), intent(inout) :: cm + real(kind=kind_phys), intent(inout) :: ust + real(kind=kind_phys), intent(inout) :: chs + real(kind=kind_phys), intent(inout) :: chs2 + real(kind=kind_phys), intent(inout) :: cqs2 + real(kind=kind_phys), intent(inout) :: cm - real(kind=kind_phys), intent(inout) :: rmolx + real(kind=kind_phys), intent(inout) :: rmolx real(kind=kind_phys), intent(inout) :: rbx real(kind=kind_phys), intent(inout) :: fmx real(kind=kind_phys), intent(inout) :: fhx @@ -10096,57 +10541,57 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & real(kind=kind_phys), intent(inout) :: wspdx real(kind=kind_phys), intent(inout) :: flhcx - real(kind=kind_phys), intent(inout) :: flqcx + real(kind=kind_phys), intent(inout) :: flqcx real(kind=kind_phys) :: zolx real(kind=kind_phys) :: molx - -! diagnostics out -! real, intent(out) :: u10 -! real, intent(out) :: v10 -! real, intent(out) :: th2 -! real, intent(out) :: t2 -! real, intent(out) :: q2 -! real, intent(out) :: qsfc - - -! local - - real(kind=kind_phys) :: za ! height of full-sigma level - real(kind=kind_phys) :: thvx ! virtual potential temperature - real(kind=kind_phys) :: zqkl ! height of upper half level - real(kind=kind_phys) :: zqklp1 ! height of lower half level (surface) - real(kind=kind_phys) :: thx ! potential temperature - real(kind=kind_phys) :: psih ! similarity function for heat - real(kind=kind_phys) :: psih2 ! similarity function for heat 2m - real(kind=kind_phys) :: psih10 ! similarity function for heat 10m - real(kind=kind_phys) :: psim ! similarity function for momentum - real(kind=kind_phys) :: psim2 ! similarity function for momentum 2m - real(kind=kind_phys) :: psim10 ! similarity function for momentum 10m - - real(kind=kind_phys) :: gz1oz0 ! log(za/z0) - real(kind=kind_phys) :: gz2oz0 ! log(z2/z0) - real(kind=kind_phys) :: gz10oz0 ! log(z10/z0) - - real(kind=kind_phys) :: rhox ! density - real(kind=kind_phys) :: govrth ! g/theta for stability l - real(kind=kind_phys) :: tgdsa ! tsk - real(kind=kind_phys) :: tvir ! temporal variable src4 -> tvir - real(kind=kind_phys) :: thgb ! potential temperature ground - real(kind=kind_phys) :: psfcx ! surface pressure - real(kind=kind_phys) :: cpm - real(kind=kind_phys) :: qgh - - integer :: n,i,k,kk,l,nzol,nk,nzol2,nzol10 + +! diagnostics out +! real, intent(out) :: u10 +! real, intent(out) :: v10 +! real, intent(out) :: th2 +! real, intent(out) :: t2 +! real, intent(out) :: q2 +! real, intent(out) :: qsfc + + +! local + + real(kind=kind_phys) :: za ! height of full-sigma level + real(kind=kind_phys) :: thvx ! virtual potential temperature + real(kind=kind_phys) :: zqkl ! height of upper half level + real(kind=kind_phys) :: zqklp1 ! height of lower half level (surface) + real(kind=kind_phys) :: thx ! potential temperature + real(kind=kind_phys) :: psih ! similarity function for heat + real(kind=kind_phys) :: psih2 ! similarity function for heat 2m + real(kind=kind_phys) :: psih10 ! similarity function for heat 10m + real(kind=kind_phys) :: psim ! similarity function for momentum + real(kind=kind_phys) :: psim2 ! similarity function for momentum 2m + real(kind=kind_phys) :: psim10 ! similarity function for momentum 10m + + real(kind=kind_phys) :: gz1oz0 ! log(za/z0) + real(kind=kind_phys) :: gz2oz0 ! log(z2/z0) + real(kind=kind_phys) :: gz10oz0 ! log(z10/z0) + + real(kind=kind_phys) :: rhox ! density + real(kind=kind_phys) :: govrth ! g/theta for stability l + real(kind=kind_phys) :: tgdsa ! tsk + real(kind=kind_phys) :: tvir ! temporal variable src4 -> tvir + real(kind=kind_phys) :: thgb ! potential temperature ground + real(kind=kind_phys) :: psfcx ! surface pressure + real(kind=kind_phys) :: cpm + real(kind=kind_phys) :: qgh + + integer :: n,i,k,kk,l,nzol,nk,nzol2,nzol10 real(kind=kind_phys) :: zolzt, zolz0, zolza real(kind=kind_phys) :: gz1ozt,gz2ozt,gz10ozt - - real(kind=kind_phys) :: pl,thcon,tvcon,e1 - real(kind=kind_phys) :: zl,tskv,dthvdz,dthvm,vconv,rzol,rzol2,rzol10,zol2,zol10 - real(kind=kind_phys) :: dtg,psix,dtthx,psix10,psit,psit2,psiq,psiq2,psiq10 - real(kind=kind_phys) :: fluxc,vsgd,z0q,visc,restar,czil,restar2 + + real(kind=kind_phys) :: pl,thcon,tvcon,e1 + real(kind=kind_phys) :: zl,tskv,dthvdz,dthvm,vconv,rzol,rzol2,rzol10,zol2,zol10 + real(kind=kind_phys) :: dtg,psix,dtthx,psix10,psit,psit2,psiq,psiq2,psiq10 + real(kind=kind_phys) :: fluxc,vsgd,z0q,visc,restar,czil,restar2 real(kind=kind_phys) :: dqg real(kind=kind_phys) :: tabs @@ -10158,12 +10603,12 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & real(kind=kind_phys) :: qstar real(kind=kind_phys) :: ep2 real(kind=kind_phys) :: ep_3 -!------------------------------------------------------------------- +!------------------------------------------------------------------- - psfcx=psfcpa/1000. ! to kPa for saturation check + psfcx=psfcpa/1000. ! to kPa for saturation check ep2=ep_2 ep_3=1.-ep_2 - + if (itime == 1) then !init SP, MR if (isice == 0) then tabs = 0.5*(tsk + t1d) @@ -10229,24 +10674,24 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & endif endif !done INIT if itime=1 -! convert (tah or tgb = tsk) temperature to potential temperature. - tgdsa = tsk +! convert (tah or tgb = tsk) temperature to potential temperature. + tgdsa = tsk thgb = tsk*(p1000mb/psfcpa)**(rair/cpair) !psfcpa is pa ! store virtual, virtual potential and potential temperature - pl = p1d/1000. - thx = t1d*(p1000mb*0.001/pl)**(rair/cpair) + pl = p1d/1000. + thx = t1d*(p1000mb*0.001/pl)**(rair/cpair) t1dc = t1d - 273.15 - thvx = thx*(1.+ep_1*qx) !qx is SH from input + thvx = thx*(1.+ep_1*qx) !qx is SH from input tvir = t1d*(1.+ep_1*qx) - rhox=psfcx*1000./(rair*tvir) - govrth=grav/thx + rhox=psfcx*1000./(rair*tvir) + govrth=grav/thx za = zlvl - - !za=0.5*dz8w + + !za=0.5*dz8w ! directly from input; check units @@ -10281,21 +10726,21 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & ! cpm=cp*(1.+0.84*qx) ! qx is SH cpm=cp*(1.+0.84*qx/(1.0-qx) ) - wspdx=sqrt(ux*ux+vx*vx) + wspdx=sqrt(ux*ux+vx*vx) - tskv=thgb*(1.+ep_1*qsfc) !avg with tsurf not used - dthvdz=(thvx-tskv) + tskv=thgb*(1.+ep_1*qsfc) !avg with tsurf not used + dthvdz=(thvx-tskv) - fluxc = max(hfx/rhox/cp + ep_1*tskv*qfx/rhox,0.) !hfx + qfx are fluxes units: wm^-2 and kg m^-2 s^-1 -! vconv = vconvc*(g/tgdsa*pblh*fluxc)**.33 + fluxc = max(hfx/rhox/cp + ep_1*tskv*qfx/rhox,0.) !hfx + qfx are fluxes units: wm^-2 and kg m^-2 s^-1 +! vconv = vconvc*(g/tgdsa*pblh*fluxc)**.33 vconv = vconvc*(grav/tgdsa*min(1.5*pblhx,4000.0)*fluxc)**.33 !wstar -! vsgd = 0.32 * (max(dx/5000.-1.,0.))**.33 +! vsgd = 0.32 * (max(dx/5000.-1.,0.))**.33 - vsgd = min(0.32 * (max(dx/5000.-1.,0.))**.33,0.5) - wspdx=sqrt(wspdx*wspdx+vconv*vconv+vsgd*vsgd) - wspdx=max(wspdx,0.1) !0.1 is wmin - rbx=govrth*za*dthvdz/(wspdx*wspdx) !buld rich # + vsgd = min(0.32 * (max(dx/5000.-1.,0.))**.33,0.5) + wspdx=sqrt(wspdx*wspdx+vconv*vconv+vsgd*vsgd) + wspdx=max(wspdx,0.1) !0.1 is wmin + rbx=govrth*za*dthvdz/(wspdx*wspdx) !buld rich # if (itime == 1) then rbx=max(rbx,-2.0) @@ -10306,7 +10751,7 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & endif -! visc=(1.32+0.009*(t1d-273.15))*1.e-5 +! visc=(1.32+0.009*(t1d-273.15))*1.e-5 ! kinematic viscosity @@ -10316,7 +10761,7 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & !compute roughness reynolds number (restar) using default znt !the GFS option has been removed - restar=max(ust*znt/visc,0.1) + restar=max(ust*znt/visc,0.1) ! get zt, zq based on the input ! the GFS roughness option and spp_pbl have been removed @@ -10550,6 +10995,8 @@ subroutine sfcdif4(iloc ,jloc ,ux ,vx ,t1d , & end subroutine sfcdif4 +!>\ingroup NoahMP_LSM +!! subroutine zilitinkevich_1995(z_0,zt,zq,restar,ustar,vkc,& & landsea,iz0tlnd2,spp_pbl,rstoch) @@ -10614,6 +11061,7 @@ subroutine zilitinkevich_1995(z_0,zt,zq,restar,ustar,vkc,& end subroutine zilitinkevich_1995 +!>\ingroup NoahMP_LSM !!data. the formula for land uses a constant ratio (z_0/7.4) taken !!from garratt (1992). subroutine garratt_1992(zt,zq,z_0,ren,landsea) @@ -10811,13 +11259,15 @@ subroutine li_etal_2010(zl, rib, zaz0, z0zt) end subroutine li_etal_2010 !------------------------------------------------------------------- +!>\ingroup NoahMP_LSM +!! real*8 function zolri(ri,za,z0,zt,zol1,psi_opt) - ! this iterative algorithm was taken from the revised surface layer - ! scheme in wrf-arw, written by pedro jimenez and jimy dudhia and - ! summarized in jimenez et al. (2012, mwr). this function was adapted - ! to input the thermal roughness length, zt, (as well as z0) and use initial - ! estimate of z/l. + !> this iterative algorithm was taken from the revised surface layer + !! scheme in wrf-arw, written by pedro jimenez and jimy dudhia and + !! summarized in jimenez et al. (2012, mwr). this function was adapted + !! to input the thermal roughness length, zt, (as well as z0) and use initial + !! estimate of z/l. implicit none real (kind=kind_phys), intent(in) :: ri,za,z0,zt,zol1 @@ -10997,6 +11447,8 @@ real*8 function zolrib(ri,za,z0,zt,logz0,logzt,zol1,psi_opt) end function !==================================================================== +!>\ingroup NoahMP_LSM +!! subroutine psi_init(psi_opt,errmsg,errflg) integer :: n,psi_opt @@ -11070,7 +11522,7 @@ real*8 function psim_unstable_full(zolf) x=(1.-16.*zolf)**.25 !psimk=2*alog(0.5*(1+x))+alog(0.5*(1+x*x))-2.*atan(x)+2.*atan(1.) - psimk=2.*log(0.5*(1+x))+log(0.5*(1+x*x))-2.*atan(x)+2.*atan1 + psimk=2.*dlog(0.5*(1+x))+dlog(0.5*(1+x*x))-2.*atan(x)+2.*atan1 ym=(1.-10.*zolf)**onethird !psimc=(3./2.)*log((ym**2.+ym+1.)/3.)-sqrt(3.)*atan((2.*ym+1)/sqrt(3.))+4.*atan(1.)/sqrt(3.)