Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ __pycache__

# files
poetry.lock
.pid
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ Options:
-v, --dataset-version TEXT Dry run
-nd, --no-directories TEXT Option to not recreate folder hierarchy in
output directory
--force-download TEXT Flag to skip confirmation before download
--disable-progress-bar TEXT Flag to hide progress bar
-n, --username TEXT Username
-w, --password TEXT Password
Expand Down Expand Up @@ -263,13 +262,13 @@ Options:
With a specific file:

```shell
mds etag -e s3://mdl-native-12/native/MEDSEA_ANALYSISFORECAST_PHY_006_013/cmems_mod_med_phy-tem_anfc_4.2km_P1D-m_202411/2023/08/20230820_d-CMCC--TEMP-MFSeas9-MEDATL-b20240607_an-sv10.00.nc
mds etag -e s3://mdl-native-12/native/MEDSEA_ANALYSISFORECAST_PHY_006_013/cmems_mod_med_phy-cur_anfc_4.2km_PT15M-i_202411/2025/05/20250501_qm-CMCC--RFVL-MFSeas9-MEDATL-b20250513_an-sv10.00.nc
```

Or:

```shell
mds etag -p MEDSEA_ANALYSISFORECAST_PHY_006_013 -i cmems_mod_med_phy-cur_anfc_4.2km_PT15M-i -g 202411 -f '*b20241212*' -s 2024/12
mds etag -p MEDSEA_ANALYSISFORECAST_PHY_006_013 -i cmems_mod_med_phy-cur_anfc_4.2km_PT15M-i -g 202411 -f '*' -s 2025/05
```

---
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ channels:
- defaults
dependencies:
- python=3.10
- copernicusmarine=1.2.3
- copernicusmarine >2.1
- boto3 >=1.37.4
- click >=8.1.8
7 changes: 5 additions & 2 deletions mds/core/copernicus.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@


def subset(**subset_kwargs) -> pathlib.Path:
subset_kwargs.update({"force_download": True, "disable_progress_bar": True})
subset_kwargs.update({"disable_progress_bar": True})
utils.check_dict_validity(subset_kwargs, SUBSET_MANDATORY_ATTRS)

# patch needed because Click returns a tuple but subset() needs a list of variables
subset_kwargs["variables"] = list(subset_kwargs["variables"])

# download
utils.pprint_dict(subset_kwargs)
result = copernicusmarine.subset(
Expand All @@ -33,7 +36,7 @@ def get(**get_kwargs) -> List[pathlib.Path]:

# download
utils.pprint_dict(get_kwargs)
result = copernicusmarine.get(**get_kwargs, no_metadata_cache=True)
result = copernicusmarine.get(**get_kwargs)
return result


Expand Down
1 change: 0 additions & 1 deletion mds/core/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def mds_list(dataset_id, mds_filter: str, quiet=True, dataset_version=None) -> L
"filter": mds_filter,
"output_directory": tempdir,
"create_file_list": mds_output_filename,
"force_download": True,
"disable_progress_bar": True,
"dataset_version": dataset_version,
}
Expand Down
6 changes: 0 additions & 6 deletions mds/mng/wrapper_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ def subset(**kwargs):
default=True,
help="Option to not recreate folder hierarchy in output directory",
)
@click.option(
"--force-download",
type=str,
default=True,
help="Flag to skip confirmation before download",
)
@click.option(
"--disable-progress-bar", type=str, default=True, help="Flag to hide progress bar"
)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mds-toolbox"
version = "1.0.0"
version = "2.0.0"
description = "A custom CMCC library to list and download data from the Marine Data Store"
authors = ["Antonio Mariani <[email protected]>"]
readme = ["README.md"]
Expand All @@ -13,7 +13,7 @@ keywords = ["copernicus", "copernicusmarine", "mds", "marine data store"]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
boto3 = "^1.37.4"
copernicusmarine = "1.3.5"
copernicusmarine = ">=2.1.1"
click = "^8.1.8"

[build-system]
Expand Down
53 changes: 1 addition & 52 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,10 @@
aiohappyeyeballs==2.4.6 ; python_version >= "3.10" and python_version < "3.13"
aiohttp==3.11.13 ; python_version >= "3.10" and python_version < "3.13"
aiosignal==1.3.2 ; python_version >= "3.10" and python_version < "3.13"
asciitree==0.3.3 ; python_version >= "3.10" and python_version < "3.13"
async-timeout==5.0.1 ; python_version >= "3.10" and python_version < "3.11"
attrs==25.1.0 ; python_version >= "3.10" and python_version < "3.13"
beautifulsoup4==4.13.3 ; python_version >= "3.10" and python_version < "3.13"
boto3==1.37.4 ; python_version >= "3.10" and python_version < "3.13"
botocore==1.37.4 ; python_version >= "3.10" and python_version < "3.13"
cachier==3.1.2 ; python_version >= "3.10" and python_version < "3.13"
certifi==2025.1.31 ; python_version >= "3.10" and python_version < "3.13"
cftime==1.6.4.post1 ; python_version >= "3.10" and python_version < "3.13"
charset-normalizer==3.4.1 ; python_version >= "3.10" and python_version < "3.13"
click==8.1.8 ; python_version >= "3.10" and python_version < "3.13"
cloudpickle==3.1.1 ; python_version >= "3.10" and python_version < "3.13"
colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.13" and platform_system == "Windows"
copernicusmarine==1.3.5 ; python_version >= "3.10" and python_version < "3.13"
dask==2025.2.0 ; python_version >= "3.10" and python_version < "3.13"
fasteners==0.19 ; python_version >= "3.10" and python_version < "3.13" and sys_platform != "emscripten"
frozenlist==1.5.0 ; python_version >= "3.10" and python_version < "3.13"
fsspec==2025.2.0 ; python_version >= "3.10" and python_version < "3.13"
idna==3.10 ; python_version >= "3.10" and python_version < "3.13"
importlib-metadata==8.6.1 ; python_version >= "3.10" and python_version < "3.12"
copernicusmarine==2.1.2 ; python_version >= "3.10" and python_version < "3.13"
jmespath==1.0.1 ; python_version >= "3.10" and python_version < "3.13"
locket==1.0.0 ; python_version >= "3.10" and python_version < "3.13"
lxml==5.3.1 ; python_version >= "3.10" and python_version < "3.13"
motuclient==3.0.0 ; python_version >= "3.10" and python_version < "3.13"
multidict==6.1.0 ; python_version >= "3.10" and python_version < "3.13"
nest-asyncio==1.6.0 ; python_version >= "3.10" and python_version < "3.13"
netcdf4==1.7.2 ; python_version >= "3.10" and python_version < "3.13"
numcodecs==0.13.1 ; python_version >= "3.10" and python_version < "3.13"
numpy==2.2.3 ; python_version >= "3.10" and python_version < "3.13"
packaging==24.2 ; python_version >= "3.10" and python_version < "3.13"
pandas==2.2.3 ; python_version >= "3.10" and python_version < "3.13"
partd==1.4.2 ; python_version >= "3.10" and python_version < "3.13"
portalocker==3.1.1 ; python_version >= "3.10" and python_version < "3.13"
propcache==0.3.0 ; python_version >= "3.10" and python_version < "3.13"
pydap==3.5.3 ; python_version >= "3.10" and python_version < "3.13"
pystac==1.12.2 ; python_version >= "3.10" and python_version < "3.13"
python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "3.13"
pytz==2025.1 ; python_version >= "3.10" and python_version < "3.13"
pywin32==308 ; python_version >= "3.10" and python_version < "3.13" and platform_system == "Windows"
pyyaml==6.0.2 ; python_version >= "3.10" and python_version < "3.13"
requests==2.32.3 ; python_version >= "3.10" and python_version < "3.13"
s3transfer==0.11.3 ; python_version >= "3.10" and python_version < "3.13"
scipy==1.15.2 ; python_version >= "3.10" and python_version < "3.13"
semver==3.0.4 ; python_version >= "3.10" and python_version < "3.13"
setuptools==75.8.2 ; python_version >= "3.10" and python_version < "3.13"
six==1.17.0 ; python_version >= "3.10" and python_version < "3.13"
soupsieve==2.6 ; python_version >= "3.10" and python_version < "3.13"
toolz==1.0.0 ; python_version >= "3.10" and python_version < "3.13"
tqdm==4.67.1 ; python_version >= "3.10" and python_version < "3.13"
typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "3.13"
tzdata==2025.1 ; python_version >= "3.10" and python_version < "3.13"
urllib3==2.3.0 ; python_version >= "3.10" and python_version < "3.13"
watchdog==6.0.0 ; python_version >= "3.10" and python_version < "3.13"
webob==1.8.9 ; python_version >= "3.10" and python_version < "3.13"
xarray==2025.1.2 ; python_version >= "3.10" and python_version < "3.13"
yarl==1.18.3 ; python_version >= "3.10" and python_version < "3.13"
zarr==2.18.3 ; python_version >= "3.10" and python_version < "3.13"
zipp==3.21.0 ; python_version >= "3.10" and python_version < "3.12"
Loading