diff --git a/.github/workflows/stglib_test_conda.yml b/.github/workflows/stglib_test_conda.yml index f1764f01..4a7c9632 100644 --- a/.github/workflows/stglib_test_conda.yml +++ b/.github/workflows/stglib_test_conda.yml @@ -27,7 +27,7 @@ jobs: - run: git lfs checkout - uses: conda-incubator/setup-miniconda@v3 with: - mamba-version: "*" + # mamba-version: "*" activate-environment: test-environment environment-file: requirements.yml python-version: ${{ matrix.python-version }} diff --git a/doc/aqd.rst b/doc/aqd.rst index d5604847..f93d9a87 100644 --- a/doc/aqd.rst +++ b/doc/aqd.rst @@ -1,31 +1,6 @@ Aquadopp (currents) ******************* -Data will generally be processed using a series of run scripts that use command line arguments. For AQD currents it's a 2 step process. - -Instrument data to raw .cdf -=========================== - First, in AquaPro, export data to text files using the default options. -Convert from text to a raw netCDF file with ``.cdf`` extension using runaqdhdr2cdf.py. This script -depends on two arguments, the global attribute file and extra configuration information :doc:`configuration files `. - -runaqdhdr2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.aqdhdr2cdf_parser - :prog: runaqdhdr2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension, optionally including :doc:`atmospheric correction ` of the pressure data. - -runaqdcdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.aqdcdf2nc_parser - :prog: runaqdcdf2nc.py +Then use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/aqdhr.rst b/doc/aqdhr.rst index 52d6cd46..19b5f190 100644 --- a/doc/aqdhr.rst +++ b/doc/aqdhr.rst @@ -3,31 +3,6 @@ Aquadopp HR **Aquadopp HR mode data has only seen limited testing. Contributions welcome.** -Data are processed using a series of run scripts that use command line arguments. - -Instrument data to raw .cdf -=========================== - First, in AquaPro HR, export data to text files using the default options. -Convert from text to a raw netCDF file with ``.cdf`` extension using runaqdhrhdr2cdf.py. This script -depends on two arguments, the global attribute file and extra configuration information :doc:`configuration files `. - -runaqdhrhdr2cdf.py ------------------- - -.. argparse:: - :ref: stglib.core.cmd.aqdhdr2cdf_parser - :prog: runaqdhrhdr2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension, optionally including :doc:`atmospheric correction ` of the pressure data. - -runaqdhrcdf2nc.py ------------------ - -.. argparse:: - :ref: stglib.core.cmd.aqdcdf2nc_parser - :prog: runaqdhrcdf2nc.py +Then use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/eofe.rst b/doc/eofe.rst index b658e05f..49cf4475 100644 --- a/doc/eofe.rst +++ b/doc/eofe.rst @@ -1,29 +1,4 @@ EofE ECHOLOGGER *************** -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. - -Instrument data to raw .cdf -=========================== - -Convert from tab or space-delimited log file to a raw netCDF file with .cdf extension using ``runeofelog2cdf.py``. - -runeofelog2cdf.py ------------------ - -.. argparse:: - :ref: stglib.core.cmd.eofelog2cdf_parser - :prog: runeofelog2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into CF-compliant netCDF file with .nc extension using ``runeofecdf2nc.py``. - -runeofecdf2nc.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.eofecdf2nc_parser - :prog: runeofecdf2nc.py +Starting from the tab or space-delimited log file, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/exo.rst b/doc/exo.rst index ae5ed9dc..ea4db51f 100644 --- a/doc/exo.rst +++ b/doc/exo.rst @@ -1,29 +1,4 @@ YSI EXO ******* -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. - -Instrument data to raw .cdf -=========================== - -Convert from exported .csv file from KOR software to a raw netCDF file with .cdf extension using ``runexocsv2cdf.py``. - -runexocsv2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.exocsv2cdf_parser - :prog: runexocsv2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension using ``runexocdf2nc.py``, optionally including :doc:`atmospheric correction ` of the pressure data. - -runexocdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.exocdf2nc_parser - :prog: runexocdf2nc.py +Starting from exported .csv file from KOR software, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/index.rst b/doc/index.rst index 582cb32f..d51e0a9c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -47,23 +47,24 @@ We have plans to support: config atmos waves + Processing data with runouts (use this!) aqd - wvs aqdhr - vec - sig + wvs rsk + sig + vec + wet + eofe exo + hobo + indexvel iq + lisst mc - wet - hobo - wxt sg - eofe - lisst tcm - indexvel + wxt turnaround code contributing diff --git a/doc/iq.rst b/doc/iq.rst index 82a0dde3..6a9063e5 100644 --- a/doc/iq.rst +++ b/doc/iq.rst @@ -9,25 +9,4 @@ depends on two :doc:`configuration files `. IQ-exported Matlab file to raw .cdf =================================== -First, export .mat files from the instrument software. - -Convert from exported .mat to a raw netCDF file with .cdf extension using ``runiqmat2cdf.py``. - -runiqmat2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.iqmat2cdf_parser - :prog: runiqmat2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension using ``runiqcdf2nc.py``. - -runiqcdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.iqcdf2nc_parser - :prog: runiqcdf2nc.py +First, export .mat files from the instrument software. Then, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/lisst.rst b/doc/lisst.rst index e963c496..fe8c14e8 100644 --- a/doc/lisst.rst +++ b/doc/lisst.rst @@ -1,29 +1,4 @@ Sequoia Scientific LISST ************************ -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. - -Exported ASCII data to raw .cdf -=============================== - -Convert from comma-delimited file to a raw netCDF file with .cdf extension using ``runlisstcsv2cdf.py``. - -runlisstcsv2cdf.py ------------------- - -.. argparse:: - :ref: stglib.core.cmd.lisstcsv2cdf_parser - :prog: runlisstcsv2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into CF-compliant netCDF file with .nc extension using ``runlisstcdf2nc.py``. - -runlisstcdf2nc.py ------------------ - -.. argparse:: - :ref: stglib.core.cmd.lisstcdf2nc_parser - :prog: runlisstcdf2nc.py +Starting from exported comma-delimited file, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/mc.rst b/doc/mc.rst index 2026dac4..b7276b64 100644 --- a/doc/mc.rst +++ b/doc/mc.rst @@ -1,29 +1,4 @@ Seabird SBE 37 MicroCAT *********************** - -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. -Instrument data to raw .cdf -=========================== - -Convert from exported .asc file to a raw netCDF file with .cdf extension using ``runmcasc2cdf.py``. - -runmcasc2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.mcasc2cdf_parser - :prog: runmcasc2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into a CF-compliant netCDF file with .nc extension using ``runmccdf2nc.py``. - -runmccdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.mccdf2nc_parser - :prog: runmccdf2nc.py +Starting from exported .asc file, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/rsk.rst b/doc/rsk.rst index 74a914ce..4d9613c4 100644 --- a/doc/rsk.rst +++ b/doc/rsk.rst @@ -9,27 +9,7 @@ Instrument data to raw .cdf First, export data to text (.zip) format (File -> Export -> Text (\*.zip)) from the Ruskin software. -Then use ``runrskcsv2cdf.py`` to convert this exported data to a raw netCDF .cdf file. - -runrskcsv2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.rskcsv2cdf_parser - :prog: runrskcsv2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension using ``runrskcdf2nc.py``, optionally including :doc:`atmospheric correction ` of the pressure data. - -runrskcdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.rskcdf2nc_parser - :prog: runrskcdf2nc.py - +Then use :doc:`runots ` to process using the two :doc:`configuration files `. Waves processing ================ @@ -37,15 +17,7 @@ Waves processing Option 1: internal waves code ----------------------------- -This option is recommended as it does not require MATLAB. Generate the waves statistics and incorporate them into an CF-compliant netCDF file with .nc extension using ``runrsknc2waves.py``. - -runrsknc2waves.py -~~~~~~~~~~~~~~~~~ - -.. argparse:: - :ref: stglib.core.cmd.rsknc2waves_parser - :prog: runrsknc2waves.py - +This option is recommended as it does not require MATLAB. Generate the waves statistics and incorporate them into an CF-compliant netCDF file with .nc extension using :doc:`runots `. Option 2: DIWASP ---------------- diff --git a/doc/runots.rst b/doc/runots.rst new file mode 100644 index 00000000..cb9d31f3 --- /dev/null +++ b/doc/runots.rst @@ -0,0 +1,28 @@ +Processing data with runots +*************************** + +Data are processed using the umbrella run script ``runots``. With this script the user specifies the instrument and step to be applied to the data. + +For most instruments, this is a two-step process: + +1. instrument data to raw CDF +2. raw CDF to clean .nc + +For some instruments (usually those measuring waves) there is a third step: + +3. clean .nc to wave-statistics .nc + +The user will call ``runots`` from the command line, with arguments described below. The autogenerated documentation below can be a little challenging to interpret, so here's an example: + +``runots aqd hdr2cdf gatts_file.txt config_file.yaml`` + +The above command specifies ``aqd`` (Aquadopp collecting in currents mode) and ``hdr2cdf`` (step 1 above, instrument data to raw CDF), using the specified :doc:`configuration files `. + +To get to the final .nc file, the user would then run ``runots aqd cdf2nc raw_cdf_file_name.cdf`` + +runots +------ + +.. argparse:: + :ref: stglib.core.cmd.runots_parser + :prog: runots diff --git a/doc/sg.rst b/doc/sg.rst index 258ec8ec..d488de4d 100644 --- a/doc/sg.rst +++ b/doc/sg.rst @@ -1,29 +1,4 @@ Seabird SBE 26plus Seagauge *************************** - -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. -Instrument data to raw .cdf -=========================== - -Convert from exported .tide file to a raw netCDF file with .cdf extension using ``runsgtid2cdf.py``. - -runsgtid2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.sgtid2cdf_parser - :prog: runsgtid2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into a CF-compliant netCDF file with .nc extension using ``runsgcdf2nc.py``. - -runsgcdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.sgcdf2nc_parser - :prog: runsgcdf2nc.py +Starting from exported .tid file, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/sig.rst b/doc/sig.rst index 0d1aaa8f..f209576a 100644 --- a/doc/sig.rst +++ b/doc/sig.rst @@ -1,34 +1,10 @@ Signature ********* -Data will generally be processed using a series of run scripts that use command line arguments. - **NOTE: this code works with up- or down-looking Signature data collected in 'beam', 'XYZ' or 'earth'. It supports data types Burst, IBurst, Echo1, BurstHR, and IBurstHR. It also supports Altimeter and AHRS (Advanced Heading Reference System) data that are included when present with supported data types. Presently it does not yet support data types Average and BottomTrack, but they will be added in the future as needed.** -Instrument data to raw .cdf -=========================== First, export data from the Signature Deployment software to Matlab format with coordinate transformations. -Convert from mat files to a raw netCDF file (for each data type) with ``.cdf`` extension using runsigmat2cdf.py. This script -depends on two arguments, the global attribute file and extra configuration information :doc:`configuration files `. - -runsigmat2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.sigmat2cdf_parser - :prog: runsigmat2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data (for each data type) into an CF-compliant netCDF file with .nc extension, optionally including :doc:`atmospheric correction ` of the pressure data. - -runsigcdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.sigcdf2nc_parser - :prog: runsigcdf2nc.py +Then use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/tcm.rst b/doc/tcm.rst index 026d6d47..3d8b8225 100644 --- a/doc/tcm.rst +++ b/doc/tcm.rst @@ -1,29 +1,4 @@ Lowell Tilt Current Meter (TCM) ******************************* -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. - -Instrument data to raw .cdf -=========================== - -Convert from exported CSV file to a raw netCDF file with .cdf extension using ``runtcmcsv2cdf.py``. - -runtcmcsv2cdf.py ------------------ - -.. argparse:: - :ref: stglib.core.cmd.tcmcsv2cdf_parser - :prog: runtcmcsv2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into CF-compliant netCDF file with .nc extension using ``runtcmcdf2nc.py``. - -runtcmcdf2nc.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.tcmcdf2nc_parser - :prog: runtcmcdf2nc.py +Convert from exported CSV file using :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/vec.rst b/doc/vec.rst index f5824a98..b3efda25 100644 --- a/doc/vec.rst +++ b/doc/vec.rst @@ -11,43 +11,13 @@ For more information, see "The Comprehensive Manual - Velocimeters" available fr The ``orientation`` variable (indicating the probe head orientation) in the config file is required and the user will be warned if it does not match what the instrument reports. -Instrument data to raw .cdf -=========================== +Processing data +=============== First, export data from the Vector software to text format. -Convert from text to a raw netCDF file with ``.cdf`` extension using runvechdr2cdf.py. This script -depends on two arguments, the global attribute file and extra configuration information :doc:`configuration files `. +Then use :doc:`runots ` to process using the two :doc:`configuration files `. -runvecdat2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.vechdr2cdf_parser - :prog: runvecdat2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension, optionally including :doc:`atmospheric correction ` of the pressure data. - -runveccdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.veccdf2nc_parser - :prog: runveccdf2nc.py - -Compute wave statistics -======================= - -Use stglib's built-in wave-statistics toolbox to compute a wave-statistics file. +Use stglib's built-in wave-statistics toolbox to compute a wave-statistics file (``runots vec nc2waves``). **Experimental** PUV support is also present. Testing welcome! - -runvecnc2waves.py ------------------ - -.. argparse:: - :ref: stglib.core.cmd.vecnc2waves_parser - :prog: runvecnc2waves.py diff --git a/doc/wet.rst b/doc/wet.rst index 64ad753b..d35ebd5f 100644 --- a/doc/wet.rst +++ b/doc/wet.rst @@ -1,29 +1,4 @@ WET Labs ECO ************ -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. - -Instrument data to raw .cdf -=========================== - -Convert from tab-delimited log file to a raw netCDF file with .cdf extension using ``runecocsv2cdf.py``. - -runecocsv2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.ecolog2cdf_parser - :prog: runecocsv2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into a CF-compliant netCDF file with .nc extension using ``runecocdf2nc.py``. - -runecocdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.ecocdf2nc_parser - :prog: runecocdf2nc.py +Starting from tab-delimited log file, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/doc/wvs.rst b/doc/wvs.rst index 88dfd594..35cbc3df 100644 --- a/doc/wvs.rst +++ b/doc/wvs.rst @@ -1,46 +1,10 @@ Aquadopp (waves) **************** -Data will generally be processed using a series of run scripts that use command line arguments. For AQD waves it's a 3 step process. - -Instrument data to raw .cdf -=========================== - First, export data to text format using the AquaPro software and default options. -Convert from text to a raw netCDF file with ``.cdf`` extension using runwvswad2cdf.py. This script -depends on two arguments, the global attribute file and extra configuration information :doc:`configuration files `. - -runwvswad2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.wvswad2cdf_parser - :prog: runwvswad2cdf.py - - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into an CF-compliant netCDF file with .nc extension, optionally including :doc:`atmospheric correction ` of the pressure data. - -runwvscdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.wvscdf2nc_parser - :prog: runwvscdf2nc.py - -Compute wave statistics -======================= - -Using DIWASP: This is run separately in Matlab using the DIWASP toolbox (docs TODO). - -Use stglib's built-in wave-statistics toolbox to compute a wave-statistics file. +Then use :doc:`runots ` to process using the two :doc:`configuration files `. -runwvsnc2waves.py ------------------ +Use stglib's built-in wave-statistics toolbox to compute a wave-statistics file (``runots wvs nc2waves``). -.. argparse:: - :ref: stglib.core.cmd.wvsnc2waves_parser - :prog: runwvsnc2waves.py +**Experimental** PUV support is also present. Testing welcome! diff --git a/doc/wxt.rst b/doc/wxt.rst index 2fe12275..956d61b1 100644 --- a/doc/wxt.rst +++ b/doc/wxt.rst @@ -1,29 +1,4 @@ Vaisala WXT536 ************** -Data will generally be processed using a series of run scripts. The first script for each instrument type -depends on two :doc:`configuration files `. - -Instrument data to raw .cdf -=========================== - -Convert from exported .csv file to a raw netCDF file with .cdf extension using ``runwxtcsv2cdf.py``. - -runwxtcsv2cdf.py ----------------- - -.. argparse:: - :ref: stglib.core.cmd.wxtcsv2cdf_parser - :prog: runwxtcsv2cdf.py - -Raw .cdf to CF-compliant .nc -============================ - -Convert the raw .cdf data into a CF-compliant netCDF file with .nc extension using ``runwxtcdf2nc.py``. - -runwxtcdf2nc.py ---------------- - -.. argparse:: - :ref: stglib.core.cmd.wxtcdf2nc_parser - :prog: runwxtcdf2nc.py +Starting from exported .csv file, use :doc:`runots ` to process using the two :doc:`configuration files `. diff --git a/stglib/core/cmd.py b/stglib/core/cmd.py index 8756a767..5b3427a4 100644 --- a/stglib/core/cmd.py +++ b/stglib/core/cmd.py @@ -27,102 +27,113 @@ def ncarg(parser): parser.add_argument("ncname", help="processed .nc filename") -def addcdf2nc(instsp): - instsp.add_parser("cdf2nc", parents=[cdf2nc_parser()], add_help=False) +def addcdf2nc(instsp, description="Convert raw .cdf to clean .nc"): + instsp.add_parser( + "cdf2nc", parents=[cdf2nc_parser()], add_help=False, description=description + ) def addnc2waves(instsp): instsp.add_parser("nc2waves", parents=[nc2waves_parser()], add_help=False) -def addinst2cdf(instsp, action): - instsp.add_parser(action, parents=[inst2cdf_parser()], add_help=False) +def addinst2cdf(instsp, action, description="Convert instrument data to raw .cdf"): + instsp.add_parser( + action, parents=[inst2cdf_parser()], add_help=False, description=description + ) -def add_instrument(subparsers, instrument): - inst = subparsers.add_parser(instrument, add_help=False) - instsp = inst.add_subparsers(title="steps", required=True, dest="step") +def add_instrument(subparsers, instrument, description=None): + inst = subparsers.add_parser(instrument, description=description) + instsp = inst.add_subparsers( + title="Steps", + required=True, + dest="step", + description="Specify one of the steps in the list below", + ) return instsp def runots_parser(): - description = "Run USGS CMHRP ocean time-series data processing system." - parser = argparse.ArgumentParser(description=description) + parser = argparse.ArgumentParser( + description="Run USGS CMHRP ocean time-series data processing system." + ) subparsers = parser.add_subparsers( - title="instruments", + title="Instruments", required=True, dest="instrument", + description="Specify one of the instruments in the list below", ) - instsp = add_instrument(subparsers, "aqd") + instsp = add_instrument(subparsers, "aqd", "Aquadopp (currents)") addinst2cdf(instsp, "hdr2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "aqdhr") + instsp = add_instrument(subparsers, "aqdhr", "Aquadopp HR") addinst2cdf(instsp, "hdr2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "wvs") + instsp = add_instrument(subparsers, "wvs", "Aquadopp Waves") addinst2cdf(instsp, "wad2cdf") addcdf2nc(instsp) addnc2waves(instsp) - instsp = add_instrument(subparsers, "rbr") + instsp = add_instrument(subparsers, "rbr", "RBR") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) addnc2waves(instsp) - instsp = add_instrument(subparsers, "sig") + instsp = add_instrument(subparsers, "sig", "Nortek Signature") addinst2cdf(instsp, "mat2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "vec") + instsp = add_instrument(subparsers, "vec", "Nortek Vector") addinst2cdf(instsp, "dat2cdf") addcdf2nc(instsp) addnc2waves(instsp) - instsp = add_instrument(subparsers, "eco") + instsp = add_instrument(subparsers, "eco", "WET Labs ECO") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "eofe") + instsp = add_instrument(subparsers, "eofe", "EofE ECHOLOGGER") addinst2cdf(instsp, "log2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "exo") + instsp = add_instrument(subparsers, "exo", "YSI EXO") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "hobo") + instsp = add_instrument(subparsers, "hobo", "Onset HOBO") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "iq") + instsp = add_instrument(subparsers, "iq", "SonTek IQ") addinst2cdf(instsp, "mat2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "lisst") + instsp = add_instrument(subparsers, "lisst", "Sequoia Scientific LISST") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "mc") + instsp = add_instrument(subparsers, "mc", "Seabird MicroCAT") addinst2cdf(instsp, "asc2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "sg") + instsp = add_instrument(subparsers, "sg", "Seabird Seagauge") addinst2cdf(instsp, "tid2cdf") addcdf2nc(instsp) addnc2waves(instsp) - instsp = add_instrument(subparsers, "tcm") + instsp = add_instrument(subparsers, "tcm", "Lowell Tilt Current Meter") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "troll") + instsp = add_instrument(subparsers, "troll", "AquaTROLL") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) - instsp = add_instrument(subparsers, "wxt") + instsp = add_instrument(subparsers, "wxt", "Vaisala WXT") addinst2cdf(instsp, "csv2cdf") addcdf2nc(instsp) @@ -139,9 +150,10 @@ def inst2cdf_parser(description="Convert instrument files to raw .cdf format"): return parser -def cdf2nc_parser(): +def cdf2nc_parser( + description="Convert raw .cdf format to processed .nc files, optionally compensating for atmospheric pressure", +): """generic parser for raw .cdf format to processed .nc files, optionally compensating for atmospheric pressure""" - description = "Convert raw .cdf format to processed .nc files, optionally compensating for atmospheric pressure" parser = argparse.ArgumentParser(description=description) cdfarg(parser) atmarg(parser) @@ -149,9 +161,8 @@ def cdf2nc_parser(): return parser -def nc2waves_parser(): +def nc2waves_parser(description="Generate wave-statistics file"): """generic parser for processed .nc to wave statistics""" - description = "Generate waves statistics file" parser = argparse.ArgumentParser(description=description) ncarg(parser)