Allows you to download NetCDF files from the WW3 model (Ifremer), prepare them for GRIB2 conversion compatible with QtVlm, and concatenate them.
- Python 3.8+
requestsxarraytqdmcdo(for NetCDF → GRIB2 conversion)
Install Python dependencies:
pip install requests xarray tqdmInstall CDO (on Ubuntu/Debian):
sudo apt-get install cdoYou can download the files via HTTPS (default) or FTP (using the --ftp option).
python dl_files.py --zone MANCHE-NORD-500M --days_fwd 2 --download_dir ww3_dataPrepare a credentials file (e.g. ftp_credentials.json):
{
"user": "ext-marc_vagues",
"password": "YOUR_PASSWORD_HERE"
}Then run the command:
python dl_files.py --zone MANCHE-NORD-500M --days_fwd 2 --download_dir ww3_data --ftp --credentials ftp_credentials.json
--zone: name of the zone (e.g., MANCHE-NORD-500M, FINIS-200M)--days_fwd: number of days to download starting from the start date--ftp: enables FTP download--credentials: path to the JSON file containing FTP credentials--download_dir: destination folder
python process_files.py ww3_data/*.nc --output manchesud.nc --processed_dir processed_nc
--output: name of the concatenated NetCDF file--processed_dir: folder for the processed NetCDF files
Use the following command:
cdo -f grb2 copy manchesud.nc manchesud.grb2