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

MDTF-diagnostics preprocessor update #509

Merged
merged 341 commits into from
Mar 8, 2024

Conversation

wrongkindofdoctor
Copy link
Collaborator

@wrongkindofdoctor wrongkindofdoctor commented Mar 8, 2024

Description
Preliminary updates to MDTF-diagnostics package with support for intake-esm catalogs and custom preprocessing scripts

Associated issue #81, #51

How Has This Been Tested?
This branch has only undergone basic functionality tests with a CMIP dataset. It is still under development.

Checklist:

  • My branch is up-to-date with the NOAA-GFDL main branch, and all merge conflicts are resolved
  • The scripts are written in Python 3.11 or above (preferred; required if funded by a CPO grant), NCL, or R
  • All of my scripts are in the diagnostics/[POD short name] subdirectory, and include a main_driver script, template html, and settings.jsonc file
  • I have made corresponding changes to the documentation in the POD's doc/ subdirectory
  • I have requested that the framework developers add packages required by my POD to the python3, NCL, or R environment yaml file if necessary, and my environment builds with conda_env_setup.sh
  • I have added any necessary data to input_data/obs_data/[pod short name] and/or input_data/model/[pod short name]
  • My code is portable; it uses MDTF environment variables, and does not contain hard-coded file or directory paths
  • I have provided the code to generate digested data files from raw data files
  • Each digested data file generated by the script contains numerical data (no figures), and is 3 GB or less in size
  • I have included copies of the figures generated by the POD in the pull request
  • The repository contains no extra test scripts or data files

add routine to check the conda env specified by the POD for the required packages
… is the correct way to inherit from the modified Singleton definition
…in PODs that require the python environment, since packages for NCL are not explicitly imported in the driver scripts
add calls to register methods for abstract atts back to data_model.py
… a single standard name

working on the call to Fieldlist.from_struct
add try except block to catch duplicates to _DMDimensionsMixin build_axes method
move VariableTranslator class and modifier check from data_model to translation.FieldlistEntry __post_init method to avoid circular import
… string in DMDependentvariable because this class is used to define coordinates, which do not have realm atts, and variables, which do
…ifier and realm entries when defining fieldlist lookup tables

remove mandatory modifier and ndim units from fieldlist class atts since they are not needed there
… the change in class names in varlist_util.py
… attribute to data_model._dmcoordinatshared class which is inherited by the same child classes in varlist_util
define pod_dims using the _pod_dims_from_struct function in Varlist from_struct call
comment out convention match check for varlist setup development in pod_setup
add date_range attribute to datasourcebase and a method to set the date range
add call to set_date_range to pod_setup
change varlist_util.setup_var to accept date_range and convention parameters to pass to called methods
add dummy attributes required by abstract methods in data_model
clean up formatting
add realm to from_CF method in translation
add module loader procedure to import custom preprocessing python scripts to DaskMultFilePreprocessor init method
remove unused deactivate_data_key method from VarlistEntry
update example_multicase config and environment yamls
still need to debug calling custom module on xr ds and variable
change user_pp_scripts preprocessor attribute to just be a list of script names and not the full paths
…arlistentries

or xarray datasets whether they perform operations or act as dummy functions
@wrongkindofdoctor wrongkindofdoctor added the framework Issue pertains to the framework code label Mar 8, 2024
@wrongkindofdoctor wrongkindofdoctor self-assigned this Mar 8, 2024
@wrongkindofdoctor wrongkindofdoctor merged commit 3109e5f into NOAA-GFDL:refactor_pp Mar 8, 2024
wrongkindofdoctor added a commit that referenced this pull request Mar 8, 2024
MDTF-diagnostics preprocessor update (#509)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework Issue pertains to the framework code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants