<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'>Hello Celso,<div><br></div><div>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:</div><div><br></div><div>'set t 1'</div><div>'d maskout(prec,mask.2(t=1))'</div><div>'set t 2'</div><div>'d maskout(prec,mask.2(t=1))'<br>...</div><div><br></div><div>Best regards,</div><div><br><br><div><span name="x"></span>Eric L. Altshuler<br>Research Scientist<br>Center for Ocean-Land-Atmosphere Studies<br>253 Research Hall, Mail Stop 6C5<div>George Mason University</div><div>4400 University Drive<br>Fairfax, VA 22030 USA<br><br>E-mail: ela@cola.iges.org<br>Phone: (703) 993-5725<br>Fax: (703) 993-5770</div><span name="x"></span><br></div><br><hr id="zwchr"><b>From: </b>"Celso Bandeira de Melo Ribeiro" <celso.bandeira@ufjf.edu.br><br><b>To: </b>"GrADS Users Forum" <gradsusr@gradsusr.org><br><b>Sent: </b>Thursday, November 7, 2013 6:12:04 PM<br><b>Subject: </b>Re: [gradsusr] Problem with maskout<br><br>Hello Kishore,<br>The command "x=maskout(your_var,mask.2(t=1))" works well for the first<br>time.<br>The file.dat don't have problema as I was thinking.<br>But It doesn’t work for times different of 1.<br>See the message of error (attached file):<br><br>ga-> d maskout(prec,mask.2(t=2))<br>Low Level I/O Error: Read error on data file <br> Data file name = am_maskaut.dat <br> Error reading 245 bytes at location 306740 <br>Data Request Error: Error for variable 'mask.2'<br>Operation Error: Error from maskout function<br> Error ocurred at column 1<br>DISPLAY error: Invalid expression <br> Expression = maskout(prec,mask.2(t=2))<br>ga-> <br><br>Is it possible use run maskout for all time (365 days)?<br>Can you help me again?<br>Thank you.<br>Celso<br><br><br>On Thu, 7 Nov 2013 09:59:59 +0530, Kishore Ragi <kishoreragi@gmail.com><br>wrote:<br>> just use the command like the following according to your need ..<br>> <br>> open your file and then open mask file as second ... then use the<br>following<br>> command ...<br>> <br>> x=maskout(your_var,mask.2(t=1))<br>> <br>> Cheers,<br>> <br>> Kishore<br>> <br>> <br>> On Thu, Nov 7, 2013 at 9:45 AM, Celso Bandeira de Melo Ribeiro <<br>> celso.bandeira@ufjf.edu.br> wrote:<br>> <br>>> Hello Alejandro Meza and grads users,<br>>> My name is Celso and I am trying extract daily precipitation from<br>Merge<br>>> TRMM by INPE (NATIONAL INSTITUTE OF RESEARCH SPATIAL - Brasil) using<br>>> maskout function, same that you did.<br>>> I did one maskout ctl using MetoInfo software, following the same<br>>> proceedings but I don't know how to use this mask in grads.<br>>> The maskout ctl is:<br>>><br>>> DSET am_maskaut.dat<br>>> TITLE Mask data<br>>> UNDEF -9999<br>>> XDEF 245 LINEAR -82.8 0.2<br>>> YDEF 313 LINEAR -50.2 0.2<br>>> ZDEF 1 LINEAR 1 1<br>>> TDEF 365 LINEAR 1Jan1998 1dy<br>>> VARS 1<br>>> mask 0 99 background mask data<br>>> ENDVARS<br>>><br>>> Looking forward for any help.<br>>> Thank you,<br>>> Celso<br>>><br>>> ____________________________________________<br>>> Celso Bandeira de Melo Ribeiro<br>>> Universidade Federal de Juiz de Fora - UFJF<br>>> Faculdade de Engenharia, Plataforma 4<br>>> Departamento de Engenharia Ambiental e Sanitaria<br>>> Bairro Martelos, Juiz de Fora (MG) CEP. 36036-900<br>>> tel. (32) 2102-3400<br>>> Visiting Scholar in Texas A&M University<br>>><br>>><br>>> On Fri, 25 Oct 2013 12:57:30 -0400, Jennifer Adams <jma@cola.iges.org><br>>> wrote:<br>>> > Try using a local override of the time index in your expression, like<br>>> this:<br>>> > ga-> sst2 = maskout(sst1,mask.2(t=1))<br>>> ><br>>> > --Jennifer<br>>> ><br>>> > On Oct 25, 2013, at 12:45 PM, Alejandro Meza Mayorga wrote:<br>>> ><br>>> >> Hello grads users. I have netcdf file containing daily sst data over<br>a<br>>> >> year, and I need to extract the grid data over an irregular area for<br>>> each<br>>> >> day, so I used the maskout function.<br>>> >><br>>> >> First I created a shapefile for the area that I needed using ArcGis<br>>> >> software (1.png).<br>>> >><br>>> >> Then I followed the instructions posted in a previous thread by Dr.<br>>> >> Yaqiang Wang<br>>> >> (http://gradsusr.org/pipermail/gradsusr/2013-April/034603.html). So<br>>> using<br>>> >> MeteoInfo software I made a grads maskout data with the shapefile<br>>> >> (2.png), and I changed the TDEF in the maskout ctl file just as<br>stated<br>>> >> (3.png).<br>>> >><br>>> >> The maskout works fine for the first day (t=1) of the data (4.png),<br>>> >> but<br>>> >> the problem is that when I try to use another 't' different than 1<br>it<br>>> >> gives an error (5.png).<br>>> >><br>>> >> I hope you could give some ideas of what the error might be. Is it a<br>>> >> mistake of how to create the shapefile, or an error in the control<br>>> file?<br>>> >><br>>> >> Looking forward for your help. Thanks in advance.<br>>> >><br>>> >> Alejandro.<br>>> >><br>>> >><br>>> >><br>>><br>>><br><1.png><2.png><3.png><4.png><5.png>_______________________________________________<br>>> >> gradsusr mailing list<br>>> >> gradsusr@gradsusr.org<br>>> >> http://gradsusr.org/mailman/listinfo/gradsusr<br>>> ><br>>> > --<br>>> > Jennifer M. Adams<br>>> > Center for Ocean-Land-Atmosphere Studies (COLA)<br>>> > 111 Research Hall, Mail Stop 2B3<br>>> > George Mason University<br>>> > 4400 University Drive<br>>> > Fairfax, VA 22030<br>>><br>>> --<br>>> _______________________________________________<br>>> gradsusr mailing list<br>>> gradsusr@gradsusr.org<br>>> http://gradsusr.org/mailman/listinfo/gradsusr<br>>><br><br>-- <br>____________________________________________<br>Prof. Celso Bandeira de Melo Ribeiro<br>Universidade Federal de Juiz de Fora - UFJF<br>Faculdade de Engenharia, Plataforma 4<br>Departamento de Engenharia Ambiental e Sanitaria<br>Bairro Martelos, Juiz de Fora (MG) CEP. 36036-900<br>tel. (32) 2102-3400<br>Visiting Scholar in Texas A&M University<br>_______________________________________________<br>gradsusr mailing list<br>gradsusr@gradsusr.org<br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></div></body></html>