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

rework check_group_daterange to work with data starting at year 0001 #669

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

jtmims
Copy link
Collaborator

@jtmims jtmims commented Aug 20, 2024

Description
Include a summary of the change, and link the associated issue (if applicable).
List any dependencies that are required for this change, including libraries and variables,
and their metadata (units, frequencies, etc...). Be sure to separate PRs and issues for new PODs and PODs currently under development.

Associated issue # (replace this phrase and parentheses with the issue number)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes in enough detail that
someone can reproduce them. Include any relevant details for your test configuration
such as the Python version, package versions, expected POD wallclock time, and the
operating system(s) you ran your tests on.

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.12 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

@wrongkindofdoctor wrongkindofdoctor self-assigned this Aug 20, 2024
@wrongkindofdoctor wrongkindofdoctor added the framework Issue pertains to the framework code label Aug 20, 2024
Comment on lines 798 to 801
if '-' in time_vals[i]:
time_vals[i] = time_vals[i].replace('-', '')
if ':' in time_vals[i]:
time_vals[i] = time_vals[i].replace(':', '')
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can replace multiple characters in one call without having to explicitly check for them, e.g.,

time_vals[i] = time_vals[i].replace('-', ':').replace('', '').

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll condense that for the final PR

@jtmims jtmims marked this pull request as ready for review August 22, 2024 16:51
@wrongkindofdoctor wrongkindofdoctor merged commit 0a00b60 into NOAA-GFDL:main Aug 22, 2024
3 of 5 checks passed
@jtmims jtmims deleted the date_issues branch August 28, 2024 16:27
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