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

Land sea mask generation #1006

Merged
merged 11 commits into from
Dec 18, 2023
Prev Previous commit
Next Next commit
replace cdutil generate land sea mask to the regionmask-based new fun…
…ction
  • Loading branch information
lee1043 committed Dec 16, 2023
commit da35f2abe4f28c91c120c038cb58066b5d029ef5
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import sys

import cdutil
import numpy as np
import pandas as pd
import xarray as xr
Expand All @@ -13,6 +12,7 @@
from xcdat.regridder import grid

import pcmdi_metrics
from pcmdi_metrics.utils import create_land_sea_mask


# ==================================================================================
Expand Down Expand Up @@ -389,9 +389,8 @@ def Avg_PS_DomFrq(d, frequency, ntd, dat, mip, frc):
else:
sys.exit("ERROR: frc " + frc + " is not defined!")

d_cdms = xr.DataArray.to_cdms2(d[0])
mask = cdutil.generateLandSeaMask(d_cdms)
mask = xr.DataArray.from_cdms2(mask)
# generate land sea mask
mask = create_land_sea_mask(d[0])

psdmfm = {}
for dom in domains:
Expand Down
Loading