bopen / c3s-eqc-toolbox-template

CADS Toolbox template application
Apache License 2.0
6 stars 4 forks source link

Time coordinate replaced by "source" #158

Closed gmandorl closed 2 months ago

gmandorl commented 2 months ago

What happened?

Hi!

I am trying to download the CCI dataset of cloud.

The 'download_and_transform' function works, however, the output dataset do not contain the coordinate "time" in the right format. I get instead a coordinate named "source" with strings.

Why is it happening? Is there a way to transform those strings back in datetime (or in seconds from 1970 as reported in the documentation)?

source_coordinate.zip

Minimal Complete Verifiable Example

No response

Relevant log output

No response

Anything else we need to know?

No response

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.4.0=pyhd8ed1ab_0 - 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.29=hc36b679_0 - aws-c-cal=0.7.4=h2abdd08_0 - aws-c-common=0.9.27=h4bc722e_0 - aws-c-compression=0.2.19=haa50ccc_0 - aws-c-event-stream=0.4.3=h570d160_0 - aws-c-http=0.8.8=h9b61739_1 - aws-c-io=0.14.18=hc9e8850_8 - aws-c-mqtt=0.10.4=h5c8269d_18 - aws-c-s3=0.6.5=hcad183f_1 - aws-c-sdkutils=0.1.19=h038f3f9_2 - aws-checksums=0.1.18=h038f3f9_10 - aws-crt-cpp=0.28.2=h91b7d8e_3 - aws-sdk-cpp=1.11.379=hc1bef60_8 - 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.3.0=pyhd8ed1ab_0 - cairo=1.18.0=hebfffa5_3 - cartopy=0.23.0=py311h14de704_1 - cdsapi=0.7.2=pyhd8ed1ab_1 - certifi=2024.8.30=pyhd8ed1ab_0 - cf-units=3.2.0=py311h9f3472d_6 - cf_xarray=0.9.4=pyhd8ed1ab_0 - cffi=1.17.1=py311hf29c0ef_0 - cfgrib=0.9.14.0=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_1 - cycler=0.12.1=pyhd8ed1ab_0 - cytoolz=0.12.3=py311h459d7ec_0 - dask=2024.8.2=pyhd8ed1ab_0 - dask-core=2024.8.2=pyhd8ed1ab_0 - dask-expr=1.1.13=pyhd8ed1ab_0 - dataclasses=0.8=pyhc8e2a94_3 - dbus=1.13.6=h5008d03_3 - debugpy=1.8.5=py311hfdbb021_1 - decorator=5.1.1=pyhd8ed1ab_0 - defusedxml=0.7.1=pyhd8ed1ab_0 - distributed=2024.8.2=pyhd8ed1ab_0 - docutils=0.20.1=py311h38be061_3 - double-conversion=3.3.0=h59595ed_0 - earthkit-data=0.10.0=pyhd8ed1ab_0 - entrypoints=0.4=pyhd8ed1ab_0 - esmf=8.6.1=nompi_h0a5817f_2 - 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.0=pyhd8ed1ab_0 - findlibs=0.0.5=pyhd8ed1ab_0 - flox=9.11=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.53.1=py311h9ecbd09_1 - 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_1 - geopandas=1.0.1=pyhd8ed1ab_0 - geopandas-base=1.0.1=pyha770c72_0 - geos=3.12.2=he02047a_1 - geotiff=1.7.3=hf7fa9e8_2 - gflags=2.2.2=he1b5a44_1004 - giflib=5.2.2=hd590300_0 - glog=0.7.1=hbabe93e_0 - graphite2=1.3.13=h59595ed_1003 - greenlet=3.0.3=py311hb755f60_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.8=pyhd8ed1ab_0 - imagesize=1.4.1=pyhd8ed1ab_0 - importlib-metadata=8.4.0=pyha770c72_0 - importlib_metadata=8.4.0=hd8ed1ab_0 - importlib_resources=6.4.4=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.17=h1220068_1 - 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.2=pyhd8ed1ab_0 - jupyter_core=5.7.2=py311h38be061_0 - 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.40=hf3520f5_7 - 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=h8d2e343_13_cpu - libarrow-acero=17.0.0=h5888daf_13_cpu - libarrow-dataset=17.0.0=h5888daf_13_cpu - libarrow-substrait=17.0.0=hf54134d_13_cpu - libblas=3.9.0=23_linux64_openblas - libbrotlicommon=1.1.0=hb9d3cd8_2 - libbrotlidec=1.1.0=hb9d3cd8_2 - libbrotlienc=1.1.0=hb9d3cd8_2 - libcblas=3.9.0=23_linux64_openblas - libclang-cpp18.1=18.1.8=default_hf981a13_4 - libclang13=18.1.8=default_h9def88c_4 - libcrc32c=1.1.2=h9c3ff4c_0 - libcups=2.3.3=h4637d8d_4 - libcurl=8.9.1=hdb1bdb2_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_1 - libgdal-core=3.9.2=h353785f_1 - libgdal-fits=3.9.2=h2db6552_1 - libgdal-grib=3.9.2=hc3b29a1_1 - libgdal-hdf4=3.9.2=hd5ecb85_1 - libgdal-hdf5=3.9.2=h6283f77_1 - libgdal-jp2openjpeg=3.9.2=h1b2c38e_1 - libgdal-kea=3.9.2=h1df15e4_1 - libgdal-netcdf=3.9.2=hf2d2f32_1 - libgdal-pdf=3.9.2=h600f43f_1 - libgdal-pg=3.9.2=h151b34b_1 - libgdal-postgisraster=3.9.2=h151b34b_1 - libgdal-tiledb=3.9.2=ha8d0372_1 - libgdal-xls=3.9.2=h03c987c_1 - 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.3=h315aac3_2 - 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.28.0=h26d7fe4_0 - libgoogle-cloud-storage=2.28.0=ha262f82_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=23_linux64_openblas - libllvm14=14.0.6=hcd5def8_4 - libllvm18=18.1.8=h8b73ec9_2 - 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 - libparquet=17.0.0=h39682fd_13_cpu - libpciaccess=0.18=hd590300_0 - libpng=1.6.43=h2797004_0 - libpq=16.4=h2d7952a_1 - libprotobuf=4.25.3=h08a7969_0 - libre2-11=2023.09.01=h5a48ba9_2 - librttopo=1.1.0=hc670b87_16 - libsodium=1.0.20=h4ab18f5_0 - libspatialite=5.1.0=h15fa968_9 - 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.6.0=h46a8edc_4 - 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.16=hb9d3cd8_1 - 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.10.1=h2629f0a_3 - 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 - lz4=4.3.3=py311h2cbdf9a_1 - lz4-c=1.9.4=hcb278e6_0 - lzo=2.10=hd590300_1001 - mapclassify=2.8.0=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_0 - matplotlib-base=3.9.2=py311h74b4f7c_0 - matplotlib-inline=0.1.7=pyhd8ed1ab_0 - mdit-py-plugins=0.4.1=pyhd8ed1ab_0 - mdurl=0.1.2=pyhd8ed1ab_0 - minizip=4.0.7=h401b404_0 - mistune=3.0.2=pyhd8ed1ab_0 - msgpack-python=1.0.8=py311hd18a35c_1 - multidict=6.0.5=py311h9ecbd09_1 - multiurl=0.3.1=pyhd8ed1ab_0 - munkres=1.1.4=pyh9f0ad1d_0 - mysql-common=9.0.1=h70512c7_0 - mysql-libs=9.0.1=ha479ceb_0 - myst-nb=1.1.1=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.2=py311h14de704_1 - pandoc=3.3=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=py311h82a398c_0 - pip=24.2=pyh8b19718_1 - pixman=0.43.2=h59595ed_0 - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1 - platformdirs=4.3.2=pyhd8ed1ab_0 - plotly=5.24.0=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.4.1=h54d7996_1 - prometheus_client=0.20.0=pyhd8ed1ab_0 - prompt-toolkit=3.0.47=pyha770c72_0 - properscoring=0.1=py_0 - psutil=6.0.0=py311h9ecbd09_1 - pthread-stubs=0.4=h36c2ea0_1001 - ptyprocess=0.7.0=pyhd3deb0d_0 - pure_eval=0.2.3=pyhd8ed1ab_0 - pwlf=2.2.1=py311h38be061_3 - 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.8.2=pyhd8ed1ab_0 - pydantic-core=2.20.1=py311hb3a8bbb_0 - pydantic-settings=2.4.0=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=py311h58d3061_9 - pyshp=2.3.1=pyhd8ed1ab_0 - pyside6=6.7.2=py311hba19f1e_2 - pysocks=1.7.1=pyha2e5f31_6 - python=3.11.9=hb806964_0_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.1=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=hb12f9c5_5 - rasterio=1.3.11=py311hfbe93a2_0 - 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.7.1=pyhd8ed1ab_0 - rioxarray=0.17.0=pyhd8ed1ab_0 - rpds-py=0.20.0=py311h9e33e62_1 - s2n=1.5.2=h7b32b05_0 - scikit-learn=1.5.1=py311hd632256_0 - 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=73.0.1=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.2=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.34=py311h9ecbd09_0 - sqlite=3.46.1=h9eae976_0 - stack_data=0.6.2=pyhd8ed1ab_0 - statsmodels=0.14.2=py311h18e1886_0 - 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.25.0=h86fa3b2_11 - 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.2=pyhd8ed1ab_1 - 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.7.0=pyhd8ed1ab_0 - xarraymannkendall=1.4.5=pyhd8ed1ab_0 - xcb-util=0.4.1=hb711507_2 - xcb-util-cursor=0.1.4=h4ab18f5_2 - 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=h7f98852_1002 - xorg-inputproto=2.3.2=h7f98852_1002 - xorg-kbproto=1.0.7=h7f98852_1002 - 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=hd590300_0 - xorg-libxdmcp=1.1.3=h7f98852_0 - 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=h4bc722e_1 - xorg-recordproto=1.14.2=h7f98852_1002 - xorg-renderproto=0.11.1=h7f98852_1002 - xorg-xextproto=7.3.0=h0b41bf4_1003 - xorg-xproto=7.0.31=h7f98852_1007 - 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.11.0=py311h9ecbd09_0 - zarr=2.18.3=pyhd8ed1ab_0 - zeromq=4.3.5=ha4adb4c_5 - zict=3.0.0=pyhd8ed1ab_0 - zipp=3.20.1=pyhd8ed1ab_0 - zlib=1.3.1=h4ab18f5_1 - zstandard=0.23.0=py311hbc35293_1 - zstd=1.5.6=ha6fb4c9_0 - pip: - alembic==1.13.2 - c3s-eqc-automatic-quality-control==0.1.2.dev113+g12de045 - cacholote==1.3.2 - cgul==0.0.4 - earthkit-geo==0.2.0 - earthkit-meteo==0.1.1 - eccodes==2.37.0 - ecmwflibs==0.6.3 - kaleido==0.2.1 - lru-dict==1.3.0 - mako==1.3.5 - pymannkendall==1.4.3 - sqlalchemy-utils==0.41.2 prefix: /data/common/miniforge3/envs/wp5
malmans2 commented 2 months ago

The source coordinate is only added when the time coordinate is not present in the original files. I'll take a look later today. Most of the times it is possible to infer the time coordinate from the attributes of the original files.

malmans2 commented 2 months ago

Hi @gmandorl,

Yes, it's the problem I mentioned this morning. Try this:

from c3s_eqc_automatic_quality_control import download
import pandas as pd

collection_id = "satellite-cloud-properties"
ds_cci_month = {
    "origin": "esa",
    "variable": ["all_variables"],
    "sensor_on_satellite": ["aatsr_on_envisat"],
    "climate_data_record_type": "thematic_climate_data_record",
    "product_family": "cci",
    "time_aggregation": "monthly_mean",
    "year": ["2010", "2011"],
    "month": ["01", "02", "03", "04", "05"],
    "area": [10, 170, 0, 180],
}

def preprocess(ds):
    time = pd.to_datetime(ds.attrs["time_coverage_start"])
    return ds.assign_coords(time=time)

ds_cci_month = download.download_and_transform(
    collection_id,
    ds_cci_month,
    preprocess=preprocess,
)

Let me know if it works OK!

malmans2 commented 2 months ago

(There was a small typo in my snippet, so I edited it)

gmandorl commented 2 months ago

Hi @malmans2

Thank you very much, the code works well now.