- pyart.io.write_grid(filename, grid, format='NETCDF4', include_fields=None, write_proj_coord_sys=True, proj_coord_sys=None, arm_time_variables=False, arm_alt_lat_lon_variables=False, write_point_x_y_z=False, write_point_lon_lat_alt=False)#
Write a Grid object to a CF-1.5 and ARM standard netCDF file.
To control how the netCDF variables are created, set any of the following keys in the grid attribute dictionaries.
See the netCDF4 documentation for details on these settings.
filename (str) – Filename to save grid to.
grid (Grid) – Grid object to write.
format (str, optional) – netCDF format, one of ‘NETCDF4’, ‘NETCDF4_CLASSIC’, ‘NETCDF3_CLASSIC’ or ‘NETCDF3_64BIT’. See netCDF4 documentation for details.
include_fields (list, optional) – Fields to write out to NETCDF file. Default is None and will include all fields from the original grid object.
write_proj_coord_sys bool, optional – True to write information on the coordinate transform used in the map projection to the ProjectionCoordinateSystem variable following the CDM Object Model. The resulting file should be interpreted as containing geographic grids by tools which use the Java NetCDF library (THREDDS, toolsUI, etc).
proj_coord_sys (dict or None, optional) – Dictionary of parameters which will be written to the ProjectionCoordinateSystem NetCDF variable if write_proj_coord_sys is True. A value of None will attempt to generate an appropriate dictionary by examining the projection attribute of the grid object. If the projection is not understood a warnings will be issued.
arm_time_variables (bool, optional) – True to write the ARM standard time variables base_time and time_offset. False will not write these variables.
arm_alt_lat_lon_variables (bool, optional) – True to write the ARM standard alt, lat, lon variables. False will not write these variables.
write_point_x_y_z (bool, optional) – True to include the point_x, point_y and point_z variables in the written file, False will not write these variables.
write_point_lon_lat_alt (bool, optional) – True to include the point_longitude, point_latitude and point_altitude variables in the written file, False will not write these variables.