[gradsusr] Error: Axis sizes not the same

Jeff Duda jeffduda319 at gmail.com
Thu Jul 7 16:03:34 EDT 2016


Justin,
As in my previous response to another thread, use the lterp function - it
performs linear interpolation to match two grids. It is a fairly simple
function. If for whatever reason you don't want to do that or it doesn't
work, you can change the XDEF and YDEF lines of your control files to match
each other, as that information is what GrADS uses to determine if you can
perform operations on two grids. The PDEF entries do not have to match.

Jeff Duda

On Thu, Jul 7, 2016 at 2:38 PM, Justin Hicks <jhicks2014 at gmail.com> wrote:

> GrADS users,
>
> I previously used GLDAS files and mask files to calculate monthly area
> averages. However, I am trying to get MERRA2 data to work with the masks
> now. I keep getting an error saying:
>
> ga-> run EXAMPLE_MASK_SCRIPT
> Error in gagchk: axis sizes are not the same
> Operation error:  Incompatable grids
>   Dimension = 0
>   1st grid range = -179 181   2nd = 1 360
> Operation Error:  Error from maskout function
> Operation Error:  Error from aave function
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression =
> aave(maskout(prectot.2,mask.1(time=00:30z01feb1980)),lon=-179.5,lon=179.5,lat=-89.5,lat=89.5)
>
>
> I tried to fix x and y grid points using the following command, but it did
> not work:
>
> aave(maskout(prectot.2(x=1,y=1),mask.1(x=1,y=1
> ,time=00:30z01feb1980)),lon=-179.5,lon=179.5,lat=-89.5,lat=89.5)
>
>
>
>
>
> The result of 'q dims' of the mask file is:
>
> Default file number is: 1
> X is fixed     Lon = 0  X = 180.5
> Y is fixed     Lat = -90  Y = 0.5
> Z is fixed     Lev = 0  Z = 1
> T is fixed     Time = 00:30Z01DEC1991  T = 143
> E is fixed     Ens = 1  E = 1
>
> The result of 'q dims' of the MERRA2 file is:
>
> Default file number is: 2
> X is fixed     Lon = 0  X = 1
> Y is fixed     Lat = -90  Y = 1
> Z is fixed     Lev = 0  Z = 1
> T is fixed     Time = 00:30Z01DEC1991  T = 143
> E is fixed     Ens = 1  E = 1
>
>
> How can I get the x and y grid points to match up? I'm not even sure if
> this is the issue, as the GLDAS and mask files didn't have matching x and y
> grid points, yet they still worked.
>
> -Justin
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Post-doctoral research associate
University of Oklahoma School of Meteorology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160707/889b30b3/attachment-0001.html 


More information about the gradsusr mailing list