Unidata / awips2

Weather forecasting display and analysis package developed by NWS/Raytheon, released as open source software by Unidata.
http://unidata.github.io/awips2/
Other
176 stars 67 forks source link

An overflow bug during prcessing MSL pressure #672

Open GarryLai opened 7 months ago

GarryLai commented 7 months ago

Hello,

When I trying to ingest ECMWF. I found the MSL pressure which should be layer "0.0 MSL" but it comes "MSL -2147483.648". A same thing mentioned at mail list https://www.unidata.ucar.edu/mailing_lists/archives/awips2-users/2016/msg00097.html but nothing about how to fix it. It seems that some numbers overflow inside EDEX. This cause MSL pressure can be loaded in product browser but not display in volume browser. image

srcarter3 commented 7 months ago

Hi there,

I'm sorry you're experiencing this. Unfortunately, this is not something we've dealt with before, so we don't have any advice or guidance to offer at this time.

GarryLai commented 7 months ago

Hi there,

I'm sorry you're experiencing this. Unfortunately, this is not something we've dealt with before, so we don't have any advice or guidance to offer at this time.

Thanks for your reply. I had found a tricky way to "passby" the bug. What I do is using wgrib2 to modify the grib2 file from "P on MSL" to "PRMSL on SFC". These two parameters had the same meaning but the latter will working in AWIPS. The command I use: wgrib2 -if ":PRES:mean sea level:" -set_var PRMSL -set_lev surface -fi -set_grib_type complex1 ${file} -grib_out ${file}.comp.grib2

srcarter3 commented 7 months ago

Hi there,

Okay, that's interesting and good that you found a workaround!

It means that something in AWIPS is familiar with PRMSL then, but maybe not the other parameter....

WxmanJ commented 7 months ago

@GarryLai I have also encountered this and typically use the wgrib2 conversion.

However, if you really want an AWIPS only method of copying the Pressure (P) field to MSLP field using the ECMWF-HiRes, you can add an alias entry to the derivedParameter definition of choice. I typically use msl-P.xml with a sample entry below. After copying the entry in and restarting D2D, you should see 2 new MSLP Pressure fields available in the Product Browser. You will still have to use the minimum 32-bit int (-2147483) if displaying from the Product Browser.

<Method name="Alias" models="ECMWF-HiRes">
<Field abbreviation="P" />
</Method>

Also, I think most ECMWF-HiRes style rules typically use smoothing if using the courser resolution, so you may want to consider adding an XML entry to d2dContourStyleRules.xml similar to the following. A similar entry may be needed in the gridImageryStyleRules.xml if you like to use color fill overlays.

   <styleRule>
        <paramLevelMatches>
            <creatingEntity>ECMWF-HiRes</creatingEntity>
            <parameter>msl-P</parameter>
        </paramLevelMatches>
        <contourStyle>
            <displayUnits>mb</displayUnits>
            <smoothingDistance>100</smoothingDistance>
            <contourLabeling labelSpacing="4" labelFormat="#">
                <increment>2</increment>
            </contourLabeling>
        </contourStyle>
    </styleRule>`

Wgrib2 is the cleaner and less messy option.