km4ack / patmenu2

Tools for working with Pat Menu
GNU General Public License v3.0
21 stars 9 forks source link

GRIB Request Coordinate Issue #18

Open Aramalas opened 3 years ago

Aramalas commented 3 years ago

As posted on the groups.io page. When requesting a GRIB file using Pat Catalog it generates a GRIB file that is not my current location.

Here is what it is sending to saildocs: send gfs:56N,66N,19W,9W|2,2|24,48,72|WIND,PRESS,WAVES,APCP,PRMSL,HGT500,SFCTMP,TMP500,LFTX,CAPE

My coordinates from my GPS are: 61°12'11.01"N, 149°46'20.48"W

I've attached the GRIB file if that helps at all.

gfs20210210203002768.zip

motormayhem commented 3 years ago

I tinkered on it last night and believe I fixed the issue. Hopefully this fixes a few bugs without adding new ones!

The current script pulled the data for longitude as a two character string. Hence the 149W longitude getting pulled as 14W. The script then adds the +/-5deg to get 19W and 9W for the request rather than 154W and 144W.

This new script grabs the data and converts it to decimal degrees => then rounds that to the nearest whole lat or long. I used decimal deg so something like your above 149°46'20.48"W is rounded to 150W not 149W. It also uses +/- sign convention so when the region boundaries are added it will appropriately overlap the prime meridian or equator. So if you are at 0.5,0.5 it will request 5N,5S,5E,5W.

I'm also including an updated Grib request file as some of the parameters were coming back as not valid.

Note the .txt file extension so it would let me upload it here cat-functions.txt

griblist.txt

motormayhem commented 3 years ago

Added a few more things for my personal system that may be of use to the main application at some point. Hope these help. -Corrected GPS -GFS Weather model (what was called GRIB) -HRRR Whether model (High resolution rapid refresh weather model. Updated hourly, finer grid resolution) -Descriptions for weather parameter meanings -Option to select resolution of grid spacing in GRIB file request (note this allows file size to grow well over the winlink limit if large areas and fine grid spacing is selected) -Fixed the GPS weather issue described in issue #19 -Broke the GPS coordinate processing into a separate file so I could apply the fix to GRIB and GPS weather sections of the code without duplicating the GPS code.

cat-functions-rework.zip