[ncl-talk] Masking with shapefile

Amit Kumar amitkumar.777 at hotmail.com
Thu Sep 15 04:32:11 MDT 2016


Hi All,


I've a gridded data & I want to mask it while using shapefile. But it is not taking it as a grid and giving error: shapefile_mask_data: Error: not a valid rectilinear, curvilinear, or unstructured grid


      left_longitude : 30.05
      right_longitude : 120.05
      upper_latitude : 40.05
      lower_latitude : -39.95
      lat_interval : 0.1
      lon_interval : 0.1
      NCO : "4.5.4"
      CDO : Climate Data Operators version 1.7.0 (http://mpimet.mpg.de/cdo)
   dimensions:
      longitude = 300
      latitude = 380
      time = 1  // unlimited
   variables:
      double longitude ( longitude )
         standard_name :    longitude
         long_name :    longitude
         units :    degrees_east
         axis :    X

      double latitude ( latitude )
         standard_name :    latitude
         long_name :    latitude
         units :    degrees_north
         axis :    Y

      double time ( time )
         standard_name :    time
         units :    minutes since 2000-1-1 00:00:00
         calendar :    standard
         axis :    T

      float IMR_DLY ( time, latitude, longitude )
         standard_name :    Precipitation
         long_name :    INSAT Multispectral Rainfall(Daily)
         units :    mm/day
         _FillValue :    -999
         missing_value :    -999



Now how to convert my data into a valid rectilinear, curvilinear, or unstructured grid so that masking can be performed.


var                 = doubletofloat(a->IMR_DLY)
  lat                 =  a->latitude
  lon                 =  a->longitude
shp_mask = shapefile_mask_data(var(i,:,:),filename,opt) ------> error here


script is also attached.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160915/91dab65d/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imr-01-06-july.ncl
Type: application/octet-stream
Size: 3687 bytes
Desc: imr-01-06-july.ncl
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160915/91dab65d/attachment.obj 


More information about the ncl-talk mailing list