geoschem / gcpy

Python toolkit for GEOS-Chem. Contains basic plotting scripts, plus the suite of GEOS-Chem benchmarking utilities.
https://gcpy.readthedocs.io
Other
50 stars 24 forks source link

Problems creating virtual environment compatible with GCPy 1.4.1 #284

Closed lizziel closed 6 months ago

lizziel commented 7 months ago

Name and Institution (Required)

Name: Lizzie Lundgren Institution: Harvard University

Description of your issue or question

I am creating python virtual environments for use with GCPy 1.4.1 on two different compute clusters following instructions on ReadTheDocs to install Mamba 23.3.1. On both clusters I ran into dependency issues preventing installation. Specifying library version for matplotlib enabled creating an environment but GCPy then failed due to incompatibility with other library versions (not sure exactly which).

I solved this problem by creating an environment file that specifies exactly what version for every package used. I got the version numbers from a functional python environment on the Harvard Cannon cluster. Since this environment is known to work with GCPy I suggest we make it available within the repository. There could also be an open-ended environment file that does not specify version number but pulls the latest version. That one could be used for GCST testing to upgrade libraries periodically.

Here is the list of package versions that work.

    - awscli==2.13.39                 # Utilities for AWS cloud
    - cartopy==0.22.0                 # Geospatial data processing
    - cf_xarray==0.8.4                # CF conventions for xarray
    - dask==2023.9.2                  # Parallel library; backend for xarray
    - gridspec==0.1.0                 # Define Earth System Model grids
    - ipython==8.15.0                 # Interactive Python (used by Jupyter)
    - joblib==1.3.2                   # Parallelize python code
    - jupyter==1.0.0                  # Jupyter Notebook
    - matplotlib==3.8.0               # Creates plots and visualizations
    - netcdf4==1.6.0                  # Python wrapper for netCDF
    - netcdf-fortran==4.5.4           # Python wrapper for netCDF-Fortran
    - numpy==1.26.0                   # Optimized mathematical functions
    - pandas==2.1.1                   # Tables/timeseries manipulation
    - pip==23.2.1                     # Install packages from PyPi
    - pylint==2.17.5                   # Python linter
    - pyproj==3.6.1                   # Python map projections library
    - python==3.9.18                          # Any python version prior to 3.10
    - pypdf==3.16.1                    # PDF utilities (bookmarks, etc.)
    - recommonmark==0.7.1             # Dependency for Sphinx
    - requests==2.31.0                 # HTTP library
    - scipy==1.11.2                   # Scientific python package
    - sparselt==0.1.3                 # Regridding earth system model data
    - tabulate==0.9.0                 # Pretty-printing for column data
    - tk==8.6.12                      # Tcl/tk library
    - xarray==2023.8.0                # Read data from netCDF etc files
    - esmf==8.1.1                     # Earth system modeling framework
    - esmpy==8.1.1                    # Python wrapper for ESMF
    - xesmf==0.5.1                    # Universal regridder
    - docutils==0.16                  # Convert text to other formats
    - jinja2==3.0.3                   # Dependency for Sphinx
    - sphinx==3.5.4                   # Generate ReadTheDocs output
    - sphinx-autoapi==1.9.0           # Sphinx autodoc style documentation
    - sphinx-autobuild==2021.3.14     # Build ReadTheDos live in browser
    - sphinxcontrib-bibtex==2.2.0     # ReadTheDocs bibliography style
    - sphinx_rtd_theme==0.5.2         # ReadTheDocs HTML theme files
yantosca commented 6 months ago

We can now close this issue, as PR #289 has been merged into GCPy 1.4.2. Also, we have now set up GitHub actions to test the environment builds.