import h5netcdf
import xarray as xr
import numpy as np
import matplotlib.pyplot as plt
import hvplot.xarray
import cartopy.crs as ccrs
import cartopy.feature as cfeat
import earthaccess
from earthaccess import Auth, DataCollections, DataGranules, Store
From the PO.DAAC Cookbook, to access the GitHub version of the notebook, follow this link.
MUR Sea Surface Temperature Analysis of Washington State
Requirement:
- Compute environment
This tutorial can only be run in an AWS cloud instance running in us-west-2: NASA Earthdata Cloud data in S3 can be directly accessed via temporary credentials; this access is limited to requests made within the US West (Oregon) (code: us-west-2
) AWS region.
- Earthdata Login
An Earthdata Login account is required to access data, as well as discover restricted data, from the NASA Earthdata system. Thus, to access NASA data, you need Earthdata Login. Please visit https://urs.earthdata.nasa.gov to register and manage your Earthdata Login account. This account is free to create and only takes a moment to set up.
Learning Objectives:
- Access cloud-stored MUR Global SST data within AWS cloud, without downloading it to your local machine
- Visualize and analyze data in a use case example
- Use
earthaccess
library to search for, access, and download the data
GHRSST Level 4 MUR Global Foundation Sea Surface Temperature Analysis (v4.1) Dataset:
- MUR-JPL-L4-GLOB-v4.1
Notebook Author: Zoë Walschots, NASA PO.DAAC (Aug 2023)
Import Packages
In this notebook, we will be calling the authentication in the below cell.
= earthaccess.login(strategy="interactive", persist=True) auth
Access and Visualize Data
Let’s look at the Sea Surface Temperature of first summer we have data for (2012) using earthaccess
= earthaccess.search_data(short_name = 'MUR-JPL-L4-GLOB-v4.1', temporal = ('2012-05-21', '2012-08-20'), bounding_box = ('-125.41992','45.61181','-116.64844','49.2315')) mur_results
Granules found: 92
= xr.open_mfdataset(earthaccess.open(mur_results), engine = 'h5netcdf')
ds_mur ds_mur
Opening 92 granules, approx size: 0.0 GB
<xarray.Dataset> Dimensions: (time: 92, lat: 17999, lon: 36000) Coordinates: * time (time) datetime64[ns] 2012-05-21T09:00:00 ... 2012-08-2... * lat (lat) float32 -89.99 -89.98 -89.97 ... 89.97 89.98 89.99 * lon (lon) float32 -180.0 -180.0 -180.0 ... 180.0 180.0 180.0 Data variables: analysed_sst (time, lat, lon) float32 dask.array<chunksize=(1, 17999, 36000), meta=np.ndarray> analysis_error (time, lat, lon) float32 dask.array<chunksize=(1, 17999, 36000), meta=np.ndarray> mask (time, lat, lon) float32 dask.array<chunksize=(1, 17999, 36000), meta=np.ndarray> sea_ice_fraction (time, lat, lon) float32 dask.array<chunksize=(1, 17999, 36000), meta=np.ndarray> Attributes: (12/47) Conventions: CF-1.5 title: Daily MUR SST, Final product summary: A merged, multi-sensor L4 Foundation SST anal... references: http://podaac.jpl.nasa.gov/Multi-scale_Ultra-... institution: Jet Propulsion Laboratory history: created at nominal 4-day latency; replaced nr... ... ... project: NASA Making Earth Science Data Records for Us... publisher_name: GHRSST Project Office publisher_url: http://www.ghrsst.org publisher_email: ghrsst-po@nceo.ac.uk processing_level: L4 cdm_data_type: grid
- timePandasIndex
PandasIndex(DatetimeIndex(['2012-05-21 09:00:00', '2012-05-22 09:00:00', '2012-05-23 09:00:00', '2012-05-24 09:00:00', '2012-05-25 09:00:00', '2012-05-26 09:00:00', '2012-05-27 09:00:00', '2012-05-28 09:00:00', '2012-05-29 09:00:00', '2012-05-30 09:00:00', '2012-05-31 09:00:00', '2012-06-01 09:00:00', '2012-06-02 09:00:00', '2012-06-03 09:00:00', '2012-06-04 09:00:00', '2012-06-05 09:00:00', '2012-06-06 09:00:00', '2012-06-07 09:00:00', '2012-06-08 09:00:00', '2012-06-09 09:00:00', '2012-06-10 09:00:00', '2012-06-11 09:00:00', '2012-06-12 09:00:00', '2012-06-13 09:00:00', '2012-06-14 09:00:00', '2012-06-15 09:00:00', '2012-06-16 09:00:00', '2012-06-17 09:00:00', '2012-06-18 09:00:00', '2012-06-19 09:00:00', '2012-06-20 09:00:00', '2012-06-21 09:00:00', '2012-06-22 09:00:00', '2012-06-23 09:00:00', '2012-06-24 09:00:00', '2012-06-25 09:00:00', '2012-06-26 09:00:00', '2012-06-27 09:00:00', '2012-06-28 09:00:00', '2012-06-29 09:00:00', '2012-06-30 09:00:00', '2012-07-01 09:00:00', '2012-07-02 09:00:00', '2012-07-03 09:00:00', '2012-07-04 09:00:00', '2012-07-05 09:00:00', '2012-07-06 09:00:00', '2012-07-07 09:00:00', '2012-07-08 09:00:00', '2012-07-09 09:00:00', '2012-07-10 09:00:00', '2012-07-11 09:00:00', '2012-07-12 09:00:00', '2012-07-13 09:00:00', '2012-07-14 09:00:00', '2012-07-15 09:00:00', '2012-07-16 09:00:00', '2012-07-17 09:00:00', '2012-07-18 09:00:00', '2012-07-19 09:00:00', '2012-07-20 09:00:00', '2012-07-21 09:00:00', '2012-07-22 09:00:00', '2012-07-23 09:00:00', '2012-07-24 09:00:00', '2012-07-25 09:00:00', '2012-07-26 09:00:00', '2012-07-27 09:00:00', '2012-07-28 09:00:00', '2012-07-29 09:00:00', '2012-07-30 09:00:00', '2012-07-31 09:00:00', '2012-08-01 09:00:00', '2012-08-02 09:00:00', '2012-08-03 09:00:00', '2012-08-04 09:00:00', '2012-08-05 09:00:00', '2012-08-06 09:00:00', '2012-08-07 09:00:00', '2012-08-08 09:00:00', '2012-08-09 09:00:00', '2012-08-10 09:00:00', '2012-08-11 09:00:00', '2012-08-12 09:00:00', '2012-08-13 09:00:00', '2012-08-14 09:00:00', '2012-08-15 09:00:00', '2012-08-16 09:00:00', '2012-08-17 09:00:00', '2012-08-18 09:00:00', '2012-08-19 09:00:00', '2012-08-20 09:00:00'], dtype='datetime64[ns]', name='time', freq=None))
- latPandasIndex
PandasIndex(Index([-89.98999786376953, -89.9800033569336, -89.97000122070312, -89.95999908447266, -89.94999694824219, -89.94000244140625, -89.93000030517578, -89.91999816894531, -89.91000366210938, -89.9000015258789, ... 89.9000015258789, 89.91000366210938, 89.91999816894531, 89.93000030517578, 89.94000244140625, 89.94999694824219, 89.95999908447266, 89.97000122070312, 89.9800033569336, 89.98999786376953], dtype='float32', name='lat', length=17999))
- lonPandasIndex
PandasIndex(Index([-179.99000549316406, -179.97999572753906, -179.97000122070312, -179.9600067138672, -179.9499969482422, -179.94000244140625, -179.92999267578125, -179.9199981689453, -179.91000366210938, -179.89999389648438, ... 179.91000366210938, 179.9199981689453, 179.92999267578125, 179.94000244140625, 179.9499969482422, 179.9600067138672, 179.97000122070312, 179.97999572753906, 179.99000549316406, 180.0], dtype='float32', name='lon', length=36000))
- Conventions :
- CF-1.5
- title :
- Daily MUR SST, Final product
- summary :
- A merged, multi-sensor L4 Foundation SST analysis product from JPL.
- references :
- http://podaac.jpl.nasa.gov/Multi-scale_Ultra-high_Resolution_MUR-SST
- institution :
- Jet Propulsion Laboratory
- history :
- created at nominal 4-day latency; replaced nrt (1-day latency) version.
- comment :
- MUR = "Multi-scale Ultra-high Reolution"
- license :
- These data are available free of charge under data policy of JPL PO.DAAC.
- id :
- MUR-JPL-L4-GLOB-v04.1
- naming_authority :
- org.ghrsst
- product_version :
- 04.1
- uuid :
- 27665bc0-d5fc-11e1-9b23-0800200c9a66
- gds_version_id :
- 2.0
- netcdf_version_id :
- 4.1
- date_created :
- 20150711T060041Z
- start_time :
- 20120521T090000Z
- stop_time :
- 20120521T090000Z
- time_coverage_start :
- 20120520T210000Z
- time_coverage_end :
- 20120521T210000Z
- file_quality_level :
- 1
- source :
- AVHRR18_G-NAVO, AVHRR19_G-NAVO, AVHRR_METOP_A-EUMETSAT, MODIS_A-JPL, MODIS_T-JPL, WSAT-REMSS, iQUAM-NOAA/NESDIS, Ice_Conc-OSISAF
- platform :
- Aqua, DMSP, NOAA-POES, Suomi-NPP, Terra
- sensor :
- AMSR-E, AVHRR, MODIS, SSM/I, VIIRS, in-situ
- Metadata_Conventions :
- Unidata Observation Dataset v1.0
- metadata_link :
- http://podaac.jpl.nasa.gov/ws/metadata/dataset/?format=iso&shortName=MUR-JPL-L4-GLOB-v04.1
- keywords :
- Oceans > Ocean Temperature > Sea Surface Temperature
- keywords_vocabulary :
- NASA Global Change Master Directory (GCMD) Science Keywords
- standard_name_vocabulary :
- NetCDF Climate and Forecast (CF) Metadata Convention
- southernmost_latitude :
- -90.0
- northernmost_latitude :
- 90.0
- westernmost_longitude :
- -180.0
- easternmost_longitude :
- 180.0
- spatial_resolution :
- 0.01 degrees
- geospatial_lat_units :
- degrees north
- geospatial_lat_resolution :
- 0.01 degrees
- geospatial_lon_units :
- degrees east
- geospatial_lon_resolution :
- 0.01 degrees
- acknowledgment :
- Please acknowledge the use of these data with the following statement: These data were provided by JPL under support by NASA MEaSUREs program.
- creator_name :
- JPL MUR SST project
- creator_email :
- ghrsst@podaac.jpl.nasa.gov
- creator_url :
- http://mur.jpl.nasa.gov
- project :
- NASA Making Earth Science Data Records for Use in Research Environments (MEaSUREs) Program
- publisher_name :
- GHRSST Project Office
- publisher_url :
- http://www.ghrsst.org
- publisher_email :
- ghrsst-po@nceo.ac.uk
- processing_level :
- L4
- cdm_data_type :
- grid