Summary
Makes a table view from a netCDF file.
Usage
-
Table views are tables stored in memory and are the same as Standalone Tables in the ArcGIS Pro Contents pane.
-
Table views can be used as inputs to other geoprocessing tools in the current ArcGIS Pro session. Once ArcGIS Pro exits, the tables in memory are removed. To save the table view to a permanent table that can be used in later ArcGIS Pro sessions, use the Copy Rows tool.
An existing table view will be overwritten if the same table view name is entered.
The number of records in the table view is the same as the number of unique values in the row dimension. If multiple dimensions are selected, the number of records is the product of the number of unique values in those dimensions.
The output table contains only one record if no row dimension is specified. The values in the fields represent the slice specified by the dimension-value pairs.
The type of field is determined by the netCDF variable and dimension type.
The first value of a non-row dimension is used to create a default table view of a multidimensional variable.
The calendar attribute values noleap and 365_day, assigned to the time coordinate variable of the netCDF file, are not honored in ArcGIS.
The values represented by missing_value or _FillValue attributes of a variable in a netCDF file will be null in the output table view.
Syntax
arcpy.md.MakeNetCDFTableView(in_netCDF_file, variable, out_table_view, {row_dimension}, {dimension_values}, {value_selection_method})
Parameter | Explanation | Data Type |
in_netCDF_file | The input netCDF file. | File |
variable [variable,...] | The netCDF variable, or variables, used to create fields in the table view. | String |
out_table_view | The name of the output table view. | Table View |
row_dimension [row_dimension,...] (Optional) | The netCDF dimension, or dimensions, used to create fields populated with unique values in the table view. The dimension, or dimensions, set here determine the number of rows in the table view and the fields that will be present. For instance, if stationID is a dimension in the netCDF file and has 10 values, by setting stationID as the dimension to use, 10 rows will be created in the table view. If stationID and time are used and there are 3 time slices, 30 rows will be created in the table view. | String |
dimension_values [[dimension {value}],...] (Optional) | A set of dimension-value pairs used to specify a slice of a multidimensional variable.
| Value Table |
value_selection_method (Optional) | Specifies the dimension value selection method that will be used.
| String |
Code sample
Creates a table view from a netCDF file.
import arcpy
arcpy.MakeNetCDFTableView_md("C:/data/netcdf/precipmonmean.nc","precip",
"precipmonmeantable","time")
Creates a table view from a netCDF file.
# MakeNetCDFTableView_Ex_02.py
# Description: Create a table view from a netCDF file.
# Requirements: None
#Import system modules
import arcpy
# Set local variables
inNetCDFFile = "c:/data/netcdf/precipmonmean.nc"
variable = "precip;humidity"
outTableView = "precipmonmeantable"
rowDimension = "time"
dimensionValue = ""
valueSelectionMethod = ""
# Execute MakeNetCDFTableView
arcpy.MakeNetCDFTableView_md(inNetCDFFile, variable, outTableView, rowDimension,
dimensionValue,valueSelectionMethod)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes