Skip to main content
Ctrl+K
Herbie 2024.5.0 documentation - Home
  • User Guide
  • API Reference
  • SynopticPy
  • GOES-2-go
  • Twitter
  • GitHub
  • PyPI
  • User Guide
  • API Reference
  • SynopticPy
  • GOES-2-go
  • Twitter
  • GitHub
  • PyPI

Section Navigation

Get Started

  • 🐍 Installation
  • πŸ›  Configure
  • 🚦 β€œStart your engines!”

Background Knowledge

  • πŸ“œ Herbie’s History
  • πŸ”’ What is GRIB2?
  • ☁ Data Sources
  • β„Ή Model Info
    • HRRR: High Resolution Rapid Refresh
    • RAP: Rapid Refresh
  • ⚑ What about Zarr?

Using Herbie

  • 🏁 Introduction
  • πŸͺ‚ Subset with search
  • πŸ“ƒ Inventory
  • πŸ—Ί Model Tutorials
    • HRRR
    • HRRR-Alaska
    • RAP
    • HAFS
    • RTMA and URMA
    • NAM
    • GFS
    • GEFS
    • NBM
    • NOGAPS
    • RRFS πŸ…±
    • ECMWF (IFS and AIFS)
    • HRDPS πŸ…±
    • RDPS πŸ…±
    • GDPS πŸ…±
    • NAVGEM
  • πŸ—ƒοΈ Xarray Accessors
    • πŸ“ Pick Points
    • 🌐 Cartopy CRS
    • πŸ”³ Domain Boundary
    • πŸ—ΊοΈ Quick Maps
  • πŸ•ΊπŸ» Bonus Notebooks
    • ⌚ Herbie Latest
    • β˜” Precipitation Variables
    • 🏷️ Custom filename on download
    • πŸ—ΊοΈ Brian’s Maps
    • 🧭 CRS with MetPy
    • πŸͺ„ Merge Datasets
    • πŸ” Plot model terrain
    • πŸ“ Nearest Points
    • β›ˆ K-Index
    • 🌡 Vapor Pressure Deficit
    • 🧩 HRRR in Zarr Format
  • πŸƒπŸΌβ€β™‚οΈ FastHerbie
  • ⌚ Latest Data
  • 🎁 Wrapper for wgrib2
  • πŸ‘·πŸ»β€β™‚οΈ Extending Herbie

Housekeeping

  • πŸ–‹ How to Cite
  • πŸ‘¨πŸ»β€πŸ­ Disclaimer & Contributing Guide
  • 🎨 Style Guide
  • πŸ€– Rclone
  • βš’ Other Tools
  • User Guide
  • πŸ—Ί Model Tutorials
  • NAVGEM

NAVGEM#

This demonstrates how to use public data from the NAVGEM model from NOMADS or GODAE.

Note: there are not .idx files provided, so you have to download the full file and generate the .idx file with wgrib2 (requires Linux).

NAVGEM on NOMADS#

[42]:
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
from paint.standard2 import cm_tmp
from toolbox import EasyMap, pc

from herbie import Herbie
[43]:
H = Herbie("2024-01-18", model="navgem_nomads", fxx=6)
βœ… Found β”Š model=navgem_nomads β”Š product=none β”Š 2024-Jan-18 00:00 UTC F06 β”Š GRIB2 @ local β”Š IDX @ None
[44]:
H.PRODUCTS
[44]:
{'none': ''}
[45]:
H.SOURCES
[45]:
{'nomads': 'https://nomads.ncep.noaa.gov/pub/data/nccf/com/fnmoc/prod/navgem.20240118/navgem_2024011800f006.grib2'}
[46]:
# no index file available. Have to download the full file.
H.download()
[46]:
PosixPath('/p/cwfs/blaylock/data/navgem_nomads/20240118/navgem_2024011800f006.grib2')
[47]:
# Since we have download the full file and don't have an index,
# we need to filter by keys to open the variable we want.

ds = H.xarray(
    backend_kwargs={
        "filter_by_keys": {"shortName": "2t", "typeOfLevel": "heightAboveGround"}
    },
)
ds
/p/home/blaylock/BB_python/Herbie/herbie/core.py:1064: UserWarning: Will not remove GRIB file because it previously existed.
  warnings.warn("Will not remove GRIB file because it previously existed.")
[47]:
<xarray.Dataset>
Dimensions:              (latitude: 361, longitude: 720)
Coordinates:
    time                 datetime64[ns] 2024-01-18
    step                 timedelta64[ns] 06:00:00
    heightAboveGround    float64 2.0
  * latitude             (latitude) float64 -90.0 -89.5 -89.0 ... 89.0 89.5 90.0
  * longitude            (longitude) float64 0.0 0.5 1.0 ... 358.5 359.0 359.5
    valid_time           datetime64[ns] ...
Data variables:
    t2m                  (latitude, longitude) float32 ...
    gribfile_projection  object None
Attributes:
    GRIB_edition:            2
    GRIB_centre:             fnmo
    GRIB_centreDescription:  US Navy - Fleet Numerical Oceanography Center
    GRIB_subCentre:          0
    Conventions:             CF-1.7
    institution:             US Navy - Fleet Numerical Oceanography Center
    model:                   navgem_nomads
    product:                 none
    description:             Navy Global Environment Model
    remote_grib:             /p/cwfs/blaylock/data/navgem_nomads/20240118/nav...
    local_grib:              /p/cwfs/blaylock/data/navgem_nomads/20240118/nav...
    search:            None
xarray.Dataset
    • latitude: 361
    • longitude: 720
    • time
      ()
      datetime64[ns]
      2024-01-18
      long_name :
      initial time of forecast
      standard_name :
      forecast_reference_time
      array('2024-01-18T00:00:00.000000000', dtype='datetime64[ns]')
    • step
      ()
      timedelta64[ns]
      06:00:00
      long_name :
      time since forecast_reference_time
      standard_name :
      forecast_period
      array(21600000000000, dtype='timedelta64[ns]')
    • heightAboveGround
      ()
      float64
      2.0
      long_name :
      height above the surface
      units :
      m
      positive :
      up
      standard_name :
      height
      array(2.)
    • latitude
      (latitude)
      float64
      -90.0 -89.5 -89.0 ... 89.5 90.0
      units :
      degrees_north
      standard_name :
      latitude
      long_name :
      latitude
      array([-90. , -89.5, -89. , ...,  89. ,  89.5,  90. ])
    • longitude
      (longitude)
      float64
      0.0 0.5 1.0 ... 358.5 359.0 359.5
      units :
      degrees_east
      standard_name :
      longitude
      long_name :
      longitude
      array([  0. ,   0.5,   1. , ..., 358.5, 359. , 359.5])
    • valid_time
      ()
      datetime64[ns]
      ...
      standard_name :
      time
      long_name :
      time
      [1 values with dtype=datetime64[ns]]
    • t2m
      (latitude, longitude)
      float32
      ...
      GRIB_paramId :
      167
      GRIB_dataType :
      af
      GRIB_numberOfPoints :
      259920
      GRIB_typeOfLevel :
      heightAboveGround
      GRIB_stepUnits :
      1
      GRIB_stepType :
      instant
      GRIB_gridType :
      regular_ll
      GRIB_NV :
      0
      GRIB_Nx :
      720
      GRIB_Ny :
      361
      GRIB_cfName :
      air_temperature
      GRIB_cfVarName :
      t2m
      GRIB_gridDefinitionDescription :
      Latitude/longitude
      GRIB_iDirectionIncrementInDegrees :
      0.5
      GRIB_iScansNegatively :
      0
      GRIB_jDirectionIncrementInDegrees :
      0.5
      GRIB_jPointsAreConsecutive :
      0
      GRIB_jScansPositively :
      1
      GRIB_latitudeOfFirstGridPointInDegrees :
      -90.0
      GRIB_latitudeOfLastGridPointInDegrees :
      90.0
      GRIB_longitudeOfFirstGridPointInDegrees :
      0.0
      GRIB_longitudeOfLastGridPointInDegrees :
      359.5
      GRIB_missingValue :
      3.4028234663852886e+38
      GRIB_name :
      2 metre temperature
      GRIB_parameterName :
      Temperature
      GRIB_parameterUnits :
      K
      GRIB_shortName :
      2t
      GRIB_stepRange :
      6
      GRIB_units :
      K
      long_name :
      2 metre temperature
      units :
      K
      standard_name :
      air_temperature
      grid_mapping :
      gribfile_projection
      [259920 values with dtype=float32]
    • gribfile_projection
      ()
      object
      None
      crs_wkt :
      GEOGCRS["unknown",DATUM["unknown",ELLIPSOID["unknown",6371229,0,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]
      semi_major_axis :
      6371229.0
      semi_minor_axis :
      6371229.0
      inverse_flattening :
      0.0
      reference_ellipsoid_name :
      unknown
      longitude_of_prime_meridian :
      0.0
      prime_meridian_name :
      Greenwich
      geographic_crs_name :
      unknown
      horizontal_datum_name :
      unknown
      grid_mapping_name :
      latitude_longitude
      long_name :
      NAVGEM_NOMADS model grid projection
      array(None, dtype=object)
    • latitude
      PandasIndex
      PandasIndex(Index([-90.0, -89.5, -89.0, -88.5, -88.0, -87.5, -87.0, -86.5, -86.0, -85.5,
             ...
              85.5,  86.0,  86.5,  87.0,  87.5,  88.0,  88.5,  89.0,  89.5,  90.0],
            dtype='float64', name='latitude', length=361))
    • longitude
      PandasIndex
      PandasIndex(Index([  0.0,   0.5,   1.0,   1.5,   2.0,   2.5,   3.0,   3.5,   4.0,   4.5,
             ...
             355.0, 355.5, 356.0, 356.5, 357.0, 357.5, 358.0, 358.5, 359.0, 359.5],
            dtype='float64', name='longitude', length=720))
  • GRIB_edition :
    2
    GRIB_centre :
    fnmo
    GRIB_centreDescription :
    US Navy - Fleet Numerical Oceanography Center
    GRIB_subCentre :
    0
    Conventions :
    CF-1.7
    institution :
    US Navy - Fleet Numerical Oceanography Center
    model :
    navgem_nomads
    product :
    none
    description :
    Navy Global Environment Model
    remote_grib :
    /p/cwfs/blaylock/data/navgem_nomads/20240118/navgem_2024011800f006.grib2
    local_grib :
    /p/cwfs/blaylock/data/navgem_nomads/20240118/navgem_2024011800f006.grib2
    search :
    None
[48]:
int(ds.step.dt.total_seconds() / 60 / 60)
[48]:
6
[49]:
ax = EasyMap(crs=ds.herbie.crs, figsize=[10, 8]).ax
p = ax.pcolormesh(
    ds.longitude, ds.latitude, ds.t2m, transform=pc, **cm_tmp(units="K").cmap_kwargs
)
plt.colorbar(
    p, ax=ax, orientation="horizontal", pad=0.05, **cm_tmp(units="K").cbar_kwargs
)

ax.set_title(ds.t2m.GRIB_name, loc="right")
ax.set_title(
    f'{H.model.upper()}: {ds.time.dt.strftime("%H:%M UTC %d %b %Y").item()} F{int(ds.step.dt.total_seconds() / 60 / 60):03d}',
    loc="left",
)
[49]:
Text(0.0, 1.0, 'NAVGEM_NOMADS: 00:00 UTC 18 Jan 2024 F006')
../../../_images/user_guide_tutorial_model_notebooks_navgem_8_1.png

After downloading the full file, you can create an index file. (Only possible if WGRIB2 is installed and in your path)

[50]:
from herbie import wgrib2
[51]:
wgrib2.create_inventory_file(H.grib)
[51]:
PosixPath('/p/cwfs/blaylock/data/navgem_nomads/20240118/navgem_2024011800f006.grib2.idx')
[52]:
H.inventory()
[52]:
grib_message start_byte end_byte range reference_time valid_time variable level forecast_time search_this
0 1 421 150741.0 421-150741 2024-01-18 2024-01-18 06:00:00 ACPCP surface 0-6 hour acc fcst :ACPCP:surface:0-6 hour acc fcst
1 2 150742 296573.0 150742-296573 2024-01-18 2024-01-18 06:00:00 APCP surface 0-6 hour acc fcst :APCP:surface:0-6 hour acc fcst
2 3 296574 522814.0 296574-522814 2024-01-18 2024-01-18 06:00:00 TMP max wind 6 hour fcst :TMP:max wind:6 hour fcst
3 4 522815 791251.0 522815-791251 2024-01-18 2024-01-18 06:00:00 HGT max wind 6 hour fcst :HGT:max wind:6 hour fcst
4 5 791252 1110273.0 791252-1110273 2024-01-18 2024-01-18 06:00:00 PRES max wind 6 hour fcst :PRES:max wind:6 hour fcst
... ... ... ... ... ... ... ... ... ... ...
86 87 18256249 18609646.0 18256249-18609646 2024-01-18 2024-01-18 06:00:00 UGRD 10 m above ground 6 hour fcst :UGRD:10 m above ground:6 hour fcst
87 88 18609647 18961671.0 18609647-18961671 2024-01-18 2024-01-18 06:00:00 VGRD 10 m above ground 6 hour fcst :VGRD:10 m above ground:6 hour fcst
88 89 18961672 19336231.0 18961672-19336231 2024-01-18 2024-01-18 06:00:00 var discipline=0 center=58 local_table=0 parmc... 19.5 m above ground 6 hour fcst :var discipline=0 center=58 local_table=0 parm...
89 90 19336232 19693176.0 19336232-19693176 2024-01-18 2024-01-18 06:00:00 UGRD 19.5 m above ground 6 hour fcst :UGRD:19.5 m above ground:6 hour fcst
90 91 19693177 NaN 19693177- 2024-01-18 2024-01-18 06:00:00 VGRD 19.5 m above ground 6 hour fcst :VGRD:19.5 m above ground:6 hour fcst

91 rows Γ— 10 columns

[53]:
H.inventory().attrs
[53]:
{'url': <_io.StringIO at 0x2b1a531ef010>,
 'source': 'generated',
 'description': 'Inventory index file for the GRIB2 file.',
 'model': 'navgem_nomads',
 'product': 'none',
 'lead_time': 6,
 'datetime': Timestamp('2024-01-18 00:00:00')}
[54]:
H.xarray("TMP:2 m")
[54]:
<xarray.Dataset>
Dimensions:              (latitude: 361, longitude: 720)
Coordinates:
    time                 datetime64[ns] 2024-01-18
    step                 timedelta64[ns] 06:00:00
    heightAboveGround    float64 2.0
  * latitude             (latitude) float64 -90.0 -89.5 -89.0 ... 89.0 89.5 90.0
  * longitude            (longitude) float64 0.0 0.5 1.0 ... 358.5 359.0 359.5
    valid_time           datetime64[ns] 2024-01-18T06:00:00
Data variables:
    t2m                  (latitude, longitude) float32 243.6 244.1 ... 248.9
    gribfile_projection  object None
Attributes:
    GRIB_edition:            2
    GRIB_centre:             fnmo
    GRIB_centreDescription:  US Navy - Fleet Numerical Oceanography Center
    GRIB_subCentre:          0
    Conventions:             CF-1.7
    institution:             US Navy - Fleet Numerical Oceanography Center
    model:                   navgem_nomads
    product:                 none
    description:             Navy Global Environment Model
    remote_grib:             /p/cwfs/blaylock/data/navgem_nomads/20240118/nav...
    local_grib:              /p/cwfs/blaylock/data/navgem_nomads/20240118/sub...
    search:            TMP:2 m
xarray.Dataset
    • latitude: 361
    • longitude: 720
    • time
      ()
      datetime64[ns]
      2024-01-18
      long_name :
      initial time of forecast
      standard_name :
      forecast_reference_time
      array('2024-01-18T00:00:00.000000000', dtype='datetime64[ns]')
    • step
      ()
      timedelta64[ns]
      06:00:00
      long_name :
      time since forecast_reference_time
      standard_name :
      forecast_period
      array(21600000000000, dtype='timedelta64[ns]')
    • heightAboveGround
      ()
      float64
      2.0
      long_name :
      height above the surface
      units :
      m
      positive :
      up
      standard_name :
      height
      array(2.)
    • latitude
      (latitude)
      float64
      -90.0 -89.5 -89.0 ... 89.5 90.0
      units :
      degrees_north
      standard_name :
      latitude
      long_name :
      latitude
      array([-90. , -89.5, -89. , ...,  89. ,  89.5,  90. ])
    • longitude
      (longitude)
      float64
      0.0 0.5 1.0 ... 358.5 359.0 359.5
      units :
      degrees_east
      standard_name :
      longitude
      long_name :
      longitude
      array([  0. ,   0.5,   1. , ..., 358.5, 359. , 359.5])
    • valid_time
      ()
      datetime64[ns]
      2024-01-18T06:00:00
      standard_name :
      time
      long_name :
      time
      array('2024-01-18T06:00:00.000000000', dtype='datetime64[ns]')
    • t2m
      (latitude, longitude)
      float32
      243.6 244.1 244.1 ... 248.9 248.9
      GRIB_paramId :
      167
      GRIB_dataType :
      af
      GRIB_numberOfPoints :
      259920
      GRIB_typeOfLevel :
      heightAboveGround
      GRIB_stepUnits :
      1
      GRIB_stepType :
      instant
      GRIB_gridType :
      regular_ll
      GRIB_NV :
      0
      GRIB_Nx :
      720
      GRIB_Ny :
      361
      GRIB_cfName :
      air_temperature
      GRIB_cfVarName :
      t2m
      GRIB_gridDefinitionDescription :
      Latitude/longitude
      GRIB_iDirectionIncrementInDegrees :
      0.5
      GRIB_iScansNegatively :
      0
      GRIB_jDirectionIncrementInDegrees :
      0.5
      GRIB_jPointsAreConsecutive :
      0
      GRIB_jScansPositively :
      1
      GRIB_latitudeOfFirstGridPointInDegrees :
      -90.0
      GRIB_latitudeOfLastGridPointInDegrees :
      90.0
      GRIB_longitudeOfFirstGridPointInDegrees :
      0.0
      GRIB_longitudeOfLastGridPointInDegrees :
      359.5
      GRIB_missingValue :
      3.4028234663852886e+38
      GRIB_name :
      2 metre temperature
      GRIB_parameterName :
      Temperature
      GRIB_parameterUnits :
      K
      GRIB_shortName :
      2t
      GRIB_stepRange :
      6
      GRIB_units :
      K
      long_name :
      2 metre temperature
      units :
      K
      standard_name :
      air_temperature
      grid_mapping :
      gribfile_projection
      array([[243.63, 244.1 , 244.1 , ..., 244.1 , 244.1 , 244.1 ],
             [243.66, 243.66, 243.67, ..., 243.64, 243.65, 243.65],
             [243.72, 243.72, 243.72, ..., 243.73, 243.72, 243.72],
             ...,
             [246.11, 246.11, 246.11, ..., 246.1 , 246.1 , 246.1 ],
             [246.79, 246.79, 246.8 , ..., 246.78, 246.79, 246.79],
             [249.88, 248.92, 248.92, ..., 248.92, 248.92, 248.92]],
            dtype=float32)
    • gribfile_projection
      ()
      object
      None
      crs_wkt :
      GEOGCRS["unknown",DATUM["unknown",ELLIPSOID["unknown",6371229,0,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]
      semi_major_axis :
      6371229.0
      semi_minor_axis :
      6371229.0
      inverse_flattening :
      0.0
      reference_ellipsoid_name :
      unknown
      longitude_of_prime_meridian :
      0.0
      prime_meridian_name :
      Greenwich
      geographic_crs_name :
      unknown
      horizontal_datum_name :
      unknown
      grid_mapping_name :
      latitude_longitude
      long_name :
      NAVGEM_NOMADS model grid projection
      array(None, dtype=object)
    • latitude
      PandasIndex
      PandasIndex(Index([-90.0, -89.5, -89.0, -88.5, -88.0, -87.5, -87.0, -86.5, -86.0, -85.5,
             ...
              85.5,  86.0,  86.5,  87.0,  87.5,  88.0,  88.5,  89.0,  89.5,  90.0],
            dtype='float64', name='latitude', length=361))
    • longitude
      PandasIndex
      PandasIndex(Index([  0.0,   0.5,   1.0,   1.5,   2.0,   2.5,   3.0,   3.5,   4.0,   4.5,
             ...
             355.0, 355.5, 356.0, 356.5, 357.0, 357.5, 358.0, 358.5, 359.0, 359.5],
            dtype='float64', name='longitude', length=720))
  • GRIB_edition :
    2
    GRIB_centre :
    fnmo
    GRIB_centreDescription :
    US Navy - Fleet Numerical Oceanography Center
    GRIB_subCentre :
    0
    Conventions :
    CF-1.7
    institution :
    US Navy - Fleet Numerical Oceanography Center
    model :
    navgem_nomads
    product :
    none
    description :
    Navy Global Environment Model
    remote_grib :
    /p/cwfs/blaylock/data/navgem_nomads/20240118/navgem_2024011800f006.grib2
    local_grib :
    /p/cwfs/blaylock/data/navgem_nomads/20240118/subset_5eb222e6__navgem_2024011800f006.grib2
    search :
    TMP:2 m

NAVGEM on GODAE#

The GRIB files are organized differently, and you have to specify the level and variable. Look at the File Naming Convention

[37]:
H = Herbie(
    "2023-01-12 18:00",
    model="navgem_godae",
    product="GMET",
    level="0100_010132-000000",
    variable="air_temp",
)
H, H.SOURCES
βœ… Found β”Š model=navgem_godae β”Š product=GMET β”Š 2023-Jan-12 18:00 UTC F00 β”Š GRIB2 @ godae β”Š IDX @ None
[37]:
(β–Œβ–ŒHerbie NAVGEM_GODAE model GMET product initialized 2023-Jan-12 18:00 UTC F00 β”Š source=godae,
 {'godae': 'https://usgodae.org/ftp/outgoing/fnmoc/models/navgem_0.5/2023/2023011218/US058GMET-GR1mdl.0018_0056_00000F0OF2023011218_0100_010132-000000air_temp'})
[39]:
ds = H.xarray()
ds
/p/home/blaylock/BB_python/Herbie/herbie/core.py:1069: UserWarning: Will not remove GRIB file because Herbie will only remove subsetted files (not full files).
  warnings.warn(
[39]:
<xarray.Dataset>
Dimensions:              (latitude: 361, longitude: 720)
Coordinates:
    time                 datetime64[ns] 2023-01-12T18:00:00
    step                 timedelta64[ns] 00:00:00
    isobaricInhPa        float64 1.013e+03
  * latitude             (latitude) float64 -90.0 -89.5 -89.0 ... 89.0 89.5 90.0
  * longitude            (longitude) float64 -0.5 0.0 0.5 ... 358.0 358.5 359.0
    valid_time           datetime64[ns] ...
Data variables:
    t                    (latitude, longitude) float32 ...
    gribfile_projection  object None
Attributes:
    GRIB_edition:            1
    GRIB_centre:             fnmo
    GRIB_centreDescription:  US Navy - Fleet Numerical Oceanography Center
    GRIB_subCentre:          0
    Conventions:             CF-1.7
    institution:             US Navy - Fleet Numerical Oceanography Center
    model:                   navgem_godae
    product:                 GMET
    description:             Navy Global Environment Model
    remote_grib:             /p/cwfs/blaylock/data/navgem_godae/20230112/US05...
    local_grib:              /p/cwfs/blaylock/data/navgem_godae/20230112/US05...
    search:            None
xarray.Dataset
    • latitude: 361
    • longitude: 720
    • time
      ()
      datetime64[ns]
      2023-01-12T18:00:00
      long_name :
      initial time of forecast
      standard_name :
      forecast_reference_time
      array('2023-01-12T18:00:00.000000000', dtype='datetime64[ns]')
    • step
      ()
      timedelta64[ns]
      00:00:00
      long_name :
      time since forecast_reference_time
      standard_name :
      forecast_period
      array(0, dtype='timedelta64[ns]')
    • isobaricInhPa
      ()
      float64
      1.013e+03
      long_name :
      pressure
      units :
      hPa
      positive :
      down
      stored_direction :
      decreasing
      standard_name :
      air_pressure
      array(1013.)
    • latitude
      (latitude)
      float64
      -90.0 -89.5 -89.0 ... 89.5 90.0
      units :
      degrees_north
      standard_name :
      latitude
      long_name :
      latitude
      array([-90. , -89.5, -89. , ...,  89. ,  89.5,  90. ])
    • longitude
      (longitude)
      float64
      -0.5 0.0 0.5 ... 358.0 358.5 359.0
      units :
      degrees_east
      standard_name :
      longitude
      long_name :
      longitude
      array([ -0.5,   0. ,   0.5, ..., 358. , 358.5, 359. ])
    • valid_time
      ()
      datetime64[ns]
      ...
      standard_name :
      time
      long_name :
      time
      [1 values with dtype=datetime64[ns]]
    • t
      (latitude, longitude)
      float32
      ...
      GRIB_paramId :
      130
      GRIB_numberOfPoints :
      259920
      GRIB_typeOfLevel :
      isobaricInhPa
      GRIB_stepUnits :
      1
      GRIB_stepType :
      instant
      GRIB_gridType :
      regular_ll
      GRIB_NV :
      0
      GRIB_Nx :
      720
      GRIB_Ny :
      361
      GRIB_cfName :
      air_temperature
      GRIB_cfVarName :
      t
      GRIB_gridDefinitionDescription :
      Latitude/Longitude Grid
      GRIB_iDirectionIncrementInDegrees :
      0.5
      GRIB_iScansNegatively :
      0
      GRIB_jDirectionIncrementInDegrees :
      0.5
      GRIB_jPointsAreConsecutive :
      0
      GRIB_jScansPositively :
      1
      GRIB_latitudeOfFirstGridPointInDegrees :
      -90.0
      GRIB_latitudeOfLastGridPointInDegrees :
      90.0
      GRIB_longitudeOfFirstGridPointInDegrees :
      0.0
      GRIB_longitudeOfLastGridPointInDegrees :
      -0.5
      GRIB_missingValue :
      3.4028234663852886e+38
      GRIB_name :
      Temperature
      GRIB_parameterName :
      T Temperature K
      GRIB_parameterUnits :
      unknown
      GRIB_shortName :
      t
      GRIB_stepRange :
      0
      GRIB_units :
      K
      long_name :
      Temperature
      units :
      K
      standard_name :
      air_temperature
      grid_mapping :
      gribfile_projection
      [259920 values with dtype=float32]
    • gribfile_projection
      ()
      object
      None
      crs_wkt :
      GEOGCRS["unknown",DATUM["unknown",ELLIPSOID["unknown",6367470,0,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]
      semi_major_axis :
      6367470.0
      semi_minor_axis :
      6367470.0
      inverse_flattening :
      0.0
      reference_ellipsoid_name :
      unknown
      longitude_of_prime_meridian :
      0.0
      prime_meridian_name :
      Greenwich
      geographic_crs_name :
      unknown
      horizontal_datum_name :
      unknown
      grid_mapping_name :
      latitude_longitude
      long_name :
      NAVGEM_GODAE model grid projection
      array(None, dtype=object)
    • latitude
      PandasIndex
      PandasIndex(Index([-90.0, -89.5, -89.0, -88.5, -88.0, -87.5, -87.0, -86.5, -86.0, -85.5,
             ...
              85.5,  86.0,  86.5,  87.0,  87.5,  88.0,  88.5,  89.0,  89.5,  90.0],
            dtype='float64', name='latitude', length=361))
    • longitude
      PandasIndex
      PandasIndex(Index([ -0.5,   0.0,   0.5,   1.0,   1.5,   2.0,   2.5,   3.0,   3.5,   4.0,
             ...
             354.5, 355.0, 355.5, 356.0, 356.5, 357.0, 357.5, 358.0, 358.5, 359.0],
            dtype='float64', name='longitude', length=720))
  • GRIB_edition :
    1
    GRIB_centre :
    fnmo
    GRIB_centreDescription :
    US Navy - Fleet Numerical Oceanography Center
    GRIB_subCentre :
    0
    Conventions :
    CF-1.7
    institution :
    US Navy - Fleet Numerical Oceanography Center
    model :
    navgem_godae
    product :
    GMET
    description :
    Navy Global Environment Model
    remote_grib :
    /p/cwfs/blaylock/data/navgem_godae/20230112/US058GMET-GR1mdl.0018_0056_00000F0OF2023011218_0100_010132-000000air_temp
    local_grib :
    /p/cwfs/blaylock/data/navgem_godae/20230112/US058GMET-GR1mdl.0018_0056_00000F0OF2023011218_0100_010132-000000air_temp
    search :
    None
[40]:
ax = EasyMap(crs=ds.herbie.crs, figsize=[10, 8]).ax
p = ax.pcolormesh(
    ds.longitude, ds.latitude, ds.t, transform=pc, **cm_tmp(units="K").cmap_kwargs
)
plt.colorbar(
    p, ax=ax, orientation="horizontal", pad=0.05, **cm_tmp(units="K").cbar_kwargs
)

ax.set_title(
    f"{ds.t.GRIB_name} {float(ds[ds.t.GRIB_typeOfLevel])} {str(ds[ds.t.GRIB_typeOfLevel].units)}",
    loc="right",
)
ax.set_title(
    f'{H.model.upper()}: {ds.time.dt.strftime("%H:%M UTC %d %b %Y").item()} F{int(ds.step.dt.total_seconds() / 60 / 60):03d}',
    loc="left",
)
[40]:
Text(0.0, 1.0, 'NAVGEM_GODAE: 18:00 UTC 12 Jan 2023 F000')
../../../_images/user_guide_tutorial_model_notebooks_navgem_18_1.png
[ ]:

previous

GDPS πŸ…±

next

πŸ—ƒοΈ Xarray Accessors

On this page
  • NAVGEM on NOMADS
  • NAVGEM on GODAE
Edit on GitHub
Show Source

Β© Copyright 2024, Brian K. Blaylock. β™» Updated: 04:50 UTC 04 May 2024.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.2.