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

Ocean Colour Notebook #2 #169

Open
chiaravol opened this issue Nov 29, 2024 · 17 comments
Open

Ocean Colour Notebook #2 #169

chiaravol opened this issue Nov 29, 2024 · 17 comments
Labels

Comments

@chiaravol
Copy link

Notebook description

Analysis of Chlorophyll and remote sensing reflectances in the polar oceans

Notebook link or upload

OC_PolarOceans.ipynb.zip

Anything else we need to know?

Hi Mattia,
I am working on the new Ocean Colour notebook (first time I am using the new VM). I simply modified the previous Notebook (that was working great) and I've changed the regions I want analyze and the spatial mean function since I want to have a complete datasets to perform both spatial and temporal means.

The code seems to be working (no errors), but even if I've started with a short period (i.e., 1 year), it is taking forever to download the data. Am I doing something wrong? Could you please take a look?

Thank you,
Chiara

Environment

<name: wp5
channels:

  • conda-forge
    dependencies:
  • _libgcc_mutex=0.1=conda_forge
  • _openmp_mutex=4.5=2_gnu
  • accessible-pygments=0.0.5=pyhd8ed1ab_0
  • affine=2.4.0=pyhd8ed1ab_0
  • aiohttp=3.9.5=py311h459d7ec_0
  • aiosignal=1.3.1=pyhd8ed1ab_0
  • alabaster=0.7.16=pyhd8ed1ab_0
  • alsa-lib=1.2.12=h4ab18f5_0
  • annotated-types=0.7.0=pyhd8ed1ab_0
  • ansicolors=1.1.8=pyhd8ed1ab_0
  • antlr-python-runtime=4.11.1=pyhd8ed1ab_0
  • anyio=4.6.0=pyhd8ed1ab_1
  • argon2-cffi=23.1.0=pyhd8ed1ab_0
  • argon2-cffi-bindings=21.2.0=py311h9ecbd09_5
  • arrow=1.3.0=pyhd8ed1ab_0
  • asciitree=0.3.3=py_2
  • asttokens=2.4.1=pyhd8ed1ab_0
  • async-lru=2.0.4=pyhd8ed1ab_0
  • attrs=24.2.0=pyh71513ae_0
  • aws-c-auth=0.7.31=h57bd9a3_0
  • aws-c-cal=0.7.4=hfd43aa1_1
  • aws-c-common=0.9.28=hb9d3cd8_0
  • aws-c-compression=0.2.19=h756ea98_1
  • aws-c-event-stream=0.4.3=h29ce20c_2
  • aws-c-http=0.8.10=h5e77a74_0
  • aws-c-io=0.14.18=h33ff4e5_10
  • aws-c-mqtt=0.10.6=h02abb05_0
  • aws-c-s3=0.6.6=h834ce55_0
  • aws-c-sdkutils=0.1.19=h756ea98_3
  • aws-checksums=0.1.20=h756ea98_0
  • aws-crt-cpp=0.28.3=h469002c_5
  • aws-sdk-cpp=1.11.407=h9f1560d_0
  • azure-core-cpp=1.13.0=h935415a_0
  • azure-identity-cpp=1.8.0=hd126650_2
  • azure-storage-blobs-cpp=12.12.0=hd2e3451_0
  • azure-storage-common-cpp=12.7.0=h10ac4d7_1
  • azure-storage-files-datalake-cpp=12.11.0=h325d260_1
  • babel=2.14.0=pyhd8ed1ab_0
  • beautifulsoup4=4.12.3=pyha770c72_0
  • bleach=6.1.0=pyhd8ed1ab_0
  • blosc=1.21.6=hef167b5_0
  • bokeh=3.5.2=pyhd8ed1ab_0
  • bottleneck=1.4.0=py311h9f3472d_2
  • branca=0.7.2=pyhd8ed1ab_0
  • brotli=1.1.0=hb9d3cd8_2
  • brotli-bin=1.1.0=hb9d3cd8_2
  • brotli-python=1.1.0=py311hfdbb021_2
  • bzip2=1.0.8=h4bc722e_7
  • c-ares=1.33.1=heb4867d_0
  • ca-certificates=2024.8.30=hbcca054_0
  • cached-property=1.5.2=hd8ed1ab_1
  • cached_property=1.5.2=pyha770c72_1
  • cads-api-client=1.4.2=pyhd8ed1ab_0
  • cairo=1.18.0=hebfffa5_3
  • cartopy=0.23.0=py311h7db5c69_2
  • cdsapi=0.7.3=pyhd8ed1ab_0
  • certifi=2024.8.30=pyhd8ed1ab_0
  • cf-units=3.2.0=py311h9f3472d_6
  • cf_xarray=0.9.5=pyhd8ed1ab_1
  • cffi=1.17.1=py311hf29c0ef_0
  • cfgrib=0.9.14.1=pyhd8ed1ab_0
  • cfitsio=4.4.1=hf8ad068_0
  • cftime=1.6.4=py311h9f3472d_1
  • charset-normalizer=3.3.2=pyhd8ed1ab_0
  • click=8.1.7=unix_pyh707e725_0
  • click-plugins=1.1.1=py_0
  • cligj=0.7.2=pyhd8ed1ab_1
  • cloudpickle=3.0.0=pyhd8ed1ab_0
  • cmocean=4.0.3=pyhd8ed1ab_0
  • colorama=0.4.6=pyhd8ed1ab_0
  • colorspacious=1.1.2=pyh24bf2e0_0
  • comm=0.2.2=pyhd8ed1ab_0
  • contourpy=1.3.0=py311hd18a35c_2
  • cycler=0.12.1=pyhd8ed1ab_0
  • cytoolz=0.12.3=py311h459d7ec_0
  • dask=2024.9.0=pyhd8ed1ab_0
  • dask-core=2024.9.0=pyhd8ed1ab_0
  • dask-expr=1.1.14=pyhd8ed1ab_0
  • dbus=1.13.6=h5008d03_3
  • debugpy=1.8.6=py311hfdbb021_0
  • decorator=5.1.1=pyhd8ed1ab_0
  • defusedxml=0.7.1=pyhd8ed1ab_0
  • distributed=2024.9.0=pyhd8ed1ab_0
  • docutils=0.20.1=py311h38be061_3
  • double-conversion=3.3.0=h59595ed_0
  • earthkit-data=0.10.4=pyhd8ed1ab_0
  • entrypoints=0.4=pyhd8ed1ab_0
  • esmf=8.6.1=nompi_h4441c20_3
  • esmpy=8.6.1=pyhc1e730c_0
  • exceptiongroup=1.2.2=pyhd8ed1ab_0
  • executing=2.1.0=pyhd8ed1ab_0
  • expat=2.6.3=h5888daf_0
  • fasteners=0.17.3=pyhd8ed1ab_0
  • filelock=3.16.1=pyhd8ed1ab_0
  • findlibs=0.0.5=pyhd8ed1ab_0
  • flox=0.9.12=pyhd8ed1ab_0
  • fmt=11.0.2=h434a139_0
  • folium=0.17.0=pyhd8ed1ab_0
  • font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  • font-ttf-inconsolata=3.000=h77eed37_0
  • font-ttf-source-code-pro=2.038=h77eed37_0
  • font-ttf-ubuntu=0.83=h77eed37_2
  • fontconfig=2.14.2=h14ed4e7_0
  • fonts-conda-ecosystem=1=0
  • fonts-conda-forge=1=0
  • fonttools=4.54.1=py311h9ecbd09_0
  • fqdn=1.5.1=pyhd8ed1ab_0
  • freeglut=3.2.2=ha6d2627_3
  • freetype=2.12.1=h267a509_2
  • freexl=2.0.0=h743c826_0
  • frozenlist=1.4.1=py311h9ecbd09_1
  • fsspec=2024.9.0=pyhff2d567_0
  • gdal=3.9.2=py311h5159542_4
  • geopandas=1.0.1=pyhd8ed1ab_1
  • geopandas-base=1.0.1=pyha770c72_1
  • geos=3.12.2=he02047a_1
  • geotiff=1.7.3=h77b800c_3
  • gflags=2.2.2=h5888daf_1005
  • giflib=5.2.2=hd590300_0
  • glog=0.7.1=hbabe93e_0
  • graphite2=1.3.13=h59595ed_1003
  • greenlet=3.1.1=py311hfdbb021_0
  • h11=0.14.0=pyhd8ed1ab_0
  • h2=4.1.0=pyhd8ed1ab_0
  • harfbuzz=9.0.0=hda332d3_1
  • hdf4=4.2.15=h2a13503_7
  • hdf5=1.14.3=nompi_hdf9ad27_105
  • hpack=4.0.0=pyh9f0ad1d_0
  • httpcore=1.0.5=pyhd8ed1ab_0
  • httpx=0.27.2=pyhd8ed1ab_0
  • hyperframe=6.0.1=pyhd8ed1ab_0
  • icu=75.1=he02047a_0
  • idna=3.10=pyhd8ed1ab_0
  • imagesize=1.4.1=pyhd8ed1ab_0
  • importlib-metadata=8.5.0=pyha770c72_0
  • importlib_metadata=8.5.0=hd8ed1ab_0
  • importlib_resources=6.4.5=pyhd8ed1ab_0
  • ipykernel=6.29.5=pyh3099207_0
  • ipython=8.27.0=pyh707e725_0
  • isoduration=20.11.0=pyhd8ed1ab_0
  • jasper=4.2.4=h536e39c_0
  • jedi=0.19.1=pyhd8ed1ab_0
  • jinja2=3.1.4=pyhd8ed1ab_0
  • joblib=1.4.2=pyhd8ed1ab_0
  • json-c=0.18=h6688a6e_0
  • json5=0.9.25=pyhd8ed1ab_0
  • jsonpointer=3.0.0=py311h38be061_1
  • jsonschema=4.23.0=pyhd8ed1ab_0
  • jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
  • jsonschema-with-format-nongpl=4.23.0=hd8ed1ab_0
  • jupyter-book=1.0.2=pyhd8ed1ab_0
  • jupyter-cache=1.0.0=pyhd8ed1ab_0
  • jupyter-lsp=2.2.5=pyhd8ed1ab_0
  • jupyter-server-proxy=4.4.0=pyhd8ed1ab_0
  • jupyter_client=8.6.3=pyhd8ed1ab_0
  • jupyter_core=5.7.2=pyh31011fe_1
  • jupyter_events=0.10.0=pyhd8ed1ab_0
  • jupyter_server=2.14.2=pyhd8ed1ab_0
  • jupyter_server_terminals=0.5.3=pyhd8ed1ab_0
  • jupyterlab=4.2.5=pyhd8ed1ab_0
  • jupyterlab-myst=2.4.2=pyhd8ed1ab_0
  • jupyterlab_pygments=0.3.0=pyhd8ed1ab_1
  • jupyterlab_server=2.27.3=pyhd8ed1ab_0
  • kealib=1.5.3=hf8d3e68_2
  • keyutils=1.6.1=h166bdaf_0
  • kiwisolver=1.4.7=py311hd18a35c_0
  • krb5=1.21.3=h659f571_0
  • latexcodec=2.0.1=pyh9f0ad1d_0
  • lcms2=2.16=hb7c19ff_0
  • ld_impl_linux-64=2.43=h712a8e2_1
  • lerc=4.0.0=h27087fc_0
  • libabseil=20240116.2=cxx17_he02047a_1
  • libaec=1.1.3=h59595ed_0
  • libarchive=3.7.4=hfca40fe_0
  • libarrow=17.0.0=had3b6fe_16_cpu
  • libarrow-acero=17.0.0=h5888daf_16_cpu
  • libarrow-dataset=17.0.0=h5888daf_16_cpu
  • libarrow-substrait=17.0.0=hf54134d_16_cpu
  • libblas=3.9.0=24_linux64_openblas
  • libbrotlicommon=1.1.0=hb9d3cd8_2
  • libbrotlidec=1.1.0=hb9d3cd8_2
  • libbrotlienc=1.1.0=hb9d3cd8_2
  • libcblas=3.9.0=24_linux64_openblas
  • libclang-cpp19.1=19.1.0=default_hb5137d0_0
  • libclang13=19.1.0=default_h9c6a7e4_0
  • libcrc32c=1.1.2=h9c3ff4c_0
  • libcups=2.3.3=h4637d8d_4
  • libcurl=8.10.1=hbbe4b11_0
  • libdeflate=1.21=h4bc722e_0
  • libdrm=2.4.123=hb9d3cd8_0
  • libedit=3.1.20191231=he28a2e2_2
  • libegl=1.7.0=ha4b6fd6_0
  • libev=4.33=hd590300_2
  • libevent=2.1.12=hf998b51_1
  • libexpat=2.6.3=h5888daf_0
  • libffi=3.4.2=h7f98852_5
  • libgcc=14.1.0=h77fa898_1
  • libgcc-ng=14.1.0=h69a702a_1
  • libgdal=3.9.2=ha770c72_4
  • libgdal-core=3.9.2=hb0d795b_4
  • libgdal-fits=3.9.2=h2db6552_4
  • libgdal-grib=3.9.2=hc3b29a1_4
  • libgdal-hdf4=3.9.2=hd5ecb85_4
  • libgdal-hdf5=3.9.2=h6283f77_4
  • libgdal-jp2openjpeg=3.9.2=h1b2c38e_4
  • libgdal-kea=3.9.2=h1df15e4_4
  • libgdal-netcdf=3.9.2=hf2d2f32_4
  • libgdal-pdf=3.9.2=h600f43f_4
  • libgdal-pg=3.9.2=h151b34b_4
  • libgdal-postgisraster=3.9.2=h151b34b_4
  • libgdal-tiledb=3.9.2=h4a3bace_4
  • libgdal-xls=3.9.2=h03c987c_4
  • libgfortran=14.1.0=h69a702a_1
  • libgfortran-ng=14.1.0=h69a702a_1
  • libgfortran5=14.1.0=hc5f4f2c_1
  • libgl=1.7.0=ha4b6fd6_0
  • libglib=2.80.5=h2ff4ddf_0
  • libglu=9.0.0=ha6d2627_1004
  • libglvnd=1.7.0=ha4b6fd6_0
  • libglx=1.7.0=ha4b6fd6_0
  • libgomp=14.1.0=h77fa898_1
  • libgoogle-cloud=2.29.0=h435de7b_0
  • libgoogle-cloud-storage=2.29.0=h0121fbd_0
  • libgrpc=1.62.2=h15f2491_0
  • libiconv=1.17=hd590300_2
  • libjpeg-turbo=3.0.0=hd590300_1
  • libkml=1.3.0=hf539b9f_1021
  • liblapack=3.9.0=24_linux64_openblas
  • libllvm14=14.0.6=hcd5def8_4
  • libllvm19=19.1.0=ha7bfdaf_0
  • libnetcdf=4.9.2=nompi_h135f659_114
  • libnghttp2=1.58.0=h47da74e_1
  • libnsl=2.0.1=hd590300_0
  • libopenblas=0.3.27=pthreads_hac2b453_1
  • libopengl=1.7.0=ha4b6fd6_0
  • libparquet=17.0.0=h39682fd_16_cpu
  • libpciaccess=0.18=hd590300_0
  • libpng=1.6.44=hadc24fc_0
  • libpq=16.4=h2d7952a_1
  • libprotobuf=4.25.3=hd5b35b9_1
  • libre2-11=2023.09.01=h5a48ba9_2
  • librttopo=1.1.0=hc670b87_16
  • libsodium=1.0.20=h4ab18f5_0
  • libspatialite=5.1.0=hfd1504b_10
  • libsqlite=3.46.1=hadc24fc_0
  • libssh2=1.11.0=h0841786_0
  • libstdcxx=14.1.0=hc0a3c3a_1
  • libstdcxx-ng=14.1.0=h4852527_1
  • libthrift=0.20.0=h0e7cc3e_1
  • libtiff=4.7.0=h6565414_0
  • libudunits2=2.2.28=h40f5838_3
  • libutf8proc=2.8.0=h166bdaf_0
  • libuuid=2.38.1=h0b41bf4_0
  • libwebp-base=1.4.0=hd590300_0
  • libxcb=1.17.0=h8a09558_0
  • libxcrypt=4.4.36=hd590300_1
  • libxkbcommon=1.7.0=h2c5496b_1
  • libxml2=2.12.7=he7c6b58_4
  • libxslt=1.1.39=h76b75d6_0
  • libzip=1.11.1=hf83b1b0_0
  • libzlib=1.3.1=h4ab18f5_1
  • linkify-it-py=2.0.3=pyhd8ed1ab_0
  • llvmlite=0.43.0=py311h9c9ff8c_1
  • locket=1.0.0=pyhd8ed1ab_0
  • lru-dict=1.3.0=py311h9ecbd09_1
  • lz4=4.3.3=py311h2cbdf9a_1
  • lz4-c=1.9.4=hcb278e6_0
  • lzo=2.10=hd590300_1001
  • mapclassify=2.8.1=pyhd8ed1ab_0
  • markdown=3.6=pyhd8ed1ab_0
  • markdown-it-py=3.0.0=pyhd8ed1ab_0
  • markupsafe=2.1.5=py311h9ecbd09_1
  • matplotlib=3.9.2=py311h38be061_1
  • matplotlib-base=3.9.2=py311h2b939e6_1
  • matplotlib-inline=0.1.7=pyhd8ed1ab_0
  • mdit-py-plugins=0.4.2=pyhd8ed1ab_0
  • mdurl=0.1.2=pyhd8ed1ab_0
  • minizip=4.0.7=h401b404_0
  • mistune=3.0.2=pyhd8ed1ab_0
  • msgpack-python=1.1.0=py311hd18a35c_0
  • multidict=6.1.0=py311h9ecbd09_0
  • multiurl=0.3.1=pyhd8ed1ab_0
  • munkres=1.1.4=pyh9f0ad1d_0
  • mysql-common=9.0.1=h266115a_1
  • mysql-libs=9.0.1=he0572af_1
  • myst-nb=1.1.2=pyhd8ed1ab_0
  • myst-parser=2.0.0=pyhd8ed1ab_0
  • nbclient=0.10.0=pyhd8ed1ab_0
  • nbconvert=7.16.4=hd8ed1ab_1
  • nbconvert-core=7.16.4=pyhd8ed1ab_1
  • nbconvert-pandoc=7.16.4=hd8ed1ab_1
  • nbformat=5.10.4=pyhd8ed1ab_0
  • nc-time-axis=1.4.1=pyhd8ed1ab_0
  • ncurses=6.5=he02047a_1
  • nest-asyncio=1.6.0=pyhd8ed1ab_0
  • netcdf-fortran=4.6.1=nompi_h22f9119_106
  • netcdf4=1.7.1=nompi_py311hae66bec_102
  • networkx=3.3=pyhd8ed1ab_1
  • notebook-shim=0.2.4=pyhd8ed1ab_0
  • nspr=4.35=h27087fc_0
  • nss=3.104=hd34e28f_0
  • numba=0.60.0=py311h4bc866e_0
  • numcodecs=0.13.0=py311h044e617_0
  • numpy=2.0.2=py311h71ddf71_0
  • numpy_groupies=0.11.2=pyhd8ed1ab_0
  • openjpeg=2.5.2=h488ebb8_0
  • openssl=3.3.2=hb9d3cd8_0
  • orc=2.0.2=h669347b_0
  • overrides=7.7.0=pyhd8ed1ab_0
  • packaging=24.1=pyhd8ed1ab_0
  • pandas=2.2.3=py311h7db5c69_1
  • pandoc=3.4=ha770c72_0
  • pandocfilters=1.5.0=pyhd8ed1ab_0
  • papermill=2.6.0=pyhd8ed1ab_0
  • parso=0.8.4=pyhd8ed1ab_0
  • partd=1.4.2=pyhd8ed1ab_0
  • patsy=0.5.6=pyhd8ed1ab_0
  • pcre2=10.44=hba22ea6_2
  • pdbufr=0.11.0=pyhd8ed1ab_0
  • pexpect=4.9.0=pyhd8ed1ab_0
  • pickleshare=0.7.5=py_1003
  • pillow=10.4.0=py311h4aec55e_1
  • pip=24.2=pyh8b19718_1
  • pixman=0.43.2=h59595ed_0
  • pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
  • platformdirs=4.3.6=pyhd8ed1ab_0
  • plotly=5.24.1=pyhd8ed1ab_0
  • pooch=1.8.2=pyhd8ed1ab_0
  • poppler=24.08.0=h47131b8_1
  • poppler-data=0.4.12=hd8ed1ab_0
  • postgresql=16.4=hb2eb5c0_1
  • proj=9.5.0=h12925eb_0
  • prometheus_client=0.21.0=pyhd8ed1ab_0
  • prompt-toolkit=3.0.48=pyha770c72_0
  • properscoring=0.1=py_0
  • psutil=6.0.0=py311h9ecbd09_1
  • pthread-stubs=0.4=hb9d3cd8_1002
  • ptyprocess=0.7.0=pyhd3deb0d_0
  • pure_eval=0.2.3=pyhd8ed1ab_0
  • pwlf=2.2.1=py311h38be061_4
  • pyarrow=17.0.0=py311hbd00459_1
  • pyarrow-core=17.0.0=py311h4510849_1_cpu
  • pyarrow-hotfix=0.6=pyhd8ed1ab_0
  • pybtex=0.24.0=pyhd8ed1ab_2
  • pybtex-docutils=1.0.3=py311h38be061_2
  • pycparser=2.22=pyhd8ed1ab_0
  • pydantic=2.9.2=pyhd8ed1ab_0
  • pydantic-core=2.23.4=py311h9e33e62_0
  • pydantic-settings=2.5.2=pyhd8ed1ab_0
  • pydata-sphinx-theme=0.15.4=pyhd8ed1ab_0
  • pydoe=0.3.8=py_1
  • pygments=2.18.0=pyhd8ed1ab_0
  • pyogrio=0.9.0=py311h35c0331_2
  • pyparsing=3.1.4=pyhd8ed1ab_0
  • pyproj=3.6.1=py311h0f98d5a_10
  • pyshp=2.3.1=pyhd8ed1ab_0
  • pyside6=6.7.2=py311h9053184_4
  • pysocks=1.7.1=pyha2e5f31_6
  • python=3.11.10=hc5c86c4_1_cpython
  • python-dateutil=2.9.0=pyhd8ed1ab_0
  • python-dotenv=1.0.1=pyhd8ed1ab_0
  • python-fastjsonschema=2.20.0=pyhd8ed1ab_0
  • python-json-logger=2.0.7=pyhd8ed1ab_0
  • python-tzdata=2024.2=pyhd8ed1ab_0
  • python_abi=3.11=5_cp311
  • pytz=2024.1=pyhd8ed1ab_0
  • pyyaml=6.0.2=py311h9ecbd09_1
  • pyzmq=26.2.0=py311h7deb3e3_2
  • qhull=2020.2=h434a139_5
  • qt6-main=6.7.2=hadfd74e_5
  • rasterio=1.3.11=py311hce1b398_2
  • re2=2023.09.01=h7f4b329_2
  • readline=8.2=h8228510_1
  • referencing=0.35.1=pyhd8ed1ab_0
  • regionmask=0.12.1=pyhd8ed1ab_0
  • requests=2.32.3=pyhd8ed1ab_0
  • rfc3339-validator=0.1.4=pyhd8ed1ab_0
  • rfc3986-validator=0.1.1=pyh9f0ad1d_0
  • rich=13.8.1=pyhd8ed1ab_0
  • rioxarray=0.17.0=pyhd8ed1ab_0
  • rpds-py=0.20.0=py311h9e33e62_1
  • s2n=1.5.3=h7b32b05_0
  • scikit-learn=1.5.2=py311h57cc02b_1
  • scipy=1.14.1=py311he1f765f_0
  • seaborn=0.13.2=hd8ed1ab_2
  • seaborn-base=0.13.2=pyhd8ed1ab_2
  • send2trash=1.8.3=pyh0d859eb_0
  • setuptools=75.1.0=pyhd8ed1ab_0
  • shapely=2.0.6=py311h9036bbf_1
  • shellingham=1.5.4=pyhd8ed1ab_0
  • simpervisor=1.0.0=pyhd8ed1ab_0
  • six=1.16.0=pyh6c4a22f_0
  • snappy=1.2.1=ha2e4443_0
  • sniffio=1.3.1=pyhd8ed1ab_0
  • snowballstemmer=2.2.0=pyhd8ed1ab_0
  • snuggs=1.4.7=pyhd8ed1ab_1
  • sortedcontainers=2.4.0=pyhd8ed1ab_0
  • soupsieve=2.5=pyhd8ed1ab_1
  • sparse=0.15.4=pyhd8ed1ab_0
  • spdlog=1.14.1=hed91bc2_1
  • sphinx=7.4.7=pyhd8ed1ab_0
  • sphinx-book-theme=1.1.3=pyhd8ed1ab_0
  • sphinx-comments=0.0.3=pyh9f0ad1d_0
  • sphinx-copybutton=0.5.2=pyhd8ed1ab_0
  • sphinx-design=0.6.1=pyhd8ed1ab_1
  • sphinx-external-toc=1.0.1=pyhd8ed1ab_0
  • sphinx-jupyterbook-latex=1.0.0=pyhd8ed1ab_0
  • sphinx-multitoc-numbering=0.1.3=pyhd8ed1ab_0
  • sphinx-thebe=0.3.1=pyhd8ed1ab_0
  • sphinx-togglebutton=0.3.2=pyhd8ed1ab_0
  • sphinxcontrib-applehelp=2.0.0=pyhd8ed1ab_0
  • sphinxcontrib-bibtex=2.6.3=pyhd8ed1ab_0
  • sphinxcontrib-devhelp=2.0.0=pyhd8ed1ab_0
  • sphinxcontrib-htmlhelp=2.1.0=pyhd8ed1ab_0
  • sphinxcontrib-jsmath=1.0.1=pyhd8ed1ab_0
  • sphinxcontrib-qthelp=2.0.0=pyhd8ed1ab_0
  • sphinxcontrib-serializinghtml=1.1.10=pyhd8ed1ab_0
  • sqlalchemy=2.0.35=py311h9ecbd09_0
  • sqlite=3.46.1=h9eae976_0
  • stack_data=0.6.2=pyhd8ed1ab_0
  • statsmodels=0.14.3=py311h9f3472d_1
  • structlog=24.4.0=pyhd8ed1ab_0
  • tabulate=0.9.0=pyhd8ed1ab_1
  • tblib=3.0.0=pyhd8ed1ab_0
  • tenacity=9.0.0=pyhd8ed1ab_0
  • terminado=0.18.1=pyh0d859eb_0
  • threadpoolctl=3.5.0=pyhc1e730c_0
  • tiledb=2.26.1=h4c922dd_1
  • tinycss2=1.3.0=pyhd8ed1ab_0
  • tk=8.6.13=noxft_h4845f30_101
  • toml=0.10.2=pyhd8ed1ab_0
  • tomli=2.0.1=pyhd8ed1ab_0
  • toolz=0.12.1=pyhd8ed1ab_0
  • tornado=6.4.1=py311h9ecbd09_1
  • tqdm=4.66.5=pyhd8ed1ab_0
  • traitlets=5.14.3=pyhd8ed1ab_0
  • typer=0.12.5=pyhd8ed1ab_0
  • typer-slim=0.12.5=pyhd8ed1ab_0
  • typer-slim-standard=0.12.5=hd8ed1ab_0
  • types-python-dateutil=2.9.0.20240906=pyhd8ed1ab_0
  • typing-extensions=4.12.2=hd8ed1ab_0
  • typing_extensions=4.12.2=pyha770c72_0
  • typing_utils=0.1.0=pyhd8ed1ab_0
  • tzcode=2024b=hb9d3cd8_0
  • tzdata=2024a=h8827d51_1
  • uc-micro-py=1.0.3=pyhd8ed1ab_0
  • udunits2=2.2.28=h40f5838_3
  • uri-template=1.3.0=pyhd8ed1ab_0
  • uriparser=0.9.8=hac33072_0
  • urllib3=2.2.3=pyhd8ed1ab_0
  • wayland=1.23.1=h3e06ad9_0
  • wcwidth=0.2.13=pyhd8ed1ab_0
  • webcolors=24.8.0=pyhd8ed1ab_0
  • webencodings=0.5.1=pyhd8ed1ab_2
  • websocket-client=1.8.0=pyhd8ed1ab_0
  • wheel=0.44.0=pyhd8ed1ab_0
  • xarray=2024.9.0=pyhd8ed1ab_0
  • xarraymannkendall=1.4.5=pyhd8ed1ab_0
  • xcb-util=0.4.1=hb711507_2
  • xcb-util-cursor=0.1.5=hb9d3cd8_0
  • xcb-util-image=0.4.0=hb711507_2
  • xcb-util-keysyms=0.4.1=hb711507_0
  • xcb-util-renderutil=0.3.10=hb711507_0
  • xcb-util-wm=0.4.2=hb711507_0
  • xerces-c=3.2.5=h666cd97_1
  • xesmf=0.8.7=pyhd8ed1ab_0
  • xhistogram=0.3.2=pyhd8ed1ab_0
  • xkeyboard-config=2.42=h4ab18f5_0
  • xorg-fixesproto=5.0=hb9d3cd8_1003
  • xorg-inputproto=2.3.2=hb9d3cd8_1003
  • xorg-kbproto=1.0.7=hb9d3cd8_1003
  • xorg-libice=1.1.1=hd590300_0
  • xorg-libsm=1.2.4=h7391055_0
  • xorg-libx11=1.8.9=hb711507_1
  • xorg-libxau=1.0.11=hb9d3cd8_1
  • xorg-libxdmcp=1.1.3=hb9d3cd8_1
  • xorg-libxext=1.3.4=h0b41bf4_2
  • xorg-libxfixes=5.0.3=h7f98852_1004
  • xorg-libxi=1.7.10=h4bc722e_1
  • xorg-libxrender=0.9.11=hd590300_0
  • xorg-libxtst=1.2.5=h4bc722e_0
  • xorg-libxxf86vm=1.1.5=hb9d3cd8_2
  • xorg-recordproto=1.14.2=hb9d3cd8_1003
  • xorg-renderproto=0.11.1=hb9d3cd8_1003
  • xorg-xextproto=7.3.0=hb9d3cd8_1004
  • xorg-xproto=7.0.31=hb9d3cd8_1008
  • xskillscore=0.0.26=pyhd8ed1ab_0
  • xyzservices=2024.9.0=pyhd8ed1ab_0
  • xz=5.2.6=h166bdaf_0
  • yaml=0.2.5=h7f98852_2
  • yarl=1.12.1=py311h9ecbd09_0
  • zarr=2.18.3=pyhd8ed1ab_0
  • zeromq=4.3.5=ha4adb4c_5
  • zict=3.0.0=pyhd8ed1ab_0
  • zipp=3.20.2=pyhd8ed1ab_0
  • zlib=1.3.1=h4ab18f5_1
  • zstandard=0.23.0=py311hbc35293_1
  • zstd=1.5.6=ha6fb4c9_0
  • pip:
    • alembic==1.13.3
    • c3s-eqc-automatic-quality-control==0.1.2.dev113+g12de045
    • cacholote==1.4.0
    • cgul==0.0.4
    • earthkit-geo==0.2.0
    • earthkit-meteo==0.1.1
    • eccodes==2.38.0
    • ecmwflibs==0.6.3
    • kaleido==0.2.1
    • mako==1.3.5
    • pymannkendall==1.4.3
    • sqlalchemy-utils==0.41.2
      prefix: /data/common/miniforge3/envs/wp5
@malmans2
Copy link
Member

Hi @chiaravol,

If you are waiting a long time to download data, the CDS is probably quite busy at the moment.
I can cache the data for you running scripts over the weekend (usually the queue is shorter).

Just let me know the parameters to use for caching.

@chiaravol
Copy link
Author

Hi Mattia,

Thanks for the prompt reply. I remember having a similar issue with the previous NB as the data set is pretty heavy. It would be great if you can cache the data for me! :)

I need to analyze all chlor_a, Rrs_443 and Rrs_560 data between September 1997 and June 2024 in two regions: 1) the Antarctic Ocean (between latitudes -47.5°S and -63.5°S and longitudes -180, 180) and 2) the Arctic Ocean (between latitudes 60°N and 90°N and longitudes -180, 180).

It's a large amount of data. If you think it's too much, we can chache only Chlor_a data for now.

Cheers,
Chiara

@chiaravol
Copy link
Author

Please, note that the two regions are specified already in the NB I shared.

@malmans2
Copy link
Member

I started caching the files right now, I'll be in touch next week.
Have a good weekend!

@chiaravol
Copy link
Author

Thanks Mattia.

Wishing you a good weekend as well!

@malmans2
Copy link
Member

malmans2 commented Dec 2, 2024

Hi @chiaravol,

chlor_a is now cached. This is the code I cached:

import xarray as xr
from c3s_eqc_automatic_quality_control import download, utils

# Time period
start = "1997-09"
stop = "2024-06"

# Variables
variables = ["chlor_a"]
assert set(variables) <= {"chlor_a"} | {f"Rrs_{wl}" for wl in (443, 560)}

# Regions
regions = {
    "SO": {
        "lon_slice": slice(-180, 180),
        "lat_slice": slice(-47.5, -63.5),
    },
    "NO": {
        "lon_slice": slice(-180, 180),
        "lat_slice": slice(90, 60),
    },
}
for region, slices in regions.items():
    # Enforce sorting as original data
    for k, v in slices.items():
        assert v.start >= v.stop if k == "lat_slice" else v.start <= v.stop, (region, k)

# Define data request
collection_id = "satellite-ocean-colour"
request = {
    "projection": "regular_latitude_longitude_grid",
    "version": "6_0",
    "format": "zip",
}

def regionalising(ds, variable, lon_slice, lat_slice):
    da = ds[variable]
    da = utils.regionalise(da, lon_slice=lon_slice, lat_slice=lat_slice)
    return da.to_dataset(name=variable)

datasets = []
for variable in variables:
    for region, slices in regions.items():
        print(f"{variable=} {region=}")
        requests = download.update_request_date(
            request
            | {
                "variable": "remote_sensing_reflectance"
                if variable.startswith("Rrs")
                else "mass_concentration_of_chlorophyll_a"
            },
            start=start,
            stop=stop,
            stringify_dates=True,
        )
        ds = download.download_and_transform(
            collection_id,
            requests,
            transform_func=regionalising,
            transform_func_kwargs=slices | {"variable": variable},
            chunks={"year": 1, "month": 1, "variable": 1},
        )
        datasets.append(ds.expand_dims(region=[region]))
ds = xr.concat(datasets, "region")

@chiaravol
Copy link
Author

Thanks Mattia!

Should I just copy-paste the code you shared in my notebook and run it, right?

@malmans2
Copy link
Member

malmans2 commented Dec 2, 2024

That would work, but I used the same code you shared with me (I just cleaned it up a bit).
So your notebook should work if you only select chlor_a.

@chiaravol
Copy link
Author

I just run your code, but when I print ds I only have chlor_a data for the NO region. Could you please check it out?

@malmans2
Copy link
Member

malmans2 commented Dec 2, 2024

My code was just a cleaned-up version of your notebook to cache the data.
You need to concat or merge the datasets, the same as all the other notebooks you produced so far.

For example, add ds = xr.merge(datasets) or ds = xr.concat(datasets, "region")

@chiaravol
Copy link
Author

I tried ds = xr.merge(datasets) but the kernel restarted. I am running the code again, but the download is stuck at 1%. I guess a lot of people are using the VM at the moment. I'll keep you posted.

Thanks again,
Chiara

@malmans2
Copy link
Member

malmans2 commented Dec 2, 2024

Oops my bad, I meant to cache Rrs but I was rerunning the scripts to cache chlor_a.
Should be fixed in 5min.
I'll let you know when it's ready.

@malmans2
Copy link
Member

malmans2 commented Dec 2, 2024

Should work now. I added the concatenation step in my snippet above.

@chiaravol
Copy link
Author

It works now. Thanks.

Could you please cache the total_nobs variable instead of Rrs? I am not sure we will use Rrs in this notebook.

@malmans2
Copy link
Member

malmans2 commented Dec 2, 2024

OK

@malmans2
Copy link
Member

malmans2 commented Dec 3, 2024

What's total_nobs? I couldn't find it here: https://cds.climate.copernicus.eu/datasets/satellite-ocean-colour?tab=download

Is it one of the variables downloaded with chlor_a? If so, the data is already on disk, so we need to cache the transformed data (e.g., after applying the regionalisation function). In that case, I suggest we handle this once you're done with this notebook and you know the analysis you'd like to perform on total_nobs.

@chiaravol
Copy link
Author

Yes, It's the total number of chl observations. Ok, we can wait for that if caching them won't take a lot of time

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

No branches or pull requests

2 participants