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

mean climate bug fix for E3SMv2.1 evaluation #1068

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
pre-commit fix
  • Loading branch information
lee1043 committed Mar 10, 2024
commit 3310892b68730f61edc3df0e30b4b4a126655145
6 changes: 4 additions & 2 deletions pcmdi_metrics/mean_climate/lib/load_and_regrid.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import xcdat as xc

from pcmdi_metrics.io import xcdat_open, get_latitude, get_longitude
from pcmdi_metrics.io import get_latitude, get_longitude, xcdat_open


def load_and_regrid(
Expand Down Expand Up @@ -43,7 +43,9 @@ def load_and_regrid(
if "units" in ds[varname_in_file].attrs:
if ds[varname_in_file].units == "kg m-2 s-1":
ds[varname_in_file] = ds[varname_in_file] * 86400
print("pr units adjusted to [mm d-1] from [kg m-2 s-1] by 86400 multiplied")
print(
"pr units adjusted to [mm d-1] from [kg m-2 s-1] by 86400 multiplied"
)
else:
ds[varname_in_file] = ds[varname_in_file] * 86400 # Assumed as kg m-2 s-1

Expand Down
Loading