Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An overflow bug during prcessing MSL pressure #672

Open
GarryLai opened this issue Mar 3, 2024 · 4 comments
Open

An overflow bug during prcessing MSL pressure #672

GarryLai opened this issue Mar 3, 2024 · 4 comments

Comments

@GarryLai
Copy link

GarryLai commented Mar 3, 2024

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
Copy link
Contributor

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
Copy link
Author

GarryLai commented Mar 7, 2024

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
Copy link
Contributor

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
Copy link

WxmanJ commented Mar 16, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants