csdms / bmi-wavewatch3

Fetch WaveWatch3 data
MIT License
6 stars 0 forks source link

Add plot subcommand #13

Closed mcflugen closed 2 years ago

mcflugen commented 2 years ago

This pull request adds a plot subcommand to the ww3 command-line interface. From the command line, one can now plot data with, for example,

$ ww3 plot plot --grid=at_4m --data-var=swh "2010-09-15T15"

The above will plot significant wave height (--data-var=swh) for the east coast of the United States (as will as a square around Hurricane Julia). Note that the name of the data vars is different from quantity names used in other commands. The name of the data var is the name used in the grib2 data file, whereas the quantity name is the name used in the name of the grib2 file itself. These two names, unfortunately, are different. In the above example, for instance, the name of the data file is multi_1.at_4m.hs.201902.grb2 (i.e. hs) but if you were to open that file, the variable corresponding to significant wave height is called swh (there is no hs variable).