-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I'm using the following cdms2 on Linux
cdms2 2.12.2018.02.22.17.40.g09431cb.npy1.13 py27_0 uvcdat/label/nightly
@gleckler1 @durack1 feel free to chime in
code:
from __future__ import print_function
import cdms2, vcs, MV2
import os
data = cdms2.open("data.nc")("ta")
print(data.shape)
tmp = cdms2.open("sft.nc")
sft = tmp("sftlf")
tmp.close()
data2 = MV2.masked_where(MV2.less(sft,50.),data)
tGrid = cdms2.createUniformGrid(-88.875, 72, 2.5, 0, 144, 2.5)
x=vcs.init()
for mthd in ["conservative", "linear"]:
print("USING REGRID METHOD:",mthd)
data3 = data2.regrid(tGrid, regridTool="esmf", regridMethod=mthd)
print("pltting")
x.plot(data3)
print("pnging")
x.png("masked_{}".format(mthd))
print("clearing")
x.clear()
Data files: