[gradsusr] help with regrid

Jose Augusto Paixão Veiga veiga.uea at gmail.com
Tue Nov 29 10:00:18 EST 2011


Thank you very much Nick. 

It perfectly worked.

Now both variables (original and regrided one) 'fix' each other in the map.

Thanks again. 

José Augusto P. Veiga, 

======================================
Universidade do Estado do Amazonas 
Departamento de Meteorologia
Escola Superior de Tecnologia (EST)
-----------------------------------------------------------------------------
Av. Darcy Vargas, 1200, Manaus-AM Brasil
Work phone:    (92) 3878 4333
Skype: veiga_j.a.p.
-----------------------------------------------------------------------------
CV: http://lattes.cnpq.br/4027612512091565
URL:http://scientificmet.wordpress.com/
http://nmet.wordpress.com/
-----------------------------------------------------------------------------

On Nov 29, 2011, at 10:22 AM, Nick Heath wrote:

> Hey,
> 
> I think I have found the problem in your script.  Make these changes:
> 
> 'reinit'
> * Data to be regrided into the defalt data
> 'open uvtwg_ncep.ctl'
> * Default data
> 'open uvtwg_ecmwf.ctl'
> 
> 'set dfile 2'
> 'set x 1 240'
> 'set y 1 121'
> 'variavel=lterp(u.1,u.2)'
> 'set gxout fwrite'
> 'set fwrite uvtwg_new.bin'
> 
> 
> 
> 'd variavel'
> 
> 'disable fwrite'
> 
> I believe that will work.
> 
> -Nick
> 
> 
> ----- Original Message -----
> From: Jose Augusto Paixão Veiga <veiga.uea at gmail.com>
> Date: Tuesday, November 29, 2011 2:14 pm
> Subject: Re: [gradsusr] help with regrid
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> 
>> Dear Nick I changed things in the script and in CTL as you suggest 
>> me, but the problem persist.
>> 
>> My Script:
>> 
>> 'reinit'
>> * Data to be regrided into the defalt data
>> 'open uvtwg_ncep.ctl'
>> * Default data
>> 'open uvtwg_ecmwf.ctl'
>> 
>> 
>> 'set gxout fwrite'
>> 'set fwrite uvtwg_new.bin'
>> 
>> 'variavel=lterp(u.1,u.2)'
>> 
>> 'd variavel'
>> 
>> 'disable fwrite'
>> 
>> 
>> The CTL modified
>> 
>> dset   uvtwg_new.bin
>> undef  9.999E+20 
>> title  NCEP 1.5x1.5 graus 
>> xdef 240  linear     0.0 1.5
>> ydef 121  linear   -90.0 1.5
>> zdef   1  linear     1   1 
>> tdef   1  linear  JAN1979 1mo 
>> vars  1
>> u 0 99  zonal wind            (U)  [m/sec]   
>> endvars
>> 
>> Any other hint?
>> 
>> 
>> Thanks for help.
>> 
>> 
>> José Augusto P. Veiga, 
>> 
>> ======================================
>> Universidade do Estado do Amazonas 
>> Departamento de Meteorologia
>> Escola Superior de Tecnologia (EST)
>> --------------------------------------------------------------------
>> ---------
>> Av. Darcy Vargas, 1200, Manaus-AM Brasil
>> Work phone:    (92) 3878 4333
>> Skype: veiga_j.a.p.
>> --------------------------------------------------------------------
>> ---------
>> CV: http://lattes.cnpq.br/4027612512091565
>> URL:http://scientificmet.wordpress.com/
>> http://nmet.wordpress.com/
>> --------------------------------------------------------------------
>> ---------
>> 
>> On Nov 29, 2011, at 9:48 AM, Nick Heath wrote:
>> 
>>> José Augusto P. Veiga,
>>> 
>>> You can remove the 'set gxout shaded' when you are writing to a 
>> file.  In the control file for the new data you created trying 
>> making this change:
>>> 
>>> dset   uvtwg_new.bin
>>> undef  9.999E+20
>>> title  NCEP 1.5x1.5 graus
>>> xdef 240  linear     0.0 1.5
>>> ydef 121  linear   -90.0 1.5
>>> zdef   1  linear     1   1
>>> tdef   1  linear  JAN1979 1mo
>>> vars  1
>>> u 0 99  zonal wind            (U)  [m/sec]  
>>> endvars
>>> 
>>> In the past, I have found that in the variable description I 
>> needed 0 99 instead of what was originally in there.  I'm not sure 
>> if that will fix it, but it's worth a shot.
>>> Good luck.
>>> 
>>> -Nick
>>> 
>>> 
>>> ----- Original Message -----
>>> From: Jose Augusto Paixão Veiga <veiga.uea at gmail.com>
>>> Date: Tuesday, November 29, 2011 1:36 pm
>>> Subject: [gradsusr] help with regrid
>>> To: GrADS Users Forum <gradsusr at gradsusr.org>
>>> 
>>>> Dear all,
>>>> 
>>>> I am trying to regrid NCEP (2.5 x 2.5, one time, one level) data 
>>>> into a ECMWF (1.5x1.5, one time, one level) data, with lterp 
>>>> command, issuing to compare both. To do this job, I used the 
>> script 
>>>> bellow:
>>>> 'reinit'
>>>> * Data to be regrided into the defalt data
>>>> 'open uvtwg_ncep.ctl'
>>>> 
>>>> * Default data
>>>> 'open uvtwg_ecmwf.ctl'
>>>> 
>>>> 'variavel=lterp(u.1,u.2)'
>>>> 'd variavel'
>>>> 
>>>> 'set gxout fwrite'
>>>> 'set fwrite uvtwg_new.bin'
>>>> 
>>>> 'set gxout shaded'
>>>> 'd variavel'
>>>> 
>>>> 'disable fwrite' 
>>>> 
>>>> 
>>>> 
>>>> After running the above script I construct the ctl file to 
>> receive 
>>>> the uvtwg_new.bin. And so far so good. However, when I opened 
>> GrAds 
>>>> and displayed the variable recorded it saw as it was shifted in 
>>>> relation to the original data.
>>>> 
>>>> I have attached both figures and included bellow the CTL files 
>> that 
>>>> I am using as a hope to some help.
>>>> 
>>>> 
>>>> Original CTL (NCEP)
>>>> 
>>>> dset   uvtwg_ncep.bin
>>>> undef  9.999E+20 
>>>> title  NCEP 2.5x2.5 graus 
>>>> xdef 144  linear     0.0 2.5
>>>> ydef  73  linear   -90.0 2.5
>>>> zdef   1  linear     1   1 
>>>> tdef   1  linear  JAN1979 1mo 
>>>> vars  5
>>>> u 1  33,100  zonal wind            (U)  [m/sec]   
>>>> v 1  34,100  meridional wind       (V)  [m/sec]   
>>>> t 1  11,100  temperature           (T)      [C]   
>>>> w 1  39,100  vertical velocity     (w)  [Pa/s]    
>>>> g 1  40,100  geopotencial          (w)  [m²/s²]
>>>> 
>>>> Defalt CTL (ECMWF)
>>>> 
>>>> dset   uvtwg_ecmwf.bin
>>>> undef  9.999E+20 
>>>> title  ERA INTERIN 1.5x1.5 grau 
>>>> xdef 240 linear     0.0 1.5
>>>> ydef 121 linear   -90.0 1.5
>>>> zdef   1 linear     1   1 
>>>> tdef   1 linear  JAN1979 1mo 
>>>> vars  5
>>>> u 1  33,100  zonal wind            (U)  [m/sec]   
>>>> v 1  34,100  meridional wind       (V)  [m/sec]   
>>>> t 1  11,100  temperature           (T)      [C]   
>>>> w 1  39,100  vertical velocity     (w)  [Pa/s]    
>>>> g 1  40,100  geopotencial          (w)  [m²/s²]   
>>>> endvars
>>>> 
>>>> CTL for the regrided data (uvtwg_new.bin)
>>>> 
>>>> dset   uvtwg_new.bin
>>>> undef  9.999E+20 
>>>> title  NCEP 1.5x1.5 graus 
>>>> xdef 240  linear     0.0 1.5
>>>> ydef 121  linear   -90.0 1.5
>>>> zdef   1  linear     1   1 
>>>> tdef   1  linear  JAN1979 1mo 
>>>> vars  1
>>>> u 1  33,100  zonal wind            (U)  [m/sec]   
>>>> endvars
>>>> 
>>>> 
>>>> Thanks in advance,
>>>> 
>>>> 
>>>> José Augusto P. Veiga, 
>>>> 
>>>> ======================================
>>>> Universidade do Estado do Amazonas 
>>>> Departamento de Meteorologia
>>>> Escola Superior de Tecnologia (EST)
>>>> -----------------------------------------------------------------
>> ---
>>>> ---------
>>>> Av. Darcy Vargas, 1200, Manaus-AM Brasil
>>>> Work phone:    (92) 3878 4333
>>>> Skype: veiga_j.a.p.
>>>> -----------------------------------------------------------------
>> ---
>>>> ---------
>>>> CV: http://lattes.cnpq.br/4027612512091565
>>>> URL:http://scientificmet.wordpress.com/
>>>> http://nmet.wordpress.com/
>>>> -----------------------------------------------------------------
>> ---
>>>> ---------
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Nick Heath
>>> Graduate Student
>>> Florida State University
>>> Department of Earth, Ocean, and Atmospheric Science
>>> Love Bldg. Rm 311
>>> 
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>> 
>> 
> 
> 
> 
> 
> 
> 
> 
> Nick Heath
> Graduate Student
> Florida State University
> Department of Earth, Ocean, and Atmospheric Science
> Love Bldg. Rm 311
> 
> _______________________________________________
> 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/20111129/5e13eb40/attachment-0003.html 


More information about the gradsusr mailing list