[gradsusr] NCEP global SST data and GrADS

Bill Reilly bill_reilly at compuserve.com
Sat Feb 3 13:01:30 EST 2018


Jennifer:

Thanks for your reply and explanation.

Unfortunately I'm using GrADS in Windows and I've never been able to get 
g2ctl.exe working, so I've been using Degrib to create control files, 
which works perfectly for all other grib2 files that I use (GFS, WW3, 
NAM, etc.).

When I use Degrib without the -Interp switch I get the following control 
file:

DSET ^sst.flt
OPTIONS big_endian
OPTIONS yrev
UNDEF 9999.000000
TITLE GrADS control file based on GRIB2 file.
XDEF 4320 LINEAR 0.042000 0.083000
YDEF 2160 LINEAR 89.958000 0.083000
ZDEF 1 LINEAR 0 1
TDEF 1 LINEAR 00:00Z02Feb2018 1MN
VARS 1
TMP 1 99 Temperature [K]
ENDVARS

This control file is very similar to the one you get using g2ctl, but 
unfortunately when I try to use it I get the following message:

Data Request Warning: Request beyond file limits
Cannot contour grid - all undefined values

When I use Degrib with the -Interp switch I get the following control file:

DSET ^sst.flt
OPTIONS big_endian
OPTIONS yrev
UNDEF 9999.000000
TITLE GrADS control file based on GRIB2 file.
XDEF 4321 LINEAR -179.958333 0.083333
YDEF 2160 LINEAR -89.958000 0.083333
ZDEF 1 LINEAR 0 1
TDEF 1 LINEAR 00:00Z02Feb2018 1MN
VARS 1
TMP 1 99 Temperature [K]
ENDVARS

Using this control file works perfectly, although I get the blank space 
along the Greenwich Meridian and I also have to use a workaround hack to 
plot data across the 180° meridian... Both of these problems I can live 
with, although having it work 100% would be better, obviously.

I've also tried using CDO to convert these SST data files to NC files, 
which I've also had great success with using other GRIB files, but when 
i try it I get the following error message:

Error (gribapiScanTimestep1) : GRIB_API support not compiled in!

CDO works with every other GRIB file that I've tried it with but not 
these SST data files for some reason.

I'm sure there's a simple explanation for these problems so hopefully 
I'll figure it out... And maybe somebody out there will have had a 
similar problem and will help me.

Thanks again for your help, Jennifer, as always!... You've helped me out 
many times in the past (along with Wesley and Arlindo) and I really 
appreciate it!

Regards,

Bill

--

Bill Reilly

(+34) 686-110-748

bill at passageweather.com
www.passageweather.com

On 03/02/2018 14:27, Jennifer M Adams wrote:
> Hi, Bill —
> The problem is that GrADS has determined that your grid does not wrap the globe. The error is in your XDEF declaration. You have
>      XDEF 4321 LINEAR -179.958333 0.083333
> which you say you got from degrib. That is incorrect. The size should be 4320 — the grid as you’ve defined it actually overlaps and therefore fails the globe-wrapping test in GrADS (if longitude at x=1 is roughly the same as longitude at x=xsize+1)
>
> Since your descriptor file is for a flat binary file and not a grib2 file, I suspect you may have stuck an extra column of data onto your grid when converting the format.
>
> I downloaded the grib2 file in question and used g2ctl to get a descriptor and got this for XDEF:
>     XDEF 4320 linear 0.042000 0.083000
>
> Your grid size is clearly 4320 and not 4321. A quick check of the initial lon value confirms that the grib2 grid goes from 0 to 360 and not -180 to 180.
>
> Here is my complete descriptor:
> dset ^rtgssthr_grb_0.083.grib2
> index ^rtgssthr_grb_0.083.idx
> undef 9.999E+20
> title rtgssthr_grb_0.083.grib2
> dtype grib2
> ydef 2160 linear -89.958000 0.083
> xdef 4320 linear 0.042000 0.083000
> tdef 1 linear 00Z01feb2018 1mo
> zdef 1 linear 1 1
> vars 1
> sst   0,1,0   0,0,0  sea surface temperature [K]
> endvars
>
> —Jennifer
>
>
>
>> On Feb 2, 2018, at 10:04 PM, Bill Reilly <Bill_Reilly at compuserve.com> wrote:
>>
>> James:
>>
>> Thanks for your reply.
>>
>> Attached is the control file (created by Degrib) from the GRIB file: ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/sst.20180201/rtgssthr_grb_0.083.grib2
>>
>> The output fom 'q dims' is:
>>
>> X is varying   Lon = -179.958 to 180.04   X = 1.00002 to 4321
>> Y is varying   Lat = -89.958 to 89.9579   Y = 1.00007 to 2160
>> Z is fixed     Lev = 0  Z = 1
>> T is fixed     Time = 00Z01FEB2018  T = 1
>>
>> Another problem is the white gap along the Greenwich Meridian, as you can see here: http://secure-web.cisco.com/1klShagusmxOl2ljtIq0xB1a58WL6eghciuLuMXRTbBkiU9zFianbONsiCD5I-y2PTKHSVmaYcvybUmgpuQ59vFAYD5cX5Oxb3ao_497WlYyjx1oIzEJd58GzNzum087LvDurkbC8wREnRMwoZPJOsbuNs98MfWYk5HOBXn5Dp-wWWuoUOvLlpXxwlQA3U86Yy8ZuczaB5cnQiDLQsstlml29f5aLrTupsYDAHHD_esZgOFgTD3NB-90jKdwg22ym-0e489MflL9bY1A6WtWEvDgQ-0ge1FkXV4dl0BULXWkEl6weDf4rGSr1oPyteCpC2uTvPUCUDc83mQkQ-xiitNejC3xjSLHJxTFOAE6NoRAuO5KHmuTiNaHv4rrKX3zyNjuKCS-2jyEOlofPn6zDclN0tiY9wtwGzc8Or_JhZNNk4VLlhcl76vx5QVgdt0Am/http%3A%2F%2Fwww.passageweather.com%2Fmaps%2Fneurope%2Fsstc.png, but that's a different problem which I'll get to afterwards.
>>
>> Thanks for your help.
>>
>> Bill
>>
>> --
>>
>> Bill Reilly
>>
>> (+34) 686-110-748
>>
>> bill at passageweather.com
>> http://secure-web.cisco.com/1VBXmCBKOj-RAhn4LBYo7ul0_Q2nAf1ixRad8r6w2Ws2tAjVOjqFwAck9EABbOM83C00Itoz57a5YhW-gg9ifdJW-VQIghdj075tNK29OVb8VjUPojxbg5Cl5dLxshnK1zCx5pSMoCuKvSKlsVHqxGTIMYmLyU6dGthdpY_001fWXKN8rY3qirpRtMVRPaZZ_A_3WSrfzjWWWuUbbVwdMsRtLp3xG3BonNJRfsMpO371Nnu0zdzhd1ckcVmWXHiqDPMwlHKAez9Uo99TacA-VJwpdfjC2ZtsqrebAttaGQFX9yz4mvfb-m7uEHbUO9HzN67CNhOAzJ9XK4xjglu5X5aTo-RXuXbfjKnlD-HM-Ga9zO1vaH7h4hsQBGiAd5CUtCGvHqkDE5mWiFSeMmkVT277CMLYUawbVozSY9lfcx14DAsIWFHYw7Z4BC5WI9ir-/http%3A%2F%2Fwww.passageweather.com
>>
>> On 03/02/2018 03:23, James T. Potemra wrote:
>>> Bill,
>>>
>>> Can you provide the control file?  Or the URL?  If you enter "q dims" it should show the legitimate lat/lon ranges available.  If these show a global range you should be able to plot it.
>>>
>>> Jim
>>>
>>>
>>> On 2/2/18 2:38 PM, Bill Reilly wrote:
>>>> Hello:
>>>>
>>>> I'm trying to display the NCEP global SST data using GrADS but I can't get it to display data across the 180° meridian... It will either display west of this meridian or east of it, but not both.
>>>>
>>>> Using the North Pacific Ocean as an example, I want the plot to go from 110°E to 80°W.
>>>>
>>>> 'set lon 110 280' only displays data WEST of 180°.
>>>>
>>>> 'set lon -250 -80' only displays EAST of 180°.
>>>>
>>>> 'set lon 110 -80' doesn't display anything.
>>>>
>>>> 'set lon 470 640' doesn't display anything.
>>>>
>>>> Does anybody have any ideas how to fix this?
>>>>
>>>> Thanks,
>>>>
>>>> Bill
>>>>
>>>> -- 
>>>>
>>>> Bill Reilly
>>>>
>>>> (+34) 686-110-748
>>>>
>>>> bill at passageweather.com
>>>> http://secure-web.cisco.com/1VBXmCBKOj-RAhn4LBYo7ul0_Q2nAf1ixRad8r6w2Ws2tAjVOjqFwAck9EABbOM83C00Itoz57a5YhW-gg9ifdJW-VQIghdj075tNK29OVb8VjUPojxbg5Cl5dLxshnK1zCx5pSMoCuKvSKlsVHqxGTIMYmLyU6dGthdpY_001fWXKN8rY3qirpRtMVRPaZZ_A_3WSrfzjWWWuUbbVwdMsRtLp3xG3BonNJRfsMpO371Nnu0zdzhd1ckcVmWXHiqDPMwlHKAez9Uo99TacA-VJwpdfjC2ZtsqrebAttaGQFX9yz4mvfb-m7uEHbUO9HzN67CNhOAzJ9XK4xjglu5X5aTo-RXuXbfjKnlD-HM-Ga9zO1vaH7h4hsQBGiAd5CUtCGvHqkDE5mWiFSeMmkVT277CMLYUawbVozSY9lfcx14DAsIWFHYw7Z4BC5WI9ir-/http%3A%2F%2Fwww.passageweather.com
>>>>
>>>> bill at brwebworks.com
>>>> www.brwebworks.com
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://secure-web.cisco.com/1CYf56UC1Vtxt_yC_0q2kfeawU_oPg_qd5C--80dSawqV6NkI3GHu0XaJyS6MRSP0owL-DM4hToM7XYao8NJw5t-dcNC-wfG7rK8fbjL4yKITsU-7iTdiEq2kQ9NMeDOzWyQCtSKUV1Hqh7m1uR2v-8J6z7f9iKd6iKqp6Hqe1p5Zw3hDuO_E4aOwc78gL5ZDBfKT_aY0hABvy0vNY4YC0t0r9nnIrrKTLtstDPLT5YBIOiZRW6Y2-hfQVnhAQlRf4S3w6kzvt2H5YuD8aKXmbLIh5DNHPIuQYHNGjmfDERLP7eCuEY7Wf7XgeMgSau204-dYa96ud0ABxcCUHecIMZoZa4H8hG0NUglQP_tBb4Zw7WBIDUkUPZOiVnpv6uCHUi3Byxi47otU3qyE-6zY723dm0D4bV2X9S2iyPE2pcqK2rwc6xVWYwT5XwZbVCg3/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
>>>
>> <sst.ctl>_______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://secure-web.cisco.com/1CYf56UC1Vtxt_yC_0q2kfeawU_oPg_qd5C--80dSawqV6NkI3GHu0XaJyS6MRSP0owL-DM4hToM7XYao8NJw5t-dcNC-wfG7rK8fbjL4yKITsU-7iTdiEq2kQ9NMeDOzWyQCtSKUV1Hqh7m1uR2v-8J6z7f9iKd6iKqp6Hqe1p5Zw3hDuO_E4aOwc78gL5ZDBfKT_aY0hABvy0vNY4YC0t0r9nnIrrKTLtstDPLT5YBIOiZRW6Y2-hfQVnhAQlRf4S3w6kzvt2H5YuD8aKXmbLIh5DNHPIuQYHNGjmfDERLP7eCuEY7Wf7XgeMgSau204-dYa96ud0ABxcCUHecIMZoZa4H8hG0NUglQP_tBb4Zw7WBIDUkUPZOiVnpv6uCHUi3Byxi47otU3qyE-6zY723dm0D4bV2X9S2iyPE2pcqK2rwc6xVWYwT5XwZbVCg3/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list