Download european regional models with analysis and forecast packages by using CAMS regional services REST API.
More information is available at CAMS web site, regional CAMS model page and the API documentation
This utility includes tools for:
- CLI or API usage.
- Download of individual packages.
- Bulk download.
- Grib2 conversion conversion to wgrib2 supported formats.
If you just want to download the data the only requirement is to have Python 3 and requests library installed. So just run:
python3 setup.py install
Note that python 2 is not tested but you can try (last time it works):
python setup.py install
To work with archived packages (available only in GRIB2 format) it is useful to convert this data to formats like NetCDF, CSV or ASCII grid that are supported by the majority of GIS software and tools (like GDAL or QGIS). To add support for GRIB2 format conversion you must to have NOAA wgrib2 tool, an utility to read and write grib2 files.
To install the tool just run the setup script for your OS (by now only Linux and MacOS available (feel free to add Windows script)):
./scripts/setup_linux.sh
or
./scripts/setup_macos.sh
For some tricks about wgrib2 tool usage check this link
To be improved. Just type:
CAMS tools can be used from command line. To see all the options just type:
cams -h
If you have installed wgrib2 tool in your system, the CAMS tools can uses it to convert CAMS GRIB2 files to other formats by using wgib2 tool. Currently wgrib2 supports:
- netcdf: write data in netcdf v3 format (or v4 if wgrib2 is compiled with this option. Note that in opposite as default supported NetCDF format, files converted from Grib2 to NetCDF format using CAMS tools conserves geometry information.
- mysql: export data to a mysql database
- mysql_speed: export data to a mysql database
- spread: write data for Excel spreadsheets
- csv: write in column separated values, another one for spreadsheets
- text: data in text format
- bin: data native binary floating point
- ieee: data in big endian IEEE format
- ijbox: write a rectangular grid of data
- AAIG: arcinfo ascii grid, GIS
After conversion each analysis or forecast time will be given in separated file replacing the file name TIME information with the hour with one leading zero (e.g +0H24H code will be converted to +00H, +01H, .. , +25H).
TODO
Copyright © 2017 Krzysztof Stopa (stopa.krzysztof.k@gmail.com)
This file is part of Copernicus Atmosphere Monitoring Service (CAMS) downloading and processing tools (CAMS tools).
CAMS tools is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
CAMS tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with CAMS tools. If not, see http://www.gnu.org/licenses/.