Re: mask not adjusted with the contour

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 22 2013 - 11:28:18 MST

Hi,

The "mask()" function in the call to "gsn_csm_contour_map_ce()" is returning an array that does not have the coordinate values associated with it. A solution (thanks to Dave Brown) is to break out the call to the mask function, and assign the results back to the variable "sst", retaining the coordinate association:

sst = mask(sst, maskme, 0)
plot =gsn_csm_contour_map_ce(wks, sst(0,:,:), rest)

Also, the "0" in the mask function is for land, "1" is for oceans.

Hope that helps…
Rick

On Jan 19, 2013, at 5:45 PM, Ahmed Lasheen <ahmed4kernel@gmail.com> wrote:

> Hello
> I am trying to plot sst using data from NOAA , I also downloded file from the same page to mask the land. But when i used the mask function, I found that mask work in strange way, it seems that it doesnot coincide with the contour map Although both mask file and sst file has the same dimensions.
> I got also the following error
>
> check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
> (0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
> (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
> (0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
> (0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
> I check the file and i found that there is a valid attributes
> I have attached the script and the output
> about the data file for sst and mask , here is the page http://www.esrl.noaa.gov/psd/data/gridded/data.noaa.oisst.v2.html
> , the link for sst is ftp://ftp.cdc.noaa.gov/Datasets/noaa.oisst.v2/sst.mnmean.nc
> and the link for mask file is ftp://ftp.cdc.noaa.gov/Datasets/noaa.oisst.v2/lsmask.nc
> Thanks in advance
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
> <test.ncl><sst.png>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 22 11:28:27 2013

This archive was generated by hypermail 2.1.8 : Wed Jan 23 2013 - 20:38:31 MST