[gradsusr] Masking on both sides of data origin

Hyacinth Nnamchi hyacinth.1 at hotmail.com
Wed Aug 24 07:09:46 EDT 2011


Dear grads users,

My dataset in T30 Gaussian grids is written from longitude 0 (x=1) to longitude 360 (X=96). Now I want to "maskout" so that I'll have data only for: lon = -60 20 and lat = -45 10 i.e. mainly for South Atlantic Ocean. So the data origin splits my box into two.

y=12
  while ( y <= 29 )
    x=81
    while ( x <= 102 )
      'set y 'y
      'set x 'x
      'set defval pmask 'x' 'y' 1'
      x=x+1
    say ' Domain =  lat = 'y',   lon = 'x
    endwhile
    y=y+1 
  endwhile

I have tried the above, changing x again and again but it's either I get only the western or the eastern segment of the box, not a full continuous box. My ctl and GrADS info are included below. 

Thanks in advance for any suggestions.

Hyacinth

********************************************************************************************

ga-> q ctlinfo
dset noaa_anom_1950_2010_mean1950_2010.t30.grd
title Sea surface temperature on T30 gg
undef -9.99e+08
xdef 96 linear 0 3.75
ydef 48 levels -87.16 -83.47 -79.78 -76.07 -72.36 -68.65 -64.94 -61.23
 -57.52 -53.81 -50.1 -46.39 -42.68 -38.97 -35.26 -31.54 -27.83 -24.12
 -20.41 -16.7 -12.99 -9.28 -5.57 -1.86 1.86 5.57 9.28 12.99
 16.7 20.41 24.12 27.83 31.54 35.26 38.97 42.68 46.39 50.1
 53.81 57.52 61.23 64.94 68.65 72.36 76.07 79.78 83.47 87.16
zdef 1 linear 1013 1
tdef 732 linear 00Z01JAN1950 1mo
vars 1
ssta  1  99  surface temperature  [degk]
endvars
****************************************************************
ga-> q config                                                                         
Config: v2.0.a9 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile                                                                                                   
Grid Analysis and Display System (GrADS) Version 2.0.a9                                                 
Copyright (c) 1988-2010 by Brian Doty and the                                                           
Institute for Global Environment and Society (IGES)                                                     
This program is distributed WITHOUT ANY WARRANTY                                                        
See file COPYRIGHT for more information.                                                                

Built Fri Sep  3 11:29:45 MDT 2010 for i686-pc-linux-gnu

This version of GrADS has been configured with the following options:
  o Built on a LITTLE ENDIAN machine
  o Athena Widget GUI DISABLED
  o Command line editing ENABLED
      http://tiswww.case.edu/php/chet/readline/rltop.html
  o printim command for image output ENABLED
      http://www.zlib.net
      http://www.libpng.org/pub/png/libpng.html
      http://www.libgd.org/Main_Page
  o GRIB2 interface ENABLED
      http://www.ijg.org
      http://www.ece.uvic.ca/~mdadams/jasper
      http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2
      g2clib-1.1.8
  o NetCDF interface ENABLED
      http://www.unidata.ucar.edu/software/netcdf
      netcdf 4.1.1-rc2 of Mar 26 2010 20:33:15 $
  o OPeNDAP gridded data interface ENABLED
  o OPeNDAP station data interface ENABLED
      http://iges.org/grads/gadoc/supplibs.html
      libgadap 2.0
  o HDF4 and HDF5 interfaces ENABLED
      http://hdfgroup.org
      HDF 4.2r3
      HDF5 1.8.4
  o GeoTIFF and KML/TIFF output ENABLED
      http://www.libtiff.org
      http://geotiff.osgeo.org
  o KML contour output ENABLED
  o Shapefile interface ENABLED
      http://shapelib.maptools.org

For additional information please consult http://iges.org/grads




 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110824/5a105dca/attachment-0003.html 


More information about the gradsusr mailing list