Difference between revisions of "Visualization and analysis examples"

From Geos-chem
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
'''''[[Other tools for visualizing and analyzing GEOS-Chem output|Previous]] | [[Guide to visualization and analysis tools for GEOS-Chem|Next]] | [[Guide to visualization and analysis tools for GEOS-Chem|Guide to Visualization and Analysis Tools]]'''''
+
'''''[[Other tools for visualizing and analyzing GEOS-Chem output|Previous]] | [[GEOS-Chem_coding_and_debugging|Next]] | [[Getting Started with GEOS-Chem]]'''''
 +
#[[Minimum system requirements for GEOS-Chem|Minimum system requirements]]
 +
#[[Installing required software]]
 +
#[[Configuring your computational environment]]
 +
#[[Downloading GEOS-Chem source code|Downloading source code]]
 +
#[[Downloading GEOS-Chem data directories|Downloading data directories]]
 +
#[[Creating GEOS-Chem run directories|Creating run directories]]
 +
#[[GEOS-Chem input files|Configuring runs]]
 +
#[[Compiling GEOS-Chem|Compiling]]
 +
#[[Running GEOS-Chem|Running]]
 +
#[[GEOS-Chem output files|Output files]]
 +
#[[Guide to visualization and analysis tools for GEOS-Chem|Visualizing and processing output]]
 +
#*[[Python tools for use with GEOS-Chem|Python tools]]
 +
#*[[Other tools for visualizing and analyzing GEOS-Chem output|Other tools]]
 +
#*<span style="color:blue">'''Examples'''</span>
 +
#[[GEOS-Chem_coding_and_debugging|Coding and debugging]]
 +
#[[GEOS-Chem_overview#Further_reading|Further reading]]
  
#[[Python tools for use with GEOS-Chem|Python tools for visualizing and analyzing GEOS-Chem output]]
 
#[[Other tools for visualizing and analyzing GEOS-Chem output]]
 
#<span style="color:blue">'''Visualization and analysis examples'''</span>
 
  
 +
== Plotting ==
  
== Plotting examples ==
+
We have created several Python plotting example scripts and notebooks that you can modify for your own research needs.
  
=== Timeseries data ===
+
=== Comparing diagnostics from different simulations ===
  
 +
{| border=1 cellspacing=0 cellpadding=5
 +
|-bgcolor="#CCCCCC"
 +
!width="200px"|Script or notebook
 +
!width="200px"|Author
 +
!width="600px"|Description
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/diagnostics/compare_diagnostics.ipynb compare_diagnostics.ipynb]
 +
|Lizzie Lundgren (Harvard)
 +
|Jupyter notebook that illustrates the steps involved in comparing output from two different GEOS-Chem simulations.
 +
 +
|}
 +
 +
=== Plotting timeseries data ===
 +
 +
{| border=1 cellspacing=0 cellpadding=5
 +
|-bgcolor="#CCCCCC"
 +
!width="200px"|Script or notebook
 +
!width="200px"|Author
 +
!width="600px"|Description
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/timeseries/plot_timeseries.py plot_timeseries.py]
 +
|Bob Yantosca (Harvard)
 +
|Example script that plots timeseries from two different [[Guide to GEOS-Chem History diagnostics|GEOS-Chem diagnostic collections]] (ConcAboveSfc, SpeciesConc) at a specified location.  This is a good example of the using Python xarray and matplotlib packages to create line plots.
 +
 +
|}
 +
 +
=== Plotting 2D data ===
 +
 +
{| border=1 cellspacing=0 cellpadding=5
 +
|-bgcolor="#CCCCCC"
 +
!width="200px"|Script or notebook
 +
!width="200px"|Author
 +
!width="600px"|Description
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/plotting/plot_global.py plot_global.py]
 +
|Daniel Rothenberg
 +
|Creates a global average plot.  Using cartopy_ we can easily visualize gridded model output on maps with different cartographic projections, and then configure them with any aesthetics or features such as continents, geopolitical borders, gridlines, and more.
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/plotting/plot_seasonsl.py plot_seasons.py]
 +
|Daniel Rothenberg
 +
|For a given field timeseries, compute seasonal averages over all data and plot each average on a four-panel figure.
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/plotting/quickplot.py quickplot.py]
 +
|Bob Yantosca (Harvard)
 +
|Creates a quick-and-dirty plot of a variable in a netCDF (HDF5, GRIB, etc. file).  Uses xarray.
 +
 +
|}
 +
 +
== Working with files ==
 +
 +
Please see the following scripts for examples on using Python to manipulate files.
 +
 +
{| border=1 cellspacing=0 cellpadding=5
 +
|-bgcolor="#CCCCCC"
 +
!width="200px"|Script or notebook
 +
!width="200px"|Author
 +
!width="600px"|Description
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/bpch_to_nc/bpch2nc.py bpch2nc.py]
 +
|Bob Yantosca (Harvard)
 +
|Creates a netCDF file from data contained in a GEOS-Chem binary punch (aka "bpch") file.
 +
 +
|-valign="top"
 +
|[https://github.com/geoschem/gcpy/blob/master/examples/working_with_files/concatenate_files.py concatenate_files.py]
 +
|Bob Yantosca (Harvard)
 +
|Uses xarray to concatenate several files into a single Dataset.
 +
 +
|}
  
  
 
----
 
----
'''''[[Python tools for use with GEOS-Chem|Previous]] | [[Guide to visualization and analysis tools for GEOS-Chem|Next]] | [[Guide to visualization and analysis tools for GEOS-Chem|Guide to Visualization and Analysis Tools]]'''''
+
'''''[[Other tools for visualizing and analyzing GEOS-Chem output|Previous]] | [[GEOS-Chem_coding_and_debugging|Next]] | [[Getting Started with GEOS-Chem]]'''''

Latest revision as of 17:27, 8 December 2020

Previous | Next | Getting Started with GEOS-Chem

  1. Minimum system requirements
  2. Installing required software
  3. Configuring your computational environment
  4. Downloading source code
  5. Downloading data directories
  6. Creating run directories
  7. Configuring runs
  8. Compiling
  9. Running
  10. Output files
  11. Visualizing and processing output
  12. Coding and debugging
  13. Further reading


Plotting

We have created several Python plotting example scripts and notebooks that you can modify for your own research needs.

Comparing diagnostics from different simulations

Script or notebook Author Description
compare_diagnostics.ipynb Lizzie Lundgren (Harvard) Jupyter notebook that illustrates the steps involved in comparing output from two different GEOS-Chem simulations.

Plotting timeseries data

Script or notebook Author Description
plot_timeseries.py Bob Yantosca (Harvard) Example script that plots timeseries from two different GEOS-Chem diagnostic collections (ConcAboveSfc, SpeciesConc) at a specified location. This is a good example of the using Python xarray and matplotlib packages to create line plots.

Plotting 2D data

Script or notebook Author Description
plot_global.py Daniel Rothenberg Creates a global average plot. Using cartopy_ we can easily visualize gridded model output on maps with different cartographic projections, and then configure them with any aesthetics or features such as continents, geopolitical borders, gridlines, and more.
plot_seasons.py Daniel Rothenberg For a given field timeseries, compute seasonal averages over all data and plot each average on a four-panel figure.
quickplot.py Bob Yantosca (Harvard) Creates a quick-and-dirty plot of a variable in a netCDF (HDF5, GRIB, etc. file). Uses xarray.

Working with files

Please see the following scripts for examples on using Python to manipulate files.

Script or notebook Author Description
bpch2nc.py Bob Yantosca (Harvard) Creates a netCDF file from data contained in a GEOS-Chem binary punch (aka "bpch") file.
concatenate_files.py Bob Yantosca (Harvard) Uses xarray to concatenate several files into a single Dataset.



Previous | Next | Getting Started with GEOS-Chem