[ncl-talk] Mediterranean Sea masking
Dennis Shea
shea at ucar.edu
Mon Nov 17 15:11:13 MST 2014
Suggestion:
http://www.ncl.ucar.edu/Applications/mask.shtml
See examples 9 and 13
In particular, once tou create the appropriate mask, it should be saved to
a netCDF file.
Subsequently read the mask from the file.
Good Luck
D
On Mon, Nov 17, 2014 at 7:16 AM, Ufuk Utku Turuncoglu (BE) <
u.utku.turuncoglu at be.itu.edu.tr> wrote:
> Hi,
>
> You have to define a polygon around the region that you interested and
> you could use gc_inout function to assign different number (oe mask
> value) for different regions. You could create a mask for every
> sub-regions. So, for example
>
> do r = 0, nregs-1
> do i = 0, nlon-1
> do j = 0, nlat-1
> if (gc_inout(lat2d(j,i), lon2d(j,i), ybox(r,:), xbox(r,:)))
> then
> dmask(k,r,j,i) = r
> end if
> end do
> end do
> end do
>
> in this case, nregs is the number of sub-region and xbox, ybox store the
> polygon information. You could also add land-sea mask to the if clause
> to eliminate the land grid points. Of course, this method works for the
> data that has a grid bu it could be extended to other types of data. I
> hope it helps.
>
> Regards,
>
> --ufuk
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141117/ac8cebce/attachment.html
More information about the ncl-talk
mailing list