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

Workaround needed for bug in conservationCheck analysis member #999

Closed
xylar opened this issue Apr 4, 2024 · 2 comments · Fixed by E3SM-Project/E3SM#6412
Closed

Workaround needed for bug in conservationCheck analysis member #999

xylar opened this issue Apr 4, 2024 · 2 comments · Fixed by E3SM-Project/E3SM#6412
Assignees

Comments

@xylar
Copy link
Collaborator

xylar commented Apr 4, 2024

When I run the conservation analysis task, I'm seeing the bug reported in:
E3SM-Project/E3SM#6327
It manifests as:

  Open conservation file /lcrc/group/e3sm/ac.xylar/analysis/20240328.GMPAS-JRA1p5-DIB-PISMF-TMIX.TL319_IcoswISC30E3r5.chrysalis/yrs-01-10/timeseries/oceanConservation.nc...
analysis task oceanConservation failed during run
Traceback (most recent call last):
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/shared/analysis_task.py", line 322, in run
    self.run_task()
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/ocean/conservation.py", line 232, in run_task
    self._make_plot(plot_type)
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/ocean/conservation.py", line 332, in _make_plot
    ds = open_mpas_dataset(fileName=self.outputFile,
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/shared/io/mpas_reader.py", line 74, in open_mpas_dataset
    ds = _parse_dataset_time(ds, timeVariableNames, calendar)
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/shared/io/mpas_reader.py", line 197, in _parse_dataset_time
    days = string_to_days_since_date(dateString=timeStrings,
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/shared/timekeeping/utility.py", line 221, in string_to_days_since_date
    dates = [string_to_datetime(string) for string in dateString]
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/shared/timekeeping/utility.py", line 221, in <listcomp>
    dates = [string_to_datetime(string) for string in dateString]
  File "/lcrc/soft/climate/e3sm-unified/base/envs/e3sm_unified_1.9.3_chrysalis/lib/python3.10/site-packages/mpas_analysis/shared/timekeeping/utility.py", line 111, in string_to_datetime
    return datetime.datetime(year=year, month=month, day=day, hour=hour,
ValueError: year 0 is out of range
@xylar
Copy link
Collaborator Author

xylar commented Apr 4, 2024

My suggested fix would be just to load the whole dataset when we perform plotting, rather than a selected date range. The date range should already have been limited to the desired range in the call to ncrcat.

@xylar
Copy link
Collaborator Author

xylar commented Apr 4, 2024

Hmm, I see now that that's not a good fix because the analysis is written to work when comparing analysis that was run over two different periods of time, and to only plot the overlap of the first with the second. Maybe we really need to fix this in E3SM instead of try to work around it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants