-
Notifications
You must be signed in to change notification settings - Fork 390
Adds LIGHT modes and capabilities (passive floats, improved sampling) #56
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
Adds LIGHT modes and capabilities (passive floats, improved sampling) #56
Conversation
|
cc @sbrus89 as an example of an MPAS-O PR that we will use for testing. |
|
Particle setup files are at |
mark-petersen
left a comment
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.
@pwolfram I don't have time to test or review in detail. Considering that you only change a LIGHT file, if it passes your tests, go ahead and merge.
|
@pwolfram please confirm that this PR passes the nightly test suite. Only the cases with LIGHT are relevant, but it's easy to test the whole thing. |
src/core_ocean/analysis_members/mpas_ocn_lagrangian_particle_tracking.F
Outdated
Show resolved
Hide resolved
eb96bd1 to
13e5e99
Compare
testing_and_setup/compass/utility_scripts/LIGHTparticles/make_particle_file.py
Outdated
Show resolved
Hide resolved
6a645ba to
3036516
Compare
src/core_ocean/analysis_members/Registry_lagrangian_particle_tracking.xml
Outdated
Show resolved
Hide resolved
This merge adds passive particle floats, generalizes and improves LIGHT code, and adds support for horizontal interpolation of sampling for salinity, temperature, and BGC quantities. * pwolfram/particlePassiveFloatVerticalTreatmentFix: (63 commits) Corrects mis-matching LIGHT top and bottom interp doh. fixed the other PO4 typo fix typo for PO4 add functionality for PO4, NO3, SiO3, NH4, Fe, O2 sensors with horizontal interpolation Fix bug for BGC segfault Fixes an index bug in particle spatial interp Switches to Wachspress approach Resolves compilation error on intel compilers Fixes boundary cell overrun Fixes failed search for nearest hex vertex Adds interp calling routines for particle tracers Cleans up LIGHT scalar interpolation Horizontally interpolates particle scalars Refractors identification of LIGHT vertical index Refractors identification of LIGHT vertical index Adds recommended fields for globalID, lat/lon Updates 20km ziso default case to test particles Fixes typo with rename of particle temp/salinity Uncomment sampling logs and change sample default in registry Fix conditional clause issues ...
|
Verified that LIGHT is BFB against UPDATE: there was an error in the testing uncovered via the regression test and this is being looked into right now. |
|
I successfully compiled the merge into Is that expected? You can see the error file here: only error is this one: everything else passes. |
|
It also failed this one: because of this line: I tried to install pyamg in my local python installation but couldn't get it to work. I'm sure I just installed it wrong. If you can get that ZISO smoke test case to run successfully, go ahead and merge. Then we can make a PR into E3SM. |
| import numpy as np | ||
| from scipy import spatial | ||
| from scipy import sparse | ||
| from pyamg.classical import split, interpolate as amginterp |
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.
@pwolfram, line 19 should be wrapped in a try block per our call with ANL and @mark-petersen's error. This of course will break if the user tries the --downsample flag without pyamg, but that should be fine. For whatever reason, pyamg is not an easy install (took many tries for me).
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.
@bradyrx thanks for the suggestion. I agree, put it in a try block, and have it actually fail only when the library is needed. That will keep our nightly testing suite more accessible and portable across users and machines.
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.
Ideally we eventually need a better solution than pyamg for coarsening, but I don't think it's crucial for this PR. It's a feasible solution for oQU240, but takes ~40min for 60to30 and ~20hr for 30to10.
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.
Note my current hacky solution here: https://gist.github.com/bradyrx/ddb6c944e425ac5e63b8e8e7361809dd
I'm just running make_particle_file.py without downsampling, and then removing full columns with that gist by going through lat/lon with a fixed stride.
This approximately pulls columns at random due to the unstructured mesh indexing, but I don't suggest it as a formal method in ocean/develop.
Here, white dots are seeding at every grid cell and red are after running my script:
LIGHT BFB against ocean/develop Cleans up LIGHT helper functions and signatures BFB with minor clean up changes (commit f6a7ff8c8848dc02b0c028b70d58e2dfada891cd)
1654b1f to
fb8d7de
Compare
|
@maltrud took a look at a BGC G-case application with particles on and didn't find any problems (example below): @mark-petersen, this is ready to merge when you have a chance. |
|
@mark-petersen, please let me know if there is anything else you need us to do before this gets merged-- it is ready for your final approval and merge. Thanks! |
|
Final test and merge today. Talk to me before changing anything. |
…ix' into ocean/develop This merge adds passive particle floats, generalizes and improves LIGHT code, and adds support for horizontal interpolation of sampling for salinity, temperature, and BGC quantities. It also fixes the condition where partial bottom cells allows passive floats to advect out of the wetted domain. The solution, following consultation with @maltrud, is to simply ensure that particles are contained in the viable range (ssh - dz/2, bottomDepth - dz/2), which essentially returns particles to the nearest wet cell center vertically.
|
@mark-petersen, please merge when you get the chance, I won't make any changes-- thanks! |
|
Tested in mega-merge with MPAS nightly regression suite with gnu and intel, opt and debug, on grizzly. bfb on all tests expect were expected: See more details here, but everything looks in order. Testing mega-merge in E3SM now. Includes coastal branch as well. |
|
@mark-petersen @pwolfram, with this going into develop now, it might be a good time to point out my repo https://github.com/bradyrx/automate-mpas. I'll be down there next week so maybe we can talk about a path forward with this. It might be nice to get some code review here and ideas. But basically, one just needs to alter the |
|
test of mega-merge passed all in E3SM: |
|
Thanks @mark-petersen |
Includes: 1. LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56 2. clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164 3. merge coastal branch: MPAS-Dev/MPAS-Model#54 4. CONUS mesh update: MPAS-Dev/MPAS-Model#201 5. Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229 6. Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156 7. PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212 These changes do not alter E3SM standard cases or testing on next. COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes are protected by flags and not used in normal E3SM tests.
Update mpas source This PR update the mpas-source git submodule but only includes changes that will not impact E3SM. These changes include: * LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56 * clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164 * merge coastal branch: MPAS-Dev/MPAS-Model#54 * CONUS mesh update: MPAS-Dev/MPAS-Model#201 * Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229 * Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156 * PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212 These changes do not alter E3SM standard cases or tested configurations. COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes are protected by flags and not used in normal E3SM tests. [NML] [BFB]
Update mpas source This PR update the mpas-source git submodule but only includes changes that will not impact E3SM. These changes include: * LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56 * clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164 * merge coastal branch: MPAS-Dev/MPAS-Model#54 * CONUS mesh update: MPAS-Dev/MPAS-Model#201 * Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229 * Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156 * PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212 These changes do not alter E3SM standard cases or tested configurations. COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes are protected by flags and not used in normal E3SM tests. [NML] [BFB]
…ix' into ocean/develop This merge adds passive particle floats, generalizes and improves LIGHT code, and adds support for horizontal interpolation of sampling for salinity, temperature, and BGC quantities. It also fixes the condition where partial bottom cells allows passive floats to advect out of the wetted domain. The solution, following consultation with @maltrud, is to simply ensure that particles are contained in the viable range (ssh - dz/2, bottomDepth - dz/2), which essentially returns particles to the nearest wet cell center vertically.
…ix' into ocean/develop This merge adds passive particle floats, generalizes and improves LIGHT code, and adds support for horizontal interpolation of sampling for salinity, temperature, and BGC quantities. It also fixes the condition where partial bottom cells allows passive floats to advect out of the wetted domain. The solution, following consultation with @maltrud, is to simply ensure that particles are contained in the viable range (ssh - dz/2, bottomDepth - dz/2), which essentially returns particles to the nearest wet cell center vertically.
…ix' into ocean/develop This merge adds passive particle floats, generalizes and improves LIGHT code, and adds support for horizontal interpolation of sampling for salinity, temperature, and BGC quantities. It also fixes the condition where partial bottom cells allows passive floats to advect out of the wetted domain. The solution, following consultation with @maltrud, is to simply ensure that particles are contained in the viable range (ssh - dz/2, bottomDepth - dz/2), which essentially returns particles to the nearest wet cell center vertically.
* "GF coldpool updates and bugfix for radiation coupling" * "Update formating following Mike's suggestions"


This merge adds passive particle floats, generalizes and improves LIGHT code, and adds support for horizontal interpolation of sampling for salinity, temperature, and BGC quantities.
It also fixes the condition where partial bottom cells allows passive floats to advect out of the wetted domain. The solution, following consultation with @maltrud, is to simply ensure that particles are contained in the viable range (ssh - dz/2, bottomDepth - dz/2), which essentially returns particles to the nearest wet cell center vertically.