-
Notifications
You must be signed in to change notification settings - Fork 7
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
further cleanup of make_bcs utility and CatchmentCN routines #576
Conversation
- reinstated "source g5_modules" command within SBATCH job scripts created by make_bcs - renamed environment variables for clarification - removed obsolete "cd" and "SBATCH --chdir"
…comments throughout
UPDATE (5/5/22): It remains unclear how the tiles identified by Sebastian end up with peat as profile soil class. The attached pdf and xls files provide additional information. cc: @rdkoster @gmao-jkolassa @biljanaorescanin @weiyuan-jiang @gmao-qliu |
…ions; updated documentation
… instances of 'CLM-Carbon' to 'Catchment-CN'
…dvertently omitted from previous commit)
… to files in the mk_restarts package should be made on the mk_restarts branch and PR, not on the make_bcs branch and PR
Thanks, @biljanaorescanin. Which bcs version did you run? Given the extent of the changes in this PR, we need to run multiple versions at multiple resolutions. At the very least, we need to run NLv4 and NLv5 on M09 and M36, and we need to run NLv3 at c720, c360, c180 and c90. |
@gmao-rreichle I did NLv3. Sure, I will run other cases and add a comment once I am done. |
@gmao-rreichle @weiyuan-jiang I've added last commit so we don't have warning messages in catchcn_params.nc4 and catch_param.nc4 . I am testing it now to confirm. |
GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/mkCatchParam.F90
Show resolved
Hide resolved
I added the "contingent" label again. Not sure why this was removed. We are not quite done with this PR. Hopefully final touches and testing underway now. |
The previous two commits fix a netcdf dimension error that had been present for a long time in the catch_params.nc4 and catchcn_params.nc4 files generated by make_bcs. The data in the files was successfully verified 0-diff after the commits. @biljanaorescanin successfully completed final developer tests today (GEOSldas runs that use bcs generated with the branch associated with this PR). |
PR is ready for final verification and merging by GCM gatekeeper. PR only touches make_bcs and CatchmentCN and is trivially 0-diff for all GCM tests. Suggested log entry:
|
! For PEATMAP, the sub-layer weight of 2.33 should only count towards cFamily(1:3), and in most cases the | ||
! maxloc statement below should therefore result in o_clp = 1, 2, or 3 only. However, if the top-layer orgC | ||
! is peat for most contributing raster grid cells and the sub-layer orgC values are relatively evenly spread | ||
! over orgC classes 1, 2, and 3, then maxloc(cFamily) can result in o_clp=4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this is what we don't want.
o_clp=4 should only be allowed if o_clp makes up more than 0.5 of a grid cell.
This may explain that Sebastian found 6 'buried' peat tiles which were not peat in the top layer but in the profile layer.
|
||
! ---------------------------------------------------------------------------------------- | ||
! | ||
! Determine *top* layer mineral/organic soil class of tile n | ||
|
||
if(o_cl == 4) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make sense to include in this 'if-statement' a line like
o_clp = 4
We want all o_cl to become full peat tiles.
With this we would get rid of those inconsistent tiles with top soil being peat but not profile being peat.
bug is here: Lines 343 to 347 in 9c3baa1
When line 344 is executed, Pix1 = -999 which leads to crash. It is exposed by debug mode but exists in optimized mode ( just does not crash) . We may have to examine why it checks table 2 of pix2 but use table 1 of pix1 |
Thanks, @weiyuan-jiang, for the sleuthing. I've never looked at this program and cannot quickly make sense of what's going on here. I'm still unclear what happens when we run the (usual) build with optimization, and what a fix would look like. If we also get Pix1=-999 with the optimized build, then lines 344-347 should result in garbage, which is concerning. @atrayano, are you familiar with the code in question? [In brief, when we run this code for make_bcs using a debug build, the run stops with an error message that an index value is negative. No such stop and error message is produced when we run the (usual) optimized build. See previous comment by @weiyuan-jiang.] |
@gmao-rreichle Yes, I am familiar with this code , it was written by Max Suarez many years ago. I have seen the negative (-999) Pix error once in a while, and usually this is a result of the rasterization process not covering completely the Earth |
The good news is I only saw one bad pix. Maybe we can throw away that one ? @gmao-rreichle @biljanaorescanin @atrayano |
@weiyuan-jiang Unfortunately, we cannot throw away the "bad" Pix. My first impulse is to write a piece of code to check the raster(s) for -999 and possibly do something to re-assign a "good" value (for example, assign the value from a neighbor) |
@sdrabenh I made an issue for things we didn't address #596, we are ready to proceed with this PR as it is. @gmao-rreichle left a comment for suggested log entry: make_bcs and CatchmentCN cleanup:
|
An inconsistency in NLv5 Catchment model parameters was discovered that impacts 6 tiles (out of ~1.6 million) on the EASEv2 M09 grid. The 6 tiles in question end up with some PEATCLSM parameters (incl. porosity=0.93), even though they (probably) should have mineral soil properties (which is still reflected in some parameters associated with the 0-30 cm soil layer). An investigation is ongoing.
During this investigation, a few minor problems with the make_bcs script were discovered and fixed in the branch associated with this PR. More fixes might be needed.
The PR will be zero-diff for all model runs. It is not yet clear how the inconsistency in the Catchment model parameters will be resolved. We will probably need to introduce a new bcs version to fix the parameter inconsistency, which probably means that will the PR will also be zero-diff for the make_bcs package.
cc: @rdkoster @gmao-jkolassa @biljanaorescanin @weiyuan-jiang @gmao-qliu
UPDATED 11 Jun 2022: This PR will be merged without addressing the above-mentioned parameter inconsistency, which requires further study. The bulk of the PR consists of long overdue cleanup.