-
Notifications
You must be signed in to change notification settings - Fork 2
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
NGEE Arctic IM1 - Polygonal tundra #10
base: thorntonpe/lnd/IM1
Are you sure you want to change the base?
Conversation
@thorntonpe not ready for merge as we're still working on the forcing data issue, but I suspect this is close enough to final now that it might be worth starting to review. Known issues I plan to resolve:
Items to discuss:
|
Adds another variable of maxalt_ever and its index following existing logic for calculating the maximum active layer thickness (really thaw depth as calculated) to date in the simulation. correct initialization of altmax_ever Changes needed to get altmax_ever values to initialize correctly. Fixes an issue where altmax_ever would be >30 meters regardless of location/climate due to carrying forward the initial conditions. Now includes a spinup_state flag so that it is set as 0 during spinup, and then increases based on thaw depths over non-spinup cases.
Adds excess ground ice to the col_ws / column water state data structure as a varaible needed for NGEE-Arctic Phase 3 IM1 (improved inundation fraction). Not yet connected to any of the new polygonal ground subtypes of the vegetated columns.
Excess ground ice had been templated in these changes as mass/area - changing to a volume/volume basis (and therefore, now unitless).
Changes dimension on excess_ice parameter in water state types from being one value per column to having dimensions (columns, depth in soil)
…ndra, but still needs work defining values for microtopographic parameters before it can be tested
ispolygon is part of lun_pp data structure and not landunit_varcon so does not need to be imported to FracH2OSfc subroutine Fix rank problem with ice wedge polygon microtopographic variables
…small fixes elsewhere
wip - subsidence calculations in polygonal tundra Adds infrastructure for calculating subsidence and related microtopographic parameters based on changes in MAXALT over time. Add iwp_subsidence to column type. Adds ground subsidence variable to col_pp in column type to track subsidence associated with excess ice melting in polygonal tundra. Typo fix in associate call in ActiveLayerMod Small bug-fix to add missing continuation character for new variables in associate in ActiveLayerMod import polygonal tundra types from landunit_varcon Adds import of ilowcenpoly, iflatcenpoly, and ihighcenpoly landunit types to ActiveLayerMod. Fix indexing of ispolygon landunit logical. Logical test of lun_pp%ispolygon needed to have column specified in a place where the whole vector had previously been specified.
Imports the iwp_subsidence variable from col_pp into the SoilHydrologyMod.
Adds linear scaling of various microtopographic parameters in polygonal tundra (depression depth, excluded volume, relief)
Adds tracking for maxalt (really thaw depth) in 1989 for comparision with ATS. Necessary for model development and validation, but should be replaced with something that is more physically based for use outside of the AK north slope. Updates initialization routines to allow for polygonal landunits to be created from namelist option and from polygon type percentages specified on input file. In particular, it allows for four landunits to be created with istsoil ltype on each topounit so that the ice wedge polygons can have their own soil columns as well as be vegetated. The fourth landunit is for non-polygonal natural vegetated ground on the same topounit.
Adds use_polygonal_tundra flag to CanopyStateType as new variables were causing issues when comparing against baseline tests.
Not all polygon types were being imported from landunit_varcon, commit adds the missing polygon types.
wt_polygon had never been allocated in elm_initializeMod, so needs to be added here in order to get polygon weights in surfrdMod.F90
Removes melted excess ice from the profile and also set the initiation for subsidence calculations in 1989 (though this threshold should be replaced for expanding beyond the N Slope of Alaska). Should check melt profiles carefully as the layer structure may be inverted.
Adds logic to read gradz from surfdata file when NGEE Arctic polygonal tundra is turned on. There are already topo_slope variables so should make sure that this additional variable is actually needed.
Calculation of wt_polygon fails when use_polygonal_tundra = .false., adds more checks to prevent out of bounds errors and sets wt_polygon to zero when use_polygonal_tundra = .false. wip - trying to fix wt_nat_patch > 1 from polygons
Some developer tests were reporting DIFF due to additional variables being added to history files (and restart files). This commit adds a flag for these variables using elm_varctl
Previous logic hadn't been adding patches/columns/ and landunits for polygonal tundra. This adds them; code compiles but does not yet run due to something missing in the accounting of landunits (an extra one is included somewhere).
Adds major changes to initialization routines to get landunits for use_polygonal_tundra option to register and be correctly counted. Required some changes to the elm_ptr_* logic as well as changing max_landunit. Now runs, but seems to introduce an issue with the CH4 modules.
Adds an Arctic initialization option that starts with a fully saturated column and a temperature below zero. May need ot also fill with ice.
Moves a bunch of the microtopograhic parameters from col_pp to col_ws, and adds them to the history and restart files (subsidence, excluded volume, mictropographic depression depth and relief). Not water states per se but used in calculating water state vars for polygonal tundra, and there are alot more IO capabilities within col_ws/ColumnDataType.
Fixes a number of bugs that were discovered during an IM1 code review: 1. subsidence was never initialized to 0, therefore, was set to 0.4 when using min(subsidence,spval) 2. runoff calculation needed a conversion factor from mm/day to mm/s. 3. A few of the IWP history file variables were not writing out the correct pointer variable.
Fixes issues in the initialization of wt_lunit and wt_polygon arrays if use_polygonal_tundra is false. Briefly, new indices of wt_lunit and wt_polygon had been initialized, which caused multiple issues including: introduction of nans, floating-point exceptions, and causing issues where sum(array) > 1. Fixes multiple test failures and diffs.
A few problems found in the initialization routines that was causing the new test to fail. Finalizes new ERS test, and moves assignment of wt_lunit weights for polygon cases from initGridCellsMod to surfrdMod
In order to pass the developer tests, landunit_names array needs to have length max_non_poly_unit when no polygonal tundra, but max_lunit with polygonal tundra. Fixes some dims arising due to a change in dimension length on tests that run cprnc against elm files rather than cpl files.
Cleans up various accumulated print statements that are no longer needed and fixes a few type errors remaining in code.
@thorntonpe hi Peter - a few pieces of good news here. I've fixed a few bugs and I think all of the capability is now working here as expected. We're putting this code through a few final tests, and I've done a rebase locally that isn't reflected here yet to remove all the white-space only changes (as I had noticed had been requested by the E3SM team for the IM3 updates). I'm hoping any last changes on our end should be done in the next day or so, so that you can begin reviewing. |
There are a few small performance tweaks that could be made here - the most notable one is moving some of the variable assignments for depression depth, microtopographic relief, and excluded volume that are invariant from biogeophys/ActiveLayerMod.F90 to data_types/ColumnDataType.F90. Otherwise last round of tests was BFB relative to |
Description of changes:
Adds a representation of polygonal tundra that has been parameterized from simulations using the Advanced Terrestrial Simulator. Key changes include:
use_polygonal_tundra = .false.
, wt_polygon is 0 and wt_lunit(:,:,istsoil) is unchanged). Whenuse_polygonal_tundra = .true.
, wt_polygon is read from the surface file as PCT_LCP, PCT_HCP, and PCT_FCP, and then wt_lunit is set as follows: wt_lunit(:,:,isthighcenpoly) = wt_polygon(:,:,ihighcenpoly)*wt_lunit(:,:,istsoil), wt_lunit(:,:,istflatcenpoly) = wt_polygon(:,:,iflatcenpoly)*wt_lunit(:,:,istsoil), wt_lunit(:,:,istlowcenpoly) = wt_polygon(:,:,ilowcenpoly)*wt_lunit(:,:,istsoil). wt_lunit(:,:,istsoil) is then updated as: wt_lunit(:,:,istsoil) - sum(wt_polygon(:,:,:)).Test results: bit-for-bit with respect to 5559a57.
Expected performance impact: minimal when feature is off. When feature is on, adds up to 3 landunits to tundra grid cells, which may increase cost in these grid cells by up to ~4x if the only landunit previously had been istsoil.
cc'ing @chuckaustin @katrinaebennett for awareness