diff --git a/.gitmodules b/.gitmodules index a2ea2de84b..a736a14c68 100644 --- a/.gitmodules +++ b/.gitmodules @@ -36,7 +36,7 @@ fxDONOTUSEurl = https://github.com/NGEET/fates [submodule "cism"] path = components/cism url = https://github.com/ESCOMP/CISM-wrapper -fxtag = cismwrap_2_2_011 +fxtag = cismwrap_2_2_013 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 49b0817bbd..ea562ee749 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -148,8 +148,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/isotopes/atm_delta_C14_CMIP6_SSP5B_3x1_global_1850-2100_yearly_c181209.nc -lnd/clm2/isotopes/ctsmforc.Graven.atm_delta_C14_CMIP7_360x720_1700-2023_yearly_v3.0_c251117.nc -share/meshes/360x720_120830_ESMFmesh_c20210507_cdf5.nc +lnd/clm2/isotopes/ctsmforc.Graven.atm_delta_C14_CMIP7_360x720_1700-2023_yearly_v3.0_tweaked_latlons_c260108.nc +share/meshes/360x720_120830_ESMFmesh_tweaked_latlons_c20260108.nc 2018 @@ -927,9 +927,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=0.9x1.25 maxpft=17 mask=tx2_3v2 use_cn=.false. use_crop=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.true. + hgrid=0.9x1.25 maxpft=17 mask=tx2_3v2 use_cn=.false. use_crop=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.true. @@ -1420,12 +1422,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). phys="clm6_0" >lnd/clm2/initdata_esmf/ctsm5.4/ctsm5.4.CMIP7_ciso_ctsm5.3.075_SP_f09_127_1850.clm2.r.0102-01-01-00000.nc + lnd/clm2/initdata_esmf/ctsm5.4/ctsm5.4.CMIP7_ciso_ctsm5.3.075_f09_124_pSASU.clm2.r.0161-01-01-00000.nc - + lnd/clm2/initdata_esmf/ctsm5.4/ctsm5.4.CMIP7_ciso_ctsm5.3.075_ne30_123_pSASU.clm2.r.0161-01-01-00000.nc +>lnd/clm2/initdata_esmf/ctsm5.4/ctsm5.4.CMIP7_ciso_ctsm5.4.004_bgc_ne30_130_pSASU_greenland.clm2.r.0121-01-01-00000.nc + + I1850Clm60SpG + 1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV + + + + I1850Clm60SpGa + 1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_CISM2%AIS-EVOLVE_SWAV + + + + I1850Clm60SpGag + 1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_CISM2%AIS-EVOLVE%GRIS-EVOLVE_SWAV + + I1850Clm60BgcCropG 1850_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV @@ -731,6 +746,11 @@ 1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_SROF_CISM2%AIS-EVOLVE%GRIS-EVOLVE_SWAV + + I1850Clm60SpRsGag + 1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_CISM2%AIS-EVOLVE%GRIS-EVOLVE_SWAV + + I1850Clm60SpRs 1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index b00f3e720e..fed5e8da74 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -97,12 +97,6 @@ Restart issues with default "inactive" fields added to history by hist_all_fields. - - - FAIL - #3453 - - FAIL @@ -189,24 +183,6 @@ - - - FAIL - #2310 - - - - - - FAIL - #2310 - - - FAIL - #2310 - - - FAIL @@ -214,46 +190,6 @@ - - - FAIL - #2310 - - - - - - FAIL - #2310 - - - FAIL - #2310 - - - - - - FAIL - #2310 - - - FAIL - #2310 - - - - - - FAIL - #2310 - - - FAIL - #2310 - - - FAIL @@ -261,28 +197,6 @@ - - - FAIL - #2310 - - - FAIL - #2310 - - - - - - FAIL - #2310 - - - FAIL - #2310 - - - - - - FAIL - #3383 - - - - - - FAIL - #3383 - - FAIL diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index c651295d0e..b2701a333f 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -261,6 +261,15 @@ + + + + + + + + + diff --git a/components/cism b/components/cism index d18e0a3e1a..977367bdef 160000 --- a/components/cism +++ b/components/cism @@ -1 +1 @@ -Subproject commit d18e0a3e1aa97e8525e239904d6b0dea39886f05 +Subproject commit 977367bdef637731ca4fe4dd0ca66ad6b6642b4f diff --git a/doc/.ChangeLog_template b/doc/.ChangeLog_template index 764bac023c..2603759310 100644 --- a/doc/.ChangeLog_template +++ b/doc/.ChangeLog_template @@ -147,8 +147,10 @@ Changes answers relative to baseline: changes to state fields usually grow to greater than roundoff as the simulation progresses. If this tag changes climate list the run(s) done to evaluate the new - climate (from https://github.com/NCAR/LMWG_dev) - - issue number(s): + climate. Preferably in https://github.com/NCAR/LMWG_dev (or give details below) + - LMWG_dev issue number(s): + + - details (casename, machine, user, link to plots etc.) [if not in LMWG_dev] Other details ------------- diff --git a/doc/ChangeLog b/doc/ChangeLog index 55b07fbe05..d249248af9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,406 @@ =============================================================== +Tag name: ctsm5.4.016 +Originator(s): samrabin (Sam Rabin, UCAR/TSS) +Date: Fri Feb 6 09:09:56 MST 2026 +One-line Summary: Merge b4b-dev to master + +Purpose and description of changes +---------------------------------- + +Merge b4b-dev to master + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description): +- [ESCOMP/CTSM Issue #3696: CropPhenology: Rename leafout to gddtsoi](https://github.com/ESCOMP/CTSM/issues/3696) +- [ESCOMP/CTSM Issue #3057: error in errsol computation in BalanceCheckMod reports the wrong albedo values](https://github.com/ESCOMP/CTSM/issues/3057) + + +Notes of particular relevance for users +--------------------------------------- + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): +- New `suppress_gddmaturity_warning` namelist flag, default false. + + +Notes of particular relevance for developers: +--------------------------------------------- + +Changes to tests or testing: +- New Python unit and system tests. +- New Fortran unit tests. +- RXCROPMATURITY_ tests added to expected failure list. Will be resolved soon. + + +Testing summary: +---------------- + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - OK + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +- [ESCOMP/CTSM Pull Request #3713: Factor out new subroutine CropPhase_OnePatch](https://github.com/ESCOMP/CTSM/pull/3713) +- [ESCOMP/CTSM Pull Request #3633: Add history outputs: Crop biomass and LAI per harvest](https://github.com/ESCOMP/CTSM/pull/3633) +- [ESCOMP/CTSM Pull Request #3727: Minor improvements to generate_gdd20_baseline.py](https://github.com/ESCOMP/CTSM/pull/3727) +- [ESCOMP/CTSM Pull Request #3710: Improve radiation balance check](https://github.com/ESCOMP/CTSM/pull/3710) +- [ESCOMP/CTSM Pull Request #3729: generate_gdds: Work on arguments](https://github.com/ESCOMP/CTSM/pull/3729) +- [ESCOMP/CTSM Pull Request #3738: generate_gdds: Get file lists earlier](https://github.com/ESCOMP/CTSM/pull/3738) +- [ESCOMP/CTSM Pull Request #3741: ctsm5.4.016: b4b-dev merge 2026-02-05](https://github.com/ESCOMP/CTSM/pull/3741) + +=============================================================== +=============================================================== +Tag name: ctsm5.4.015 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Tue Feb 3 12:29:48 AM MST 2026 +One-line Summary: Update CISM to latest version with answer changes + +Purpose and description of changes +---------------------------------- + +Update the CISM submodule to the latest tag used in cesm3_0_beta0b. This includes cismwrap_2_2_012 and cismwrap_2_2_013, both of which includes answer changes for CISM due to changes in namelist defaults. Add a new test for running both Antarctic and Greenland ice sheets. Add new compsets for CISM with Clm60. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + + Fixes #3731 -- Add a CISM test for both AIS and GIS + Fixes #3732 -- Add CISM compsets for Clm60 physics + +Notes of particular relevance for users +--------------------------------------- + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + +Changes to tests or testing: + Added a test that runs both the Antarctic Ice Sheet (AIS) and Greenland Ice Sheet (GIS) + + +Testing summary: regular +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes, for compsets using CISM + + Summarize any changes to answers, i.e., + - what code configurations: compsets with CISM active (end in G, Ga, or Gag) + - what platforms/compilers: all + - nature of change: new climate over glaciers + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): cism + cism to cismwrap_2_2_013 + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + + #3733 -- Update to cismwrap_2_2_013 + +=============================================================== +=============================================================== +Tag name: ctsm5.4.014 +Originator(s): mvdebolskiy +Date: Thu Jan 29 03:28:03 PM MST 2026 +One-line Summary: Fix for xm2 and revise logic for excess ice melt + +Purpose and description of changes +---------------------------------- + +A bug fix in excess ice melt calculation. Previously, we have set +incorrectly xm2=xm-h2osoi_ice after h2osoi_ice has already been updated. +This resulted in extra heat being available to spend on melting excess_ice +since when all h2osoi_ice has been melted (xm2=xm). This fixed now, in +addition Phasechange_beta subroutine in SoilTemperatureMod has been +renamed to Phasechange by swensosc's suggestion. + +The changes are generally small and only to a few points, so NOT marking it as a +significant change in answers. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +Fixes #3678 -- Logic error in excess ice melt calculation + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + The changes in short simulations are negligible, but a few points can show larger differences if run long enough. The following lists the min and max differences for a 40 year simulation. + https://github.com/ESCOMP/CTSM/pull/3718#issuecomment-3810263334 + +Notes of particular relevance for developers: +--------------------------------------------- + +Testing summary: +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes! when use_excess_ice is TRUE + + Summarize any changes to answers, i.e., + - any configuration with use_excess_ice=.true. + - larger than roundoff changes in the soil thermal and + moisture state in gridcells where excess ice is present + in the soil at the start of the simulations. Most of the + most of the gridcells will have little differences (1e-6), + however, the difference will grow for longer (>10y) runs. + + If this tag changes climate list the run(s) done to evaluate the new + climate (from https://github.com/NCAR/LMWG_dev) + - issue number(s): + - NCAR/LMWG_dev#140 + +Other details +------------- + +Pull Requests that document the changes (include PR ids): + + https://github.com/ESCOMP/CTSM/pull/3718 + +=============================================================== +=============================================================== +Tag name: ctsm5.4.013 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Wed Jan 28 12:24:02 AM MST 2026 +One-line Summary: Patch the Greenland snow hole with initial conditions for ne30 and tweak the C14 isotope latitudes + +Purpose and description of changes +---------------------------------- + +Point to tweaked C14 Isotope file so that the latitude line is straight and regrid doesn't change depending on processor count. + +Also bring in a new ne30 finidat (Initial Conditions or IC) file so that the Greenland snow hole won't exist in ne30 initial conditions. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + + Fixes #3708 -- Patch Greenland snow "hole" + Fixes #3716 -- Use "tweaked" lat/lon C14 dataset so that the lattitude line will be straight and answers same on PE layout change + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + ONLY the ne30 IC file was updated, so this doesn't fix other resolutions + And the datm forcing still has the problem of too low snow over Greenland + +Changes made to namelist defaults (e.g., changed parameter values): + Updated: stream_fldfilename_atm_c14 and stream_meshfile_atm_c14 + Updated: finidat for ne30np4.pg3 grid (use the BgcCrop file for both BGC and SP cases) + +Notes of particular relevance for developers: +--------------------------------------------- + +Changes to tests or testing: Removed some expected fails that have been passing + + +Testing summary: regular +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - OK + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes! for f10 ciso cases, and ne30.pg3 cases + + Summarize any changes to answers, i.e., + - what code configurations: All + - what platforms/compilers: All + - nature of change: + minor for f10 Carbon Isotope C14 (the latitude line is straightened) + New IC for ne30.pg3 cases, so startup is different + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + + https://github.com/ESCOMP/CTSM/pull/3711 "ne30 IC to patch Greenland snow hole, Tweaked C14 isotope file" + +=============================================================== +=============================================================== +Tag name: ctsm5.4.012 +Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) +Date: Mon Jan 26 03:13:02 PM MST 2026 +One-line Summary: Fix C-balance error for partly emerged crops + +Purpose and description of changes +---------------------------------- + + In CNPhenology, to the section "plant had emerged before harvest" I added a subsection "plant partly emerged from the ground" that repeats the code from the "else" section just after that's labeled "plant never emerged from the ground." + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #3678 + +Testing summary: +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: Yes + + - Configurations: Four BASELINE tests show DIFFs. Three derecho_intel, one izumi_nag, all four I2000Clm60BgcCrop: + ERP_P64x2_Ld765.f10_f10_mg37.I2000Clm60BgcCrop.derecho_intel.clm-monthly BASELINE ctsm5.4.011: DIFF + ERS_Ly3.f10_f10_mg37.I2000Clm60BgcCrop.derecho_intel BASELINE ctsm5.4.011: DIFF + SMS_Ly2_PS.f19_g17.I2000Clm60BgcCrop.derecho_intel.clm-cropMonthOutput BASELINE ctsm5.4.011: DIFF + SMS_D_Ld65.f10_f10_mg37.I2000Clm60BgcCrop.izumi_nag.clm-FireLi2024GSWP BASELINE ctsm5.4.011: DIFF + - Nature of change: Potentially larger than roundoff (certainly in B-cases) but same climate and rare. + +Other details +------------- +Pull Requests that document the changes (include PR ids): + https://github.com/ESCOMP/ctsm/pull/3702 + +=============================================================== +=============================================================== Tag name: ctsm5.4.011 Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) Date: Thu Jan 22 04:01:52 PM MST 2026 diff --git a/doc/ChangeSum b/doc/ChangeSum index d97c686a6d..a5074a75c6 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,10 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.4.016 samrabin 02/06/2026 Merge b4b-dev to master + ctsm5.4.015 erik 02/03/2026 Update CISM to latest version with answer changes + ctsm5.4.014 mvdebols 01/29/2026 Fix for xm2 and revise logic for excess ice melt + ctsm5.4.013 erik 01/28/2026 Patch the Greenland snow hole with initial conditions for ne30 and tweak the C14 isotope latitudes + ctsm5.4.012 slevis 01/26/2026 Fix C-balance error for partly emerged crops ctsm5.4.011 slevis 01/22/2026 Merge b4b-dev to master ctsm5.4.010 erik 01/21/2026 Update cime to version that changes answers for ERI tests ctsm5.4.009 olyson 01/19/2026 Dewpoint Temperature check for bare ground diff --git a/src/biogeochem/CNPhenologyMod.F90 b/src/biogeochem/CNPhenologyMod.F90 index 12695c9aee..71ec677961 100644 --- a/src/biogeochem/CNPhenologyMod.F90 +++ b/src/biogeochem/CNPhenologyMod.F90 @@ -2619,6 +2619,24 @@ subroutine CropPhenology(num_pcropp, filter_pcropp , & if (tlai(p) > 0._r8) then ! plant had emerged before harvest offset_flag(p) = 1._r8 offset_counter(p) = dt + + ! plant partly emerged from the ground + ! Revert planting transfers; this will replenish the crop seed deficit. + ! We subtract from any existing value in crop_seedc_to_leaf / + ! crop_seedn_to_leaf in the event that we enter this block of + ! code soon after the planting transfer originally occurred. + if (leafc_xfer(p) > 0._r8) then + crop_seedc_to_leaf(p) = crop_seedc_to_leaf(p) - leafc_xfer(p) / dt + crop_seedn_to_leaf(p) = crop_seedn_to_leaf(p) - leafn_xfer(p) / dt + leafc_xfer(p) = 0._r8 + leafn_xfer(p) = leafc_xfer(p) / leafcn_t_evolving(p) + if (use_c13) then + c13_cnveg_carbonstate_inst%leafc_xfer_patch(p) = 0._r8 + endif + if (use_c14) then + c14_cnveg_carbonstate_inst%leafc_xfer_patch(p) = 0._r8 + endif + end if else ! plant never emerged from the ground ! Revert planting transfers; this will replenish the crop seed deficit. ! We subtract from any existing value in crop_seedc_to_leaf / @@ -2635,7 +2653,6 @@ subroutine CropPhenology(num_pcropp, filter_pcropp , & if (use_c14) then c14_cnveg_carbonstate_inst%leafc_xfer_patch(p) = 0._r8 endif - end if ! enter phase 3 while previous criteria fail and next is true; diff --git a/src/biogeophys/SoilTemperatureMod.F90 b/src/biogeophys/SoilTemperatureMod.F90 index 2819894868..367da626e6 100644 --- a/src/biogeophys/SoilTemperatureMod.F90 +++ b/src/biogeophys/SoilTemperatureMod.F90 @@ -78,7 +78,7 @@ module SoilTemperatureMod ! !PRIVATE MEMBER FUNCTIONS: private :: SoilThermProp ! Set therm conduct. and heat cap of snow/soil layers private :: PhaseChangeH2osfc ! When surface water freezes move ice to bottom snow layer - private :: PhaseChange_beta ! Calculation of the phase change within snow and soil layers + private :: PhaseChange ! Calculation of the phase change within snow and soil layers private :: BuildingHAC ! Building Heating and Cooling for simpler method (introduced in CLM4.5) real(r8), private, parameter :: thin_sfclayer = 1.0e-6_r8 ! Threshold for thin surface layer @@ -517,7 +517,7 @@ subroutine SoilTemperature(bounds, num_urbanl, filter_urbanl, num_urbanc, filter dhsdT(bounds%begc:bounds%endc), & waterstatebulk_inst, waterdiagnosticbulk_inst, waterfluxbulk_inst, temperature_inst,energyflux_inst) - call Phasechange_beta (bounds, num_nolakec, filter_nolakec, & + call Phasechange (bounds, num_nolakec, filter_nolakec, & dhsdT(bounds%begc:bounds%endc), & soilstate_inst, waterstatebulk_inst, waterdiagnosticbulk_inst, waterfluxbulk_inst, energyflux_inst, temperature_inst) @@ -1130,7 +1130,7 @@ subroutine PhaseChangeH2osfc (bounds, num_nolakec, filter_nolakec, & end subroutine PhaseChangeH2osfc !----------------------------------------------------------------------- - subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & + subroutine Phasechange (bounds, num_nolakec, filter_nolakec, dhsdT, & soilstate_inst, waterstatebulk_inst, waterdiagnosticbulk_inst, waterfluxbulk_inst, energyflux_inst, temperature_inst) ! ! !DESCRIPTION: @@ -1186,7 +1186,7 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & !----------------------------------------------------------------------- - call t_startf( 'PhaseChangebeta' ) + call t_startf( 'PhaseChange' ) ! Enforce expected array sizes SHR_ASSERT_ALL_FL((ubound(dhsdT) == (/bounds%endc/)), sourcefile, __LINE__) @@ -1279,7 +1279,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & ! If ice exists above melt point, melt some to liquid. if (h2osoi_ice(c,j) > 0._r8 .and. t_soisno(c,j) > tfrz) then imelt(c,j) = 1 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1288,7 +1287,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & ! If liquid exists below melt point, freeze some to ice. if (h2osoi_liq(c,j) > 0._r8 .AND. t_soisno(c,j) < tfrz) then imelt(c,j) = 2 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1310,7 +1308,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & if (h2osoi_ice(c,j) > 0. .AND. t_soisno(c,j) > tfrz) then imelt(c,j) = 1 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1334,7 +1331,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & if (h2osoi_liq(c,j) > supercool(c,j) .AND. t_soisno(c,j) < tfrz) then imelt(c,j) = 2 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1343,7 +1339,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & if (h2osno_no_layers(c) > 0._r8 .AND. j == 1) then if (t_soisno(c,j) > tfrz) then imelt(c,j) = 1 - ! tincc,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1438,14 +1433,18 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & heatr = 0._r8 if (xm(c,j) > 0._r8) then !if there is excess heat to melt the ice h2osoi_ice(c,j) = max(0._r8, wice0(c,j)-xm(c,j)) - heatr = hm(c,j) - hfus*(wice0(c,j)-h2osoi_ice(c,j))/dtime - xm2(c,j) = xm(c,j) - h2osoi_ice(c,j) !excess ice melting - if (h2osoi_ice(c,j) == 0._r8) then ! this might be redundant - if (excess_ice(c,j) >= 0._r8 .and. xm2(c,j)>0._r8 .and. j>=2) then ! if there is excess ice to melt - excess_ice(c,j) = max(0._r8,wexice0(c,j) - xm2(c,j)) - heatr = hm(c,j) - hfus * (wexice0(c,j)-excess_ice(c,j)+wice0(c,j)-h2osoi_ice(c,j)) / dtime + ! If xm > wice0, then all soil ice melts, + ! and the remaining heat (xm2) is used to melt excess ice + xm2(c,j) = xm(c,j) - wice0(c,j) + if (j>=1) then ! soil + if (excess_ice(c,j) >= 0._r8 .and. xm2(c,j)>0._r8) then ! if there is excess ice to melt + excess_ice(c,j) = max(0._r8,wexice0(c,j) - xm2(c,j)) endif - endif !end of excess ice block + heatr = hm(c,j) - hfus * (wexice0(c,j)-excess_ice(c,j)+ & + wice0(c,j)-h2osoi_ice(c,j)) / dtime + else !snow + heatr = hm(c,j) - hfus * (wice0(c,j)-h2osoi_ice(c,j)) / dtime + endif else if (xm(c,j) < 0._r8) then if (j <= 0) then h2osoi_ice(c,j) = min(wmass0(c,j), wice0(c,j)-xm(c,j)) ! snow @@ -1535,10 +1534,10 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & end if end do - call t_stopf( 'PhaseChangebeta' ) + call t_stopf( 'PhaseChange' ) end associate - end subroutine Phasechange_beta + end subroutine Phasechange !----------------------------------------------------------------------- subroutine ComputeGroundHeatFluxAndDeriv(bounds, &