sima0_12_000: Implement tracer_data in CAM-SIMA; registry entries for prescribed ozone/BAM; NaN check in physics data check#441
Conversation
… BAM prescribed aero
nusbaume
left a comment
There was a problem hiding this comment.
Thanks for bringing in this major new capability @jimmielin! I have some change requests, some of which would require non-trivial amounts of effort.
However, given that it is unclear what the future of all of this code will be, I am happy if you want to push back on some of my requests, or make them issues that we can tackle in the future. Just let me know!
src/utils/tracer_data.F90
Outdated
|
|
||
| ! rebin src (source) to trg (target). | ||
| ! originally from mo_util | ||
| pure subroutine rebin(nsrc, ntrg, src_x, trg_x, src, trg) |
There was a problem hiding this comment.
Can we get rid of this subroutine entirely, and instead just use the one from ccpp_tuvx_utils?
There was a problem hiding this comment.
It's the same subroutine, but ccpp_tuvx_utils is in physics/ncar_ccpp/to_be_ccppized/. Could I confirm if we are OK with CAM-SIMA code depending on atmos_phys code? Thanks!
There was a problem hiding this comment.
Yep, using atmospheric_physics code in CAM-SIMA is totally allowed. In fact we are doing that already, for example here:
https://github.com/ESCOMP/CAM-SIMA/blob/development/src/dynamics/mpas/dyn_coupling_impl.F90#L509
There was a problem hiding this comment.
Thanks, updated to use rebin from atmos_phys!
Co-authored-by: Jesse Nusbaumer <nusbaume@ucar.edu>
…o hplin/tracer_data
…unstructured throughout
nusbaume
left a comment
There was a problem hiding this comment.
Everything looks good to me now, thanks @jimmielin! I think the only outstanding request is to remove the copy of rebin, but I don't think that requires an extra re-review from me. Thanks again!
| end if | ||
| end subroutine tokenize_into_tokens_separator | ||
|
|
||
| ! Increment a string whose ending characters are digits. |
There was a problem hiding this comment.
I don't think we actually use this feature in cam. This was left over from the old MOZART chemical transport model. Not sure that increment_string needs to migrated to CAM-SIMA.
There was a problem hiding this comment.
It seems it's mentioned in this "ccm type filename" block in tracer_data.
CAM-SIMA/src/utils/tracer_data.F90
Lines 990 to 1005 in 8dcd0e8
I agree it is likely unused. I am happy to make an issue to remove this in a future cleanup. Thanks!
There was a problem hiding this comment.
It would be nice to clean this up. If you want to do it an a future PR, that's fine with me.
fvitt
left a comment
There was a problem hiding this comment.
Thanks for working on this.
|
need to make development -> main PR after merging in ESCOMP/atmospheric_physics#331 then update atmos_phys tag with latest then run regression tests. may need an additional atmos_phys PR to make sure things work - not able to easily test right now, because some PRs into main are required for this to work... |
…x for bulk aerosols (BAM) (#331) Originator(s): @jimmielin Most of the code based off from @fvitt; changes had to be made to remove use of pbuf and use the constituents infrastructure in CAM-SIMA/CCPP framework to register store prescribed aerosols data (code borrowed from @peverwhee and @nusbaume) Companion SIMA PR ESCOMP/CAM-SIMA#441 There will not be a CAM PR to bring these changes back because `tracer_data` has breaking interface changes (and no longer using pbuf) that make it infeasible to bring back these schemes into CAM. Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number): - CCPPize CAM `prescribed_ozone` -- closes #323 - CCPPize CAM `prescribed_aero` into `prescribed_aerosols` scheme -- closes #328 - Partially CCPPize CAM `aerodep_flx` into `prescribed_aerosol_deposition_flux` scheme: only BAM functionality is fully implemented; MAM functionality depends on conversion of the aerosol model -- closes #328; future work documented in #329 List all namelist files that were added or changed: ``` A schemes/chemistry/prescribed_ozone_namelist.xml A schemes/chemistry/prescribed_aerosols_namelist.xml A schemes/chemistry/prescribed_aerosol_deposition_flux_namelist.xml ``` List all files eliminated and why: N/A List all files added and what they do: ``` A schemes/chemistry/prescribed_ozone.F90 A schemes/chemistry/prescribed_ozone.meta - complete CCPPization of prescribed_ozone (#323) A schemes/chemistry/prescribed_aerosols.F90 A schemes/chemistry/prescribed_aerosols.meta - complete CCPPization of prescribed_aero (#328) A schemes/chemistry/prescribed_aerosol_deposition_flux.F90 A schemes/chemistry/prescribed_aerosol_deposition_flux.meta - CCPPize aerodep_flx for bulk aerosols (BAM) only. (#328) future work #329 A test/test_suites/suite_tracer_data_test.xml - suite for testing tracer_data chemistry and aerosols input test via prescribed ozone, aerosols, and aerosol deposition flux -- BAM configuration ``` List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) N/A List all automated tests that failed, as well as an explanation for why they weren't fixed: N/A Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc? new chemistry and aerosol schemes If yes to the above question, describe how this code was validated with the new/modified features: new regression test verified b4b with cam using same namelist options and input files as described in testmod - see CAM-SIMA PR --------- Co-authored-by: Jesse Nusbaumer <nusbaume@ucar.edu>
Tag name (required for release branches): sima0_12_000
Originator(s): @jimmielin
Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
src/utils/horizontal_interpolate.F90to CAM-SIMA (intended to be included in a sparse checkout from CAM in the future) -- currently only used for aircraft inputs, but could be used for all regridded data read from tracer_data in the future.increment_string,last_non_digit, andget_last_significant_charin support of tracer_data.If any NaN values are detected in the model state, the difference count is incremented and the maximum difference will be denoted as NaN.
The number of NaNs will be reported in the output. e.g.,
Describe any changes made to build system: N/A
Describe any changes made to the namelist: N/A
List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A
List all files eliminated and why: N/A
List all files added and what they do:
List all existing files that have been modified, and describe the changes:
(Helpful git command:
git diff --name-status development...<your_branch_name>)If there are new failures (compared to the
test/existing-test-failures.txtfile),have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?
derecho/intel/aux_sima:
derecho/gnu/aux_sima:
derecho/nvhpc/aux_sima: All PASS
If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:
CAM-SIMA date used for the baseline comparison tests if different than latest: