[gradsusr] Error: Axis sizes not the same

Justin Hicks jhicks2014 at gmail.com
Thu Jul 7 16:09:13 EDT 2016


Jeff,

Thanks, I'll try the lterp function. I tried changing the xdef and ydef
before but I still had the same issue.

-Justin

On Thu, Jul 7, 2016 at 4:03 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:

> 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
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160707/7b935427/attachment.html 


More information about the gradsusr mailing list