[gradsusr] Converting to regular horizontal grid spacing.

Andrew Revering andy at f5data.com
Tue Jul 8 01:30:17 EDT 2014


It looks like your irregular grid is in a variable 'prec'.

So if you were to do:

'define precnew = re(prec,0.5)'

you would have it interpolated to a 0.5 degree grid. You can change the 0.5
to whatever spacing you think is appropriate.

I haven't done anything like this before, so I'm not sure if the re()
function is going to give you an error if it's not a regular grid, but it
might work. :-)

I'm also not sure what will happen when you get to regions where your grid
has sparse or missing data. That's where you might want to experiment with
the degree in your new grid spacing. A larger number will probably allow it
to interpolate farther out, but a very small value may return a bunch of
missing data points...I'm not sure.

Others who know more about this can hopefully chime in.



Andrew Revering - Follow @andrewrevering
<https://twitter.com/intent/follow?screen_name=andrewrevering&source=email&variant=2.0&xd_token=ceae5c40173e5>
on Twitter
Convective Development, Inc.
PO Box 511, Cambridge, MN 55008
http://www.convectivedevelopment.com/


On Mon, Jul 7, 2014 at 11:41 PM, Jose Augusto Paixão Veiga <
veiga.uea at gmail.com> wrote:

> Hi Andrew,
>
> I presume the command 'define newgrid = re(oldgrid,1.0)' you've suggest
> me can be work in GrAds. If so, old grid would be a function or a specific
> value? It is not clear yet for me.
>
> Yes, I am trying to use regular grid date instead not regular.
>
> My original ctl file is bellow. But I need have my dx and dy  equally
> spaced.
>
> I have total precipitation.
>
> Thanks for your e-mail.
>
> dset ^sum-prec-OCT-APR-KF-d01.bin
> undef 1.e30
> title  OUTPUT FROM WRF V3.5 MODEL
> xdef  103 levels
>     262.8432
>     263.5718
>     264.3003
>     265.0289
>     265.7574
>     266.4860
>     267.2146
>     267.9431
>     268.6717
>     269.4003
>     270.1288
>     270.8574
>     271.5860
>     272.3145
>     273.0431
>     273.7717
>     274.5002
>     275.2288
>     275.9574
>     276.6859
>     277.4145
>     278.1431
>     278.8716
>     279.6002
>     280.3287
>     281.0573
>     281.7859
>     282.5144
>     283.2430
>     283.9716
>     284.7001
>     285.4287
>     286.1573
>     286.8858
>     287.6144
>     288.3430
>     289.0715
>     289.8001
>     290.5287
>     291.2572
>     291.9858
>     292.7144
>     293.4429
>     294.1715
>     294.9001
>     295.6286
>     296.3572
>     297.0858
>     297.8143
>     298.5429
>     299.2714
>     300.0000
>     300.7286
>     301.4571
>     302.1857
>     302.9142
>     303.6428
>     304.3714
>     305.0999
>     305.8285
>     306.5571
>     307.2856
>     308.0142
>     308.7428
>     309.4713
>     310.1999
>     310.9285
>     311.6570
>     312.3856
>     313.1142
>     313.8427
>     314.5713
>     315.2999
>     316.0284
>     316.7570
>     317.4856
>     318.2141
>     318.9427
>     319.6713
>     320.3998
>     321.1284
>     321.8569
>     322.5855
>     323.3141
>     324.0426
>     324.7712
>     325.4998
>     326.2283
>     326.9569
>     327.6855
>     328.4140
>     329.1426
>     329.8712
>     330.5997
>     331.3283
>     332.0569
>     332.7854
>     333.5140
>     334.2426
>     334.9711
>     335.6997
>     336.4283
>     337.1568
> ydef   89 levels
>    -34.71973
>    -34.11872
>    -33.51342
>    -32.90385
>    -32.29005
>    -31.67207
>    -31.04995
>    -30.42374
>    -29.79348
>    -29.15923
>    -28.52103
>    -27.87895
>    -27.23304
>    -26.58335
>    -25.92998
>    -25.27294
>    -24.61234
>    -23.94821
>    -23.28067
>    -22.60976
>    -21.93555
>    -21.25815
>    -20.57760
>    -19.89401
>    -19.20746
>    -18.51802
>    -17.82580
>    -17.13087
>    -16.43335
>    -15.73330
>    -15.03085
>    -14.32607
>    -13.61906
>    -12.90993
>    -12.19879
>    -11.48574
>    -10.77088
>    -10.05432
>    -9.336166
>    -8.616524
>    -7.895515
>    -7.173248
>    -6.449829
>    -5.725380
>    -5.000008
>    -4.273834
>    -3.546967
>    -2.819534
>    -2.091644
>    -1.363419
>   -0.6349640
>    9.3582153E-02
>    0.8221283
>     1.550529
>     2.278679
>     3.006462
>     3.733765
>     4.460464
>     5.186440
>     5.911591
>     6.635788
>     7.358917
>     8.080879
>     8.801544
>     9.520813
>     10.23856
>     10.95470
>     11.66911
>     12.38168
>     13.09231
>     13.80090
>     14.50734
>     15.21154
>     15.91339
>     16.61279
>     17.30966
>     18.00390
>     18.69541
>     19.38412
>     20.06992
>     20.75273
>     21.43247
>     22.10907
>     22.78243
>     23.45250
>     24.11917
>     24.78239
>     25.44209
>     26.09818
> zdef  1 linear 1 1
> tdef  213 linear 12Z01OCT2011    1440MN
> VARS   1
> prec   1  0  ACUMULATED TOTAL PRECIPITATION (CUMULUS + GRID SCALE) (mm)
> ENDVARS
>
>
>
>
> José Augusto P. Veiga,
>
> ======================================
> Coordenador do curso de Meteorologia da UEA
> 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, Ramal 4333
> Cell   phone :    (92) 8196 7122
> Skype: veiga_j.a.p.
>
> -----------------------------------------------------------------------------
> CV: http://lattes.cnpq.br/4027612512091565
> URL:http://scientificmet.wordpress.com/
>
> -----------------------------------------------------------------------------
>
>
>
>
>
> On Tue, Jul 8, 2014 at 12:19 AM, Andrew Revering <andy at f5data.com> wrote:
>
>> This is a real guess since I've never worked with an irregular grid in
>> GrADS, but couldn't you just regrid to a certain degree grid and it would
>> interpolate to a regular grid?
>>
>> IE
>>
>> 'define newgrid = re(oldgrid,1.0)'
>>
>> would regrid it to a 1.0° grid??
>>
>> While we're on the topic, how would you import/display an irregular grid
>> in GrADS? Lets say you have surface temperatures to plot?
>>
>> Andrew Revering - Follow @andrewrevering
>> <https://twitter.com/intent/follow?screen_name=andrewrevering&source=email&variant=2.0&xd_token=ceae5c40173e5>
>> on Twitter
>> Convective Development, Inc.
>> PO Box 511, Cambridge, MN 55008
>> http://www.convectivedevelopment.com/
>>
>>
>> On Mon, Jul 7, 2014 at 11:13 PM, Jose Augusto Paixão Veiga <
>> veiga.uea at gmail.com> wrote:
>>
>>> Dear Kishore,
>>>
>>> I tried this (cdo -f nc import_binary my.ctl output.nc), however I just
>>> receive the message bellow:
>>>
>>>  cdo import_binary (Abort): I/O error reading record!
>>>
>>>
>>> Do you have any idea what does it mean?
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>>
>>> On Mon, Jul 7, 2014 at 11:35 PM, Kishore Ragi <kishoreragi at gmail.com>
>>> wrote:
>>>
>>>> cdo -f nc import_binary xxxxxxx.ctl yyyyyyy.nc
>>>>
>>>
>>>
>>>
>>>
>>> José Augusto P. Veiga,
>>>
>>> ======================================
>>> Coordenador do curso de Meteorologia da UEA
>>> 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, Ramal 4333
>>> Cell   phone :    (92) 8196 7122
>>> Skype: veiga_j.a.p.
>>>
>>> -----------------------------------------------------------------------------
>>> CV: http://lattes.cnpq.br/4027612512091565
>>> URL:http://scientificmet.wordpress.com/
>>>
>>> -----------------------------------------------------------------------------
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
> _______________________________________________
> 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/20140708/efc852dd/attachment-0001.html 


More information about the gradsusr mailing list