FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ChanJeunlam/pycurrents_ADCP_processing: For processing raw ADCP data in Python using the UHDAS pycurrents package · GitHub

 
 

Repository files navigation

pycurrents_ADCP_processing

For performing "level 0" (L0), "level 1" (L1), and "level 2" (L2) processing on raw moored ADCP data in Python using the UHDAS pycurrents package.

L0 processing does not include any processing. Raw ADCP data is combined with metadata from a csv file and exported in netCDF format.

L1 processing contains minimal processing. Raw ADCP data is also combined with metadata from a csv file and exported in netCDF format. The difference from L0 is that L1 processing comprises:

  • Corrections for magnetic declination
  • Calculation of sea surface height from pressure values and latitude
  • Rotation into enu coordinates if this is not already the coordinate system of the dataset
  • Flagging leading and trailing ensembles from before and after deployment and setting them to nan's
  • Flagging negative pressure values

L2 processing contains:

  • Flagging data in bins where calculated pressure is negative
  • Flagging data by backscatter increases in upward-facing ADCPs
  • Flagging data below the depth of the sea floor in downward-facing ADCPs
  • Calculation of pressure data from CTD pressure data from the same deployment (if the ADCP was missing a pressure sensor)

add_var2nc.py adds a geographic_area variable to a netCDF file from either the L0 or L1 process and exports a new netCDF file containing this addition.

ADCP IOS header file.py produces an IOS Shell header file for each netCDF file that makes the netCDF file searchable on the IOS Water Properties website (https://www.waterproperties.ca/).

Installation

  1. Before creating a virtual environment for the package, create a folder for the virtual environment and enter the folder in terminal, e.g. "adcp"
  2. Create a virtual environment called "adcp37" with Python version 3.7:
    conda create -n adcp37 python=3.7
  3. Activate the virtual environment:
    conda activate adcp37
  4. Add the conda-forge to your channel:
    conda config --add channels conda-forge
    conda config --set channel_priority strict
  5. Install required packages:
    conda install numpy scipy pip pandas netCDF4 xarray gsw matplotlib shapely
    pip install datetime
  6. Clone pycurrents with Mercurial:
    hg clone --verbose http://currents.soest.hawaii.edu/hg/pycurrents
  7. Install pycurrents:
    pip install -e ./pycurrents
  8. Clone this pycurrents_ADCP_processing repository with git:
    git clone https://github.com/hhourston/pycurrents_ADCP_processing.git
  9. cd to the pycurrents_ADCP_processing directory and run "setup.py":
    python setup.py install

Pre-requisites

  • Linux (or Unix-like) environment
  • Python 3.7

Usage

Sample usage of ADCP_processing_L1.py, ADCP_processing_L0.py, add_var2nc.py and ADCP_IOS_Header_file.py is laid out in create_nc.py. An example of how to create uniform time data (for replacing invalid time data in a raw ADCP file) can be found in generate_time_range.py. Sample usage of the plotting functions in plot_westcoast_nc_LX.py is given in the file example_plot_westcoast.py.

Credits

ADCP_pycurrents_L1.py is based off of the gist, RdiToNetcdf.ipynb, by Jody Klymak (https://github.com/jklymak), and includes contributions from Di Wan (https://github.com/onedwd) and Eric Firing (https://github.com/efiring). add_var2nc.py was written by Di Wan. ADCP_IOS_Header_file.py was written by Lu Guan (https://github.com/guanlu129).

Helpful links

A web app based off this package can be found on the IOS Data Management Apps (DM Apps) page at https://dmapps.waterproperties.ca/en/. Credits: Tom Roe.

Documentation:

Conventions:

About

For processing raw ADCP data in Python using the UHDAS pycurrents package

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL