Skip to content
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

Preparing fre cmor to snack #243

Merged
merged 37 commits into from
Dec 20, 2024
Merged

Preparing fre cmor to snack #243

merged 37 commits into from
Dec 20, 2024

Conversation

ilaflott
Copy link
Member

@ilaflott ilaflott commented Nov 1, 2024

code QA:

  • I ran my code
  • I tried to make my code readable
  • I tried to comment my code
  • I wrote a new test, if applicable
  • I wrote new instructions/documentation, if applicable
  • I ran pytest and inspected it's output
  • I ran pylint and attempted to implement some of it's feedback

this PR adds:

  • fre cmor lister, new tool for sifting through CMIP table json configurations
  • tests for fre cmor lister cli module calls
  • all more from 4->8 out of 9 cases covered CMORsnack: netCDF file format handling in cmor_mixer #238
  • fixes Sergey's last name in docs/tools/cmor.rst
  • click cli HELP strings
  • quick extra comma removal in CMOR_input_example.json under test files to remove CMOR module warning
  • several new functions in cmor_mixer.py for reducing code repeat and making calls more consistent from line to line
  • an extra bit to create_tmp_dir to squelch a toothless CMOR warning, with an overly optimistic eye towards using an error-on-warning setting for rigor someday.

…ons. none checks, trying to generally allow this code to be more flexible. not currently working atm"

This reverts commit 1a15d95.
@ilaflott ilaflott added documentation Improvements or additions to documentation new functioning New feature or request priority: HIGH labels Nov 1, 2024
@ilaflott ilaflott self-assigned this Nov 1, 2024
@ilaflott ilaflott added bug Something isn't working and removed documentation Improvements or additions to documentation labels Nov 15, 2024
…assigned None and checked if corresponding cmor axis should bother to be assigned, instead of relying on dimenionality of the data
…he code tries to create this. this is to avoid a warning from the CMOR module. it might be good to be able to do all of this so well that we could error on warning some day. ... oither than that, not much other than keeping certain other things around like CMOR behavior field values
…ug regarding numpy object usage- ians fault! needs from fresh eyes to find it
… i get it into cmor_mixer? i can now also start tackling ocean cases, which seem at least somewhat tractable now
… leave the python interpreter instance in the wrong directory
…o the cwd for the os gets set back to what it was before fre cmor run was called
…r exception reporting for try/except/finally call of rewrite_netcdf_file_var
…n native(tripolar)-grid ocean file case. the data one seeks is likely within the statics
…file to rewrite the ocean file when i get a chance... first, going to turn to olevel issues
@ilaflott
Copy link
Member Author

please feel free to begin reviewing the code. much will not change, but i need to fix a conflict and then clean a few things up.

@ilaflott ilaflott marked this pull request as ready for review December 20, 2024 16:14
@ilaflott
Copy link
Member Author

This WILL close #241 #268 #238 #250 and #252 (the super issue containing those 4).

Copy link
Collaborator

@ceblanton ceblanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@@ -75,7 +75,7 @@ background
~~~~~~~~~~

The bulk of this routine is housed in ``fre/cmor/cmor_mixer.py``, which is a rewritten version of
Sergey Malyshev's original ``CMORcommander.py`` script, utilized during GFDL's CMIP6 publishing run.
Sergey Nikonov's original ``CMORcommander.py`` script, utilized during GFDL's CMIP6 publishing run.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMORcommander was a prototype rewrite of fremetar, which GFDL used for CMIP6 publishing.

@ilaflott ilaflott merged commit 5791010 into main Dec 20, 2024
2 checks passed
@ilaflott ilaflott deleted the cmor-snack-prep branch December 20, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new functioning New feature or request priority: HIGH
Projects
None yet
3 participants