[ncl-talk] Applying MME masks to a spatial field
Melissa Lazenby
M.Lazenby at sussex.ac.uk
Wed Mar 22 10:50:59 MDT 2017
Hi Users
I would like to apply a multi-model ensemble drying mask to various CMIP5 model fields.
This is how I am currently going about it in the code below. I work out the MME and then mask out wetting to only have regions of drying and then I multiply the mask to the original CMIP5 model files I would like to apply it to.
Just would like to check if this is how to go about it or another better way. I feel my output is not 100% correct.
Many thanks for your help in advance.
Kindest Regards
Melissa
if (gg.eq.0) then
dP_ENS = new ((/dimsizes(model),dimsizes(lat),dimsizes(lon)/), typeof(dP))
dP_ENS!0="model"
dP_ENS&model=model
dP_ENS!1="lat"
dP_ENS&lat=lat
dP_ENS!2="lon"
dP_ENS&lon=lon
end if
dP_ENS(gg,:,:) = dP(0,:,:)
dP_ENSMEAN = dim_avg_n_Wrap(dP_ENS,0) ; dP_ENS(lat, lon)
printVarSummary(dP_ENSMEAN)
dP_ENS_dry = mask(dP_ENSMEAN,dP_ENSMEAN.gt.0, False) ; mask out all the wetting regions i.e. any values above 0 for dP
dP_dry = new ((/dimsizes(lat),dimsizes(lon)/), typeof(dP_ENSMEAN))
dP_dry!0="lat"
dP_dry&lat=lat
dP_dry!1="lon"
dP_dry&lon=lon
dP_dry = dP_ENS_dry(:,:) * dP(0,:,:) ; apply mask to original files dP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170322/bcfc7a1e/attachment.html
More information about the ncl-talk
mailing list