NCAR / ADF

A unified collection of python scripts used to generate standard plots from CAM outputs.
Creative Commons Attribution 4.0 International
35 stars 29 forks source link

Climo bugfix #254

Closed cecilehannay closed 1 year ago

cecilehannay commented 1 year ago

This bug fix addresses the issue described at: https://github.com/NCAR/ADF/issues/253

The problem was that we were using a string to identify the start year and the end year of the climo years. This approach worked when we had a 4-digit year (e.g., 1979) as in the "F" cases. However, it failed for single-digit years (e.g., 1), as seen in the "B" cases. Replacing str by int in the code seems to fix the issue.

For instance: elif str(syear_baseline) not in base_climo_yrs: is replaced by: elif (syear_baseline) not in base_climo_yrs:

justin-richling commented 1 year ago

@nusbaume Changes look good to me!