csdms / bmi-wavewatch3

Fetch WaveWatch3 data
MIT License
6 stars 0 forks source link

Add ww3 command line interface #1

Closed mcflugen closed 2 years ago

mcflugen commented 2 years ago

This pull request adds a command line interface, ww3 for fetching WaveWatch III data. I've added two subcommands: ww3 url and ww3 fetch.

The url subcommand constructs urls to WaveWatch III data by date,

$ ww3 url 2008-05-05
https://www.ncei.noaa.gov/thredds-ocean/fileServer/ncep/nww3/2008/05/glo_30m/multi_1.glo_30m.dp.200805.grb2
https://www.ncei.noaa.gov/thredds-ocean/fileServer/ncep/nww3/2008/05/glo_30m/multi_1.glo_30m.hs.200805.grb2
https://www.ncei.noaa.gov/thredds-ocean/fileServer/ncep/nww3/2008/05/glo_30m/multi_1.glo_30m.tp.200805.grb2
https://www.ncei.noaa.gov/thredds-ocean/fileServer/ncep/nww3/2008/05/glo_30m/multi_1.glo_30m.wind.200805.grb2

The fetch subcommand downloads (in parallel!) the data files,

$ ww3 --cd=cache fetch 2008-05-05
cache/multi_1.glo_30m.dp.200805.grb2
cache/multi_1.glo_30m.hs.200805.grb2
cache/multi_1.glo_30m.tp.200805.grb2
cache/multi_1.glo_30m.wind.200805.grb2