geoschem / gcpy

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

Update mamba/conda environment to use Python 3.12 and xesmf 0.8.5 to allow installtion via PyPi #328

Closed yantosca closed 2 weeks ago

yantosca commented 3 months ago

Your name

Bob Yantosca

Your affiliation

Harvard + GCST

Provide a clear and concise overview of the new feature requested.

The current Mamba/Conda environment uses an old version of xesmf, which is no longer available on either conda-forge or PyPi. This has caused the installation of the geoschem-gcpy package via from both conda-forge and PyPi to fail.

To fix this, we will have to update the dependencies of GCPy to use a newer Python version plus newer package versions (esp. xesmf).

Will you be implementing this feature yourself?

Yes

Additional information

These dependences seem to build with mamba/conda. However, we need to run several tests in GCPy to make sure that none of the functionality is broken.

dependencies:
  - cartopy==0.23.0                 # Geospatial data processing
  - cf_xarray==0.9.1                # CF conventions for xarray
  - dask==2024.5.2                  # Parallel library; backend for xarray
  - esmf==8.6.1                     # Earth system modeling framework
  - esmpy==8.6.1                    # Python wrapper for ESMF
  - gridspec==0.1.0                 # Define Earth System Model grids
  - ipython==8.25.0                 # Interactive Python (used by Jupyter)
  - joblib==1.4.2                   # Parallelize python code
  - jupyter==1.0.0                  # Jupyter Notebook
  - matplotlib==3.8.4               # Creates plots and visualizations
  - netcdf4==1.6.5                  # Python wrapper for netCDF
  - netcdf-fortran==4.6.1           # Python wrapper for netCDF-Fortran
  - numpy==1.26.4                   # Optimized mathematical functions
  - pandas==2.2.2                   # Tables/timeseries manipulation
  - pip==24.0                       # Install packages from PyPi
  - pylint==3.2.2                   # Python linter
  - pyproj==3.6.1                   # Python map projections library
  - python==3.12.0                  # Python language
  - pypdf==4.2.0                    # PDF utilities (bookmarks, etc.)
  - requests==2.32.3                # HTTP library
  - scipy==1.13.1                   # Scientific python package
  - sparselt==0.1.3                 # Regridding earth system model data
  - tabulate==0.9.0                 # Pretty-printing for column data
  - tk==8.6.13                      # Tcl/tk library
  - xarray==2024.5.0                # Read data from netCDF etc files
  - xesmf==0.8.5                    # Universal regridder
yantosca commented 3 months ago

Also, I forgot to note the Python 3.9 (which is used in the GCPy environment) will be at end-of-life in 2025.

yantosca commented 3 months ago

Also see #326

yantosca commented 2 weeks ago

We can close out this issue as PR #329 has been merged into the GCPy 1.6.0 development stream.