GCPy Logo

Overview

  • About GCPy
    • What GCPy was intended to do
    • What GCPy was not intended to do
    • License
    • Requesting support
    • Submitting new features
  • Installing GCPy
    • Requirements
      • Platforms
      • Software dependencies
    • Methods for installing GCPy
    • Install GCPy from conda-forge
      • 1. Create and activate a Python virtual environment
      • 2. Install GCPy with Conda
      • 3. Verify the installation
      • 4. Deactivate the Python environment
    • Download GCPy with Git and build a Python virtual environment
      • Install GCPy and its dependencies
        • 1. Download the GCPy source code
        • 2. Create a new Python virtual environment for GCPy
        • 3. Add GCPy to PYTHONPATH
        • 4. Set the MPLBACKEND environment variable
        • 5. Perform a simple test
      • Upgrading GCPy versions
  • Specify backend for Matplotlib
    • For MacOSX
    • For Linux
  • Overview of Capabilities
    • Spatial plotting
      • Single panel plots
      • Six-panel comparison plots
      • Comprehensive benchmark plotting
    • Table creation
      • Budget tables
      • Mass tables
      • Emissions tables
    • Regridding
      • General regridding rules

Using GCPy

  • Plotting
    • Six-panel comparison plots
      • Function compare_single_level
      • Function compare_zonal_mean
      • Shared structure
      • Example script
    • Single panel plots
  • Regridding
    • Using Online Regridding Weights
      • Examples
    • Using Offline Regridding Weights
      • Example 1: Standard Lat-Lon to Cubed-Sphere Regridding
      • Example 2: Standard Cubed-Sphere to Cubed-Sphere Regridding
      • Example 3: Standard to Stretched Cubed-Sphere Regridding
    • Regridding for Plotting in GCPy
      • Pass stretched-grid file paths
      • Pass vertical grid parameters for non-72/47-level grids
      • Automatic regridding decision process
  • Benchmarking
    • Location of benchmark plotting scripts
    • Steps to create benchmark plots
    • Benchmark plotting functions
    • Benchmark tabling functions

Examples

  • Create a Test Plot
    • Source code
    • Usage
  • Single Panel Plotting
    • Source code
    • Usage
  • Six Panel Plotting
    • Source code
    • Calling sequence
  • Compare diagnostic outputs
    • Source code
    • Usage
  • Plotting output from code profilers
    • gprofng
      • Source code
      • Usage
    • Intel VTune
      • Source code
      • Usage
        • List hotspots by function
        • List hotspots by source code line
        • Comparing hotspots
        • Plotting hotspots
  • Check GCHP emission diagnostics
    • Source code
    • Usage
  • Visualizing KPP-Standalone box model output
    • Creating plots from KPP-Standalone output
      • Quick-look plots
      • Vertical profiles at multiple observation sites
    • Source code reference
      • List of functions
  • Example scripts for use with HEMCO
    • Generate a HEMCO_sa_Spec.rc file for HEMCO Standalone

Community Contributions

  • Format netCDF files for input to HEMCO
    • Source code
    • Usage
  • Create a coordinates file for the GEOS-Chem ObsPack diagnostic
    • Source code
    • Usage

Supplemental Guides

  • Install the Conda Python package manager
    • Check if Conda is already installed
    • Install the Miniforge distribution

GCPy API

  • API Reference
    • gcpy.append_grid_corners
      • Command-line arguments
    • gcpy.benchmark
      • gcpy.benchmark.modules
        • gcpy.benchmark.modules.benchmark_drydep
        • gcpy.benchmark.modules.benchmark_funcs
        • gcpy.benchmark.modules.benchmark_gcclassic_stats
        • gcpy.benchmark.modules.benchmark_mass_cons_table
        • gcpy.benchmark.modules.benchmark_models_vs_obs
        • gcpy.benchmark.modules.benchmark_models_vs_sondes
        • gcpy.benchmark.modules.benchmark_scrape_gcclassic_timers
        • gcpy.benchmark.modules.benchmark_scrape_gchp_timers
        • gcpy.benchmark.modules.benchmark_species_changes
        • gcpy.benchmark.modules.benchmark_utils
        • gcpy.benchmark.modules.budget_ox
        • gcpy.benchmark.modules.budget_tt
        • gcpy.benchmark.modules.oh_metrics
        • gcpy.benchmark.modules.run_1yr_fullchem_benchmark
        • gcpy.benchmark.modules.run_1yr_tt_benchmark
        • gcpy.benchmark.modules.ste_flux
      • gcpy.benchmark.run_benchmark
        • choose_benchmark_type()
        • run_benchmark_default()
        • main()
    • gcpy.community
      • gcpy.community.create_obspack_coords_file
        • main()
      • gcpy.community.format_hemco_data
        • format_hemco_dimensions()
        • check_hemco_variables()
        • format_hemco_variable()
        • save_hemco_netcdf()
    • gcpy.constants
      • AVOGADRO
      • BOLTZ
      • G
      • R_EARTH_m
      • MW_AIR_g
      • MW_AIR_kg
      • MW_H2O_kg
      • RD
      • RSTARG
      • RV
      • SKIP_THESE_VARS
      • TABLE_WIDTH
      • COL_WIDTH
      • ENCODING
      • GLOBAL_LL_EXTENT
      • NO_STRETCH_SG_STRETCH_FACTOR
      • NO_STRETCH_SG_TARGET_LON
      • NO_STRETCH_SG_TARGET_LAT
      • NO_STRETCH_SG_PARAMS
    • gcpy.cstools
      • extract_grid()
      • read_gridspec()
      • face_area()
      • ll2xyz()
      • sphere_angle()
      • grid_area()
      • gen_grid()
      • corners_to_xy()
      • central_angle()
      • find_index_single()
      • find_index()
      • is_cubed_sphere()
      • is_cubed_sphere_diag_grid()
      • is_cubed_sphere_rst_grid()
      • get_cubed_sphere_res()
      • is_gchp_lev_positive_down()
    • gcpy.date_time
      • get_timestamp_string()
      • add_months()
      • is_full_year()
      • datetime64_to_str()
    • gcpy.examples
      • gcpy.examples.diagnostics
        • gcpy.examples.diagnostics.check_gchp_emission_diags
        • gcpy.examples.diagnostics.compare_diags
      • gcpy.examples.dry_run
        • gcpy.examples.dry_run.download_data
      • gcpy.examples.grids
        • gcpy.examples.grids.display_gcclassic_grid_info
      • gcpy.examples.hemco
        • gcpy.examples.hemco.format_hemco_demo
        • gcpy.examples.hemco.make_hemco_sa_spec
        • gcpy.examples.hemco.make_mask_file
      • gcpy.examples.plotting
        • gcpy.examples.plotting.create_test_plot
        • gcpy.examples.plotting.plot_comparisons
        • gcpy.examples.plotting.plot_single_panel
      • gcpy.examples.timeseries
        • gcpy.examples.timeseries.plot_timeseries
      • gcpy.examples.working_with_files
        • gcpy.examples.working_with_files.add_blank_var_to_restart_file
        • gcpy.examples.working_with_files.concatenate_files
        • gcpy.examples.working_with_files.insert_field_into_restart_file
        • gcpy.examples.working_with_files.regrid_restart_ll_to_cs
      • gcpy.examples.xarray_examples
    • gcpy.file_regrid
      • file_regrid()
    • gcpy.grid
      • get_troposphere_mask()
      • get_input_res()
      • call_make_grid()
      • get_grid_extents()
      • get_vert_grid()
      • get_ilev_coord()
      • get_lev_coord()
      • get_pressure_indices()
      • pad_pressure_edges()
      • get_ind_of_pres()
      • convert_lev_to_pres()
      • VertGrid
        • VertGrid.p_edge()
        • VertGrid.p_mid()
      • make_grid_ll()
      • make_grid_cs()
      • make_grid_sg()
      • calc_rectilinear_lon_edge()
      • calc_rectilinear_lat_edge()
      • calc_rectilinear_grid_area()
      • calc_delta_lon()
      • csgrid_gmao()
      • CSGrid
        • CSGrid.__init__()
      • latlon_to_cartesian()
      • cartesian_to_latlon()
      • spherical_to_cartesian()
      • cartesian_to_spherical()
      • rotate_sphere_3d()
      • get_nearest_model_data_cs()
      • get_nearest_model_data_ll()
      • get_nearest_model_data()
    • gcpy.grid_stretching_transforms
      • rotate_vectors()
      • cartesian_to_spherical()
      • spherical_to_cartesian()
      • schmidt_transform()
      • scs_transform()
    • gcpy.kpp
      • gcpy.kpp.kppsa_plot_sites
        • Command-line Arguments
        • kppsa_plot_species_at_sites()
        • main()
      • gcpy.kpp.kppsa_quick_look
        • Command-line arguments
        • kppsa_make_quick_look_plot()
        • main()
      • gcpy.kpp.kppsa_utils
        • kppsa_get_file_list()
        • kppsa_read_one_csv_file()
        • kppsa_read_csv_files()
        • kppsa_prepare_site_data()
        • kppsa_plot_single_site()
        • kppsa_plot_one_page()
        • kppsa_get_unique_site_names()
    • gcpy.plot
      • gcpy.plot.compare_single_level
        • compare_single_level()
      • gcpy.plot.compare_zonal_mean
        • compare_zonal_mean()
      • gcpy.plot.core
        • six_panel_subplot_names()
        • normalize_colors()
        • text_to_data_units()
      • gcpy.plot.single_panel
        • single_panel()
      • gcpy.plot.six_plot
        • six_plot()
    • gcpy.profile
      • gcpy.profile.gprofng_functions
        • gprofng_read_functions()
        • gprofng_plot_functions()
        • main()
      • gcpy.profile.vtune_compare_hotspots
        • main()
      • gcpy.profile.vtune_list_hotspots
        • main()
      • gcpy.profile.vtune_plot_hotspots
        • vtune_read_hotspots()
        • vtune_plot_functions()
        • main()
      • gcpy.profile.vtune_utils
        • vtune_read_hotspots_csv()
        • vtune_how_is_report_grouped()
        • vtune_ask_user_to_continue_or_quit()
        • vtune_list_all_hotspots_by_line()
        • vtune_list_all_hotspots_by_function()
        • vtune_list_all_hotspots()
        • vtune_get_timing_info()
        • vtune_find_hotspot()
        • vtune_compare_a_hotspot_by_line()
        • vtune_compare_a_hotspot_by_function()
        • vtune_compare_a_hotspot()
    • gcpy.raveller_1D
      • create_track_func()
      • unravel_func()
    • gcpy.regrid
      • regrid()
    • gcpy.regrid_restart_file
      • regrid_restart_file()
    • gcpy.units
      • adjust_units()
      • convert_kg_to_target_units()
      • convert_units()
      • check_units()
      • data_unit_is_mol_per_mol()
    • gcpy.util
      • convert_lon()
      • get_emissions_varnames()
      • create_display_name()
      • format_number_for_table()
      • print_totals()
      • add_bookmarks_to_pdf()
      • add_nested_bookmarks_to_pdf()
      • add_missing_variables()
      • reshape_MAPL_CS()
      • get_diff_of_diffs()
      • slice_by_lev_and_time()
      • rename_and_flip_gchp_rst_vars()
      • dict_diff()
      • compare_varnames()
      • compare_stats()
      • convert_bpch_names_to_netcdf_names()
      • filter_names()
      • divide_dataset_by_dataarray()
      • get_shape_of_data()
      • get_area_from_dataset()
      • get_variables_from_dataset()
      • create_blank_dataarray()
      • check_for_area()
      • get_filepath()
      • get_filepaths()
      • extract_pathnames_from_log()
      • get_gcc_filepath()
      • get_gchp_filepath()
      • get_nan_mask()
      • all_zero_or_nan()
      • dataset_mean()
      • dataset_reader()
      • read_config_file()
      • unique_values()
      • wrap_text()
      • insert_text_into_file()
      • array_equals()
      • make_directory()
      • trim_cloud_benchmark_label()
      • verify_variable_type()
      • copy_file_to_dir()
      • replace_whitespace()
      • get_element_of_series()
      • read_species_metadata()
      • get_molwt_from_metadata()
    • gcpy.vgrid_defs

Help & Reference

  • Known bugs and issues
    • Current bug reports
    • Bugs that have been resolved
  • Editing this User Guide
    • Quick start
      • First-time setup: Install Sphinx
      • Build the documentation
    • Learning reStructured Text
    • Style guidelines
      • Titles and headers
      • References and links
      • Other common style elements
      • Indented code and text blocks
        • Python
        • Fortran
        • Bash
        • Command line (aka “console”)
        • No formatting
  • Releasing new versions (GCST only)
GCPy
  • Search


© Copyright 2023, GEOS-Chem Support Team.

Built with Sphinx using a theme provided by Read the Docs.