better than free: data explorations with public data and ... · better than free: data explorations...
TRANSCRIPT
air • planet • people Explorations with public data & tools
Better than Free: Data Explorations with Public Data
and Software Tools
Introduction to Free Tools
SEA 2016 Tutorial April 6, 2016
Mary Haley
air • planet • people NCAR/CISL/TDD
air • planet • people Explorations with public data & tools
Quicksurvey(2/2)
Whatso5waretoolsdoyoucurrentlyuse?
- Fortran,C,C++,Java
- ScripBnglanguages:IDL,MATLAB,NCL,Python,R,Ruby,etc.
- GUIs:ncview,panoply
2
air • planet • people Explorations with public data & tools
Categoriesoftools • Commandlinetools
• GUIs
• ScripBnglanguages
– Pythonpackages
3
air • planet • people Explorations with public data & tools
Commandlinetools
• Quickwaytolookatdata• EasytoperformmulBpleoperaBonsonfile(s)
• SomewhatlimitedfuncBonality
• Datafilesmayhavetomeetrequirements
• Canbeslow
4
air • planet • people Explorations with public data & tools
Commandlinetoolsforexaminingdata
• ncdump–NetCDF
• ncl_filedump–NetCDF,HDF,HDF-EOS,GRIB
• h5dump–HDF5
• wgrib/wgrib2–GRIB1/GRIB2
5
air • planet • people Explorations with public data & tools
CDO–ClimateDataOperatorsNetCDFandGRIB1/2
7
air • planet • people Explorations with public data & tools
wgrib/wgrib2
• wgrib-sliceanddiceGRIB1files
• wgrib2–“fourdrawersofkitchenutensilsaswellasthemicrowaveandblender”
8
air • planet • people Explorations with public data & tools
GUI-basedtools
10
• QuickexploraBonoffilecontents• QuickvisualizaBonofdata
• CanbeintuiBvetouse
• MayhavelimitedfuncBonality
air • planet • people Explorations with public data & tools
Panoply–netcdf,hdf,gribdataviewer(defn:impressivecollec1onofthings)
12
air • planet • people Explorations with public data & tools
ScripBnglanguages
• Powerful–loadedwithfuncBonality• Havetowritecode;easierthanC/Fortran
• Canbeslow
• Canbedifficulttogetsupport
• Looksgoodonresume!
14
air • planet • people Explorations with public data & tools
“Pythonispowerful...andfast;playswellwithothers;
runseverywhere;isfriendly&easytolearn;
isOpen.”
15
air • planet • people Explorations with public data & tools
OpendatascienceplapormthatempowersthescienBficPythoncommunity
www.conBnuum.io
18
air • planet • people Explorations with public data & tools 19
NCAR Command Language
Developed at NCAR, tailored for the analysis and visualization of geoscientific data
1. Simple, robust file input and output 2. Hundreds of analysis functions
3. Publication-quality visualizations
4. Well-supported, 1000+ examples
5. Extensive website, training
6. Now under “conda”
air • planet • people Explorations with public data & tools
NCLhashundredsofexampleshnp://www.ncl.ucar.edu/ApplicaBons/
20
air • planet • people Explorations with public data & tools
Pythonpackages
• There’sLOTSofthem(proandcon)
– Morethanonewaytodosomething
• WiderangeoffuncBonality
• EasyinstallaBonvia“pip”and“conda”
• Lackofunifiedinterfacesandsupport
21
air • planet • people Explorations with public data & tools
TipIfwriBngyourownpublicPythonpackage:
StyleGuideforPythonCodehnps://www.python.org/dev/peps/pep-0008/
22
air • planet • people Explorations with public data & tools
PythonpackagesandtoolsforAOS• cf-python• ESMPy• H5py/PyTables• Iris• netcdf4-python• ESMPy• Pygrib• PyNIO• pandas/xarray• Siphon
• Cfplot• matplotlib/basemap• cartopy• PyGRaDS• PyFerret• PyNGL• PyAverager/PyReshaper• seaborn• RPy
23
hnp://pyaos.johnny-lin.com/
air • planet • people Explorations with public data & tools 24
PyNGL-PythoninterfacetoNCL’sgraphicslibrary
PyNIO-PythoninterfacetoNCL’sfileI/Olibrary
PyNIOandPyNGL
PythonmodulesbasedonasubsetofNCL’scapabili1es
air • planet • people Explorations with public data & tools
PyNIO
• Providesunifiedinterfacetotheseformats:
– NetCDF-3/NetCDF-4
– HDF4/HDF5
– HDF-EOS2/HDF-EOS5
– GRIB1/GRIB2
– Shapefiles
25
air • planet • people Explorations with public data & tools
PyNGL
• Python2Dplosnglibrary(basedonNCL)
• Highlycustomizable
• Handlesdataonregularandirregulargrids
• SpecializedscriptsforMJOCLIVAR,skewT,
windroses,barcharts,overlays
26
air • planet • people Explorations with public data & tools
• Python2Dplosnglibrary
• BasemapprovidesmappinguBlity
• GeneratesgraphicssimilartoNCL
• MoremainstreamusagethanNCL
27
air • planet • people Explorations with public data & tools
xarraybringsthelabeleddatapowerofpandastothephysicalsciences,by
providingN-dimensionalvariantsofthecorepandasdata
28
pandasprovideshigh-performance,easy-to-usedatastructuresanddata
analysis.
air • planet • people Explorations with public data & tools 29
PyAOSwebsite
Pythonresourcesforatmosphericandoceanicsciences
hnp://pyaos.johnny-lin.com/
GoodstarBngpoint...
air • planet • people Explorations with public data & tools
Depends...• Toolscanbedomainspecific
• HowmoBvatedyouare–doyouliketowritecode?
• Doyouneedquicklookorheavyli5ing?
• Theoneyouradvisor/bosstoldyouto
31
air • planet • people Explorations with public data & tools
HelpavailablefromNCARandbeyond
NCLemaillisthnp://mailman.ucar.edu/mailman/lisBnfo/ncl-talk
PyAOSemaillisthnp://lists.johnny-lin.com/lisBnfo.cgi/pyaos-johnny-lin.com