Tool for downloading and processing data for TUFLOW FV modelling
Project description
TFV Get Tools
⚠️ Beta Package - This is a beta release. Features may change and improvements are ongoing. Please report any issues to support@tuflow.com.
Tools to assist with downloading and processing meteorological and ocean data to use with TUFLOW FV
Overview
TFV Get Tools is a Python package that simplifies the process of downloading and processing meteorological and ocean data for use with TUFLOW FV models. The tool supports extraction of tidal data, atmospheric conditions, ocean physics, and wave data from various authoritative sources.
Supported Data Sources
Atmospheric Data:
- ECMWF ERA5 (Default - registration required, see CDS API)
- NOAA CFSR (Climate Forecast System Reanalysis)
- BARRA2 (Australian Bureau of Meteorology)
Ocean Data:
- HYCOM (Naval Research Laboratory - Global Ocean Forecast System)
- Copernicus Marine Global and NWS (registration required, see Copernicus Marine Service)
Wave Data:
- CSIRO CAWCR (glob_24m, aus_10m, aus_4m, pac_10m, pac_4m)
- Copernicus Marine Global and NWS
- ECMWF ERA5 (registration required, see CDS API)
Tidal Data:
Installation
Conda/Mamba (Recommended)
# Create a new environment, if required.
conda create -n tfv python=3.9
conda activate tfv
# Install the package
conda install -c conda-forge tfv-get-tools
Pip
pip install tfv-get-tools
Quick Start
Command Line Interface
The package provides command-line tools for downloading and processing data:
Ocean Data Example:
# Download HYCOM data for January 2011 in southeast Queensland
GetOcean A 2011-01-01 2011-02-01 153 156 -29 -24
# Download with custom options (top 20m, 3-hourly data, custom prefix)
GetOcean A -p raw_data -pf SEQ_HYCOM -ts 3 -z 0 20 2011-01-01 2011-02-01 153 156 -29 -24
# Merge downloaded files
GetOcean B -i raw_data -o output -rp 28350 -tz 8 -ltz AWST -n merged_hycom.nc
Atmospheric Data Example:
# Download ERA5 atmospheric data
GetAtmos A 2011-01-01 2011-02-01 152 154 -28 -26
# Merge with reprojection and timezone conversion
GetAtmos B -i raw_data -o output -rp 7856 -tz 10 -ltz AEST
Tidal Data Example:
# Extract tidal data using a boundary nodestring shapefile
GetTide output/tide_data.nc 2011-01-01 2012-01-01 boundaries/nodestring.shp path/to/fes2022/
Python API
Ocean Data:
from tfv_get_tools import DownloadOcean, MergeOcean
# Download HYCOM data
result = DownloadOcean(
start_date='2011-01-01',
end_date='2011-02-01',
xlims=(153, 156),
ylims=(-29, -24),
out_path='./raw_data',
source='HYCOM',
time_interval=24
)
# Merge downloaded files
MergeOcean(
in_path='./raw_data',
out_path='./output',
source='HYCOM',
reproject=28350,
local_tz=(8, 'AWST')
)
Atmospheric Data:
from tfv_get_tools import DownloadAtmos, MergeAtmos
# Download BARRA2 data
result = DownloadAtmos(
start_date='2020-01-01',
end_date='2020-02-01',
xlims=(152.72, 153.78),
ylims=(-27.49, -25.39),
out_path='./raw_data',
source='BARRA2',
model='C2'
)
# Merge with reprojection to GDA2020 MGA56
MergeAtmos(
in_path='./raw_data',
out_path='./output',
source='BARRA2',
model='C2',
reproject=7856,
local_tz=(10.0, 'AEST')
)
Tidal Data:
from pathlib import Path
from tfv_get_tools.tide import ExtractTide
# Basic tidal extraction
ExtractTide(
start_date='2011-01-01',
end_date='2012-01-01',
filename='tide_data.nc',
out_path='./output',
freq='15min',
shapefile='boundaries/nodestring.shv'
)
# Advanced usage with constituent caching
from tfv_get_tools.tide import load_nodestring_shapefile, process_nodestring_gdf, get_constituents
# Load and process boundary shapefile
gdf = load_nodestring_shapefile('boundaries/nodestring.shp', process_ids=[1])
coordinates = process_nodestring_gdf(gdf, spacing=5000)
# Extract constituents once (slow first time, fast afterwards)
constituents = get_constituents(
coordinates,
source='FES2022',
save_cons='boundary_constituents.pkl'
)
# Use cached constituents for faster extraction
ExtractTide(
start_date='2011-01-01',
end_date='2012-01-01',
filename='tide_data.nc',
out_path='./output',
freq='15min',
constituents='boundary_constituents.pkl'
)
Requirements
- Python 3.9+
- Internet connection for data downloads
- Registration required for some data sources:
- ERA5: Copernicus Climate Data Store (CDS) API
- Copernicus Marine: Copernicus Marine Service
- FES Tidal Models: AVISO+ (for tidal constituent files)
Data Credits and Acknowledgements
This package utilises data from multiple authoritative sources. Please ensure appropriate attribution when using this data:
Atmospheric Data
- ECMWF ERA5: Data provided by the European Centre for Medium-Range Weather Forecasts (ECMWF) through the Copernicus Climate Change Service (C3S). Please acknowledge: "Contains modified Copernicus Climate Change Service information [2025]".
- NOAA CFSR: Data provided by the National Oceanic and Atmospheric Administration (NOAA) National Centers for Environmental Information.
- BARRA2: Data provided by the Australian Bureau of Meteorology.
Ocean Data
- HYCOM: All ocean data is supplied by the HYCOM consortium. Please refer to the HYCOM data acknowledgement and disclaimer.
- Copernicus Marine: Ocean and wave data provided by the Copernicus Marine Environment Monitoring Service (CMEMS).
Wave Data
- CSIRO CAWCR: Wave data provided by the Commonwealth Scientific and Industrial Research Organisation (CSIRO) Centre for Australian Weather and Climate Research.
- Copernicus Marine: Wave data provided by the Copernicus Marine Environment Monitoring Service (CMEMS).
Tidal Data
- FES Tidal Models: Tidal data provided by AVISO+ and the FES development team. FES2014 and FES2022 are products of Noveltis, Legos, and CLS, with support from CNES.
- PyTMD: This package utilises the PyTMD Python package for tidal analysis and prediction, developed by Tyler Sutterley.
Support
For questions, bug reports, or feature requests:
- 📧 Email: support@tuflow.com
- 🐛 Issues: Submit via the project repository
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch from
main - Make your changes with appropriate tests
- Submit a pull request
- Email support@tuflow.com to notify the development team
Please ensure your code follows the project's coding standards and includes appropriate documentation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
Developed by BMT, 2025
Project Status
Active - This project is actively maintained and in use. For update requests or feature suggestions, please email support@tuflow.com.
Last updated: July 2025
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tfv_get_tools-0.2.1.tar.gz.
File metadata
- Download URL: tfv_get_tools-0.2.1.tar.gz
- Upload date:
- Size: 95.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418db54f1deeb3e589291afd5a13335de273a8f945a2f12cbef4b1d87fc9d3ab
|
|
| MD5 |
40aeabd116655fff3649cda45a99c277
|
|
| BLAKE2b-256 |
25c66972e6cdcec1270a93aa42de912d4525319092cbd381b9365808e9f4fb90
|
File details
Details for the file tfv_get_tools-0.2.1-py3-none-any.whl.
File metadata
- Download URL: tfv_get_tools-0.2.1-py3-none-any.whl
- Upload date:
- Size: 104.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1052fbb5b7f83e5efa7ed0a815826f2f1165ad8e122d3d82e7844a1974c64986
|
|
| MD5 |
e39c0d68517efb54fb426481d8b7e38a
|
|
| BLAKE2b-256 |
8b12e96c5cec862f040a3f899037ed884eafa1bf5de60f348ce74d68980a899e
|