SlideShare a Scribd company logo
1 of 23
JL1-SESIP-0717
Guided Tour of
Pythonian Museum
H. Joe Lee (hyoklee@hdfgroup.org)
The HDF Group
This work was supported by NASA/GSFC under
Raytheon Co. contract number NNG15HZ39C
JL1-SESIP-0717
2
Welcome to Pythonian Museum!
https://commons.wikimedia.org/wiki/File:Smithsonian_Building_NR.jpg
JL1-SESIP-0717
3
Your tour guide
• is the maintainer of hdfeos.org website.
• loves diverse NASA HDF products.
• has created 170+ Python examples so far.
JL1-SESIP-0717
4
Where is the museum?
http://hdfeos.org/zoo
Let’s
Go!
Public use graphics
https://www.autodraw.com/artists
JL1-SESIP-0717
5
The Main Entrance
• List of NASA Data Centers
• List of NASA HDF Products
Click on any product!
JL1-SESIP-0717
6
Pythonian tour has 4 packages
• pyhdf – for HDF4
• h5py – for HDF5
• netCDF4 – for HDF4/HDF5
• gdal – for HDF-EOS2/HDF-EOS5
JL1-SESIP-0717
7
Why 4 packages?
JL1-SESIP-0717
8
How about other packages?
JL1-SESIP-0717
9
What to focus on during tour
• Does product have lat/lon dataset?
• If not, are they stored in different product
or metadata or document?
• Bit packing / scale & offset handling
• Visualization tips on world map with
different projections
• Memory / performance issue
JL1-SESIP-0717
10
GES DISC AIRS Grid
• HDF-EOS2 – 1D Lat/Lon variables
• pyhdf / netCDF4
• Equidistant Cylindrical plot
# Read geolocation dataset.
lat = hdf.select(‘Latitude’)
JL1-SESIP-0717
11
GES DISC AIRS Swath
• HDF-EOS2 – 2D Lat/Lon variables
• pyhdf / netCDF4
• Polar Stereographic plot
# Read geolocation dataset.
lat = hdf.select('Latitude')
latitude = lat[:,:]
# Polar stereo
m =
Basemap(projection='npstere',
resolution='l'
boundinglat=65, lon_0 = 180)
JL1-SESIP-0717
12
GES DISC TRMM Swath v7
• HDF4 – pyhdf / netCDF4
• Lat/Lon in one 3D dataset - subsetting
• Longitude shifting for pcolormesh()
# There is a wrap-around effect to deal with.
longitude[longitude < -165] += 360
JL1-SESIP-0717
13
GES DISC TRMM Grid
• Lat/Lon are calculated from documentation.
# http://disc.sci.gsfc.nasa.gov/additional/faq/precipitation_faq.shtml
latitude = np.arange(-49.875, 49.875, 0.249375)
longitude = np.arange(-179.875, 179.876, 0.25)
JL1-SESIP-0717
14
GES DISC OMI Grid
• HDF-EOS5 - h5py (Python3)
• Lat/lon are calculated from StructMetadata
# There is no geolocation data, so construct it ourselves.
longitude = np.arange(0., 1440.0) * 0.25 - 180 + 0.125
latitude = np.arange(0., 720.0) * 0.25 - 90 + 0.125
JL1-SESIP-0717
15
GES DISC MLS Swath
• HDF-EOS5 / h5py
• netCDF-4 will not work due to object reference
• Vertical profile line plot –plot()
• Toolkit Internal Time (TAI) handling
# Handle TAI.
timebase =
datetime.datetime(1993, 1,
1, 0, 0, 0) +
datetime.timedelta(seconds
=time[399])
JL1-SESIP-0717
16
GES DISC HIRDLS ZA
• HDF-EOS5 - h5py / netCDF4
• Zonal Average plot - contourf()
• Log scale in Y-axis
# Apply log scale along
the y-axis to get a better
image.
lev = np.log10(lev)
JL1-SESIP-0717
17
GES DISC GOSAT/ACOS
• HDF5 – h5py
• 1D lat/lon swath
• Trajectory - scatter()
• Multiple plots
• Orthographic projection map
JL1-SESIP-0717
18
LAADS MOD06 Swath
• HDF-EOS2 – pyhdf / netCDF4
• Lat/lon from MOD03 product
• Scale / offset / valid range
• S. Pole Stereographic projection
# Read geolocation dataset
from MOD03 product.
hdf = SD(FILE_NAME, SDC.READ)
hdf_geo = SD(GEO_FILE_NAME,
SDC.READ)
lat =
hdf_geo.select('Latitude')
JL1-SESIP-0717
19
LP DAAC MOD09GA Grid
• HDF-EOS2 – pyhdf / gdal
• Lat/lon in Sinusoidal Projection
• mpl_toolkits.basemap.pyproj
# In basemap, the sinusoidal
projection is global, so we
won't use it.
# Instead we'll convert the
grid back to lat/lons.
sinu = pyproj.Proj("+proj=sinu
+R=6371007.181 +nadgrids=@null
+wktext")
wgs84 =
pyproj.Proj("+init=EPSG:4326")
lon, lat=
pyproj.transform(sinu, wgs84,
xv, yv)
JL1-SESIP-0717
20
MEaSURES VIP GRID
• HDF-EOS2 – pyhdf / netCDF4 / gdal
• StructMetadata parsing
• Huge dataset – sub sampling for visualization
# Scale down the data by a factor of 6 so that low-memory machines can
handle it.
data = data[::6, ::6]
JL1-SESIP-0717
21
ASDC CALIPSO
• HDF4 – pyhdf / netCDF4
• Bitmask / Complex subsetting
• Discrete colorbar
# You can visualize other
blocks by changing subset
parameters.
data2d = data[3500:3999,
0:164] # 20.2km to
30.1km
data2d = data[3500:3999,
165:1164] # 8.2km to
20.2km
data2d = data[3500:4000,
1165:] # -0.5km to 8.2km
JL1-SESIP-0717
22
More Examples?
• NASA Developers Portal – PyDAP + PyCMR
https://developer.earthdata.nasa.gov/opendap/cms-ch4-flx-na
JL1-SESIP-0717
23
This work was supported by
NASA/GSFC under Raytheon Co.
contract number NNG15HZ39C

More Related Content

What's hot

GeoMesa: Scalable Geospatial Analytics
GeoMesa:  Scalable Geospatial AnalyticsGeoMesa:  Scalable Geospatial Analytics
GeoMesa: Scalable Geospatial AnalyticsVisionGEOMATIQUE2014
 
GeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTechGeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTechRob Emanuele
 
Improving long-term preservation of EOS data by independently mapping HDF4 da...
Improving long-term preservation of EOS data by independently mapping HDF4 da...Improving long-term preservation of EOS data by independently mapping HDF4 da...
Improving long-term preservation of EOS data by independently mapping HDF4 da...The HDF-EOS Tools and Information Center
 
Metadata For Humans and Machines
Metadata For Humans and MachinesMetadata For Humans and Machines
Metadata For Humans and MachinesTed Habermann
 

What's hot (20)

NASA HDF/HDF-EOS Data for Dummies (and Developers)
NASA HDF/HDF-EOS Data for Dummies (and Developers)NASA HDF/HDF-EOS Data for Dummies (and Developers)
NASA HDF/HDF-EOS Data for Dummies (and Developers)
 
Efficiently serving HDF5 via OPeNDAP
Efficiently serving HDF5 via OPeNDAPEfficiently serving HDF5 via OPeNDAP
Efficiently serving HDF5 via OPeNDAP
 
Usage of NCL, IDL, and MATLAB to access NASA HDF4/HDF-EOS2/HDF-EOS5 data
Usage of NCL, IDL, and MATLAB to access NASA HDF4/HDF-EOS2/HDF-EOS5 dataUsage of NCL, IDL, and MATLAB to access NASA HDF4/HDF-EOS2/HDF-EOS5 data
Usage of NCL, IDL, and MATLAB to access NASA HDF4/HDF-EOS2/HDF-EOS5 data
 
HDF Update 2016
HDF Update 2016HDF Update 2016
HDF Update 2016
 
Open-source Scientific Computing and Data Analytics using HDF
Open-source Scientific Computing and Data Analytics using HDFOpen-source Scientific Computing and Data Analytics using HDF
Open-source Scientific Computing and Data Analytics using HDF
 
Visualizing and Analyzing HDF-EOS5 and HDF5 data with NCL
Visualizing and Analyzing HDF-EOS5 and HDF5 data with NCLVisualizing and Analyzing HDF-EOS5 and HDF5 data with NCL
Visualizing and Analyzing HDF-EOS5 and HDF5 data with NCL
 
HDF-EOS to GeoTIFF Conversion Tool & HDF-EOS Plug-in for HDFView
HDF-EOS to GeoTIFF Conversion Tool & HDF-EOS Plug-in for HDFViewHDF-EOS to GeoTIFF Conversion Tool & HDF-EOS Plug-in for HDFView
HDF-EOS to GeoTIFF Conversion Tool & HDF-EOS Plug-in for HDFView
 
GeoMesa: Scalable Geospatial Analytics
GeoMesa:  Scalable Geospatial AnalyticsGeoMesa:  Scalable Geospatial Analytics
GeoMesa: Scalable Geospatial Analytics
 
NEON HDF5
NEON HDF5NEON HDF5
NEON HDF5
 
Putting some Spark into HDF5
Putting some Spark into HDF5Putting some Spark into HDF5
Putting some Spark into HDF5
 
Incorporating ISO Metadata Using HDF Product Designer
Incorporating ISO Metadata Using HDF Product DesignerIncorporating ISO Metadata Using HDF Product Designer
Incorporating ISO Metadata Using HDF Product Designer
 
GeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTechGeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTech
 
Improving long-term preservation of EOS data by independently mapping HDF4 da...
Improving long-term preservation of EOS data by independently mapping HDF4 da...Improving long-term preservation of EOS data by independently mapping HDF4 da...
Improving long-term preservation of EOS data by independently mapping HDF4 da...
 
ICESat-2 Metadata and Status
ICESat-2 Metadata and StatusICESat-2 Metadata and Status
ICESat-2 Metadata and Status
 
Summary of HDF-EOS5 Files, Data Model and File Format
Summary of HDF-EOS5 Files, Data Model and File FormatSummary of HDF-EOS5 Files, Data Model and File Format
Summary of HDF-EOS5 Files, Data Model and File Format
 
Metadata For Humans and Machines
Metadata For Humans and MachinesMetadata For Humans and Machines
Metadata For Humans and Machines
 
Moving form HDF4 to HDF5/netCDF-4
Moving form HDF4 to HDF5/netCDF-4Moving form HDF4 to HDF5/netCDF-4
Moving form HDF4 to HDF5/netCDF-4
 
HDF Town Hall
HDF Town HallHDF Town Hall
HDF Town Hall
 
Product Designer Hub - Taking HPD to the Web
Product Designer Hub - Taking HPD to the WebProduct Designer Hub - Taking HPD to the Web
Product Designer Hub - Taking HPD to the Web
 
Pilot Project for HDF5 Metadata Structures for SWOT
Pilot Project for HDF5 Metadata Structures for SWOTPilot Project for HDF5 Metadata Structures for SWOT
Pilot Project for HDF5 Metadata Structures for SWOT
 

Similar to Pythonian Museum Tour of NASA HDF Products

Similar to Pythonian Museum Tour of NASA HDF Products (16)

HDF5 Tools Updates
HDF5 Tools UpdatesHDF5 Tools Updates
HDF5 Tools Updates
 
Google Colaboratory for HDF-EOS
Google Colaboratory for HDF-EOSGoogle Colaboratory for HDF-EOS
Google Colaboratory for HDF-EOS
 
HDF5 High Level and Lite Libraries
HDF5 High Level and Lite LibrariesHDF5 High Level and Lite Libraries
HDF5 High Level and Lite Libraries
 
ESDIS Status (2002)
ESDIS Status (2002)ESDIS Status (2002)
ESDIS Status (2002)
 
The New HDF-EOS WebSite - How it can help you
The New HDF-EOS WebSite - How it can help youThe New HDF-EOS WebSite - How it can help you
The New HDF-EOS WebSite - How it can help you
 
HDF-EOS APIs, tools, etc.
HDF-EOS APIs, tools, etc.HDF-EOS APIs, tools, etc.
HDF-EOS APIs, tools, etc.
 
What is HDF-EOS?
What is HDF-EOS?What is HDF-EOS?
What is HDF-EOS?
 
HDF Update
HDF UpdateHDF Update
HDF Update
 
HDF Update
HDF UpdateHDF Update
HDF Update
 
HDFEOS.org User Analsys, Updates, and Future
HDFEOS.org User Analsys, Updates, and FutureHDFEOS.org User Analsys, Updates, and Future
HDFEOS.org User Analsys, Updates, and Future
 
Apache Drill and Unidata THREDDS Data Server for NASA HDF-EOS on S3
Apache Drill and Unidata THREDDS Data Server for NASA HDF-EOS on S3Apache Drill and Unidata THREDDS Data Server for NASA HDF-EOS on S3
Apache Drill and Unidata THREDDS Data Server for NASA HDF-EOS on S3
 
HDF-EOS Development - Current Status and Schedule
HDF-EOS Development - Current Status and ScheduleHDF-EOS Development - Current Status and Schedule
HDF-EOS Development - Current Status and Schedule
 
HDF Tools Tutorial
HDF Tools TutorialHDF Tools Tutorial
HDF Tools Tutorial
 
Reading HDF family of formats via NetCDF-Java / CDM
Reading HDF family of formats via NetCDF-Java / CDMReading HDF family of formats via NetCDF-Java / CDM
Reading HDF family of formats via NetCDF-Java / CDM
 
An Overview of HDF-EOS (Part II)
An Overview of HDF-EOS (Part II)An Overview of HDF-EOS (Part II)
An Overview of HDF-EOS (Part II)
 
HDF-EOS Development: Current Status and Tools
HDF-EOS Development: Current Status and ToolsHDF-EOS Development: Current Status and Tools
HDF-EOS Development: Current Status and Tools
 

More from The HDF-EOS Tools and Information Center

STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...
STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...
STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...The HDF-EOS Tools and Information Center
 

More from The HDF-EOS Tools and Information Center (20)

Cloud-Optimized HDF5 Files
Cloud-Optimized HDF5 FilesCloud-Optimized HDF5 Files
Cloud-Optimized HDF5 Files
 
Accessing HDF5 data in the cloud with HSDS
Accessing HDF5 data in the cloud with HSDSAccessing HDF5 data in the cloud with HSDS
Accessing HDF5 data in the cloud with HSDS
 
The State of HDF
The State of HDFThe State of HDF
The State of HDF
 
Highly Scalable Data Service (HSDS) Performance Features
Highly Scalable Data Service (HSDS) Performance FeaturesHighly Scalable Data Service (HSDS) Performance Features
Highly Scalable Data Service (HSDS) Performance Features
 
Creating Cloud-Optimized HDF5 Files
Creating Cloud-Optimized HDF5 FilesCreating Cloud-Optimized HDF5 Files
Creating Cloud-Optimized HDF5 Files
 
HDF5 OPeNDAP Handler Updates, and Performance Discussion
HDF5 OPeNDAP Handler Updates, and Performance DiscussionHDF5 OPeNDAP Handler Updates, and Performance Discussion
HDF5 OPeNDAP Handler Updates, and Performance Discussion
 
Hyrax: Serving Data from S3
Hyrax: Serving Data from S3Hyrax: Serving Data from S3
Hyrax: Serving Data from S3
 
Accessing Cloud Data and Services Using EDL, Pydap, MATLAB
Accessing Cloud Data and Services Using EDL, Pydap, MATLABAccessing Cloud Data and Services Using EDL, Pydap, MATLAB
Accessing Cloud Data and Services Using EDL, Pydap, MATLAB
 
HDF - Current status and Future Directions
HDF - Current status and Future DirectionsHDF - Current status and Future Directions
HDF - Current status and Future Directions
 
HDF - Current status and Future Directions
HDF - Current status and Future Directions HDF - Current status and Future Directions
HDF - Current status and Future Directions
 
H5Coro: The Cloud-Optimized Read-Only Library
H5Coro: The Cloud-Optimized Read-Only LibraryH5Coro: The Cloud-Optimized Read-Only Library
H5Coro: The Cloud-Optimized Read-Only Library
 
MATLAB Modernization on HDF5 1.10
MATLAB Modernization on HDF5 1.10MATLAB Modernization on HDF5 1.10
MATLAB Modernization on HDF5 1.10
 
HDF for the Cloud - Serverless HDF
HDF for the Cloud - Serverless HDFHDF for the Cloud - Serverless HDF
HDF for the Cloud - Serverless HDF
 
HDF5 <-> Zarr
HDF5 <-> ZarrHDF5 <-> Zarr
HDF5 <-> Zarr
 
HDF for the Cloud - New HDF Server Features
HDF for the Cloud - New HDF Server FeaturesHDF for the Cloud - New HDF Server Features
HDF for the Cloud - New HDF Server Features
 
STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...
STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...
STARE-PODS: A Versatile Data Store Leveraging the HDF Virtual Object Layer fo...
 
HDF5 and Ecosystem: What Is New?
HDF5 and Ecosystem: What Is New?HDF5 and Ecosystem: What Is New?
HDF5 and Ecosystem: What Is New?
 
HDF5 Roadmap 2019-2020
HDF5 Roadmap 2019-2020HDF5 Roadmap 2019-2020
HDF5 Roadmap 2019-2020
 
Leveraging the Cloud for HDF Software Testing
Leveraging the Cloud for HDF Software TestingLeveraging the Cloud for HDF Software Testing
Leveraging the Cloud for HDF Software Testing
 
Parallel Computing with HDF Server
Parallel Computing with HDF ServerParallel Computing with HDF Server
Parallel Computing with HDF Server
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

Pythonian Museum Tour of NASA HDF Products

  • 1. JL1-SESIP-0717 Guided Tour of Pythonian Museum H. Joe Lee (hyoklee@hdfgroup.org) The HDF Group This work was supported by NASA/GSFC under Raytheon Co. contract number NNG15HZ39C
  • 2. JL1-SESIP-0717 2 Welcome to Pythonian Museum! https://commons.wikimedia.org/wiki/File:Smithsonian_Building_NR.jpg
  • 3. JL1-SESIP-0717 3 Your tour guide • is the maintainer of hdfeos.org website. • loves diverse NASA HDF products. • has created 170+ Python examples so far.
  • 4. JL1-SESIP-0717 4 Where is the museum? http://hdfeos.org/zoo Let’s Go! Public use graphics https://www.autodraw.com/artists
  • 5. JL1-SESIP-0717 5 The Main Entrance • List of NASA Data Centers • List of NASA HDF Products Click on any product!
  • 6. JL1-SESIP-0717 6 Pythonian tour has 4 packages • pyhdf – for HDF4 • h5py – for HDF5 • netCDF4 – for HDF4/HDF5 • gdal – for HDF-EOS2/HDF-EOS5
  • 9. JL1-SESIP-0717 9 What to focus on during tour • Does product have lat/lon dataset? • If not, are they stored in different product or metadata or document? • Bit packing / scale & offset handling • Visualization tips on world map with different projections • Memory / performance issue
  • 10. JL1-SESIP-0717 10 GES DISC AIRS Grid • HDF-EOS2 – 1D Lat/Lon variables • pyhdf / netCDF4 • Equidistant Cylindrical plot # Read geolocation dataset. lat = hdf.select(‘Latitude’)
  • 11. JL1-SESIP-0717 11 GES DISC AIRS Swath • HDF-EOS2 – 2D Lat/Lon variables • pyhdf / netCDF4 • Polar Stereographic plot # Read geolocation dataset. lat = hdf.select('Latitude') latitude = lat[:,:] # Polar stereo m = Basemap(projection='npstere', resolution='l' boundinglat=65, lon_0 = 180)
  • 12. JL1-SESIP-0717 12 GES DISC TRMM Swath v7 • HDF4 – pyhdf / netCDF4 • Lat/Lon in one 3D dataset - subsetting • Longitude shifting for pcolormesh() # There is a wrap-around effect to deal with. longitude[longitude < -165] += 360
  • 13. JL1-SESIP-0717 13 GES DISC TRMM Grid • Lat/Lon are calculated from documentation. # http://disc.sci.gsfc.nasa.gov/additional/faq/precipitation_faq.shtml latitude = np.arange(-49.875, 49.875, 0.249375) longitude = np.arange(-179.875, 179.876, 0.25)
  • 14. JL1-SESIP-0717 14 GES DISC OMI Grid • HDF-EOS5 - h5py (Python3) • Lat/lon are calculated from StructMetadata # There is no geolocation data, so construct it ourselves. longitude = np.arange(0., 1440.0) * 0.25 - 180 + 0.125 latitude = np.arange(0., 720.0) * 0.25 - 90 + 0.125
  • 15. JL1-SESIP-0717 15 GES DISC MLS Swath • HDF-EOS5 / h5py • netCDF-4 will not work due to object reference • Vertical profile line plot –plot() • Toolkit Internal Time (TAI) handling # Handle TAI. timebase = datetime.datetime(1993, 1, 1, 0, 0, 0) + datetime.timedelta(seconds =time[399])
  • 16. JL1-SESIP-0717 16 GES DISC HIRDLS ZA • HDF-EOS5 - h5py / netCDF4 • Zonal Average plot - contourf() • Log scale in Y-axis # Apply log scale along the y-axis to get a better image. lev = np.log10(lev)
  • 17. JL1-SESIP-0717 17 GES DISC GOSAT/ACOS • HDF5 – h5py • 1D lat/lon swath • Trajectory - scatter() • Multiple plots • Orthographic projection map
  • 18. JL1-SESIP-0717 18 LAADS MOD06 Swath • HDF-EOS2 – pyhdf / netCDF4 • Lat/lon from MOD03 product • Scale / offset / valid range • S. Pole Stereographic projection # Read geolocation dataset from MOD03 product. hdf = SD(FILE_NAME, SDC.READ) hdf_geo = SD(GEO_FILE_NAME, SDC.READ) lat = hdf_geo.select('Latitude')
  • 19. JL1-SESIP-0717 19 LP DAAC MOD09GA Grid • HDF-EOS2 – pyhdf / gdal • Lat/lon in Sinusoidal Projection • mpl_toolkits.basemap.pyproj # In basemap, the sinusoidal projection is global, so we won't use it. # Instead we'll convert the grid back to lat/lons. sinu = pyproj.Proj("+proj=sinu +R=6371007.181 +nadgrids=@null +wktext") wgs84 = pyproj.Proj("+init=EPSG:4326") lon, lat= pyproj.transform(sinu, wgs84, xv, yv)
  • 20. JL1-SESIP-0717 20 MEaSURES VIP GRID • HDF-EOS2 – pyhdf / netCDF4 / gdal • StructMetadata parsing • Huge dataset – sub sampling for visualization # Scale down the data by a factor of 6 so that low-memory machines can handle it. data = data[::6, ::6]
  • 21. JL1-SESIP-0717 21 ASDC CALIPSO • HDF4 – pyhdf / netCDF4 • Bitmask / Complex subsetting • Discrete colorbar # You can visualize other blocks by changing subset parameters. data2d = data[3500:3999, 0:164] # 20.2km to 30.1km data2d = data[3500:3999, 165:1164] # 8.2km to 20.2km data2d = data[3500:4000, 1165:] # -0.5km to 8.2km
  • 22. JL1-SESIP-0717 22 More Examples? • NASA Developers Portal – PyDAP + PyCMR https://developer.earthdata.nasa.gov/opendap/cms-ch4-flx-na
  • 23. JL1-SESIP-0717 23 This work was supported by NASA/GSFC under Raytheon Co. contract number NNG15HZ39C

Editor's Notes

  1. If you feel weird about the title. Don’t worry! This talk is not about petrified snakes. My talk is mostly about Earth data and Python. This tour shows how Giant Python swallows Big Earthdata in HDF.
  2. One of my favorite places on Earth is Smithonian Museum because it has a large collection of amazing things around the world. The best part is, it is free. For last 10 years, we’ve collected many NASA HDF data product samples from different NASA data centers for various testing purposes. At first, we called these collection as Zoo because of data product’s diversity. Like biological creatures, NASA HDF data products have evolved over time. Some old data products are no longer available from NASA data center and they are petrified in our FTP site. So I think it’s legitimate to call it as Museum. With NASA HDF data products from many different data centers, we’ve provided MTALAB/IDL/NCL examples. Python examples are recently added for last few years. Based on our website log, Python’s popularity surged significantly.
  3. When you hear the word Python and your brain came up with computer language, you’re a nerd. Has anyone visited Smithonian museum? Python zoo tour. “Research as art” Museum curator Zoo keeper
  4. It’s a confession time.
  5. Ideally, the best product is one that can be accessed by all packages.
  6. Let’s start from A. Polar Stereographic projection is ideal for swath.
  7. This is the beast like Giant Squid at Smithonian museum.
  8. We started porting our examples into NASA Developer portal. They are mostly related to OPeNDAP.