import xarray as xr
NOAA Operational Model Archive and Distribution System
Author
Eli Holmes (NOAA)
Overview
WORK IN PROGRESS
This tutorial will show examples of working with OPeNDAP data from the NOAA Operational Model Archive and Distribution System. These OPeNDAP servers use the GrADS protocol.
Prerequisites
Packages
Load some data and plot
<xarray.Dataset> Size: 2GB Dimensions: (time: 1, lat: 1536, lon: 3072) Coordinates: * time (time) float64 8B 7.393e+05 * lat (lat) float64 12kB -89.91 -89.79 -89.68 ... 89.79 89.91 * lon (lon) float64 25kB 0.0 0.1172 0.2344 ... 359.6 359.8 359.9 Data variables: (12/113) acondsfc (time, lat, lon) float32 19MB ... albdosfc (time, lat, lon) float32 19MB ... cduvbsfc (time, lat, lon) float32 19MB ... cnwatsfc (time, lat, lon) float32 19MB ... cpofpsfc (time, lat, lon) float32 19MB ... cpratsfc (time, lat, lon) float32 19MB ... ... ... vgrd10m (time, lat, lon) float32 19MB ... vgrdhy1 (time, lat, lon) float32 19MB ... vgtypsfc (time, lat, lon) float32 19MB ... watrsfc (time, lat, lon) float32 19MB ... weasdsfc (time, lat, lon) float32 19MB ... wiltsfc (time, lat, lon) float32 19MB ... Attributes: title: GDAS flux file at 00Z12mar2025, downloaded Mar 12 06:56 UTC Conventions: COARDS\nGrADS dataType: Grid history: Sat Mar 15 17:21:35 UTC 2025 : imported by GrADS Data Serve...
xarray.Dataset
- time: 1
- lat: 1536
- lon: 3072
- time(time)float647.393e+05
- grads_dim :
- t
- grads_mapping :
- linear
- grads_size :
- 1
- grads_min :
- 00z12mar2025
- grads_step :
- 1hr
- units :
- days since 1-1-1 00:00:0.0
- long_name :
- time
- minimum :
- 00z12mar2025
- maximum :
- 00z12mar2025
array([739323.])
- lat(lat)float64-89.91 -89.79 ... 89.79 89.91
- grads_dim :
- y
- grads_mapping :
- levels
- grads_size :
- 1536
- units :
- degrees_north
- long_name :
- latitude
- minimum :
- -89.91
- maximum :
- 89.91
- resolution :
- 0.11714658
array([-89.91 , -89.794, -89.677, ..., 89.677, 89.794, 89.91 ])
- lon(lon)float640.0 0.1172 0.2344 ... 359.8 359.9
- grads_dim :
- x
- grads_mapping :
- linear
- grads_size :
- 3072
- units :
- degrees_east
- long_name :
- longitude
- minimum :
- 0.0
- maximum :
- 359.882813
- resolution :
- 0.1171875
array([0.000000e+00, 1.171875e-01, 2.343750e-01, ..., 3.596484e+02, 3.597656e+02, 3.598828e+02])
- acondsfc(time, lat, lon)float32...
- long_name :
- ** surface aerodynamic conductance [m/s]
[4718592 values with dtype=float32]
- albdosfc(time, lat, lon)float32...
- long_name :
- ** surface albedo [%]
[4718592 values with dtype=float32]
- cduvbsfc(time, lat, lon)float32...
- long_name :
- ** surface clear sky uv-b downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- cnwatsfc(time, lat, lon)float32...
- long_name :
- ** surface plant canopy surface water [kg/m^2]
[4718592 values with dtype=float32]
- cpofpsfc(time, lat, lon)float32...
- long_name :
- ** surface percent frozen precipitation [%]
[4718592 values with dtype=float32]
- cpratsfc(time, lat, lon)float32...
- long_name :
- ** surface convective precipitation rate [kg/m^2/s]
[4718592 values with dtype=float32]
- csdlfsfc(time, lat, lon)float32...
- long_name :
- ** surface clear sky downward long wave flux [w/m^2]
[4718592 values with dtype=float32]
- csdsfsfc(time, lat, lon)float32...
- long_name :
- ** surface clear sky downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- csulfsfc(time, lat, lon)float32...
- long_name :
- ** surface clear sky upward long wave flux [w/m^2]
[4718592 values with dtype=float32]
- csulftoa(time, lat, lon)float32...
- long_name :
- ** top of atmosphere clear sky upward long wave flux [w/m^2]
[4718592 values with dtype=float32]
- csusfsfc(time, lat, lon)float32...
- long_name :
- ** surface clear sky upward solar flux [w/m^2]
[4718592 values with dtype=float32]
- csusftoa(time, lat, lon)float32...
- long_name :
- ** top of atmosphere clear sky upward solar flux [w/m^2]
[4718592 values with dtype=float32]
- cworkclm(time, lat, lon)float32...
- long_name :
- ** entire atmosphere (considered as a single layer) cloud work function [j/kg]
[4718592 values with dtype=float32]
- dlwrfavesfc(time, lat, lon)float32...
- long_name :
- ** surface downward long-wave rad. flux [w/m^2]
[4718592 values with dtype=float32]
- dlwrfsfc(time, lat, lon)float32...
- long_name :
- ** surface downward long-wave rad. flux [w/m^2]
[4718592 values with dtype=float32]
- dswrfavesfc(time, lat, lon)float32...
- long_name :
- ** surface downward short-wave radiation flux [w/m^2]
[4718592 values with dtype=float32]
- dswrftoa(time, lat, lon)float32...
- long_name :
- ** top of atmosphere downward short-wave radiation flux [w/m^2]
[4718592 values with dtype=float32]
- dswrfsfc(time, lat, lon)float32...
- long_name :
- ** surface downward short-wave radiation flux [w/m^2]
[4718592 values with dtype=float32]
- duvbsfc(time, lat, lon)float32...
- long_name :
- ** surface uv-b downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- evbssfc(time, lat, lon)float32...
- long_name :
- ** surface direct evaporation from bare soil [w/m^2]
[4718592 values with dtype=float32]
- evcwsfc(time, lat, lon)float32...
- long_name :
- ** surface canopy water evaporation [w/m^2]
[4718592 values with dtype=float32]
- fldcpsfc(time, lat, lon)float32...
- long_name :
- ** surface field capacity [fraction]
[4718592 values with dtype=float32]
- fricvsfc(time, lat, lon)float32...
- long_name :
- ** surface frictional velocity [m/s]
[4718592 values with dtype=float32]
- gfluxavesfc(time, lat, lon)float32...
- long_name :
- ** surface ground heat flux [w/m^2]
[4718592 values with dtype=float32]
- gfluxsfc(time, lat, lon)float32...
- long_name :
- ** surface ground heat flux [w/m^2]
[4718592 values with dtype=float32]
- hcdchcll(time, lat, lon)float32...
- long_name :
- ** high cloud layer high cloud cover [%]
[4718592 values with dtype=float32]
- hgtsfc(time, lat, lon)float32...
- long_name :
- ** surface geopotential height [gpm]
[4718592 values with dtype=float32]
- hgthy1(time, lat, lon)float32...
- long_name :
- ** 1 hybrid level geopotential height [gpm]
[4718592 values with dtype=float32]
- hpblsfc(time, lat, lon)float32...
- long_name :
- ** surface planetary boundary layer height [m]
[4718592 values with dtype=float32]
- icecsfc(time, lat, lon)float32...
- long_name :
- ** surface ice cover [proportion]
[4718592 values with dtype=float32]
- icetksfc(time, lat, lon)float32...
- long_name :
- ** surface ice thickness [m]
[4718592 values with dtype=float32]
- landsfc(time, lat, lon)float32...
- long_name :
- ** surface land cover (0=sea, 1=land) [proportion]
[4718592 values with dtype=float32]
- lcdclcll(time, lat, lon)float32...
- long_name :
- ** low cloud layer low cloud cover [%]
[4718592 values with dtype=float32]
- lhtflavesfc(time, lat, lon)float32...
- long_name :
- ** surface latent heat net flux [w/m^2]
[4718592 values with dtype=float32]
- lhtflsfc(time, lat, lon)float32...
- long_name :
- ** surface latent heat net flux [w/m^2]
[4718592 values with dtype=float32]
- mcdcmcll(time, lat, lon)float32...
- long_name :
- ** middle cloud layer medium cloud cover [%]
[4718592 values with dtype=float32]
- nbdsfsfc(time, lat, lon)float32...
- long_name :
- ** surface near ir beam downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- nddsfsfc(time, lat, lon)float32...
- long_name :
- ** surface near ir diffuse downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- pevpravesfc(time, lat, lon)float32...
- long_name :
- ** surface potential evaporation rate [w/m^2]
[4718592 values with dtype=float32]
- pevprsfc(time, lat, lon)float32...
- long_name :
- ** surface potential evaporation rate [w/m^2]
[4718592 values with dtype=float32]
- pratesfc(time, lat, lon)float32...
- long_name :
- ** surface precipitation rate [kg/m^2/s]
[4718592 values with dtype=float32]
- preslclb(time, lat, lon)float32...
- long_name :
- ** low cloud bottom level pressure [pa]
[4718592 values with dtype=float32]
- preslclt(time, lat, lon)float32...
- long_name :
- ** low cloud top level pressure [pa]
[4718592 values with dtype=float32]
- presmclb(time, lat, lon)float32...
- long_name :
- ** middle cloud bottom level pressure [pa]
[4718592 values with dtype=float32]
- presmclt(time, lat, lon)float32...
- long_name :
- ** middle cloud top level pressure [pa]
[4718592 values with dtype=float32]
- preshclb(time, lat, lon)float32...
- long_name :
- ** high cloud bottom level pressure [pa]
[4718592 values with dtype=float32]
- preshclt(time, lat, lon)float32...
- long_name :
- ** high cloud top level pressure [pa]
[4718592 values with dtype=float32]
- pressfc(time, lat, lon)float32...
- long_name :
- ** surface pressure [pa]
[4718592 values with dtype=float32]
- prescclb(time, lat, lon)float32...
- long_name :
- ** convective cloud bottom level pressure [pa]
[4718592 values with dtype=float32]
- prescclt(time, lat, lon)float32...
- long_name :
- ** convective cloud top level pressure [pa]
[4718592 values with dtype=float32]
- pwatclm(time, lat, lon)float32...
- long_name :
- ** entire atmosphere (considered as a single layer) precipitable water [kg/m^2]
[4718592 values with dtype=float32]
- qmax2m(time, lat, lon)float32...
- long_name :
- ** 2 m above ground maximum specific humidity at 2m [kg/kg]
[4718592 values with dtype=float32]
- qmin2m(time, lat, lon)float32...
- long_name :
- ** 2 m above ground minimum specific humidity at 2m [kg/kg]
[4718592 values with dtype=float32]
- sbsnosfc(time, lat, lon)float32...
- long_name :
- ** surface sublimation (evaporation from snow) [w/m^2]
[4718592 values with dtype=float32]
- sfcrsfc(time, lat, lon)float32...
- long_name :
- ** surface surface roughness [m]
[4718592 values with dtype=float32]
- sfexcsfc(time, lat, lon)float32...
- long_name :
- ** surface exchange coefficient [(kg/m^3)(m/s)]
[4718592 values with dtype=float32]
- shtflavesfc(time, lat, lon)float32...
- long_name :
- ** surface sensible heat net flux [w/m^2]
[4718592 values with dtype=float32]
- shtflsfc(time, lat, lon)float32...
- long_name :
- ** surface sensible heat net flux [w/m^2]
[4718592 values with dtype=float32]
- sltypsfc(time, lat, lon)float32...
- long_name :
- ** surface surface slope type [index]
[4718592 values with dtype=float32]
- snodsfc(time, lat, lon)float32...
- long_name :
- ** surface snow depth [m]
[4718592 values with dtype=float32]
- snohfsfc(time, lat, lon)float32...
- long_name :
- ** surface snow phase change heat flux [w/m^2]
[4718592 values with dtype=float32]
- snowcsfc(time, lat, lon)float32...
- long_name :
- ** surface snow cover [%]
[4718592 values with dtype=float32]
- soill0_10cm(time, lat, lon)float32...
- long_name :
- ** 0-0.1 m below ground liquid volumetric soil moisture (non frozen) [proportion]
[4718592 values with dtype=float32]
- soill10_40cm(time, lat, lon)float32...
- long_name :
- ** 0.1-0.4 m below ground liquid volumetric soil moisture (non frozen) [proportion]
[4718592 values with dtype=float32]
- soill40_100cm(time, lat, lon)float32...
- long_name :
- ** 0.4-1 m below ground liquid volumetric soil moisture (non frozen) [proportion]
[4718592 values with dtype=float32]
- soill100_200cm(time, lat, lon)float32...
- long_name :
- ** 1-2 m below ground liquid volumetric soil moisture (non frozen) [proportion]
[4718592 values with dtype=float32]
- soilm0_200cm(time, lat, lon)float32...
- long_name :
- ** 0-2 m below ground soil moisture validation to deprecate [kg/m^3]
[4718592 values with dtype=float32]
- soilw0_10cm(time, lat, lon)float32...
- long_name :
- ** 0-0.1 m below ground volumetric soil moisture content [fraction]
[4718592 values with dtype=float32]
- soilw10_40cm(time, lat, lon)float32...
- long_name :
- ** 0.1-0.4 m below ground volumetric soil moisture content [fraction]
[4718592 values with dtype=float32]
- soilw40_100cm(time, lat, lon)float32...
- long_name :
- ** 0.4-1 m below ground volumetric soil moisture content [fraction]
[4718592 values with dtype=float32]
- soilw100_200cm(time, lat, lon)float32...
- long_name :
- ** 1-2 m below ground volumetric soil moisture content [fraction]
[4718592 values with dtype=float32]
- sotypsfc(time, lat, lon)float32...
- long_name :
- ** surface soil type [-]
[4718592 values with dtype=float32]
- spfh2m(time, lat, lon)float32...
- long_name :
- ** 2 m above ground specific humidity [kg/kg]
[4718592 values with dtype=float32]
- spfhhy1(time, lat, lon)float32...
- long_name :
- ** 1 hybrid level specific humidity [kg/kg]
[4718592 values with dtype=float32]
- ssrunsfc(time, lat, lon)float32...
- long_name :
- ** surface storm surface runoff [kg/m^2]
[4718592 values with dtype=float32]
- sunsdsfc(time, lat, lon)float32...
- long_name :
- ** surface sunshine duration [s]
[4718592 values with dtype=float32]
- tcdcclm(time, lat, lon)float32...
- long_name :
- ** entire atmosphere total cloud cover [%]
[4718592 values with dtype=float32]
- tcdcblcll(time, lat, lon)float32...
- long_name :
- ** boundary layer cloud layer total cloud cover [%]
[4718592 values with dtype=float32]
- tcdcccll(time, lat, lon)float32...
- long_name :
- ** convective cloud layer total cloud cover [%]
[4718592 values with dtype=float32]
- tmax2m(time, lat, lon)float32...
- long_name :
- ** 2 m above ground maximum temperature [k]
[4718592 values with dtype=float32]
- tmin2m(time, lat, lon)float32...
- long_name :
- ** 2 m above ground minimum temperature [k]
[4718592 values with dtype=float32]
- tmplclt(time, lat, lon)float32...
- long_name :
- ** low cloud top level temperature [k]
[4718592 values with dtype=float32]
- tmpmclt(time, lat, lon)float32...
- long_name :
- ** middle cloud top level temperature [k]
[4718592 values with dtype=float32]
- tmphclt(time, lat, lon)float32...
- long_name :
- ** high cloud top level temperature [k]
[4718592 values with dtype=float32]
- tmpsfc(time, lat, lon)float32...
- long_name :
- ** surface temperature [k]
[4718592 values with dtype=float32]
- tmp2m(time, lat, lon)float32...
- long_name :
- ** 2 m above ground temperature [k]
[4718592 values with dtype=float32]
- tmphy1(time, lat, lon)float32...
- long_name :
- ** 1 hybrid level temperature [k]
[4718592 values with dtype=float32]
- transsfc(time, lat, lon)float32...
- long_name :
- ** surface transpiration [w/m^2]
[4718592 values with dtype=float32]
- tsoil0_10cm(time, lat, lon)float32...
- long_name :
- ** 0-0.1 m below ground soil temperature validation to deprecate [k]
[4718592 values with dtype=float32]
- tsoil10_40cm(time, lat, lon)float32...
- long_name :
- ** 0.1-0.4 m below ground soil temperature validation to deprecate [k]
[4718592 values with dtype=float32]
- tsoil40_100cm(time, lat, lon)float32...
- long_name :
- ** 0.4-1 m below ground soil temperature validation to deprecate [k]
[4718592 values with dtype=float32]
- tsoil100_200cm(time, lat, lon)float32...
- long_name :
- ** 1-2 m below ground soil temperature validation to deprecate [k]
[4718592 values with dtype=float32]
- ugwdsfc(time, lat, lon)float32...
- long_name :
- ** surface zonal flux of gravity wave stress [n/m^2]
[4718592 values with dtype=float32]
- uflxsfc(time, lat, lon)float32...
- long_name :
- ** surface momentum flux, u-component [n/m^2]
[4718592 values with dtype=float32]
- ugrd10m(time, lat, lon)float32...
- long_name :
- ** 10 m above ground u-component of wind [m/s]
[4718592 values with dtype=float32]
- ugrdhy1(time, lat, lon)float32...
- long_name :
- ** 1 hybrid level u-component of wind [m/s]
[4718592 values with dtype=float32]
- ulwrfavesfc(time, lat, lon)float32...
- long_name :
- ** surface upward long-wave rad. flux [w/m^2]
[4718592 values with dtype=float32]
- ulwrftoa(time, lat, lon)float32...
- long_name :
- ** top of atmosphere upward long-wave rad. flux [w/m^2]
[4718592 values with dtype=float32]
- ulwrfsfc(time, lat, lon)float32...
- long_name :
- ** surface upward long-wave rad. flux [w/m^2]
[4718592 values with dtype=float32]
- uswrfavesfc(time, lat, lon)float32...
- long_name :
- ** surface upward short-wave radiation flux [w/m^2]
[4718592 values with dtype=float32]
- uswrftoa(time, lat, lon)float32...
- long_name :
- ** top of atmosphere upward short-wave radiation flux [w/m^2]
[4718592 values with dtype=float32]
- uswrfsfc(time, lat, lon)float32...
- long_name :
- ** surface upward short-wave radiation flux [w/m^2]
[4718592 values with dtype=float32]
- vgwdsfc(time, lat, lon)float32...
- long_name :
- ** surface meridional flux of gravity wave stress [n/m^2]
[4718592 values with dtype=float32]
- vbdsfsfc(time, lat, lon)float32...
- long_name :
- ** surface visible beam downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- vddsfsfc(time, lat, lon)float32...
- long_name :
- ** surface visible diffuse downward solar flux [w/m^2]
[4718592 values with dtype=float32]
- vegsfc(time, lat, lon)float32...
- long_name :
- ** surface vegetation [%]
[4718592 values with dtype=float32]
- vflxsfc(time, lat, lon)float32...
- long_name :
- ** surface momentum flux, v-component [n/m^2]
[4718592 values with dtype=float32]
- vgrd10m(time, lat, lon)float32...
- long_name :
- ** 10 m above ground v-component of wind [m/s]
[4718592 values with dtype=float32]
- vgrdhy1(time, lat, lon)float32...
- long_name :
- ** 1 hybrid level v-component of wind [m/s]
[4718592 values with dtype=float32]
- vgtypsfc(time, lat, lon)float32...
- long_name :
- ** surface vegetation type [integer(0-13)]
[4718592 values with dtype=float32]
- watrsfc(time, lat, lon)float32...
- long_name :
- ** surface water runoff [kg/m^2]
[4718592 values with dtype=float32]
- weasdsfc(time, lat, lon)float32...
- long_name :
- ** surface water equivalent of accumulated snow depth [kg/m^2]
[4718592 values with dtype=float32]
- wiltsfc(time, lat, lon)float32...
- long_name :
- ** surface wilting point [fraction]
[4718592 values with dtype=float32]
- timePandasIndex
PandasIndex(Index([739323.0], dtype='float64', name='time'))
- latPandasIndex
PandasIndex(Index([ -89.91, -89.794, -89.677, -89.56, -89.443, -89.326, -89.209, -89.092, -88.975, -88.858, ... 88.858, 88.975, 89.092, 89.209, 89.326, 89.443, 89.56, 89.677, 89.794, 89.91], dtype='float64', name='lat', length=1536))
- lonPandasIndex
PandasIndex(Index([ 0.0, 0.11718750016, 0.23437500033, 0.35156250049, 0.46875000065, 0.58593750081, 0.70312500098, 0.82031250114, 0.9375000013, 1.05468750147, ... 358.82812549853, 358.9453129987, 359.06250049886, 359.17968799902, 359.29687549918, 359.41406299935, 359.53125049951, 359.64843799967, 359.76562549984, 359.882813], dtype='float64', name='lon', length=3072))
- title :
- GDAS flux file at 00Z12mar2025, downloaded Mar 12 06:56 UTC
- Conventions :
- COARDS GrADS
- dataType :
- Grid
- history :
- Sat Mar 15 17:21:35 UTC 2025 : imported by GrADS Data Server 2.0