I have dowloaded data from the HRRR, similar to the grib2 file from this notebook:
https://nbviewer.org/github/microsoft/AIforEarthDataSets/blob/main/data/noaa-hrrr.ipynb
I now wish to use the data for specific Longitude, Latitude. But I do not know how to convert my (Longitude, Latitude) to the grid coordinates in the matrix data.
The notebook mentions that “the HRRR data comes in the Lambert conformal projection.” (See cell 8).
I have looked at the GMT package, and they seem to handle the Lambert conformal projection: https://docs.juliahub.com/GMT/EoU0j/0.30.1/proj_examples/.
But how can I convert the coordinates?
The following code seems to convert, but I don't think this is for Lambert, and after looking at the GMT documentation, I am not able to adjust the settings in the command.
lat=37.0; lon=-119.0;
gmt("mapproject -J+proj=merc", [lat;lon])
Vector{GMTdataset} with 1 segments
First segment DATA
Global BoundingBox: [-1.3247019404399555e7, 4.118821159351122e6]
First seg BoundingBox: [-1.3247019404399555e7, 4.118821159351122e6]
2×1 Matrix{Float64}:
4.118821159351122e6
-1.3247019404399555e7