Hi Bob:
You might think that if scanmode = 64, one should just invert the grids. As
it turns out, on all projections except for latlon (that i have sample of),
the right thing to do is to ignore the flipping, because the coordinate
system (the asignment of lat,lon calues to each grid point) correctly
adjusts for it. So its just on latlon grids that this issue arises.
So on your file:
C:/Users/caron/Downloads/grid174_scanmode_64_example.grb2
latlon scan mode=64 dLat=0.125000 lat=(89.938004,-89.938004)
Now, the only other example of a latlon Grid that I seem to have with scan
mode 64 is
Q:/cdmUnitTest/tds/ncep/SREF_PacificNE_0p4_ensprod_20120213_2100.grib2
latlon scan 64 lat=(10.000000 , 50.000000)
its over the pacific and much harder to tell if its flipped, but im
guessing not. Note that its lat range is consistent with scan mode 64.
Im loath to generalize from a sample size of 2. Do you have a sample of
GRIB2 files with various encodings? Perhaps I could test them to see if we
can guess when to flip or not.
thanks,
John
On Wed, Jan 14, 2015 at 10:30 AM, Bob Lipschutz - NOAA Affiliate <
robert.c.lipschutz@xxxxxxxx> wrote:
> John,
>
> Thanks for looking at this. Sorry, I don't have any particular
> recommendation here. The grid specification does seem odd and inconsistent
> with other domains with scanMode=64 that give south-to-north corner
> coordinates. It's also inconsistent with the similar 1/12th degree '173'
> grid, which has scanMode=0 and north-to-south corners. We will check with
> NCEP to see if there's an error in the table, but it's not a new entry and
> ostensibly used by someone out there (it's described as a Sea Ice grid)...
>
> Thanks again,
>
> -Bob
>
> On Wed, Jan 14, 2015 at 1:14 AM, Bonny Strong - NOAA Affiliate <
> bonny.strong@xxxxxxxx> wrote:
>
>> John, I don't have Bob's expertise, but I know that during discussions
>> here at GSD trying to figure this out, one developer gave his opinion that
>> the lats of the first and last point were unrelated related to the scan
>> direction. Bob may wish to add to that tomorrow.
>>
>> Bonny
>>
>> On Tue, Jan 13, 2015 at 6:07 PM, John Caron <caron@xxxxxxxx> wrote:
>>
>>> Hi Bob:
>>>
>>> Thanks for reporting this problem. Im looking at it now. Do you have any
>>> idea how these various parameters interact? They have first lat in north,
>>> last lat in south, but a positive Dj. Then with scanMode 64, they say
>>> "Points of first row or column scan in the +j (+y) direction". Seems
>>> overspecified with the possibility of inconsistent results. Im looking
>>> though my data samples now to see if I can detect if there is are problems,
>>> but im not exactly sure what combinations should be legal. Any thoughts?
>>>
>>> heres my dump on your record:
>>>
>>> 47: La1 -
>>> latitude of first grid point == 89938000
>>> 56: La2 -
>>> latitude of last grid point == -89938000
>>> 68: Dj
>>> - j direction increment == 125000
>>> 72:
>>> Scanning mode == 64
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Jan 12, 2015 at 4:02 PM, Bob Lipschutz - NOAA Affiliate <
>>> Robert.C.Lipschutz@xxxxxxxx> wrote:
>>>
>>>>
>>>> Java NetCDF Folks,
>>>>
>>>> We have recently begun generating global 1/8 degree GRIB files
>>>> using NCEP's grid 174 definition (
>>>> http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html#GRID174).
>>>>
>>>> Following that definition, we are setting the value of scanMode to 64,
>>>> which
>>>> per GRIB2 Table 3.4 indicates "points scan in the +j direction", and so
>>>> filling
>>>> the data arrays from south to north. However, the java-netCDF package
>>>> (v4.5)
>>>> does not seem to handle the scanMode flag properly, and consequently our
>>>> grids appear flipped on display. Meanwhile, I understand that NCL does
>>>> handle
>>>> the data mapping correctly, from which we conclude that java-netCDF is
>>>> has a
>>>> problem with this grid definition.
>>>>
>>>> As a work-around, we will set scanMode to 0 and write from north to
>>>> south,
>>>> which will fix the problem for us. But, we'd also hope to have the
>>>> tools work
>>>> correctly, too so that we can use the NCEP's grid as specified -- which
>>>> admittedly is strange in that it list the corner lons from north to
>>>> south.
>>>>
>>>> I've posted a sample GRIB2 file and resulting flipped image here:
>>>>
>>>> ftp://aftp.fsl.noaa.gov/divisions/its/bob/grid174_scanmode_64_example.grb2
>>>> ftp://aftp.fsl.noaa.gov/divisions/its/bob/flipped_174grid.jpg
>>>>
>>>> FWIW, here is the output from the (v4.3) Grib2Dump utility on that data
>>>> file:
>>>>
>>>> Header : GRIB2
>>>> Discipline : 0 Meteorological
>>>> products
>>>> GRIB Edition : 2
>>>> GRIB length : 2808735
>>>> Originating Center : 59 The NOAA Forecast
>>>> Systems Laboratory
>>>> Originating Sub-Center : 0
>>>> Significance of Reference Time : 1 Start of forecast
>>>> Reference Time : 2015-01-08T00:00:00Z
>>>> Product Status : 0 Operational products
>>>> Product Type : 1 Forecast products
>>>> Number of data points : 4147200
>>>> Grid Name : 0 Latitude_Longitude
>>>> Grid Shape: 0 Earth spherical with
>>>> radius = 6,367,470 m
>>>> Number of points along parallel: 2880
>>>> Number of points along meridian: 1440
>>>> Basic angle : 0
>>>> Subdivisions of basic angle: 0
>>>> Latitude of first grid point : 89.938
>>>> Longitude of first grid point : 0.062
>>>> Resolution & Component flags : 48
>>>> Winds : True
>>>> Latitude of last grid point : -89.938
>>>> Longitude of last grid point : 359.938
>>>> i direction increment : 0.125
>>>> j direction increment : 0.125
>>>> Grid Units : degrees
>>>> Scanning mode : 64
>>>> Product Definition : 0 Analysis/forecast
>>>> at horizontal level/layer at a point in time
>>>> Parameter Category : 0 Temperature
>>>> Parameter Name : 0 Temperature
>>>> Parameter Units : K
>>>> Generating Process Type : 2 Forecast
>>>> ForecastTime : 240
>>>> First Surface Type : 1 Ground or water
>>>> surface
>>>> First Surface value : 0.0
>>>> Second Surface Type : 255 Missing
>>>> Second Surface value : 0.0
>>>>
>>>> Thanks for any insights on this issue!
>>>>
>>>> Bob Lipschutz
>>>> NOAA/ESRL/Global Systems Division
>>>> IT Services/Data Services Group
>>>>
>>>>
>>>> _______________________________________________
>>>> netcdf-java mailing list
>>>> netcdf-java@xxxxxxxxxxxxxxxx
>>>> For list information or to unsubscribe, visit:
>>>> http://www.unidata.ucar.edu/mailing_lists/
>>>>
>>>>
>>>
>>
>>
>> --
>> Bonny Strong
>> NOAA Affiliate
>> 303 497-3936
>>
>
>