-
Notifications
You must be signed in to change notification settings - Fork 190
Aldivi/gcam gcam6 merge co2 #543
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
Open
aldivi
wants to merge
86
commits into
e3sm-rebase-gcam6
Choose a base branch
from
aldivi/gcam_gcam6_merge_co2
base: e3sm-rebase-gcam6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This includes gcam spinup functionality to generate baseline and restart gcam files (which have been generated and stored in the inputdata directory). The gcam namelist has been updated and new defaults set that point to the inputdata directory. PFT to gcam land type has been updated. land scalar calculation has been updated to deal with some bad input data (this may need to be re-updated later when the inputs are updated). Emissions downscaling has been updated to read in baseline data. Some additional arguments were added to get namelist values. GCAM runs annually with annual land scalar updates. New xml inputs are used for GCAM6, but they have been updated to exclude fuel wood harvest. Reading and writing of scalars and baselines have been updated for CSV files (this includes the baseline elm files for scalar creation). The eigen library header has been included here and is pointed to by the e3sm build scripts. Also set a compiler option in E3SM to not run GCAM in paralled because the libraries are not present. Some additional diagnostics are output.
This isn't currently necessary and will likely be removed soon
Used the aData.set function because it is a value, but this doesn't seem to work either. Strating to output other info to logs.
The runGCAM function now takes an E3SM restart state argument and controls setDensity (which is no longer called separately). The call order is changed such that if the run is a restart run (or branch) GCAM needs to run to set up its current state, then the scalars are updated, then the current period is run. If it is not a restart run the scalars are just updated before GCAM is run.
This part of the code was modified to further constrain the scalar values to avoid outliers. The outlier limit was decreased for the gridded input data. Negative below ground scalars were set to zero.
This part of the code is mainly about updating the carbon scaling. Constrained the scalars between 0.125 and 2. Relaxed the outlier limit to the original 5.2 because this is sufficient and retains 5% more data points.
These untracked files need to be ignored so that they don't cause issues with changing branches and such.
* FE_DIVBYZERO * FE_OVERFLOW * FE_INVALID In addition some fixes to be able to compile GCAM standalone and turn on float exception by defining `E3SM_FLOAT_DEBUG`
The scaling values are now applied to carbon density in addition to ag yields. Some names have changed to more accurately reflect this. A new namelist item allows selection of ag yield scaling separately from carbon density scaling. Bug fix for GCAM region names with a space for setting values - the grid mapping file for GCAM needs spaces, but the one for GLM cannot have spaces. A new carbon density mapping was needed in order to select crop technologies more specifically because IRR and RFD crops have different carbon densities.
…m-core into aldivi/gcam_gcam6_merge_co2 This was a selective merge that brought the CO2 downscaling code into the working code. This was done by using: git merge --no-ff --no-commit <branch> Files unaffected by the co2 code were retained as-is, merge conflicts were resolved in other files, and a few files were brought in directly by auto-merge.
CO2 linearly downscaled grid values have been verified up to the point just prior to being copied to the monthly arrays passed back to the fortran ehc. Restarts also work properly. All base co2 data are now read in upon init, and the 2014 base grids are sclaed to 2015 base gcam global data. Annual scaling uses this 2015 grid as the reference (gcam scalars are also referenced to 2015). Aircraft, international shipping, and other surface are downscaled separately. Base gridded data have been updated accordingly, and a shell script has been added to gcam/tools that generates the corresponding csv files (and their netcdf precurserors).The convergence downscaling code has not been tested. GCAM still throws nan floating point exceptions that the fortran code does not like. The boost library has been added to the repo for portability.
Successfully runs for 1+ years with e3sm v2.1. Requires associated giac and e3sm branches. This branch commit has been set in the parent repos (i think).
fix bug for co2 downscaling
…ore into aldivi/gcam_gcam6_merge_co2 This merges Dalei's quick bug fix with a cleaner version of this code.
This included removing the repo files and removing a boost submodule. Boost is now available in a personal directory, but eventually will be available on the machines. Eigen has been added as a submodule.
The land unit weights need to be summed within a region. A new mapping file contains values that sum to 1 within a cell.
Was trying to access beyond end of array for copying ELM area.
Shut off SeetDataHelper_log and scaler_diagnostics.csv Commented out some co2 diagnostics from coupleLog.
the 'util/testing-framework submodule is not necessary, and it is accessible only on compy. cloning the code fails on other machines, so this submodule has been removed.
The lower precision could have caused non-bfb restarts. The new precision ensures no losses when converting between binary and text via the restaert file.
This isn't absolutely necessary, but it should enable BFB duplication of a full-feedback run using the read scalar capability with scalars written from a full-feedback run. This isn't necessary because 6 decimals is more than enough significant digits for these values; more than this is just a numerical fact rather than value-added information.
Now correctly excluding outliers. Also added some diagnostic output related to scalar creation, namely the number of valid non-zero values used for calculating scalars. also fixed the cell area output diagnostic.
The carbon densities were not being read in from the GCAM restart file. These fixes should remedy this problem. Changes to be committed: modified: cpl/include/get_data_helper.h modified: cpl/source/get_data_helper.cpp modified: cvs/objects/ccarbon_model/include/land_carbon_densities.h modified: cvs/objects/util/base/source/manage_state_variables.cpp
Now save the debug file for the restart portion a GCAM run. Also update the cell area diagnostics for scalars to track the outliers better.
Aldivi/gcam gcam6 restart fix This fixes the GCAM restart problem by saving the carbon density values in GCAM's restart files and then reading them upon restart.
Also updates the scalar diagnostic file name.
…ore into aldivi/gcam_gcam6_merge_co2 Aligning remote and local branch to merge in the diagnostic updates
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New pull request to include recent updates.
This merge is the first step to creating our new "main" branch for e3sm-gcam.
The second step is to then merge down to the 'e3sm-integration' branch, which would be our new "main."
There was discussion with Pralit about not doing the second merge, but there are several commits there that are not in the e3sm-rebase-gcam6 branch.
I did both of these merge automatically, prior to the previous pull request (#383) and the resulting code worked properly.