Skip to content

Instantly share code, notes, and snippets.

@adyork
Last active October 20, 2022 15:57
Show Gist options
  • Save adyork/50a4f4552ffff23dacb4a67f8ec8dad8 to your computer and use it in GitHub Desktop.
Save adyork/50a4f4552ffff23dacb4a67f8ec8dad8 to your computer and use it in GitHub Desktop.
read_netcdf.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "read_netcdf.ipynb",
"provenance": [],
"collapsed_sections": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/adyork/50a4f4552ffff23dacb4a67f8ec8dad8/read_netcdf.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"# Read and Examine a netCDF file for parameter information\n",
"\n",
"Example notebook to look at contents of a netcdf file, get parameter list. With option to download a csv file with parameter information.\n",
"\n",
"Below you can change the \"url =\" to the netcdf file url you want to examine, and if using colab you can run all to get the info for that file.\n",
"\n",
"Or you can adapt this to provide the ncFile directly if you downloaded it already.\n",
"\n",
"Requirements: Parameter information in one or more fields (units, standard_name, long_name, comments).\n",
"\n",
"To get the csv file download of the parameter information make sure download_csv = True below.\n",
"\n",
"Example data from Ocean Observatories Initiative (thredds.dataexplorer.oceanobservatories.org). source: CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth"
],
"metadata": {
"id": "GmiqJE023sbc"
}
},
{
"cell_type": "code",
"source": [
"import netCDF4 as nc\n",
"import os\n",
"from urllib.parse import urlparse"
],
"metadata": {
"id": "MvYnx0rgvAQe"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "jkvlr-MCut2x",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "cc3b9847-11ee-4da0-8c2f-86b44cf0f136"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"0"
]
},
"metadata": {},
"execution_count": 2
}
],
"source": [
"# you can comment out this cell and provide the ncFile directly in the next cell\n",
"# if not using a url\n",
"\n",
"download_csv = True #if True will popup to download the parameter list for the file\n",
"\n",
"url = 'https://thredds.dataexplorer.oceanobservatories.org/thredds/fileServer/ooigoldcopy/public/CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth/deployment0014_CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth_20210403T120000-20211103T163000.nc'\n",
"\n",
"\n",
"a = urlparse(url)\n",
"#print(a.path) #url path (not storage location) \n",
"\n",
"ncFile = os.path.basename(a.path)\n",
"\n",
"#download netcdf file\n",
"# downloads in colab to /content/filename\n",
"os.system('wget '+url+' -O '+ncFile)"
]
},
{
"cell_type": "code",
"source": [
"#ncFile = 'ADCP_BB15.nc'\n",
"print('File: '+ncFile)"
],
"metadata": {
"id": "brgdcrUM6N6S",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "96c92686-f0a5-490f-ba84-99ca345ec33d"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"File: deployment0014_CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth_20210403T120000-20211103T163000.nc\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# get dataset from file\n",
"\n",
"dataset = nc.Dataset(ncFile)\n",
"#print header info\n",
"print(dataset)"
],
"metadata": {
"id": "UGfJSJdsy4is",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "ed33d82e-e726-4eed-c3ef-34a1e7192b52"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<class 'netCDF4._netCDF4.Dataset'>\n",
"root group (NETCDF4 data model, file format HDF5):\n",
" node: MFD35\n",
" comment: \n",
" publisher_email: \n",
" sourceUrl: http://oceanobservatories.org/\n",
" collection_method: recovered_inst\n",
" stream: adcp_velocity_earth\n",
" featureType: point\n",
" creator_email: \n",
" publisher_name: Ocean Observatories Initiative\n",
" date_modified: 2022-01-14T04:51:50.206660\n",
" keywords: \n",
" cdm_data_type: Point\n",
" references: More information can be found at http://oceanobservatories.org/\n",
" Metadata_Conventions: Unidata Dataset Discovery v1.0\n",
" date_created: 2022-01-14T04:51:50.206657\n",
" id: CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth\n",
" requestUUID: 07a51e20-adff-4120-897f-39cf299d2bdc\n",
" contributor_role: \n",
" summary: Dataset Generated by Stream Engine from Ocean Observatories Initiative\n",
" keywords_vocabulary: \n",
" institution: Ocean Observatories Initiative\n",
" naming_authority: org.oceanobservatories\n",
" feature_Type: point\n",
" infoUrl: http://oceanobservatories.org/\n",
" license: \n",
" contributor_name: \n",
" uuid: 07a51e20-adff-4120-897f-39cf299d2bdc\n",
" creator_name: Ocean Observatories Initiative\n",
" title: Data produced by Stream Engine version 1.19.2 for CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth\n",
" sensor: 01-ADCPTF000\n",
" standard_name_vocabulary: NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table 29\n",
" acknowledgement: \n",
" Conventions: CF-1.6\n",
" project: Ocean Observatories Initiative\n",
" source: CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth\n",
" publisher_url: http://oceanobservatories.org/\n",
" creator_url: http://oceanobservatories.org/\n",
" nodc_template_version: NODC_NetCDF_TimeSeries_Orthogonal_Template_v1.1\n",
" subsite: CP01CNSM\n",
" processing_level: L2\n",
" history: 2022-01-14T04:51:50.206621 generated from Stream Engine\n",
" Manufacturer: Teledyne RDI\n",
" ModelNumber: WHS150-1500\n",
" SerialNumber: 20530\n",
" Description: ADCP Velocity Profiler (short range): ADCPT Series F\n",
" FirmwareVersion: Not specified.\n",
" SoftwareVersion: Not specified.\n",
" AssetUniqueID: CGINS-ADCPTF-20530\n",
" Notes: Not specified.\n",
" Owner: Not specified.\n",
" RemoteResources: []\n",
" ShelfLifeExpirationDate: Not specified.\n",
" Mobile: False\n",
" AssetManagementRecordLastModified: 2022-01-07T18:08:58.112000\n",
" time_coverage_start: 2021-04-03T12:00:00\n",
" time_coverage_end: 2021-11-03T16:30:00\n",
" time_coverage_resolution: P1801.58S\n",
" geospatial_lat_min: 40.132833\n",
" geospatial_lat_max: 40.132833\n",
" geospatial_lat_units: degrees_north\n",
" geospatial_lat_resolution: 0.1\n",
" geospatial_lon_min: -70.778\n",
" geospatial_lon_max: -70.778\n",
" geospatial_lon_units: degrees_east\n",
" geospatial_lon_resolution: 0.1\n",
" geospatial_vertical_units: meters\n",
" geospatial_vertical_resolution: 0.1\n",
" geospatial_vertical_positive: down\n",
" lat: 40.132833\n",
" lon: -70.778\n",
" dimensions(sizes): obs(10272), bin(36), string36(36), string18(18)\n",
" variables(dimensions): int32 obs(obs), float64 corrected_echo_intensity_beam4(obs, bin), uint8 num_cells(obs), uint16 ensemble_number(obs), uint16 transducer_depth(obs), float64 corrected_echo_intensity_beam3(obs, bin), float64 corrected_echo_intensity_beam2(obs, bin), int16 pitch(obs), uint8 percent_bad_beams(obs, bin), uint8 percent_transforms_reject(obs, bin), float64 error_seawater_velocity(obs, bin), uint16 cell_length(obs), float64 corrected_echo_intensity_beam1(obs, bin), uint8 percent_good_4beam(obs, bin), uint8 temperature_qc_executed(obs), int16 water_velocity_north(obs, bin), float64 driver_timestamp(obs), |S1 id(obs, string36), float64 depth(obs), int16 temperature(obs), |S1 provenance(obs, string36), uint8 percent_good_3beam(obs, bin), float64 eastward_seawater_velocity(obs, bin), uint16 heading(obs), uint8 temperature_qc_results(obs), int16 water_velocity_up(obs, bin), float64 internal_timestamp(obs), float64 ctdbp_cdef_dcl_instrument_recovered-depth(obs), int16 water_velocity_east(obs, bin), int8 sysconfig_vertical_orientation(obs), int16 roll(obs), int32 bin(bin), float64 bin_depths(obs, bin), float64 non_zero_pressure(obs), float64 ingestion_timestamp(obs), float64 port_timestamp(obs), float64 time(obs), uint32 pressure(obs), float64 non_zero_depth(obs), int32 deployment(obs), uint16 bin_1_distance(obs), float64 upward_seawater_velocity(obs, bin), |S1 preferred_timestamp(obs, string18), float64 int_ctd_pressure(obs), float64 northward_seawater_velocity(obs, bin), int16 error_velocity(obs, bin), uint8 echo_intensity_beam2(obs, bin), float64 depth_from_pressure(obs), uint16 salinity(obs), uint8 correlation_magnitude_beam4(obs, bin), uint8 correlation_magnitude_beam2(obs, bin), uint8 correlation_magnitude_beam3(obs, bin), uint8 correlation_magnitude_beam1(obs, bin), uint8 echo_intensity_beam4(obs, bin), uint8 echo_intensity_beam3(obs, bin), uint8 echo_intensity_beam1(obs, bin)\n",
" groups: \n"
]
}
]
},
{
"cell_type": "code",
"source": [
"#adapted from http://schubert.atmos.colostate.edu/~cslocum/netcdf_example.html (Author: Chris Slocum)\n",
"\n",
"import datetime as dt # Python standard library datetime module\n",
"import numpy as np\n",
"from netCDF4 import Dataset # http://code.google.com/p/netcdf4-python/\n",
"\n",
"def ncdump(nc_fid, verb=True):\n",
" '''\n",
" ncdump outputs dimensions, variables and their attribute information.\n",
" The information is similar to that of NCAR's ncdump utility.\n",
" ncdump requires a valid instance of Dataset.\n",
"\n",
" Parameters\n",
" ----------\n",
" nc_fid : netCDF4.Dataset\n",
" A netCDF4 dateset object\n",
" verb : Boolean\n",
" whether or not nc_attrs, nc_dims, and nc_vars are printed\n",
"\n",
" Returns\n",
" -------\n",
" nc_attrs : list\n",
" A Python list of the NetCDF file global attributes\n",
" nc_dims : list\n",
" A Python list of the NetCDF file dimensions\n",
" nc_vars : list\n",
" A Python list of the NetCDF file variables\n",
" '''\n",
" def print_ncattr(key):\n",
" \"\"\"\n",
" Prints the NetCDF file attributes for a given key\n",
"\n",
" Parameters\n",
" ----------\n",
" key : unicode\n",
" a valid netCDF4.Dataset.variables key\n",
" \"\"\"\n",
" try:\n",
" print(\"\\t\\ttype:\", repr(nc_fid.variables[key].dtype))\n",
" for ncattr in nc_fid.variables[key].ncattrs():\n",
" print('\\t\\t%s:' % ncattr,\\\n",
" repr(nc_fid.variables[key].getncattr(ncattr)))\n",
" except KeyError:\n",
" print(\"\\t\\tWARNING: %s does not contain variable attributes\" % key)\n",
"\n",
" # NetCDF global attributes\n",
" nc_attrs = nc_fid.ncattrs()\n",
" if verb:\n",
" print(\"NetCDF Global Attributes:\")\n",
" for nc_attr in nc_attrs:\n",
" print('\\t%s:' % nc_attr, repr(nc_fid.getncattr(nc_attr)))\n",
" nc_dims = [dim for dim in nc_fid.dimensions] # list of nc dimensions\n",
" # Dimension shape information.\n",
" if verb:\n",
" print(\"NetCDF dimension information:\")\n",
" for dim in nc_dims:\n",
" print(\"\\tName:\", dim )\n",
" print(\"\\t\\tsize:\", len(nc_fid.dimensions[dim]))\n",
" print_ncattr(dim)\n",
" # Variable information.\n",
" nc_vars = [var for var in nc_fid.variables] # list of nc variables\n",
" if verb:\n",
" print(\"NetCDF variable information:\")\n",
" for var in nc_vars:\n",
" if var not in nc_dims:\n",
" print('\\tName:', var)\n",
" print(\"\\t\\tdimensions:\", nc_fid.variables[var].dimensions)\n",
" print(\"\\t\\tsize:\", nc_fid.variables[var].size)\n",
" print_ncattr(var)\n",
" return nc_attrs, nc_dims, nc_vars\n"
],
"metadata": {
"id": "-MA7pnbe2YfL"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"nc_fid = Dataset(ncFile, 'r') # Dataset is the class behavior to open the file\n",
" # and create an instance of the ncCDF4 class\n",
"#get param info \n",
"nc_attrs, nc_dims, nc_vars = ncdump(nc_fid)\n"
],
"metadata": {
"id": "bT5zEtVk2yoj",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "8e4f7263-5aa8-495e-e7fe-a145e0e6909c"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"NetCDF Global Attributes:\n",
"\tnode: 'MFD35'\n",
"\tcomment: ''\n",
"\tpublisher_email: ''\n",
"\tsourceUrl: 'http://oceanobservatories.org/'\n",
"\tcollection_method: 'recovered_inst'\n",
"\tstream: 'adcp_velocity_earth'\n",
"\tfeatureType: 'point'\n",
"\tcreator_email: ''\n",
"\tpublisher_name: 'Ocean Observatories Initiative'\n",
"\tdate_modified: '2022-01-14T04:51:50.206660'\n",
"\tkeywords: ''\n",
"\tcdm_data_type: 'Point'\n",
"\treferences: 'More information can be found at http://oceanobservatories.org/'\n",
"\tMetadata_Conventions: 'Unidata Dataset Discovery v1.0'\n",
"\tdate_created: '2022-01-14T04:51:50.206657'\n",
"\tid: 'CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth'\n",
"\trequestUUID: '07a51e20-adff-4120-897f-39cf299d2bdc'\n",
"\tcontributor_role: ''\n",
"\tsummary: 'Dataset Generated by Stream Engine from Ocean Observatories Initiative'\n",
"\tkeywords_vocabulary: ''\n",
"\tinstitution: 'Ocean Observatories Initiative'\n",
"\tnaming_authority: 'org.oceanobservatories'\n",
"\tfeature_Type: 'point'\n",
"\tinfoUrl: 'http://oceanobservatories.org/'\n",
"\tlicense: ''\n",
"\tcontributor_name: ''\n",
"\tuuid: '07a51e20-adff-4120-897f-39cf299d2bdc'\n",
"\tcreator_name: 'Ocean Observatories Initiative'\n",
"\ttitle: 'Data produced by Stream Engine version 1.19.2 for CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth'\n",
"\tsensor: '01-ADCPTF000'\n",
"\tstandard_name_vocabulary: 'NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table 29'\n",
"\tacknowledgement: ''\n",
"\tConventions: 'CF-1.6'\n",
"\tproject: 'Ocean Observatories Initiative'\n",
"\tsource: 'CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth'\n",
"\tpublisher_url: 'http://oceanobservatories.org/'\n",
"\tcreator_url: 'http://oceanobservatories.org/'\n",
"\tnodc_template_version: 'NODC_NetCDF_TimeSeries_Orthogonal_Template_v1.1'\n",
"\tsubsite: 'CP01CNSM'\n",
"\tprocessing_level: 'L2'\n",
"\thistory: '2022-01-14T04:51:50.206621 generated from Stream Engine'\n",
"\tManufacturer: 'Teledyne RDI'\n",
"\tModelNumber: 'WHS150-1500'\n",
"\tSerialNumber: '20530'\n",
"\tDescription: 'ADCP Velocity Profiler (short range): ADCPT Series F'\n",
"\tFirmwareVersion: 'Not specified.'\n",
"\tSoftwareVersion: 'Not specified.'\n",
"\tAssetUniqueID: 'CGINS-ADCPTF-20530'\n",
"\tNotes: 'Not specified.'\n",
"\tOwner: 'Not specified.'\n",
"\tRemoteResources: '[]'\n",
"\tShelfLifeExpirationDate: 'Not specified.'\n",
"\tMobile: 'False'\n",
"\tAssetManagementRecordLastModified: '2022-01-07T18:08:58.112000'\n",
"\ttime_coverage_start: '2021-04-03T12:00:00'\n",
"\ttime_coverage_end: '2021-11-03T16:30:00'\n",
"\ttime_coverage_resolution: 'P1801.58S'\n",
"\tgeospatial_lat_min: 40.132833\n",
"\tgeospatial_lat_max: 40.132833\n",
"\tgeospatial_lat_units: 'degrees_north'\n",
"\tgeospatial_lat_resolution: 0.1\n",
"\tgeospatial_lon_min: -70.778\n",
"\tgeospatial_lon_max: -70.778\n",
"\tgeospatial_lon_units: 'degrees_east'\n",
"\tgeospatial_lon_resolution: 0.1\n",
"\tgeospatial_vertical_units: 'meters'\n",
"\tgeospatial_vertical_resolution: 0.1\n",
"\tgeospatial_vertical_positive: 'down'\n",
"\tlat: 40.132833\n",
"\tlon: -70.778\n",
"NetCDF dimension information:\n",
"\tName: obs\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('int32')\n",
"\tName: bin\n",
"\t\tsize: 36\n",
"\t\ttype: dtype('int32')\n",
"\tName: string36\n",
"\t\tsize: 36\n",
"\t\tWARNING: string36 does not contain variable attributes\n",
"\tName: string18\n",
"\t\tsize: 18\n",
"\t\tWARNING: string18 does not contain variable attributes\n",
"NetCDF variable information:\n",
"\tName: corrected_echo_intensity_beam4\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.'\n",
"\t\tlong_name: 'Echo Intensity Beam 4'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B4_L1'\n",
"\t\tunits: 'dB'\n",
"\t\tancillary_variables: 'echo_intensity_beam4'\n",
"\tName: num_cells\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Contains the number of cells over which the ADCP collects data'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Number Cells'\n",
"\t\tunits: '1'\n",
"\tName: ensemble_number\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint16')\n",
"\t\t_FillValue: 65535\n",
"\t\tcomment: 'Sequential number of the ensemble to which the data applies'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Ensemble Number'\n",
"\t\tunits: '1'\n",
"\tName: transducer_depth\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint16')\n",
"\t\t_FillValue: 65535\n",
"\t\tcomment: 'Contains either the manual or measured depth of transducer below the water surface.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Transducer Depth'\n",
"\t\tunits: 'dm'\n",
"\tName: corrected_echo_intensity_beam3\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.'\n",
"\t\tlong_name: 'Echo Intensity Beam 3'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B3_L1'\n",
"\t\tunits: 'dB'\n",
"\t\tancillary_variables: 'echo_intensity_beam3'\n",
"\tName: corrected_echo_intensity_beam2\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.'\n",
"\t\tlong_name: 'Echo Intensity Beam 2'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B2_L1'\n",
"\t\tunits: 'dB'\n",
"\t\tancillary_variables: 'echo_intensity_beam2'\n",
"\tName: pitch\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -9999\n",
"\t\tcomment: 'Contains either the manual or measured pitch of the ADCP.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Pitch'\n",
"\t\tunits: 'deci-degrees'\n",
"\tName: percent_bad_beams\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 255\n",
"\t\tcomment: 'Percentage of velocity data rejected because not enough beams had good data.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Percent Bad Beams'\n",
"\t\tunits: 'percent'\n",
"\tName: percent_transforms_reject\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 255\n",
"\t\tcomment: 'Percentage of transformations rejected (error velocity that was higher than the WE-command setting)'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Percent Transforms Reject'\n",
"\t\tunits: 'percent'\n",
"\tName: error_seawater_velocity\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Error sea water velocity component.'\n",
"\t\tlong_name: 'Error Velocity'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-EVL_L1'\n",
"\t\tunits: 'm s-1'\n",
"\t\tancillary_variables: 'error_velocity'\n",
"\tName: cell_length\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint16')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Contains the depth of one cell length'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Cell Length'\n",
"\t\tunits: 'cm'\n",
"\tName: corrected_echo_intensity_beam1\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.'\n",
"\t\tlong_name: 'Echo Intensity Beam 1'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B1_L1'\n",
"\t\tunits: 'dB'\n",
"\t\tancillary_variables: 'echo_intensity_beam1'\n",
"\tName: percent_good_4beam\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 255\n",
"\t\tcomment: 'Percentage of velocity data collected during ensemble that were calculated with all 4 beams'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Percent Good 4Beam'\n",
"\t\tunits: 'percent'\n",
"\tName: temperature_qc_executed\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint8')\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\tName: water_velocity_north\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -32768\n",
"\t\tcomment: 'A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the northward seawater velocity component.'\n",
"\t\tlong_name: 'Northward Seawater Velocity'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-VLN_L0'\n",
"\t\tstandard_name: 'northward_sea_water_velocity'\n",
"\t\tunits: 'mm s-1'\n",
"\tName: driver_timestamp\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Driver timestamp, UTC'\n",
"\t\tunits: 'seconds since 1900-01-01'\n",
"\t\tlong_name: 'Driver Timestamp, UTC'\n",
"\tName: id\n",
"\t\tdimensions: ('obs', 'string36')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('S1')\n",
"\t\tname: 'id'\n",
"\tName: depth\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Depth (m) calculated from pressure (daPa) and latitude.'\n",
"\t\tprecision: 3\n",
"\t\tlong_name: 'Depth calculated from pressure'\n",
"\t\tunits: 'm'\n",
"\t\tancillary_variables: 'pressure'\n",
"\t\taxis: 'Z'\n",
"\tName: temperature\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -9999\n",
"\t\tcomment: 'Contains either the manual or measured temperature at the transducer face.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Transducer Temperature'\n",
"\t\tunits: 'cdeg_C'\n",
"\tName: provenance\n",
"\t\tdimensions: ('obs', 'string36')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('S1')\n",
"\t\tname: 'provenance'\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\tName: percent_good_3beam\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 255\n",
"\t\tcomment: 'Percentage of good 3-beam solutions (successful velocity calculations using 3-beams). VELPROF-PCG'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Percent Good 3Beam'\n",
"\t\tunits: 'percent'\n",
"\tName: eastward_seawater_velocity\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Eastward sea water velocity component in Earth coordinates with the magnetic variation accounted for.'\n",
"\t\tlong_name: 'Eastward Sea Water Velocity'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-VLE_L1'\n",
"\t\tstandard_name: 'eastward_sea_water_velocity'\n",
"\t\tunits: 'm s-1'\n",
"\t\tancillary_variables: 'water_velocity_east water_velocity_north time'\n",
"\tName: heading\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint16')\n",
"\t\t_FillValue: 65535\n",
"\t\tcomment: 'Contains either the manual or measured heading of the ADCP.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Heading'\n",
"\t\tunits: 'deci-degrees'\n",
"\tName: temperature_qc_results\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint8')\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\tName: water_velocity_up\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -32768\n",
"\t\tcomment: 'A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the upward seawater velocity component.'\n",
"\t\tlong_name: 'Upward Seawater Velocity'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-VLU_L0'\n",
"\t\tstandard_name: 'upward_sea_water_velocity'\n",
"\t\tunits: 'mm s-1'\n",
"\tName: internal_timestamp\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Internal timestamp, UTC'\n",
"\t\tunits: 'seconds since 1900-01-01'\n",
"\t\tlong_name: 'Internal Timestamp, UTC'\n",
"\tName: ctdbp_cdef_dcl_instrument_recovered-depth\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: nan\n",
"\t\tcomment: 'Depth (m) calculated from pressure (dbar) and latitude.'\n",
"\t\tlong_name: 'Depth calculated from pressure'\n",
"\t\tunits: 'm'\n",
"\t\tprecision: 3\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tinstrument: 'CP01CNSM-MFD37-03-CTDBPD000'\n",
"\t\tstream: 'ctdbp_cdef_dcl_instrument_recovered'\n",
"\tName: water_velocity_east\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -32768\n",
"\t\tcomment: 'A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the eastward seawater velocity component.'\n",
"\t\tlong_name: 'Eastward Seawater Velocity'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-VLE_L0'\n",
"\t\tstandard_name: 'eastward_sea_water_velocity'\n",
"\t\tunits: 'mm s-1'\n",
"\tName: sysconfig_vertical_orientation\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('int8')\n",
"\t\t_FillValue: -99\n",
"\t\tcomment: 'Whether vertical orientation is upward or downward'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Sysconfig Vertical Orientation'\n",
"\t\tunits: '1'\n",
"\tName: roll\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -9999\n",
"\t\tcomment: 'Contains either the manual or measured roll of the ADCP.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Roll'\n",
"\t\tunits: 'deci-degrees'\n",
"\tName: bin_depths\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Bin Depths'\n",
"\t\tlong_name: 'Bin Depths'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: '?'\n",
"\t\tunits: 'm'\n",
"\t\tancillary_variables: 'non_zero_depth cell_length bin_1_distance num_cells sysconfig_vertical_orientation'\n",
"\tName: non_zero_pressure\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'A non-zero pressure value.'\n",
"\t\tprecision: 3\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Non-zero Pressure'\n",
"\t\tunits: 'dbar'\n",
"\t\tancillary_variables: 'pressure pressure'\n",
"\tName: ingestion_timestamp\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999.0\n",
"\t\tcomment: 'The NTP Timestamp for when the granule was ingested'\n",
"\t\tunits: 'seconds since 1900-01-01'\n",
"\t\tlong_name: 'Ingestion Timestamp, UTC'\n",
"\tName: port_timestamp\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Port timestamp, UTC'\n",
"\t\tunits: 'seconds since 1900-01-01'\n",
"\t\tlong_name: 'Port Timestamp, UTC'\n",
"\tName: time\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tlong_name: 'time'\n",
"\t\tstandard_name: 'time'\n",
"\t\tunits: 'seconds since 1900-01-01 0:0:0'\n",
"\t\tcalendar: 'gregorian'\n",
"\t\taxis: 'T'\n",
"\tName: pressure\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint32')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'ADCP pressure sensor value measured in decaPascals'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Pressure'\n",
"\t\tunits: 'daPa'\n",
"\tName: non_zero_depth\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'A non-zero depth value.'\n",
"\t\tprecision: 3\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Non-zero Depth'\n",
"\t\tunits: 'm'\n",
"\t\tancillary_variables: 'depth_from_pressure'\n",
"\tName: deployment\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('int32')\n",
"\t\tname: 'deployment'\n",
"\tName: bin_1_distance\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint16')\n",
"\t\t_FillValue: 65535\n",
"\t\tcomment: 'Distance to middle of first depth cell (bin 1).'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Bin 1 Distance'\n",
"\t\tunits: 'cm'\n",
"\tName: upward_seawater_velocity\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Upward sea water velocity component in Earth coordinates.'\n",
"\t\tlong_name: 'Upward Sea Water Velocity'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-VLU_L1'\n",
"\t\tstandard_name: 'upward_sea_water_velocity'\n",
"\t\tunits: 'm s-1'\n",
"\t\tancillary_variables: 'water_velocity_up'\n",
"\tName: preferred_timestamp\n",
"\t\tdimensions: ('obs', 'string18')\n",
"\t\tsize: 184896\n",
"\t\ttype: dtype('S1')\n",
"\t\t_FillValue: b'e'\n",
"\t\tcomment: 'Timestamp preferred as official record.'\n",
"\t\tunits: '1'\n",
"\t\tlong_name: 'Preferred Timestamp'\n",
"\tName: int_ctd_pressure\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: nan\n",
"\t\tcomment: 'Seawater Pressure refers to the pressure exerted on a sensor in situ by the weight of the column of seawater above it. It is calculated by subtracting one standard atmosphere from the absolute pressure at the sensor to remove the weight of the atmosphere on top of the water column. The pressure at a sensor in situ provides a metric of the depth of that sensor.'\n",
"\t\tdata_product_identifier: 'PRESWAT_L1'\n",
"\t\tprecision: 3\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Seawater Pressure'\n",
"\t\tstandard_name: 'sea_water_pressure'\n",
"\t\tunits: 'dbar'\n",
"\tName: northward_seawater_velocity\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Northward sea water velocity component in Earth coordinates with the magnetic variation accounted for.'\n",
"\t\tlong_name: 'Northward Sea Water Velocity'\n",
"\t\tprecision: 4\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-VLN_L1'\n",
"\t\tstandard_name: 'northward_sea_water_velocity'\n",
"\t\tunits: 'm s-1'\n",
"\t\tancillary_variables: 'water_velocity_east water_velocity_north time'\n",
"\tName: error_velocity\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('int16')\n",
"\t\t_FillValue: -32768\n",
"\t\tcomment: 'A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the error seawater velocity component.'\n",
"\t\tlong_name: 'Error Seawater Velocity'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'VELPROF-EVL_L0'\n",
"\t\tunits: 'mm s-1'\n",
"\tName: echo_intensity_beam2\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.'\n",
"\t\tlong_name: 'Echo Intensity Beam 2 Measurement'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B2_L0'\n",
"\t\tunits: 'counts'\n",
"\tName: depth_from_pressure\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('float64')\n",
"\t\t_FillValue: -9999999.0\n",
"\t\tcomment: 'Depth (m) calculated from pressure (dbar) and latitude.'\n",
"\t\tprecision: 3\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Depth calculated from pressure'\n",
"\t\tunits: 'm'\n",
"\t\tancillary_variables: 'non_zero_pressure'\n",
"\tName: salinity\n",
"\t\tdimensions: ('obs',)\n",
"\t\tsize: 10272\n",
"\t\ttype: dtype('uint16')\n",
"\t\t_FillValue: 65535\n",
"\t\tcomment: 'Contains either the manual or measured (calculated from external conductivity sensor) salinity at the transducer face.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Transducer Salinity'\n",
"\t\tunits: '1'\n",
"\tName: correlation_magnitude_beam4\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Correlation Magnitude Beam4'\n",
"\t\tunits: '1'\n",
"\tName: correlation_magnitude_beam2\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Correlation Magnitude Beam2'\n",
"\t\tunits: '1'\n",
"\tName: correlation_magnitude_beam3\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Correlation Magnitude Beam3'\n",
"\t\tunits: '1'\n",
"\tName: correlation_magnitude_beam1\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tlong_name: 'Correlation Magnitude Beam1'\n",
"\t\tunits: '1'\n",
"\tName: echo_intensity_beam4\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.'\n",
"\t\tlong_name: 'Echo Intensity Beam 4 Measurement'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B4_L0'\n",
"\t\tunits: 'counts'\n",
"\tName: echo_intensity_beam3\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.'\n",
"\t\tlong_name: 'Echo Intensity Beam 3 Measurement'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B3_L0'\n",
"\t\tunits: 'counts'\n",
"\tName: echo_intensity_beam1\n",
"\t\tdimensions: ('obs', 'bin')\n",
"\t\tsize: 369792\n",
"\t\ttype: dtype('uint8')\n",
"\t\t_FillValue: 0\n",
"\t\tcomment: 'Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.'\n",
"\t\tlong_name: 'Echo Intensity Beam 1 Measurement'\n",
"\t\tprecision: 0\n",
"\t\tcoordinates: 'time lat lon depth'\n",
"\t\tdata_product_identifier: 'ECHOINT-B1_L0'\n",
"\t\tunits: 'counts'\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"if download_csv:\n",
" import csv,re\n",
" from google.colab import files\n",
"\n",
" param_filename = re.sub('\\.','_',ncFile)+'_params.csv'\n",
" print(\"Writing parameter info to file: \"+param_filename+'...\\n')\n",
" \n",
" #nc_dims = [dim for dim in nc_fid.dimensions]\n",
" nc_vars = [var for var in nc_fid.variables]\n",
" csv_lines = list(['param_name,param_description,units'])\n",
" \n",
" for var in nc_vars:\n",
" #print(var)\n",
" descrip = list() #will be filled with long_name and comment if exist else var name\n",
" unit = ''\n",
" #nc_fid.variables[var].dtype\n",
" if var in nc_fid.variables:\n",
" if 'units' in nc_fid.variables[var].ncattrs():\n",
" unit = nc_fid.variables[var].getncattr('units')\n",
" if 'standard_name' in nc_fid.variables[var].ncattrs():\n",
" descrip.append(\"standard_name:\"+nc_fid.variables[var].getncattr('standard_name')) \n",
" if 'long_name' in nc_fid.variables[var].ncattrs():\n",
" descrip.append(nc_fid.variables[var].getncattr('long_name'))\n",
" if 'comment' in nc_fid.variables[var].ncattrs():\n",
" descrip.append(nc_fid.variables[var].getncattr('comment'))\n",
"\n",
" descrip = '; '.join(descrip)\n",
"\n",
" if len(descrip) == 0:\n",
" descrip = var #use name if no description\n",
" \n",
" csv_line = var+',\"'+descrip+'\",\"'+unit+'\"'\n",
" csv_lines.append(csv_line)\n",
" \n",
" print('\\n'.join(csv_lines))\n",
"\n",
" file1 = open(param_filename, 'w')\n",
" file1.write('\\n'.join(csv_lines))\n",
" file1.close()\n",
"\n",
" files.download(param_filename)"
],
"metadata": {
"id": "pRg_rBmID9Sf",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"outputId": "3c0a41cc-2d95-4d40-b6ff-f533c13f64fe"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Writing parameter info to file: deployment0014_CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth_20210403T120000-20211103T163000_nc_params.csv...\n",
"\n",
"param_name,param_description,units\n",
"obs,\"obs\",\"\"\n",
"corrected_echo_intensity_beam4,\"Echo Intensity Beam 4; Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.\",\"dB\"\n",
"num_cells,\"Number Cells; Contains the number of cells over which the ADCP collects data\",\"1\"\n",
"ensemble_number,\"Ensemble Number; Sequential number of the ensemble to which the data applies\",\"1\"\n",
"transducer_depth,\"Transducer Depth; Contains either the manual or measured depth of transducer below the water surface.\",\"dm\"\n",
"corrected_echo_intensity_beam3,\"Echo Intensity Beam 3; Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.\",\"dB\"\n",
"corrected_echo_intensity_beam2,\"Echo Intensity Beam 2; Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.\",\"dB\"\n",
"pitch,\"Pitch; Contains either the manual or measured pitch of the ADCP.\",\"deci-degrees\"\n",
"percent_bad_beams,\"Percent Bad Beams; Percentage of velocity data rejected because not enough beams had good data.\",\"percent\"\n",
"percent_transforms_reject,\"Percent Transforms Reject; Percentage of transformations rejected (error velocity that was higher than the WE-command setting)\",\"percent\"\n",
"error_seawater_velocity,\"Error Velocity; Error sea water velocity component.\",\"m s-1\"\n",
"cell_length,\"Cell Length; Contains the depth of one cell length\",\"cm\"\n",
"corrected_echo_intensity_beam1,\"Echo Intensity Beam 1; Echo intensity is the strength of the returned sound wave pulse transmitted by the ADCP. Echo intensity can be used as an indicator of the amount of sediment or organisms in the water column, as well as of the quality of a velocity measurement.\",\"dB\"\n",
"percent_good_4beam,\"Percent Good 4Beam; Percentage of velocity data collected during ensemble that were calculated with all 4 beams\",\"percent\"\n",
"temperature_qc_executed,\"temperature_qc_executed\",\"\"\n",
"water_velocity_north,\"standard_name:northward_sea_water_velocity; Northward Seawater Velocity; A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the northward seawater velocity component.\",\"mm s-1\"\n",
"driver_timestamp,\"Driver Timestamp, UTC; Driver timestamp, UTC\",\"seconds since 1900-01-01\"\n",
"id,\"id\",\"\"\n",
"depth,\"Depth calculated from pressure; Depth (m) calculated from pressure (daPa) and latitude.\",\"m\"\n",
"temperature,\"Transducer Temperature; Contains either the manual or measured temperature at the transducer face.\",\"cdeg_C\"\n",
"provenance,\"provenance\",\"\"\n",
"percent_good_3beam,\"Percent Good 3Beam; Percentage of good 3-beam solutions (successful velocity calculations using 3-beams). VELPROF-PCG\",\"percent\"\n",
"eastward_seawater_velocity,\"standard_name:eastward_sea_water_velocity; Eastward Sea Water Velocity; Eastward sea water velocity component in Earth coordinates with the magnetic variation accounted for.\",\"m s-1\"\n",
"heading,\"Heading; Contains either the manual or measured heading of the ADCP.\",\"deci-degrees\"\n",
"temperature_qc_results,\"temperature_qc_results\",\"\"\n",
"water_velocity_up,\"standard_name:upward_sea_water_velocity; Upward Seawater Velocity; A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the upward seawater velocity component.\",\"mm s-1\"\n",
"internal_timestamp,\"Internal Timestamp, UTC; Internal timestamp, UTC\",\"seconds since 1900-01-01\"\n",
"ctdbp_cdef_dcl_instrument_recovered-depth,\"Depth calculated from pressure; Depth (m) calculated from pressure (dbar) and latitude.\",\"m\"\n",
"water_velocity_east,\"standard_name:eastward_sea_water_velocity; Eastward Seawater Velocity; A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the eastward seawater velocity component.\",\"mm s-1\"\n",
"sysconfig_vertical_orientation,\"Sysconfig Vertical Orientation; Whether vertical orientation is upward or downward\",\"1\"\n",
"roll,\"Roll; Contains either the manual or measured roll of the ADCP.\",\"deci-degrees\"\n",
"bin,\"bin\",\"\"\n",
"bin_depths,\"Bin Depths; Bin Depths\",\"m\"\n",
"non_zero_pressure,\"Non-zero Pressure; A non-zero pressure value.\",\"dbar\"\n",
"ingestion_timestamp,\"Ingestion Timestamp, UTC; The NTP Timestamp for when the granule was ingested\",\"seconds since 1900-01-01\"\n",
"port_timestamp,\"Port Timestamp, UTC; Port timestamp, UTC\",\"seconds since 1900-01-01\"\n",
"time,\"standard_name:time; time\",\"seconds since 1900-01-01 0:0:0\"\n",
"pressure,\"Pressure; ADCP pressure sensor value measured in decaPascals\",\"daPa\"\n",
"non_zero_depth,\"Non-zero Depth; A non-zero depth value.\",\"m\"\n",
"deployment,\"deployment\",\"\"\n",
"bin_1_distance,\"Bin 1 Distance; Distance to middle of first depth cell (bin 1).\",\"cm\"\n",
"upward_seawater_velocity,\"standard_name:upward_sea_water_velocity; Upward Sea Water Velocity; Upward sea water velocity component in Earth coordinates.\",\"m s-1\"\n",
"preferred_timestamp,\"Preferred Timestamp; Timestamp preferred as official record.\",\"1\"\n",
"int_ctd_pressure,\"standard_name:sea_water_pressure; Seawater Pressure; Seawater Pressure refers to the pressure exerted on a sensor in situ by the weight of the column of seawater above it. It is calculated by subtracting one standard atmosphere from the absolute pressure at the sensor to remove the weight of the atmosphere on top of the water column. The pressure at a sensor in situ provides a metric of the depth of that sensor.\",\"dbar\"\n",
"northward_seawater_velocity,\"standard_name:northward_sea_water_velocity; Northward Sea Water Velocity; Northward sea water velocity component in Earth coordinates with the magnetic variation accounted for.\",\"m s-1\"\n",
"error_velocity,\"Error Seawater Velocity; A Velocity Profile includes water velocity (speed & direction) throughout the depth range of an ADCP sensor. This instance is the error seawater velocity component.\",\"mm s-1\"\n",
"echo_intensity_beam2,\"Echo Intensity Beam 2 Measurement; Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.\",\"counts\"\n",
"depth_from_pressure,\"Depth calculated from pressure; Depth (m) calculated from pressure (dbar) and latitude.\",\"m\"\n",
"salinity,\"Transducer Salinity; Contains either the manual or measured (calculated from external conductivity sensor) salinity at the transducer face.\",\"1\"\n",
"correlation_magnitude_beam4,\"Correlation Magnitude Beam4; Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.\",\"1\"\n",
"correlation_magnitude_beam2,\"Correlation Magnitude Beam2; Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.\",\"1\"\n",
"correlation_magnitude_beam3,\"Correlation Magnitude Beam3; Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.\",\"1\"\n",
"correlation_magnitude_beam1,\"Correlation Magnitude Beam1; Magnitude of the normalized echo auto-correlation at the lag used for estimating the Doppler phase change. 0 represents bad correlation and 255 represents perfect correlation.\",\"1\"\n",
"echo_intensity_beam4,\"Echo Intensity Beam 4 Measurement; Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.\",\"counts\"\n",
"echo_intensity_beam3,\"Echo Intensity Beam 3 Measurement; Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.\",\"counts\"\n",
"echo_intensity_beam1,\"Echo Intensity Beam 1 Measurement; Echo Intensity Measurement is the accoustic return signal that is output directly from the ADCP. This is used to calculate the echo intensity data product.\",\"counts\"\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.Javascript object>"
],
"application/javascript": [
"\n",
" async function download(id, filename, size) {\n",
" if (!google.colab.kernel.accessAllowed) {\n",
" return;\n",
" }\n",
" const div = document.createElement('div');\n",
" const label = document.createElement('label');\n",
" label.textContent = `Downloading \"${filename}\": `;\n",
" div.appendChild(label);\n",
" const progress = document.createElement('progress');\n",
" progress.max = size;\n",
" div.appendChild(progress);\n",
" document.body.appendChild(div);\n",
"\n",
" const buffers = [];\n",
" let downloaded = 0;\n",
"\n",
" const channel = await google.colab.kernel.comms.open(id);\n",
" // Send a message to notify the kernel that we're ready.\n",
" channel.send({})\n",
"\n",
" for await (const message of channel.messages) {\n",
" // Send a message to notify the kernel that we're ready.\n",
" channel.send({})\n",
" if (message.buffers) {\n",
" for (const buffer of message.buffers) {\n",
" buffers.push(buffer);\n",
" downloaded += buffer.byteLength;\n",
" progress.value = downloaded;\n",
" }\n",
" }\n",
" }\n",
" const blob = new Blob(buffers, {type: 'application/binary'});\n",
" const a = document.createElement('a');\n",
" a.href = window.URL.createObjectURL(blob);\n",
" a.download = filename;\n",
" div.appendChild(a);\n",
" a.click();\n",
" div.remove();\n",
" }\n",
" "
]
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.Javascript object>"
],
"application/javascript": [
"download(\"download_dd9de985-a4aa-46b7-8e05-edd610ecfb4a\", \"deployment0014_CP01CNSM-MFD35-01-ADCPTF000-recovered_inst-adcp_velocity_earth_20210403T120000-20211103T163000_nc_params.csv\", 8314)"
]
},
"metadata": {}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment