Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ncl and its dependencies from main dependencies and add documentation how to install it #3853

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented Jan 7, 2025

Description


On my local machine:

(base) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool$ \time mamba env create -n noNCL -f environment.yml

209.47user 41.62system 4:02.07elapsed 103%CPU (0avgtext+0avgdata 3208236maxresident)k                                                                    
2630240inputs+8222704outputs (4851major+1880442minor)pagefaults 0swaps

then, once the env is created and activated, if one needs NCL:

(noNCL) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool$ \time conda install -c conda-forge ncl
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/valeriu/miniconda3/envs/noNCL

  added / updated specs:
    - ncl


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    hdfeos5-5.1.16             |      h51d0b48_17         466 KB  conda-forge
    libntlm-1.8                |       hb9d3cd8_0          33 KB  conda-forge
    poppler-24.12.0            |       hd7b24de_2         1.8 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         2.3 MB

The following NEW packages will be INSTALLED:

  cfitsio            conda-forge/linux-64::cfitsio-4.4.1-ha728647_2 
  cmor               conda-forge/linux-64::cmor-3.9.0-py312h5d372d2_1 
  cyrus-sasl         conda-forge/linux-64::cyrus-sasl-2.1.27-h54b06d7_7 
  fmt                conda-forge/linux-64::fmt-11.0.2-h434a139_0 
  gettext            conda-forge/linux-64::gettext-0.22.5-he02047a_3 
  gettext-tools      conda-forge/linux-64::gettext-tools-0.22.5-he02047a_3 
  gsl                conda-forge/linux-64::gsl-2.7-he838d99_0 
  hdfeos2            conda-forge/linux-64::hdfeos2-2.20-h3e53b52_1004 
  hdfeos5            conda-forge/linux-64::hdfeos5-5.1.16-h51d0b48_17 
  kealib             conda-forge/linux-64::kealib-1.5.3-hf8d3e68_2 
  libasprintf        conda-forge/linux-64::libasprintf-0.22.5-he8f35ee_3 
  libasprintf-devel  conda-forge/linux-64::libasprintf-devel-0.22.5-he8f35ee_3 
  libgdal            conda-forge/linux-64::libgdal-3.9.2-ha770c72_7 
  libgdal-fits       conda-forge/linux-64::libgdal-fits-3.9.2-h2db6552_7 
  libgdal-grib       conda-forge/linux-64::libgdal-grib-3.9.2-hc3b29a1_7 
  libgdal-hdf4       conda-forge/linux-64::libgdal-hdf4-3.9.2-hd5ecb85_7 
  libgdal-hdf5       conda-forge/linux-64::libgdal-hdf5-3.9.2-h6283f77_7 
  libgdal-jp2openjp~ conda-forge/linux-64::libgdal-jp2openjpeg-3.9.2-h1b2c38e_7 
  libgdal-kea        conda-forge/linux-64::libgdal-kea-3.9.2-h1df15e4_7 
  libgdal-netcdf     conda-forge/linux-64::libgdal-netcdf-3.9.2-hf2d2f32_7 
  libgdal-pdf        conda-forge/linux-64::libgdal-pdf-3.9.2-h600f43f_7 
  libgdal-pg         conda-forge/linux-64::libgdal-pg-3.9.2-h5e77dd0_7 
  libgdal-postgisra~ conda-forge/linux-64::libgdal-postgisraster-3.9.2-h5e77dd0_7 
  libgdal-tiledb     conda-forge/linux-64::libgdal-tiledb-3.9.2-h4a3bace_5 
  libgdal-xls        conda-forge/linux-64::libgdal-xls-3.9.2-h03c987c_7 
  libgettextpo       conda-forge/linux-64::libgettextpo-0.22.5-he02047a_3 
  libgettextpo-devel conda-forge/linux-64::libgettextpo-devel-0.22.5-he02047a_3 
  libntlm            conda-forge/linux-64::libntlm-1.8-hb9d3cd8_0 
  libpq              conda-forge/linux-64::libpq-17.2-h04577a9_0 
  ncl                conda-forge/linux-64::ncl-6.6.2-h7cb714c_54 
  nspr               conda-forge/linux-64::nspr-4.36-h5888daf_0 
  nss                conda-forge/linux-64::nss-3.107-hdf54f9c_0 
  openblas           conda-forge/linux-64::openblas-0.3.28-pthreads_h6ec200e_1 
  openldap           conda-forge/linux-64::openldap-2.6.9-he970967_0 
  poppler            conda-forge/linux-64::poppler-24.12.0-hd7b24de_2 
  poppler-data       conda-forge/noarch::poppler-data-0.4.12-hd8ed1ab_0 
  postgresql         conda-forge/linux-64::postgresql-17.2-h1122569_0 
  spdlog             conda-forge/linux-64::spdlog-1.14.1-hed91bc2_1 
  tiledb             conda-forge/linux-64::tiledb-2.26.1-h4c922dd_1 
  tzcode             conda-forge/linux-64::tzcode-2024b-hb9d3cd8_0 
  xorg-imake         conda-forge/linux-64::xorg-imake-1.0.10-h5888daf_0 
  xorg-libxaw        conda-forge/linux-64::xorg-libxaw-1.0.16-hb9d3cd8_0 
  xorg-libxmu        conda-forge/linux-64::xorg-libxmu-1.2.1-hb9d3cd8_1 
  xorg-libxpm        conda-forge/linux-64::xorg-libxpm-3.5.17-hb9d3cd8_1 
  xorg-makedepend    conda-forge/linux-64::xorg-makedepend-1.0.9-h59595ed_0 

The following packages will be DOWNGRADED:

  cdo                                      2.4.4-h0e6046d_2 --> 2.4.4-hbe50dc4_0 
  esmf                               8.7.0-nompi_h4441c20_1 --> 8.4.2-nompi_h9e768e6_3 
  esmpy                                  8.7.0-pyhecae5ae_1 --> 8.4.2-pyhc1e730c_4 
  fiona                              1.10.1-py312h02b19dd_3 --> 1.10.1-py312h5aa26c2_1 
  gdal                              3.10.0-py312hc55c449_13 --> 3.9.2-py312h1299960_7 
  geos                                    3.13.0-h5888daf_0 --> 3.12.2-he02047a_1 
  geotiff                                  1.7.3-h77b800c_3 --> 1.7.3-hf7fa9e8_2 
  imagecodecs                     2024.9.22-py312hf6703b6_0 --> 2024.6.1-py312h6d9a048_4 
  json-c                                    0.18-h6688a6e_0 --> 0.17-h1220068_1 
  libdeflate                                1.22-hb9d3cd8_0 --> 1.21-h4bc722e_0 
  libgdal-core                            3.10.0-h7250d82_6 --> 3.9.2-hbd1db40_2 
  librttopo                               1.1.0-h97f6797_17 --> 1.1.0-hc670b87_16 
  libspatialite                           5.1.0-h1b4f908_12 --> 5.1.0-h15fa968_9 
  libtiff                                  4.7.0-hc4654cb_2 --> 4.7.0-h6565414_0 
  magics                                  4.15.5-hc87abea_0 --> 4.15.4-h24e9adf_1 
  proj                                     9.5.1-h0054346_0 --> 9.4.1-h54d7996_1 
  pyproj                              3.7.0-py312he630544_0 --> 3.6.1-py312h9211aeb_9 
  rasterio                            1.4.3-py312h8cae83d_0 --> 1.3.11-py312hd177ed6_1 
  shapely                             2.0.6-py312h391bc85_2 --> 2.0.6-py312h6cab151_1 
  xesmf                                  0.8.8-pyhd8ed1ab_1 --> 0.8.7-pyhd8ed1ab_0 


Proceed ([y]/n)?

and timing for that is very reasonable:

54.50user 8.13system 1:28.96elapsed 70%CPU (0avgtext+0avgdata 3369900maxresident)k
1878328inputs+892560outputs (27major+1376394minor)pagefaults 0swaps

So the user who needs NCL can just install it in the already created ESMValTool environment; of course, quite a few dependencies will be downgraded (and remember that even Python will be downgraded to 3.12 if the env is built with 3.13) but this is a lot more of an elegant and efficient solution for us, then to keep dragging NCL along with us!

The other two deps - imagemagick and nco can be installed together with ncl in one call or separately, I am doing separately to see which deps modify each:

(noNCL) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool$ conda install -c conda-forge imagemagick
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/valeriu/miniconda3/envs/noNCL

  added / updated specs:
    - imagemagick


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    imagemagick-7.1.1_43       |imagemagick_hf2058d9_2         2.2 MB  conda-forge
    libheif-1.19.5             | gpl_hc21c24c_100         575 KB  conda-forge
    libwebp-1.5.0              |       hae8dbeb_0          90 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         2.8 MB

The following NEW packages will be INSTALLED:

  ghostscript        conda-forge/linux-64::ghostscript-10.04.0-h5888daf_0 
  imagemagick        conda-forge/linux-64::imagemagick-7.1.1_43-imagemagick_hf2058d9_2 
  jbig               conda-forge/linux-64::jbig-2.1-h7f98852_2003 
  libwebp            conda-forge/linux-64::libwebp-1.5.0-hae8dbeb_0 
  pkg-config         conda-forge/linux-64::pkg-config-0.29.2-h4bc722e_1009 

The following packages will be UPDATED:

  libheif                           1.18.2-gpl_hffcb242_100 --> 1.19.5-gpl_hc21c24c_100

and

(noNCL) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool$ conda install -c conda-forge nco
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/valeriu/miniconda3/envs/noNCL

  added / updated specs:
    - nco


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    nco-5.3.0                  |       hf7c1f58_0         1.8 MB  conda-forge
    tempest-remap-2.2.0        |       heeae502_5         965 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         2.7 MB

The following NEW packages will be INSTALLED:

  nco                conda-forge/linux-64::nco-5.3.0-hf7c1f58_0 
  tempest-remap      conda-forge/linux-64::tempest-remap-2.2.0-heeae502_5

both easy to have them installed!

Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bringing our environment to modern standards (also with removal of NCL)
1 participant