Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding history variables for use with Newton-Krylov #1457

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Nov 23, 2021

  1. Merge tag 'ctsm5.1.dev062' into hist_vars_for_newton_krylov

    Make NUOPC the default driver rather than MCT. Update externals and switch
    tests so nuopc tests are explicit for mct. Fix several issues. Update the README
    files and in-place documentation.
    
    Remove MODEL as a setting for the build system, use COMP_NAME instead.
    Adds a container machine definition in cime.
    
    See README.NUOPC_driver.md at the top level for a description of what changes.
    
    Resolved Conflicts:
    doc/ChangeLog
    doc/ChangeSum
    src/soilbiogeochem/SoilBiogeochemDecompCascadeCNMod.F90
    slevis-lmwg committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    d0e737c View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Merge tag 'ctsm5.1.dev063' into hist_vars_for_newton_krylov

    This tag provides the FATES model access to the fcansno variable to facilitate a correction
    of it's radiation transfer code.
    
    Resolved conflicts:
    doc/ChangeLog
    doc/ChangeSum
    slevis-lmwg committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    b883976 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a29c125 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Merge tag 'ctsm5.1.dev098' into hist_vars_for_newton_krylov

    Correct perched water table calculation
    
    Modifies the calculation of the frost table and perched water table
    layers.
    
    This brings in the answer-changing aspects of the Hillslope Hydrology
    branch (ESCOMP#1715).
    
    Specific changes are:
    
    * PerchedWaterTable
    
    1) Frost table depth
    
    a) original frost table determination looped from the top
    of the soil column downward to the index of the first layer
    whose temperature was <= freezing, and whose neighbor above
    had a temperature above freezing.  The frost table depth is
    then given by the node of that soil layer, i.e. z(k_frz).
    
    b) in the new method, the same index is found, but the
    depth of the frost table is given by the depth of the top
    of the frozen layer, i.e. zi(k_frz-1).  Note zi(k_frz) would
    be the bottom of layer k_frz.
    
    2) Perched water table depth
    
    a) in the original formulation, a loop from k_frz to layer 1
    was used to identify the deepest layer in 1:k_frz whose
    volumetric soil moisture was greater than a threshold given
    by sat_lev (e.g. sat_lev = 0.9).
    
    b) in the new method, the search is only done if k_frz is
    greater than 1.  The rationale is that if k_frz = 1, then
    zwt_perched has already been initialized to the frost_table
    depth (which is equal to the top of the uppermost soil layer),
    and therefore no search is required.
    
    3) Determining perched water table depth within layer
    identified by index k_perch in 2)
    
    a) in the original formulation, the perched water table
    depth was calculated by linearly interpolating between layers
    k_perch and k_perch+1, with no consideration of their relative
    values.  In the case where the deeper layer was drier than the
    layer above it, this could result in values far outside the
    soil layer.
    
    b) in the new formulation, if the deeper layer is drier than the
    layer above it (s1 > s2), then the perched water table depth is
    simply given by the depth of the upper surface of layer k_perch,
    i.e. zi(c,k_perch-1).
    
    * PerchedLateralFlow
    
    1) Removal of icefrac calculation
    
    a) in the original calculation, the frozen layer was included,
    so an ice impedance factor was calculated using icefrac.  If
    only unfrozen layers are used, no ice impedance factor is needed.
    
    b) in the new formulation, the icefrac variable and loop are
    removed.
    
    2) Move loop calculating frost and perched water table depths
    
    a) in the original formulation, the frost and perched water
    table depths were calculated in the same loop as the calculation
    of the lateral flow from the perched saturated zone.
    
    b) in preparation for the hillslope hydrology branch, this
    calculation is moved into its own loop.
    
    3) q_perch calculation
    
    a)in the original formulation, q_perch was calculated by summing
    over layers k_perch to k_frost.  However, because k_frost is now
    identified as the frozen layer, and its depth the top of the frozen
    layer, it should not be included in the calculation; only the
    unfrozen layers above it should be included.
    
    b) in the new formulation, the loop is bounded by k_frost-1 instead
    of k_frost.
    
    4) Removal of water from perched saturated zone
    
    a) the in the original method, the frozen layer (k_frost)
    was included in the loop.  Also, the drainage was defined to be
    negative, which was confusing.
    
    b) in the new method, the frozen layer is not included in the
    loop; water is only removed from the unfrozen layers above k_frost.
    Calculate drainage as positive values, which are then subtracted
    from the soil moisture in each layer.
    
    Resolved conflicts:
    doc/ChangeLog
    doc/ChangeSum
    slevis-lmwg committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    cc7bb89 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Configuration menu
    Copy the full SHA
    85c7114 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Configuration menu
    Copy the full SHA
    f080f39 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2022

  1. Merge tag 'ctsm5.1.dev106' into hist_vars_for_newton_krylov

    Reuse some files generated in initialization when rerunning
    
    A new directory is now in your run directory init_generated_files. These
    two run time generated files - finidat_interp_dest.nc and the land
    fraction file ctsm_landfrac.nc (which is new in this PR) - are put in
    that directory when they are created. Then, if they already exist, they
    are reused rather than being regenerated. (Technically, it looks for a
    status file that flags successful creation of this file.) This applies
    when you rerun a startup (non-restart) run a second or subsequent time,
    as is common when doing development and testing.
    
    For tests, theinit_generated_files directory is removed before running,
    so that rerunning a test will do the same thing the second time.
    
    There are occasional, rare cases when a user would need to manually
    remove the init_generated_files directory – e.g., when changing things
    about N dominant landunits or PFTs.
    
    Also, output was cleaned up in a few cases so that it did not span
    multiple lines.
    
    Resolved conflicts:
    doc/ChangeLog
    doc/ChangeSum
    slevis-lmwg committed Aug 11, 2022
    Configuration menu
    Copy the full SHA
    a5b74c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e6c3c73 View commit details
    Browse the repository at this point in the history