From ecdb5364aaf3f619e014f431bfa2368baf05d4cf Mon Sep 17 00:00:00 2001 From: tomvothecoder Date: Thu, 7 Nov 2024 11:18:45 -0800 Subject: [PATCH] Update `introduction-to-xcdat.ipynb` --- .../introduction-to-xcdat.ipynb | 2154 ++++++++--------- 1 file changed, 1048 insertions(+), 1106 deletions(-) diff --git a/docs/demos/1-25-23-cwss-seminar/introduction-to-xcdat.ipynb b/docs/demos/1-25-23-cwss-seminar/introduction-to-xcdat.ipynb index cc601b62..7ff9a41e 100644 --- a/docs/demos/1-25-23-cwss-seminar/introduction-to-xcdat.ipynb +++ b/docs/demos/1-25-23-cwss-seminar/introduction-to-xcdat.ipynb @@ -13,7 +13,6 @@ " \"xCDAT\n", "\n", "\n", - "\n", "# LLNL Climate and Weather Seminar Series (01/25/2023) - A Gentle Introduction to xCDAT\n", "\n", "

\"A Python package for simple and robust climate data analysis.\"

\n", @@ -22,7 +21,7 @@ "\n", "---\n", "\n", - "_This work is performed under the auspices of the U. S. DOE by Lawrence Livermore National Laboratory under contract No. DE-AC52-07NA27344._" + "_This work is performed under the auspices of the U. S. DOE by Lawrence Livermore National Laboratory under contract No. DE-AC52-07NA27344._\n" ] }, { @@ -37,14 +36,14 @@ "\n", "Intended audience: Some or no familiarity with `xarray` and/or `xcdat`\n", "\n", - "1. __Driving force__ behind xCDAT\n", - "2. __Goals and milestones__ of CDAT's successor\n", + "1. **Driving force** behind xCDAT\n", + "2. **Goals and milestones** of CDAT's successor\n", "3. Introducing xCDAT\n", - "4. Understanding the __basics of Xarray__\n", - "5. How __xCDAT extends Xarray__ for climate data analysis\n", + "4. Understanding the **basics of Xarray**\n", + "5. How **xCDAT extends Xarray** for climate data analysis\n", "6. Technical design philosophy and APIs\n", - "8. __Demo__ of capabilities\n", - "8. How to __get involved__\n" + "7. **Demo** of capabilities\n", + "8. How to **get involved**\n" ] }, { @@ -55,17 +54,23 @@ } }, "source": [ - "## Notebook Setup\n", + "### Notebook Kernel Setup\n", + "\n", + "Users can [install their own instance of xcdat](../getting-started-guide/installation.rst) and follow these examples using their own environment (e.g., with VS Code, Jupyter, Spyder, iPython) or [enable xcdat with existing JupyterHub instances](../getting-started-guide/getting-started-hpc-jupyter.rst).\n", "\n", - "Create an Anaconda environment for this notebook using the command below:\n", + "First, create the conda environment:\n", "\n", "```bash\n", - "conda create -n xcdat -c conda-forge xarray xcdat xesmf matplotlib nc-time-axis jupyter\n", + "conda create -n xcdat_notebook_0.7.3 -c conda-forge xcdat=0.7.3 xesmf matplotlib ipython ipykernel cartopy nc-time-axis gsw-xarray jupyter pooch\n", "```\n", "\n", - "- `xesmf` is required for horizontal regridding with xESMF\n", - "- `matplotlib` is an optional dependency required for plotting with xarray\n", - "- `nc-time-axis` is an optional dependency required for `matplotlib` to plot `cftime` coordinates" + "Then install the kernel from the `xcdat_notebook_0.7.3` environment using `ipykernel` and name the kernel with the display name (e.g., `xcdat_notebook_0.7.3`):\n", + "\n", + "```bash\n", + "python -m ipykernel install --user --name xcdat_notebook_0.7.3 --display-name xcdat_notebook_0.7.3\n", + "```\n", + "\n", + "Then to select the kernel `xcdat_notebook_0.7.3` in Jupyter to use this kernel.\n" ] }, { @@ -78,16 +83,16 @@ "source": [ "## The Driving Force Behind xCDAT\n", "\n", - "* The __CDAT (Community Data Analysis Tools)__ library has provided a suite of robust and comprehensive open-source climate data analysis and visualization packages for over __20 years__\n", - "* A driving __need__ for a __modern successor__\n", - " * Focus on a maintainable and extensible library \n", - " * Serve the needs of the climate community in the long-term\n", + "- The **CDAT (Community Data Analysis Tools)** library has provided a suite of robust and comprehensive open-source climate data analysis and visualization packages for over **20 years**\n", + "- A driving **need** for a **modern successor**\n", + " - Focus on a maintainable and extensible library\n", + " - Serve the needs of the climate community in the long-term\n", "\n", "
\n", " \"CMIP6\n", " \"CMIP6\n", " \n", - "
" + "\n" ] }, { @@ -100,25 +105,24 @@ "source": [ "## Goals and Milestones for CDAT's Successor\n", "\n", - "1. __Offer similar core capabilities__\n", + "1. **Offer similar core capabilities**\n", "\n", " 1. _For example geospatial averaging, temporal averaging, and regridding_\n", "\n", - "2. Use __modern technologies__ in the library’s stack\n", + "2. Use **modern technologies** in the library’s stack\n", "\n", " 1. Support parallelism and lazy operations\n", "\n", - "3. Be __maintainable__, __extensible__, and __easy-to-use__\n", + "3. Be **maintainable**, **extensible**, and **easy-to-use**\n", "\n", " 1. Python Enhancement Proposals (PEPs)\n", " 2. Automate DevOps processes (unit testing, code coverage)\n", " 3. Actively maintain documentation\n", "\n", - "4. __Cultivate an open-source community__ that can sustain the project\n", + "4. **Cultivate an open-source community** that can sustain the project\n", "\n", " 1. Encourage GitHub contributions\n", - " 2. Community engagement efforts (e.g., Pangeo, ESGF)\n", - "\n" + " 2. Community engagement efforts (e.g., Pangeo, ESGF)\n" ] }, { @@ -131,20 +135,20 @@ "source": [ "## Introducing xCDAT\n", "\n", - "* xCDAT is an __extension of xarray__ for __climate data analysis__ on __structured grids__\n", - "* __Goal__ of providing features and utilities for __simple and robust analysis of climate data__\n", - "* Jointly developed by scientists and developers from:\n", - " * **E3SM Project** (Energy Exascale Earth System Model Project)\n", - " * **PCMDI** (Program for Climate Model Diagnosis and Intercomparison)\n", - " * **SEATS Project** (Simplifying ESM Analysis Through Standards Project) \n", - " * Users around the world **via** **GitHub**\n", + "- xCDAT is an **extension of xarray** for **climate data analysis** on **structured grids**\n", + "- **Goal** of providing features and utilities for **simple and robust analysis of climate data**\n", + "- Jointly developed by scientists and developers from:\n", + " - **E3SM Project** (Energy Exascale Earth System Model Project)\n", + " - **PCMDI** (Program for Climate Model Diagnosis and Intercomparison)\n", + " - **SEATS Project** (Simplifying ESM Analysis Through Standards Project)\n", + " - Users around the world **via** **GitHub**\n", "\n", "
\n", "\"E3SM\n", "\"PCMDI\n", "\"SEATS\n", "\n", - "
" + "\n" ] }, { @@ -157,16 +161,14 @@ "source": [ "## Before We Dive Deeper, Let's Talk About Xarray\n", "\n", - "* Xarray is an evolution of an internal tool developed at The Climate Corporation\n", - "* Released as open source in May 2014\n", - "* __NumFocus__ fiscally sponsored project since August 2018\n", - "\n", + "- Xarray is an evolution of an internal tool developed at The Climate Corporation\n", + "- Released as open source in May 2014\n", + "- **NumFocus** fiscally sponsored project since August 2018\n", "\n", "
\n", " \"xarray\n", " \"NumFOCUS\n", - "
\n", - "\n" + "\n" ] }, { @@ -179,11 +181,11 @@ "source": [ "## Key Features and Capabilities in Xarray\n", "\n", - "* __“N-D labeled arrays and datasets in Python”__\n", - " * Built upon and extends NumPy and pandas\n", - "* __Interoperable with scientific Python ecosystem__ including __NumPy, Dask, Pandas, and Matplotlib__\n", - "* Supports file I/O, indexing and selecting, interpolating, grouping, aggregating, parallelism (Dask), plotting (matplotlib wrapper)\n", - " * Supported formats include: netCDF, Iris, OPeNDAP, Zarr, and GRIB\n", + "- **“N-D labeled arrays and datasets in Python”**\n", + " - Built upon and extends NumPy and pandas\n", + "- **Interoperable with scientific Python ecosystem** including **NumPy, Dask, Pandas, and Matplotlib**\n", + "- Supports file I/O, indexing and selecting, interpolating, grouping, aggregating, parallelism (Dask), plotting (matplotlib wrapper)\n", + " - Supported formats include: netCDF, Iris, OPeNDAP, Zarr, and GRIB\n", "\n", "\n", - " \n", - " \n", - "\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - "\n", - " \n", - " 2\n", - " 1980\n", - "\n", - " \n", - " \n", - "
  • lat_bnds
    (lat, bnds)
    float64
    dask.array<chunksize=(145, 2), meta=np.ndarray>
    _ChunkSizes :
    [145 2]
    \n", - " \n", - " \n", - " \n", - " \n", - "
    \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    Array Chunk
    Bytes 2.27 kiB 2.27 kiB
    Shape (145, 2) (145, 2)
    Dask graph 1 chunks in 2 graph layers
    Data type float64 numpy.ndarray
    \n", - "
    \n", - " \n", - "\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - "\n", - " \n", - " 2\n", - " 145\n", - "\n", - "
  • lon_bnds
    (lon, bnds)
    float64
    dask.array<chunksize=(192, 2), meta=np.ndarray>
    _ChunkSizes :
    [192 2]
    \n", + " ['2021-10-01T00:00:00.000000000', '2021-11-01T00:00:00.000000000'],\n", + " ['2021-11-01T00:00:00.000000000', '2021-12-01T00:00:00.000000000'],\n", + " ['2021-12-01T00:00:00.000000000', '2022-01-01T00:00:00.000000000']],\n", + " dtype='datetime64[ns]')
  • sst
    (time, lat, lon)
    float32
    dask.array<chunksize=(624, 89, 180), meta=np.ndarray>
    long_name :
    Monthly Means of Sea Surface Temperature
    units :
    degC
    var_desc :
    Sea Surface Temperature
    level_desc :
    Surface
    statistic :
    Mean
    dataset :
    NOAA Extended Reconstructed SST V5
    parent_stat :
    Individual Values
    actual_range :
    [-1.8 42.32636]
    valid_range :
    [-1.8 45. ]
  • \n", " \n", " \n", - " \n", - " \n", - "
    \n", " \n", @@ -4556,14 +4502,14 @@ " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -4571,171 +4517,182 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - "
    Bytes 3.00 kiB 3.00 kiB 38.13 MiB 38.13 MiB
    Shape (192, 2) (192, 2) (624, 89, 180) (624, 89, 180)
    Dask graph
    Data type float64 numpy.ndarray
    \n", - "
    \n", - " \n", - "\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - "\n", - " \n", - " 2\n", - " 192\n", - "\n", - "
  • tas
    (time, lat, lon)
    float32
    dask.array<chunksize=(1205, 145, 192), meta=np.ndarray>
    standard_name :
    air_temperature
    long_name :
    Near-Surface Air Temperature
    comment :
    near-surface (usually, 2 meter) air temperature
    units :
    K
    cell_methods :
    area: time: mean
    cell_measures :
    area: areacella
    history :
    2020-06-05T04:06:10Z altered by CMOR: Treated scalar dimension: 'height'. 2020-06-05T04:06:10Z altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20).
    _ChunkSizes :
    [ 1 145 192]
    \n", - " \n", - " \n", " \n", " \n", - "
    \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", " \n", " \n", " \n", "
    Array Chunk
    Bytes 210.28 MiB 127.97 MiB
    Shape (1980, 145, 192) (1205, 145, 192)
    Dask graph 2 chunks in 2 graph layers
    Data type float32 numpy.ndarray
    \n", "
    \n", - " \n", + " \n", "\n", " \n", " \n", - " \n", + " \n", "\n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", "\n", " \n", - " \n", + " \n", "\n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", "\n", " \n", " \n", - " \n", + " \n", "\n", " \n", - " \n", + " \n", "\n", " \n", - " \n", - " \n", + " \n", + " \n", "\n", " \n", - " \n", - " \n", + " \n", + " \n", "\n", " \n", - " \n", + " \n", "\n", " \n", - " 192\n", - " 145\n", - " 1980\n", + " 180\n", + " 89\n", + " 624\n", "\n", "
    • time
      PandasIndex
      PandasIndex(CFTimeIndex([1850-01-16 12:00:00, 1850-02-15 00:00:00, 1850-03-16 12:00:00,\n",
      -       "             1850-04-16 00:00:00, 1850-05-16 12:00:00, 1850-06-16 00:00:00,\n",
      -       "             1850-07-16 12:00:00, 1850-08-16 12:00:00, 1850-09-16 00:00:00,\n",
      -       "             1850-10-16 12:00:00,\n",
      -       "             ...\n",
      -       "             2014-03-16 12:00:00, 2014-04-16 00:00:00, 2014-05-16 12:00:00,\n",
      -       "             2014-06-16 00:00:00, 2014-07-16 12:00:00, 2014-08-16 12:00:00,\n",
      -       "             2014-09-16 00:00:00, 2014-10-16 12:00:00, 2014-11-16 00:00:00,\n",
      -       "             2014-12-16 12:00:00],\n",
      -       "            dtype='object',\n",
      -       "            length=1980,\n",
      -       "            calendar='proleptic_gregorian',\n",
      -       "            freq='None'))
    • lat
      PandasIndex
      PandasIndex(Float64Index([ -90.0, -88.75,  -87.5, -86.25,  -85.0, -83.75,  -82.5, -81.25,\n",
      -       "               -80.0, -78.75,\n",
      -       "              ...\n",
      -       "               78.75,   80.0,  81.25,   82.5,  83.75,   85.0,  86.25,   87.5,\n",
      -       "               88.75,   90.0],\n",
      -       "             dtype='float64', name='lat', length=145))
    • lon
      PandasIndex
      PandasIndex(Float64Index([    0.0,   1.875,    3.75,   5.625,     7.5,   9.375,   11.25,\n",
      -       "               13.125,    15.0,  16.875,\n",
      -       "              ...\n",
      -       "               341.25, 343.125,   345.0, 346.875,  348.75, 350.625,   352.5,\n",
      -       "              354.375,  356.25, 358.125],\n",
      -       "             dtype='float64', name='lon', length=192))
  • Conventions :
    CF-1.7 CMIP-6.2
    activity_id :
    CMIP
    branch_method :
    standard
    branch_time_in_child :
    0.0
    branch_time_in_parent :
    87658.0
    creation_date :
    2020-06-05T04:06:11Z
    data_specs_version :
    01.00.30
    experiment :
    all-forcing simulation of the recent past
    experiment_id :
    historical
    external_variables :
    areacella
    forcing_index :
    1
    frequency :
    mon
    further_info_url :
    https://furtherinfo.es-doc.org/CMIP6.CSIRO.ACCESS-ESM1-5.historical.none.r10i1p1f1
    grid :
    native atmosphere N96 grid (145x192 latxlon)
    grid_label :
    gn
    history :
    2020-06-05T04:06:11Z ; CMOR rewrote data to be consistent with CMIP6, CF-1.7 CMIP-6.2 and CF standards.
    initialization_index :
    1
    institution :
    Commonwealth Scientific and Industrial Research Organisation, Aspendale, Victoria 3195, Australia
    institution_id :
    CSIRO
    mip_era :
    CMIP6
    nominal_resolution :
    250 km
    notes :
    Exp: ESM-historical; Local ID: HI-14; Variable: tas (['fld_s03i236'])
    parent_activity_id :
    CMIP
    parent_experiment_id :
    piControl
    parent_mip_era :
    CMIP6
    parent_source_id :
    ACCESS-ESM1-5
    parent_time_units :
    days since 0101-1-1
    parent_variant_label :
    r1i1p1f1
    physics_index :
    1
    product :
    model-output
    realization_index :
    10
    realm :
    atmos
    run_variant :
    forcing: GHG, Oz, SA, Sl, Vl, BC, OC, (GHG = CO2, N2O, CH4, CFC11, CFC12, CFC113, HCFC22, HFC125, HFC134a)
    source :
    ACCESS-ESM1.5 (2019): \n", - "aerosol: CLASSIC (v1.0)\n", - "atmos: HadGAM2 (r1.1, N96; 192 x 145 longitude/latitude; 38 levels; top level 39255 m)\n", - "atmosChem: none\n", - "land: CABLE2.4\n", - "landIce: none\n", - "ocean: ACCESS-OM2 (MOM5, tripolar primarily 1deg; 360 x 300 longitude/latitude; 50 levels; top grid cell 0-10 m)\n", - "ocnBgchem: WOMBAT (same grid as ocean)\n", - "seaIce: CICE4.1 (same grid as ocean)
    source_id :
    ACCESS-ESM1-5
    source_type :
    AOGCM
    sub_experiment :
    none
    sub_experiment_id :
    none
    table_id :
    Amon
    table_info :
    Creation Date:(30 April 2019) MD5:5bd755e94c2173cb3050a0f3480f60c4
    title :
    ACCESS-ESM1-5 output prepared for CMIP6
    variable_id :
    tas
    variant_label :
    r10i1p1f1
    version :
    v20200605
    license :
    CMIP6 model data produced by CSIRO is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (https://creativecommons.org/licenses/). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file). The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.
    cmor_version :
    3.4.0
    _NCProperties :
    version=2,netcdf=4.6.2,hdf5=1.10.5
    tracking_id :
    hdl:21.14100/af78ae5e-f3a6-4e99-8cfe-5f29eb467cd1
    DODS_EXTRA.Unlimited_Dimension :
    time
  • " + "
  • lon_bnds
    (lon, bnds)
    float32
    -1.0 1.0 1.0 ... 357.0 357.0 359.0
    xcdat_bounds :
    True
    array([[ -1.,   1.],\n",
    +       "       [  1.,   3.],\n",
    +       "       [  3.,   5.],\n",
    +       "       [  5.,   7.],\n",
    +       "       [  7.,   9.],\n",
    +       "       [  9.,  11.],\n",
    +       "       [ 11.,  13.],\n",
    +       "       [ 13.,  15.],\n",
    +       "       [ 15.,  17.],\n",
    +       "       [ 17.,  19.],\n",
    +       "       [ 19.,  21.],\n",
    +       "       [ 21.,  23.],\n",
    +       "       [ 23.,  25.],\n",
    +       "       [ 25.,  27.],\n",
    +       "       [ 27.,  29.],\n",
    +       "       [ 29.,  31.],\n",
    +       "       [ 31.,  33.],\n",
    +       "       [ 33.,  35.],\n",
    +       "       [ 35.,  37.],\n",
    +       "       [ 37.,  39.],\n",
    +       "...\n",
    +       "       [319., 321.],\n",
    +       "       [321., 323.],\n",
    +       "       [323., 325.],\n",
    +       "       [325., 327.],\n",
    +       "       [327., 329.],\n",
    +       "       [329., 331.],\n",
    +       "       [331., 333.],\n",
    +       "       [333., 335.],\n",
    +       "       [335., 337.],\n",
    +       "       [337., 339.],\n",
    +       "       [339., 341.],\n",
    +       "       [341., 343.],\n",
    +       "       [343., 345.],\n",
    +       "       [345., 347.],\n",
    +       "       [347., 349.],\n",
    +       "       [349., 351.],\n",
    +       "       [351., 353.],\n",
    +       "       [353., 355.],\n",
    +       "       [355., 357.],\n",
    +       "       [357., 359.]], dtype=float32)
  • lat_bnds
    (lat, bnds)
    float32
    89.0 87.0 87.0 ... -87.0 -89.0
    xcdat_bounds :
    True
    array([[ 89.,  87.],\n",
    +       "       [ 87.,  85.],\n",
    +       "       [ 85.,  83.],\n",
    +       "       [ 83.,  81.],\n",
    +       "       [ 81.,  79.],\n",
    +       "       [ 79.,  77.],\n",
    +       "       [ 77.,  75.],\n",
    +       "       [ 75.,  73.],\n",
    +       "       [ 73.,  71.],\n",
    +       "       [ 71.,  69.],\n",
    +       "       [ 69.,  67.],\n",
    +       "       [ 67.,  65.],\n",
    +       "       [ 65.,  63.],\n",
    +       "       [ 63.,  61.],\n",
    +       "       [ 61.,  59.],\n",
    +       "       [ 59.,  57.],\n",
    +       "       [ 57.,  55.],\n",
    +       "       [ 55.,  53.],\n",
    +       "       [ 53.,  51.],\n",
    +       "       [ 51.,  49.],\n",
    +       "...\n",
    +       "       [-49., -51.],\n",
    +       "       [-51., -53.],\n",
    +       "       [-53., -55.],\n",
    +       "       [-55., -57.],\n",
    +       "       [-57., -59.],\n",
    +       "       [-59., -61.],\n",
    +       "       [-61., -63.],\n",
    +       "       [-63., -65.],\n",
    +       "       [-65., -67.],\n",
    +       "       [-67., -69.],\n",
    +       "       [-69., -71.],\n",
    +       "       [-71., -73.],\n",
    +       "       [-73., -75.],\n",
    +       "       [-75., -77.],\n",
    +       "       [-77., -79.],\n",
    +       "       [-79., -81.],\n",
    +       "       [-81., -83.],\n",
    +       "       [-83., -85.],\n",
    +       "       [-85., -87.],\n",
    +       "       [-87., -89.]], dtype=float32)
    • lat
      PandasIndex
      PandasIndex(Index([ 88.0,  86.0,  84.0,  82.0,  80.0,  78.0,  76.0,  74.0,  72.0,  70.0,\n",
      +       "        68.0,  66.0,  64.0,  62.0,  60.0,  58.0,  56.0,  54.0,  52.0,  50.0,\n",
      +       "        48.0,  46.0,  44.0,  42.0,  40.0,  38.0,  36.0,  34.0,  32.0,  30.0,\n",
      +       "        28.0,  26.0,  24.0,  22.0,  20.0,  18.0,  16.0,  14.0,  12.0,  10.0,\n",
      +       "         8.0,   6.0,   4.0,   2.0,   0.0,  -2.0,  -4.0,  -6.0,  -8.0, -10.0,\n",
      +       "       -12.0, -14.0, -16.0, -18.0, -20.0, -22.0, -24.0, -26.0, -28.0, -30.0,\n",
      +       "       -32.0, -34.0, -36.0, -38.0, -40.0, -42.0, -44.0, -46.0, -48.0, -50.0,\n",
      +       "       -52.0, -54.0, -56.0, -58.0, -60.0, -62.0, -64.0, -66.0, -68.0, -70.0,\n",
      +       "       -72.0, -74.0, -76.0, -78.0, -80.0, -82.0, -84.0, -86.0, -88.0],\n",
      +       "      dtype='float32', name='lat'))
    • lon
      PandasIndex
      PandasIndex(Index([  0.0,   2.0,   4.0,   6.0,   8.0,  10.0,  12.0,  14.0,  16.0,  18.0,\n",
      +       "       ...\n",
      +       "       340.0, 342.0, 344.0, 346.0, 348.0, 350.0, 352.0, 354.0, 356.0, 358.0],\n",
      +       "      dtype='float32', name='lon', length=180))
    • time
      PandasIndex
      PandasIndex(DatetimeIndex(['1970-01-01', '1970-02-01', '1970-03-01', '1970-04-01',\n",
      +       "               '1970-05-01', '1970-06-01', '1970-07-01', '1970-08-01',\n",
      +       "               '1970-09-01', '1970-10-01',\n",
      +       "               ...\n",
      +       "               '2021-03-01', '2021-04-01', '2021-05-01', '2021-06-01',\n",
      +       "               '2021-07-01', '2021-08-01', '2021-09-01', '2021-10-01',\n",
      +       "               '2021-11-01', '2021-12-01'],\n",
      +       "              dtype='datetime64[ns]', name='time', length=624, freq=None))
  • climatology :
    Climatology is based on 1971-2000 SST, Xue, Y., T. M. Smith, and R. W. Reynolds, 2003: Interdecadal changes of 30-yr SST normals during 1871.2000. Journal of Climate, 16, 1601-1612.
    description :
    In situ data: ICOADS2.5 before 2007 and NCEP in situ data from 2008 to present. Ice data: HadISST ice before 2010 and NCEP ice after 2010.
    keywords_vocabulary :
    NASA Global Change Master Directory (GCMD) Science Keywords
    keywords :
    Earth Science > Oceans > Ocean Temperature > Sea Surface Temperature >
    instrument :
    Conventional thermometers
    source_comment :
    SSTs were observed by conventional thermometers in Buckets (insulated or un-insulated canvas and wooded buckets) or Engine Room Intaker
    geospatial_lon_min :
    -1.0
    geospatial_lon_max :
    359.0
    geospatial_laty_max :
    89.0
    geospatial_laty_min :
    -89.0
    geospatial_lat_max :
    89.0
    geospatial_lat_min :
    -89.0
    geospatial_lat_units :
    degrees_north
    geospatial_lon_units :
    degrees_east
    cdm_data_type :
    Grid
    project :
    NOAA Extended Reconstructed Sea Surface Temperature (ERSST)
    original_publisher_url :
    http://www.ncdc.noaa.gov
    References :
    https://www.ncdc.noaa.gov/data-access/marineocean-data/extended-reconstructed-sea-surface-temperature-ersst-v5 at NCEI and http://www.esrl.noaa.gov/psd/data/gridded/data.noaa.ersst.v5.html
    source :
    In situ data: ICOADS R3.0 before 2015, NCEP in situ GTS from 2016 to present, and Argo SST from 1999 to present. Ice data: HadISST2 ice before 2015, and NCEP ice after 2015
    title :
    NOAA ERSSTv5 (in situ only)
    history :
    created 07/2017 by PSD data using NCEI's ERSST V5 NetCDF values
    institution :
    This version written at NOAA/ESRL PSD: obtained from NOAA/NESDIS/National Centers for Environmental Information and time aggregated. Original Full Source: NOAA/NESDIS/NCEI/CCOG
    citation :
    Huang et al, 2017: Extended Reconstructed Sea Surface Temperatures Version 5 (ERSSTv5): Upgrades, Validations, and Intercomparisons. Journal of Climate, https://doi.org/10.1175/JCLI-D-16-0836.1
    platform :
    Ship and Buoy SSTs from ICOADS R3.0 and NCEP GTS
    standard_name_vocabulary :
    CF Standard Name Table (v40, 25 January 2017)
    processing_level :
    NOAA Level 4
    Conventions :
    CF-1.6, ACDD-1.3
    metadata_link :
    :metadata_link = https://doi.org/10.7289/V5T72FNM (original format)
    creator_name :
    Boyin Huang (original)
    date_created :
    2017-06-30T12:18:00Z (original)
    product_version :
    Version 5
    creator_url_original :
    https://www.ncei.noaa.gov
    license :
    No constraints on data access or use
    comment :
    SSTs were observed by conventional thermometers in Buckets (insulated or un-insulated canvas and wooded buckets), Engine Room Intakers, or floats and drifters
    summary :
    ERSST.v5 is developed based on v4 after revisions of 8 parameters using updated data sets and advanced knowledge of ERSST analysis
    dataset_title :
    NOAA Extended Reconstructed SST V5
    data_modified :
    2022-06-07
  • " ], "text/plain": [ - "\n", - "Dimensions: (time: 1980, bnds: 2, lat: 145, lon: 192)\n", + " Size: 40MB\n", + "Dimensions: (lat: 89, lon: 180, time: 624, bnds: 2)\n", "Coordinates:\n", - " * time (time) object 1850-01-16 12:00:00 ... 2014-12-16 12:00:00\n", - " * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n", - " * lon (lon) float64 0.0 1.875 3.75 5.625 ... 352.5 354.4 356.2 358.1\n", - " height float64 ...\n", + " * lat (lat) float32 356B 88.0 86.0 84.0 82.0 ... -84.0 -86.0 -88.0\n", + " * lon (lon) float32 720B 0.0 2.0 4.0 6.0 ... 352.0 354.0 356.0 358.0\n", + " * time (time) datetime64[ns] 5kB 1970-01-01 1970-02-01 ... 2021-12-01\n", "Dimensions without coordinates: bnds\n", "Data variables:\n", - " time_bnds (time, bnds) object dask.array\n", - " lat_bnds (lat, bnds) float64 dask.array\n", - " lon_bnds (lon, bnds) float64 dask.array\n", - " tas (time, lat, lon) float32 dask.array\n", - "Attributes: (12/49)\n", - " Conventions: CF-1.7 CMIP-6.2\n", - " activity_id: CMIP\n", - " branch_method: standard\n", - " branch_time_in_child: 0.0\n", - " branch_time_in_parent: 87658.0\n", - " creation_date: 2020-06-05T04:06:11Z\n", - " ... ...\n", - " version: v20200605\n", - " license: CMIP6 model data produced by CSIRO is li...\n", - " cmor_version: 3.4.0\n", - " _NCProperties: version=2,netcdf=4.6.2,hdf5=1.10.5\n", - " tracking_id: hdl:21.14100/af78ae5e-f3a6-4e99-8cfe-5f2...\n", - " DODS_EXTRA.Unlimited_Dimension: time" + " time_bnds (time, bnds) datetime64[ns] 10kB 1970-01-01 ... 2022-01-01\n", + " sst (time, lat, lon) float32 40MB dask.array\n", + " lon_bnds (lon, bnds) float32 1kB -1.0 1.0 1.0 3.0 ... 357.0 357.0 359.0\n", + " lat_bnds (lat, bnds) float32 712B 89.0 87.0 87.0 ... -87.0 -87.0 -89.0\n", + "Attributes: (12/37)\n", + " climatology: Climatology is based on 1971-2000 SST, Xue, Y....\n", + " description: In situ data: ICOADS2.5 before 2007 and NCEP i...\n", + " keywords_vocabulary: NASA Global Change Master Directory (GCMD) Sci...\n", + " keywords: Earth Science > Oceans > Ocean Temperature > S...\n", + " instrument: Conventional thermometers\n", + " source_comment: SSTs were observed by conventional thermometer...\n", + " ... ...\n", + " creator_url_original: https://www.ncei.noaa.gov\n", + " license: No constraints on data access or use\n", + " comment: SSTs were observed by conventional thermometer...\n", + " summary: ERSST.v5 is developed based on v4 after revisi...\n", + " dataset_title: NOAA Extended Reconstructed SST V5\n", + " data_modified: 2022-06-07" ] }, "execution_count": 15, @@ -4744,16 +4701,11 @@ } ], "source": [ - "filepath = \"http://esgf.nci.org.au/thredds/dodsC/master/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc\"\n", - "\n", "# Use .chunk() to activate Dask arrays\n", "# NOTE: `open_mfdataset()` automatically chunks by the number of files, which\n", "# might not be optimal.\n", - "ds = xc.open_dataset(\n", - " filepath,\n", - " chunks={\"time\": \"auto\"}\n", - ")\n", - "ds " + "ds = xc.tutorial.open_dataset(\"ersstv5\", chunks={\"time\": \"auto\"})\n", + "ds" ] }, { @@ -4783,14 +4735,14 @@ "source": [ "## Key Takeaways\n", "\n", - "- A driving need for a __modern successor to CDAT__ \n", + "- A driving need for a **modern successor to CDAT**\n", "- Serves the climate community in the long-term\n", - "- xCDAT is an __extension of xarray__ for __climate data analysis__ on __structured grids__\n", - "- Goal of providing features and utilities for __simple and robust analysis of climate data__\n", + "- xCDAT is an **extension of xarray** for **climate data analysis** on **structured grids**\n", + "- Goal of providing features and utilities for **simple and robust analysis of climate data**\n", "\n", "
    \n", " \"xcdat\n", - "
    " + "\n" ] }, { @@ -4803,13 +4755,11 @@ "source": [ "### Where to Find xCDAT\n", "\n", - "- xCDAT is available for installation through __Anaconda__\n", - " - Install command: __`conda install -c conda-forge xcdat xesmf`__\n", - "- Check out xCDAT’s __Read the Docs__, which we strive to keep up-to-date\n", + "- xCDAT is available for installation through **Anaconda**\n", + " - Install command: **`conda install -c conda-forge xcdat xesmf`**\n", + "- Check out xCDAT’s **Read the Docs**, which we strive to keep up-to-date\n", " - [https://xcdat.readthedocs.io/en/stable/](https://xcdat.readthedocs.io/en/stable/)\n", - " \n", - " \n", - " \n", + "\n", "
    \n", "
    \n", " \"Anaconda\n", @@ -4819,7 +4769,7 @@ " \"RTD\n", " \"RTD\n", "
    \n", - "
    " + "\n" ] }, { @@ -4831,27 +4781,24 @@ }, "source": [ "### Get Involved on GitHub!\n", - " \n", "\n", - "- __Code contributions__ are welcome and appreciated\n", + "- **Code contributions** are welcome and appreciated\n", " - GitHub Repository: https://github.com/xCDAT/xcdat\n", " - Contributing Guide: https://xcdat.readthedocs.io/en/latest/contributing.html\n", - "- __Submit and/or address tickets__ for feature suggestions, bugs, and documentation updates\n", + "- **Submit and/or address tickets** for feature suggestions, bugs, and documentation updates\n", " - GitHub Issues: https://github.com/xCDAT/xcdat/issues\n", - "- __Participate in forum discussions__ on version releases, architecture, feature suggestions, etc.\n", + "- **Participate in forum discussions** on version releases, architecture, feature suggestions, etc.\n", " - GitHub Discussions: https://github.com/xCDAT/xcdat/discussions\n", - " \n", - "
    \n", - " \"GitHub\n", - "
    \n", - "\n" + "
    \n", + " \"GitHub\n", + "
    \n" ] } ], "metadata": { "celltoolbar": "Slideshow", "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "xcdat_notebook_0.7.3", "language": "python", "name": "python3" }, @@ -4865,16 +4812,11 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.7" }, "rise": { "scroll": true, "theme": "simple" - }, - "vscode": { - "interpreter": { - "hash": "88e41074ccc6640b11c601f22854ebbd6b594c252315fe2c526c234744bbed5a" - } } }, "nbformat": 4,