NCL users,
Thanks Mary for the shpfile's link.
I modified the attached script, executed it and found some errors:
gsn_coordinates(wks,map_data,u,mkres)
-----------------------------------------^
fatal:syntax error: possibly an undefined procedure
fatal:syntax error: line 219 before or near \n
gsn_coordinates(wks,map_land_mask,u_land_mask,mkres)
--------------------------------------------------------^
fatal:syntax error: possibly an undefined procedure
fatal:syntax error: line 220 before or near \n
gsn_coordinates(wks,map_ocean_mask,u_ocean_mask,mkres)
----------------------------------------------------------^
fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 245
=====
ariable: u
Type: float
Total Size: 44640 bytes
11160 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 31] x [lon | 360]
Coordinates:
lat: [ -15.. 15]
lon: [ 0.. 359]
Number Of Attributes: 5
time : 2923.5
missing_value : -1e+34
_FillValue : -1e+34
=====
and one remaining query is how could I mask all the time dimension
thus allow me to calculate easily the areal average at given range time
period.
Thank you.
Raf
On Fri, Dec 28, 2012 at 10:04 AM, Mary Haley <haley@ucar.edu> wrote:
> Hi Rafael,
>
> Did you make sure that you don't already have a landsea mask on your data
> file? Or perhaps you have one, but it's on a different file?
>
> If you don't have one, then you can create one from a shapefile. This is
> a one time thing, and then you can write this new mask array to a NetCDF
> file so you don't have to keep creating it from scratch.
>
> Please see example mask_12.ncl at:
>
> http://www.ncl.ucar.edu/Applications/mask.shtml#ex12
>
> I found the shapefile by googling "coastal shapefiles" or something like
> that. The shapefile came from NOAA:
>
> http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.2.0/
>
> --Mary
>
> On Dec 27, 2012, at 12:46 PM, rafael dido wrote:
>
> > Hallo NCL users,
> >
> > I have 5 years datasets [time x lat x lon] 1 deg resolutions and
> recently attempting to calculate areal average for
> > land or ocean only using masking function. I look into some
> documentations such as
> http://www.ncl.ucar.edu/Applications/Scripts/mask_1.ncl
> > and I just wonder how can i get the mask file for my purpose or is there
> any other simple way to mask the land or ocean, and afterwards calculate
> the areal avergae
> > for multiyear data ?
> >
> > Thanks for the hints and response.
> >
> > Raf.
> > _______________________________________________
> > 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
This archive was generated by hypermail 2.1.8 : Fri Jan 04 2013 - 15:32:29 MST