[gradsusr] How to create a new Grads file?
Andrew Friedman
andfried at berkeley.edu
Fri Nov 22 01:35:44 EST 2013
Hi Celso,
I’m not sure if this is all of it, but SAVE_pcp.gs is missing a single quote at the end of the line 'define pcp = rec1’
Can you try it now?
Andrew
On Nov 21, 2013, at 3:55 PM, Celso Bandeira de Melo Ribeiro <celso.bandeira at ufjf.edu.br> wrote:
> Hi Andrews and Grads users,
>
> Can anybody help me?
> I am trying to apply masking in NetCdf file (ORIGINAL file =
> pcp_2000M01.nc) and trying to save de results in the same format "NetCdf"
> (result file = pcp_2000M01NEW.nc).
>
> The script (SAVE_pcp.gs) is:
> 'xdfopen amazon_2000N.ctl'
> 'set gxout shaded'
> 'open mask_new.ctl'
> 'set t 1'
> 'rec1 = maskout(pcp,mask.2(t=1))'
> 'd rec1'
> 'define pcp = rec1
> 'set sdfwrite pcp_2000M01_NEW.nc'
> 'sdfwrite pcp'
>
> The results appear that it has been saved file but when I try to open it
> (using amazon_2000NEW.ctl) only show the limits (boundary), but not the
> data inside limits.
> I am attaching the files that I am working.
> I appreciate some help.
> Celso
>
>
> On Fri, 15 Nov 2013 10:10:28 -0800, Andrew Friedman
> <andfried at berkeley.edu>
> wrote:
>> Hi Celso,
>>
>> For save.gs, you also have to download the dependency scripts
>> parsestr.gsf, parseopt.gsf, qdims.gsf and put them in your GrADS script
>> folder.
>> The program should work for gridded data, and create a .ctl control file
>> and .dat data file. You can open them by using the command ‘open’ on the
>> control file.
>>
>> One issue I’ve had with save.gs recently is that the line OPTIONS _cal
>> causes problems in the control file, so try commenting it out.
>>
>> Alternatively, you could use the GrADS command sdfwrite to create a
> netcdf
>> file.
>>
>> If your data aren’t gridded, you may want to try writing as ASCII
>> following the instructions in the User’s Guide.
>>
>> Andrew
>>
>>
>> On Nov 14, 2013, at 1:24 PM, Celso Bandeira de Melo Ribeiro
>> <celso.bandeira at ufjf.edu.br> wrote:
>>
>>> Hello Andrew,
>>> Thank you for your help.
>>> I opened the script but I didn't understand how can I use it in may
> case.
>>> Could you help me more?
>>> Thank you again.
>>> Best wishes.
>>> Celso
>>>
>>>
>>> On Tue, 12 Nov 2013 17:01:07 -0800, Andrew Friedman
>>> <andfried at berkeley.edu>
>>> wrote:
>>>> Hi Celso,
>>>>
>>>> Check out save.gs by Bin Guan.
>>>>
>>>> http://www.atmos.umd.edu/~bguan/grads/GrADS_Scripts.html#save.gs
>>>>
>>>> Andrew
>>>>
>>>> On Nov 12, 2013, at 4:01 PM, Celso Bandeira de Melo Ribeiro
>>>> <celso.bandeira at ufjf.edu.br> wrote:
>>>>
>>>>> Dear Grads user,
>>>>> I need a help.
>>>>> I'm trying to generate monthly rainfall files by accumulating daily
>>>>> rainfall from TRMM-MERGE.
>>>>> I created an scripts in this Grads and it is adding precipitation
> well
>>>>> for
>>>>> each month, but don't know how can I save this result, the monthly
> sum
>>>>> in a
>>>>> new Grads file.
>>>>> Could someone help me to save the monthly rainfall data in a new
> Grads
>>>>> file?
>>>>> Here the code I'm using in Grads.
>>>>>
>>>>> 'open pcp.ctl'
>>>>> 'jan = sum(prec,t=1,t=31)'
>>>>> 'fev = sum(prec,t=32,t=59)'
>>>>> 'mar = sum(prec,t=60,t=90)'
>>>>> 'abr = sum(prec,t=91,t=120)'
>>>>> 'mai = sum(prec,t=121,t=151)'
>>>>> 'jun = sum(prec,t=152,t=181)'
>>>>> 'jul = sum(prec,t=182,t=212)'
>>>>> 'ago = sum(prec,t=213,t=243)'
>>>>> 'sep = sum(prec,t=244,t=273)'
>>>>> 'oct = sum(prec,t=274,t=304)'
>>>>> 'nov = sum(prec,t=305,t=334)'
>>>>> 'dec = sum(prec,t=335,t=365)'
>>>>> 'd jan'
>>>>>
>>>>> I would like to save each monthly file: jan, fev, mar,...,dec.
>>>>>
>>>>> Best,
>>>>> Celso
>>>>>
>>>>>
>>>>> --
>>>>> ____________________________________________
>>>>> 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
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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<amazon_2000N.ctl><amazon_2000NEW.ctl><mask_new.ctl><mask_new.dat><pcp_2000M01.nc><pcp_2000M01_NEW.nc><SAVE_pcp.gs>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list