.. _extract_netCDF: Extracting CODAS data to NetCDF files +++++++++++++++++++++++++++++++++++++++++ With CODAS Python programs and netCDF4 installed installed, CODAS data can be extracted with ``adcp_nc.py`` :: adcp_nc.py: Class for making shipboard adcp netcdf files: a short form for analysis, and a long form to approximately match the CODAS database. usage: adcp_nc.py dbpath outfilebase cruisetitle sonar Inputs: - dbpath: can be the entire path to the database, or just the processing directory (or 'adcpdb' directory) if there is only one database - outfilebase: (can include path) create netcdf file outfilebase.nc - cruisetitle: used as part of the netcdf metadata - sonar: eg 'os75bb', 'wh300', 'nb150' eg. cd os38nb adcp_nc.py adcpdb contour/os38nb km1001c_demo os38nb Test with this: adcp_ncdump.py contour/os38nb.nc This dumps every bin and every profile of the variables typically used:: - Decimal day (CODAS convention: zero-based decimal day) - Longitude - Latitude - Editing flags - Received signal strength - Depth - Ship heading - Zonal velocity component - Meridional velocity component - Ship zonal velocity component - Ship meridional velocity component - Percent good pings - ADCP transducer temperature .. The Python program ``adcp_nc.py`` is also capable of dumping the entire CODAS database.