[gradsusr] Problem with maskout

Eric Altshuler ela at cola.iges.org
Thu Nov 7 19:10:34 EST 2013


Hello Celso, 


Does your mask data vary in time? If not, there may be only one time level of data in the mask file, in which case you should have 1 instead of 365 in your TDEF line, and always use t=1 for the mask variable: 


'set t 1' 
'd maskout(prec,mask.2(t=1))' 
'set t 2' 
'd maskout(prec,mask.2(t=1))' 
... 


Best regards, 



Eric L. Altshuler 
Research Scientist 
Center for Ocean-Land-Atmosphere Studies 
253 Research Hall, Mail Stop 6C5 
George Mason University 
4400 University Drive 
Fairfax, VA 22030 USA 

E-mail: ela at cola.iges.org 
Phone: (703) 993-5725 
Fax: (703) 993-5770 

----- Original Message -----
From: "Celso Bandeira de Melo Ribeiro" <celso.bandeira at ufjf.edu.br> 
To: "GrADS Users Forum" <gradsusr at gradsusr.org> 
Sent: Thursday, November 7, 2013 6:12:04 PM 
Subject: Re: [gradsusr] Problem with maskout 

Hello Kishore, 
The command "x=maskout(your_var,mask.2(t=1))" works well for the first 
time. 
The file.dat don't have problema as I was thinking. 
But It doesn’t work for times different of 1. 
See the message of error (attached file): 

ga-> d maskout(prec,mask.2(t=2)) 
Low Level I/O Error: Read error on data file 
Data file name = am_maskaut.dat 
Error reading 245 bytes at location 306740 
Data Request Error: Error for variable 'mask.2' 
Operation Error: Error from maskout function 
Error ocurred at column 1 
DISPLAY error: Invalid expression 
Expression = maskout(prec,mask.2(t=2)) 
ga-> 

Is it possible use run maskout for all time (365 days)? 
Can you help me again? 
Thank you. 
Celso 


On Thu, 7 Nov 2013 09:59:59 +0530, Kishore Ragi <kishoreragi at gmail.com> 
wrote: 
> just use the command like the following according to your need .. 
> 
> open your file and then open mask file as second ... then use the 
following 
> command ... 
> 
> x=maskout(your_var,mask.2(t=1)) 
> 
> Cheers, 
> 
> Kishore 
> 
> 
> On Thu, Nov 7, 2013 at 9:45 AM, Celso Bandeira de Melo Ribeiro < 
> celso.bandeira at ufjf.edu.br> wrote: 
> 
>> Hello Alejandro Meza and grads users, 
>> My name is Celso and I am trying extract daily precipitation from 
Merge 
>> TRMM by INPE (NATIONAL INSTITUTE OF RESEARCH SPATIAL - Brasil) using 
>> maskout function, same that you did. 
>> I did one maskout ctl using MetoInfo software, following the same 
>> proceedings but I don't know how to use this mask in grads. 
>> The maskout ctl is: 
>> 
>> DSET am_maskaut.dat 
>> TITLE Mask data 
>> UNDEF -9999 
>> XDEF 245 LINEAR -82.8 0.2 
>> YDEF 313 LINEAR -50.2 0.2 
>> ZDEF 1 LINEAR 1 1 
>> TDEF 365 LINEAR 1Jan1998 1dy 
>> VARS 1 
>> mask 0 99 background mask data 
>> ENDVARS 
>> 
>> Looking forward for any help. 
>> Thank you, 
>> Celso 
>> 
>> ____________________________________________ 
>> Celso Bandeira de Melo Ribeiro 
>> Universidade Federal de Juiz de Fora - UFJF 
>> Faculdade de Engenharia, Plataforma 4 
>> Departamento de Engenharia Ambiental e Sanitaria 
>> Bairro Martelos, Juiz de Fora (MG) CEP. 36036-900 
>> tel. (32) 2102-3400 
>> Visiting Scholar in Texas A&M University 
>> 
>> 
>> On Fri, 25 Oct 2013 12:57:30 -0400, Jennifer Adams <jma at cola.iges.org> 
>> wrote: 
>> > Try using a local override of the time index in your expression, like 
>> this: 
>> > ga-> sst2 = maskout(sst1,mask.2(t=1)) 
>> > 
>> > --Jennifer 
>> > 
>> > On Oct 25, 2013, at 12:45 PM, Alejandro Meza Mayorga wrote: 
>> > 
>> >> Hello grads users. I have netcdf file containing daily sst data over 
a 
>> >> year, and I need to extract the grid data over an irregular area for 
>> each 
>> >> day, so I used the maskout function. 
>> >> 
>> >> First I created a shapefile for the area that I needed using ArcGis 
>> >> software (1.png). 
>> >> 
>> >> Then I followed the instructions posted in a previous thread by Dr. 
>> >> Yaqiang Wang 
>> >> (http://gradsusr.org/pipermail/gradsusr/2013-April/034603.html). So 
>> using 
>> >> MeteoInfo software I made a grads maskout data with the shapefile 
>> >> (2.png), and I changed the TDEF in the maskout ctl file just as 
stated 
>> >> (3.png). 
>> >> 
>> >> The maskout works fine for the first day (t=1) of the data (4.png), 
>> >> but 
>> >> the problem is that when I try to use another 't' different than 1 
it 
>> >> gives an error (5.png). 
>> >> 
>> >> I hope you could give some ideas of what the error might be. Is it a 
>> >> mistake of how to create the shapefile, or an error in the control 
>> file? 
>> >> 
>> >> Looking forward for your help. Thanks in advance. 
>> >> 
>> >> Alejandro. 
>> >> 
>> >> 
>> >> 
>> 
>> 
<1.png><2.png><3.png><4.png><5.png>_______________________________________________ 
>> >> gradsusr mailing list 
>> >> gradsusr at gradsusr.org 
>> >> http://gradsusr.org/mailman/listinfo/gradsusr 
>> > 
>> > -- 
>> > Jennifer M. Adams 
>> > Center for Ocean-Land-Atmosphere Studies (COLA) 
>> > 111 Research Hall, Mail Stop 2B3 
>> > George Mason University 
>> > 4400 University Drive 
>> > Fairfax, VA 22030 
>> 
>> -- 
>> _______________________________________________ 
>> gradsusr mailing list 
>> gradsusr at gradsusr.org 
>> http://gradsusr.org/mailman/listinfo/gradsusr 
>> 

-- 
____________________________________________ 
Prof. Celso Bandeira de Melo Ribeiro 
Universidade Federal de Juiz de Fora - UFJF 
Faculdade de Engenharia, Plataforma 4 
Departamento de Engenharia Ambiental e Sanitaria 
Bairro Martelos, Juiz de Fora (MG) CEP. 36036-900 
tel. (32) 2102-3400 
Visiting Scholar in Texas A&M University 
_______________________________________________ 
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/20131107/17ffcd41/attachment.html 


More information about the gradsusr mailing list