ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Table to NetCDF

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts a table to a netCDF file.

Usage

  • The default variable name is the same as the field name specified in the Fields to Variables parameter.

  • The type of variable is the same as the type of field.

  • The default dimension name is the same as the field name specified in the Fields to Dimensions parameter.

  • The size of a dimension is equal to the number of unique values in the respective field.

  • If no field is specified as dimension, then a dimension named RecordID is created in the output netCDF file.

  • String fields may not be used to create dimensions in the netCDF file.

Syntax

arcpy.md.TableToNetCDF(in_table, fields_to_variables, out_netCDF_file, {fields_to_dimensions})
ParameterExplanationData Type
in_table

The input table.

Table View
fields_to_variables
[[field, {variable}, {units}],...]

The field or fields used to create variables in the netCDF file.

  • field—A field in the input feature attribute table.
  • {variable}—The netCDF variable name.
  • {units}—The units of the data represented by the field.
Value Table
out_netCDF_file

The output netCDF file. The file name must have a .nc extension.

File
fields_to_dimensions
[[field, {dimension}, {units}],...]
(Optional)

The field or fields used to create dimensions in the netCDF file.

  • field—A field in the input table.
  • {dimension}—The netCDF dimension name.
  • {units}—The units of the data represented by the field.
Value Table

Code sample

TableToNetCDF example 1 (Python window)

Converts a table to a netCDF file.

import arcpy
arcpy.TableToNetCDF_md("c:/data/netcdfgisdata/rainfall.dbf",
                       "longitude longitude degree_east;latitude latitude degree_north",
                       "c:/output/rain.nc","station station")
TableToNetCDF example 2 (stand-alone script)

Converts a table to a netCDF file.

# Name: TableToNetCDF_Ex_02.py
# Description: 
# Requirements: none

# Import system modules
import arcpy

# Set local variables
inTable = "c:/data/netcdfgisdata/rainfall.dbf"
fieldVariableUnits = "longitude longitude degree_east;latitude latitude degree_north"
outNetCDFFile = "c:/output/rain.nc"
fieldDimensionUnits = "station station"

# Execute SelectByDimension
import arcpy
arcpy.TableToNetCDF_md(inTable, fieldVariableUnits, outNetCDFFile, fieldDimensionUnits)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Multidimension toolbox
  • Exporting to netCDF data using geoprocessing tools
  • Raster to NetCDF
  • Feature to NetCDF

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal