USGS2TELEMAC
Downlaod & Convert USGS flow discharge and gage height raw data to liquid boundary file for TELEMAC-2D/3D modeling
Install / Use
/learn @ZhiLiHydro/USGS2TELEMACREADME
USGS2TELEMAC
This code/interface is to:
-
ask USGS NWIS for flow discharge and gage height data of the interested USGS gaging stations in the interested period of time,
-
download received raw data,
and
- prepare the liquid boundary file for TELEMAC-2D/3D modeling.
It sends on-demand requests to NWIS and receives JSON format data returned from NWIS, with help of the HydroFunctions project. Piecewise linear interpolation is applied when repairing NaNs in raw data and increasing data frequency.

Prerequisites
- Python 3
- tkinter
- Numpy
- Matplotlib
- Pandas
- HydroFunctions
tkinter is usually installed with Python 3. If not, use sudo apt install python3-tk or similar commands to install.
Numpy, Matplotlib, Pandas and HydroFunctions can be installed by pip3 install <package name>.
Run
python usgs2telemac.py
Enter station numbers (8 digits), boundary condition types (flow discharge or gage height) and datum shift amounts (real numbers).
Datum shift is needed for gage height data because TELEMAC needs a unified datum, no matter it is NGVD 29, NAVD 88, or an arbitrary one.
Click Generate stationInfo.csv button to get a stationInfo file. This stationInfo file is for more convinient future run.
Click Ask USGS button to send requests to NWIS, receive data from NWIS, and make the liquid boundary file for TELEMAC.
Use it in TELEMAC
Add the following line to the TELEMAC-2D/3D steering file (usually *.cas):
LIQUID BOUNDARIES FILE = 'usgs2telemac_liq_boundary.xls'
License
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
