[gradsusr] Using Maskout Function To Compute Areal Average

Perry, Aaron @ LSC Aaron.Perry at lsc.vsc.edu
Wed Jan 8 13:13:20 EST 2014


Good Afternoon Kishore,

I've gone back and tried to just use a plain .ctl file instead of sdfopen and I am still running into a maelstrom of errors:

Error in gagchk: axis sizes are not the same
Operation error:  Incompatable grids
Operation Error:  Error from maskout function
Operation Error:  Error from aave function
  Error ocurred at column 1
DEFINE error:  Invalid expression.
Syntax Error:  Invalid Operand
  'avgtemp' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = avgtemp
Syntax Error:  Invalid Operand
  'avgtemp' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = avgtemp
Error in format:  2rd argument invalid.
  Error occurred on line 46
  In file /home/muaddib/grads/scripts/dec2013/aavetest.gs




Onward and Upward,

Aaron D. Perry
Boston, MA
Lyndon State College '15
Twitter: @AaronPerryLSC<https://twitter.com/AaronPerryLSC>
Mobile: 617-780-4312
________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Kishore Ragi [kishoreragi at gmail.com]
Sent: Wednesday, January 08, 2014 3:43 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] Using Maskout Function To Compute Areal Average

Before going to write a program, just do the following to make sure it is working fine.

go to the working directory and open grads in terminal and invoke the following commands:

'open temp_var.ctl (don't use sdfopen)
'open mask.ctl'
'd aave(maskout(temp,mask.2(t=1)),lon=-125,lon=-66,lat=24,lat=50)'

(An instruction before doing this: open ctl file and check path of its .data file. If not right, correct the path)

Cheers,

Kishore



On Wed, Jan 8, 2014 at 12:26 PM, Perry, Aaron @ LSC <Aaron.Perry at lsc.vsc.edu<mailto:Aaron.Perry at lsc.vsc.edu>> wrote:
I still can't seem to get this aave(maskout command to run properly.

I've attached my script and the associated MeteoInfo-generated ctl file to this email to see if anyone could take a look at it for me.



Onward and Upward,

Aaron D. Perry
Boston, MA
Lyndon State College '15
Twitter: @AaronPerryLSC<https://twitter.com/AaronPerryLSC>
Mobile: 617-780-4312<tel:617-780-4312>
________________________________
From: gradsusr-bounces at gradsusr.org<mailto:gradsusr-bounces at gradsusr.org> [gradsusr-bounces at gradsusr.org<mailto:gradsusr-bounces at gradsusr.org>] on behalf of Kishore Ragi [kishoreragi at gmail.com<mailto:kishoreragi at gmail.com>]
Sent: Tuesday, January 07, 2014 11:44 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] Using Maskout Function To Compute Areal Average

Perry,

you just open your data ctl file and then your maskout ctl file as 2.

for your area average: d aave(maskout(your_var,mask.2(t=1)),lon=X1,lon=X2,lat=Y1,lat=Y2)

mask.2 shows that variable mask is second file and use always (t=1) for mask as the t step is only.

Hope it solves your purpose!!!

Cheers,

Kishore


On Wed, Jan 8, 2014 at 9:24 AM, Yaqiang Wang <yaqiang.wang at gmail.com<mailto:yaqiang.wang at gmail.com>> wrote:
Look at GrADS online document: http://www.iges.org/grads/gadoc/gradfuncmaskout.html

You can open more than one data-descriptor file. Each file is numbered according to the order in which it was opened.
http://www.iges.org/grads/gadoc/gradcomdopen.html


On Wed, Jan 8, 2014 at 11:41 AM, Perry, Aaron @ LSC <Aaron.Perry at lsc.vsc.edu<mailto:Aaron.Perry at lsc.vsc.edu>> wrote:
Good Evening All,

I'm currently trying to compute an areal average and I have created a masked out control file with MeteoInfo for the area that I'd like to compute an average of.

What do I do with the MeteoInfo-created .ctl file now?

The reason why I ask is because there's already a .ctl file for the displayed data and now there's one for just the area and I don't think that I want to be using them both at the same time...

Any guidance would be greatly appreciated.


Onward and Upward,

Aaron D. Perry
Boston, MA
Lyndon State College '15
Twitter: @AaronPerryLSC<https://twitter.com/AaronPerryLSC>
Mobile: 617-780-4312<tel:617-780-4312>

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr




--
*************************************************
Dr. Yaqiang Wang
Chinese Academy of Meteorological Sciences (CAMS)
46, Zhong-Guan-Cun South Avenue
Beijing, 100081
China
             
yaqiang.wang at gmail.com<mailto:yaqiang.wang at gmail.com>

http://www.meteothinker.com
**************************************************

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140108/20229ed4/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: conus_p05.ctl
Type: application/octet-stream
Size: 268 bytes
Desc: conus_p05.ctl
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20140108/20229ed4/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aavetest.gs
Type: application/octet-stream
Size: 871 bytes
Desc: aavetest.gs
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20140108/20229ed4/attachment-0001.obj 


More information about the gradsusr mailing list