下载逐小时的资料,处理为日均值保留源有属性及其他变量输出至新的nc
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
dir = "/public/home/sunxiaoyun/datadir/ERA5/input4cost733/"
filename = "slp-test-djf.nc"
f = addfile(dir + filename,"r")
slp = short2flt(f->msl)
opt = True
opt@nval_crit = 8
slp_daily = calculate_daily_values(slp, "avg", 0, opt)
printVarSummary(slp_daily)
ncdf = addfile("slp-test-daily.nc", "c")
ncdf->msl = slp_daily
end