[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GEMPAK #ESY-440130]: Problem with rotated lat/lon
- Subject: [GEMPAK #ESY-440130]: Problem with rotated lat/lon
- Date: Mon, 26 Mar 2007 09:56:08 -0600
Nilsson,
GDS octed 28 contains the scanning mode flag, which defines whether the grid
points
are north to south or south to north in the "j" direction. The GRIB convention
is that
bits are numbered from most significant being position "1", and least
significant being
position "8". The bit "2" should be the second bit from the left, eg the "64"
value. Note that
bits 4-8 are reserved, and should likely be zero.
In your nagrib output below, I see:
GDS byte 28 (mode) = 2
That value of 2 seems to be reversed in bit position, and I would expect it to
be "64" for
south to north grid points. Since the position "7" bit is reserved, it should
be "0", so you should
not have a value of 2 (unless your conversion program is using reserved
bits...and
the decoder wouldn't know about them anyway).
See if you can correct this bit ordering.
Steve Chiswell
Unidata User Support
> Hi,
>
> I'm having problem with gdplot after 'unrotating' a rotated lat/lon
> grib.
>
> Since Gempak doesn't handle rotated lat/lon gribs I followed these
> steps:
>
> (Original rotated grib file: swan.grb)
>
> swan.grb -> unrotate with help of XCONV output file is (in ntecdf form)
> : swan-wvhgt.nc
>
> swan-wvhgt.nc -> transformed back to grib with help of lats4d. Result is
> swan-wvhgt.grb (If I plot this, using xconv, it looks OK)
>
> swan-wvhgt.grb -> transformed to gempak format, swan-wvhgt.grd, with
> nagrib. (Se listing below)
>
> When I do a gdplot2 on swan-wvhgt.grd I get a 'correct' plot. except for
> one thing: It's upside down, ie mirrowed in north/south . I don't
> understand why. Can you pls give me a hint.
>
> I attach the the grib file <<swan-wvhgt.grb>> that I used for input to
> nagrib.
>
> /Regards Bengt
>
> The gdplot parameters are as follows
>
> GDFILE Grid file
> /home/bengt/proj/swan-wvhgt.grd
> GDATTIM Grid date/time 061221/0600F000
> GLEVEL Grid level 0
> GVCORD Grid vertical coordinate none
> PANEL Panel loc/color/dash/width/regn 0
> SKIP Skip_cntr/skip_plt_x;skip_plt_y 0
> SCALE Scalar scale / vector scale 0
> GFUNC Scalar grid HGHTSW
> CTYPE Contour type: C/F C
> CONTUR Subbox/smooth 2/0
> CINT Contour interval/min/max 0
> LINE Color/type/width/label/smth/fltr 8/1/2
> FINT Fill interval/min/max 0
> FLINE Fill colors/fill types 31-18--1
> HILO Color/symbol/rng/rad/cnt/intp
> HLSYM HILO txt size/posn/font/wdth/hw
> CLRBAR Color/ornt/anch/x;y/ln;wd/freq|t 1
> GVECT Vector grid WND
> WIND Wind symbol/siz/wdth/typ/hdsz bm6
> REFVEC Mag;x;y;txtsiz/font/wdth/HW;labl
> TITLE Title color/line/title 0
> TEXT Size/fnt/wdth/brdr/N-rot/just/hw 1.3/23//hw
> CLEAR Clear screen flag y
> GAREA Graphics area 51.8;-10.0;64.5;37.3
> IJSKIP Iskp;Istrt;Istp/Jskp;Jstrt;Jstp
> PROJ Map projection/angles/margins|dr MER/0;0;0/nm
> MAP Map color/dash/width/filter flag 0
> MSCALE fgc;bgc;mask/units/lat;hide/valu 0
> LATLON Line color/dash/width/freq/inc/l 0
> DEVICE Device|name|x size;y size|color gif|/tmp/wave.gif|1400;719
> STNPLT Txtc/txt attr|marker attr|stnfil
>
>
>
>
> GEMPAK-NAGRIB>d
> GBFILE GRIB data file name swan-wvhgt.grb
> INDXFL GRIB index file name
> GDOUTF Output grid file list
> PROJ Map projection/angles/margins|dr
> GRDAREA Area covered by grid
> KXKY Number of grid points in x;y 10;10
> MAXGRD Maximum number of grids 200
> CPYFIL Grid file whose navigation is to gds
> GAREA Graphics area 51;-10;66;38
> OUTPUT Output device/filename T
> GBTBLS Input GRIB decoding tables
> GBDIAG GRIB diagnostic elements all
> PDSEXT Y or N, add PDS extension if fou NO
> OVERWR Overwr flag yes
> GEMPAK-NAGRIB>r
> IDS bytes 0 - 4 (GRIB msg id) = GRIB
> IDS bytes 5 - 7 (ids.msg_length) = 29096
> IDS byte 8 (ids.edition) = 1
> PDS bytes 1- 3 (pds.length) = 28
> PDS byte 4 (pds.version) = 128
> PDS byte 5 (pds.center) = 82
> PDS byte 6 (pds.process) = 130
> PDS byte 7 (pds.grid_id) = 255
> PDS byte 8 (pds.flag) = 192
> PDS byte 9 (pds.parameter) = 105
> PDS byte 10 (pds.vcoord) = 102
> PDS bytes 11 (pds.level_1) = 0
> PDS bytes 12 (pds.level_2) = 0
> PDS bytes 11-12 (pds.level) = 0
> PDS byte 13 (pds.year) = 6
> PDS byte 14 (pds.month) = 12
> PDS byte 15 (pds.day) = 21
> PDS byte 16 (pds.hour) = 6
> PDS byte 17 (pds.minute) = 0
> PDS byte 18 (pds.time_unit) = 1
> PDS byte 19 (pds.time_p1) = 0
> PDS byte 20 (pds.time_p2) = 0
> PDS byte 21 (pds.time_range) = 0
> PDS bytes 22-23 (pds.avg_num) = 0
> PDS byte 24 (pds.avg_miss) = 0
> PDS byte 25 (pds.century) = 21
> PDS byte 26 (pds.izero) = 0
> PDS bytes 27-28 (pds.dec_scale) = 0
> PDS EXT FLAG (1-app,0-nc,-1-rep) = 0
> PDS EXT STRING =
> Changing center table to cntrgrib1.tbl
> Changing vertical coord table to vcrdgrib1.tbl
> Changing WMO parameter table to wmogrib128.tbl
> Changing center parameter table to smhigrib128.tbl
> GDS bytes 1 - 3 (gds.length) = 32
> GDS byte 4 (gds.NV) = 0
> GDS byte 5 (gds.PV) = 255
> GDS byte 6 (gds.grid_proj) = 0
> GDS bytes 7 - 8 (Nx) = 189
> GDS bytes 9 - 10 (Ny) = 199
> GDS bytes 11 - 13 (La1) = 51800
> GDS bytes 14 - 16 (Lo1) = -10000
> GDS byte 17 (flag) = 128
> GDS bytes 18 - 20 (La2) = 64575
> GDS bytes 21 - 23 (Lo2) = 37733
> GDS bytes 24 - 25 (skipped)
> GDS bytes 26 - 27 (skipped)
> GDS byte 28 (mode) = 2
> GDS bytes 29 - 32 (skipped)
> GDS bytes 33 - 35 (skipped)
> GDS bytes 36 - 38 (skipped)
> GDS byte 39 (skipped)
> GDS bytes 40 - 42 (skipped)
> GDS bytes 43 - 45 (skipped)
> GDS bytes 46 - 48 (skipped)
> GDS byte 49 (skipped)
> GDS bytes 50 - 52 (skipped)
>
> MESG# NMCGRD# PRM# VCD# GEMPAK_TIME LEVL1 LEVL2 VCRD PARM
> 1 255 105 102 061221/0600F000 0 NONE HGHTSW
>
>
>
> 1 GRIB messages were read or scanned from the GRIB file:
> swan-wvhgt.grb
>
>
> Parameters requested:
> GBFILE,INDXFL,GDOUTF,PROJ,GRDAREA,KXKY,MAXGRD,CPYFIL,
> GAREA,OUTPUT,GBTBLS,GBDIAG,PDSEXT,OVERWR.
>
>
Ticket Details
===================
Ticket ID: ESY-440130
Department: Support GEMPAK
Priority: Normal
Status: Closed