title: Julia - converting Latitude, Longitude in Lambert conformal projection
body: <p>I have dowloaded data from the HRRR, similar to the grib2 file from this notebook:</p>
  <p><a href="https://nbviewer.org/github/microsoft/AIforEarthDataSets/blob/main/data/noaa-hrrr.ipynb" rel="nofollow noreferrer">https://nbviewer.org/github/microsoft/AIforEarthDataSets/blob/main/data/noaa-hrrr.ipynb</a></p>
  <p>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.</p>
  <p>The notebook mentions that “the HRRR data comes in the Lambert conformal projection.” (See cell 8).</p>
  <p>I have looked at the GMT package, and they seem to handle the Lambert conformal projection: <a href="https://docs.juliahub.com/GMT/EoU0j/0.30.1/proj_examples/" rel="nofollow noreferrer">https://docs.juliahub.com/GMT/EoU0j/0.30.1/proj_examples/</a>.</p>
  <p>But how can I convert the coordinates?</p>
  <p>The following code seems to convert, but I don't think this is for Lambert, and after looking at the <a href="https://docs.generic-mapping-tools.org/latest/index.html" rel="nofollow noreferrer">GMT documentation</a>, I am not able to adjust the settings in the command.</p>
  <pre><code>lat=37.0; lon=-119.0;
  
  gmt(&quot;mapproject -J+proj=merc&quot;, [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
  </code></pre>