Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Goals\n",
"This notebook explains how to open a netcdf file, read metadata, and read variables.\n",
"It was written based on https://towardsdatascience.com/read-netcdf-data-with-python-901f7ff61648.\n",
"\n",
"# Prerequisite \n",
"1. You also need to set up your own conda environment. Please refer to https://www.rcac.purdue.edu/knowledge/brown/jupyter.\n",
"Default notebook environment (root) at Brown cluster does not 'netcdf4' package, so this notebook will fail without custom conda environment. \n",
"2. Make sure you have access to the directory where netCDF files exist. This notebook reads netcdf files stored in /depot/ssg/geoshare/data/GLASS/INFEWS/\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import netCDF4 as nc\n",
"import os"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Loading a NetCDF Dataset\n",
"\n",
"Loading a dataset is simple, just pass a NetCDF file path to __netcf4.Dataset()__"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<class 'netCDF4._netCDF4.Dataset'>\n",
"root group (NETCDF4 data model, file format HDF5):\n",
" Conventions: CF-1.6\n",
" history: Created on 2021-04-18 by Danielle Grogan (Danielle.Grogan@unh.edu)\n",
" NetCDF_version: NetCDF.4.21\n",
" institution: Water Systems Analysis Group (WSAG), the University of New Hampshire (UNH)\n",
" FilePath: /net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/daily/wbm_1950.nc\n",
" title: WBM-TrANS data\n",
" Projection: epsg:4326\n",
" WBM_VERSION: 21.3.2\n",
" PDL_VERSION: 2.019\n",
" PERL_VERSION: 5.026001\n",
" GDAL_VERSION: GDAL 3.0.0, released 2019/05/05\n",
" WBM_RUN_ID: flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical\n",
" WBM_RUN_Init: /net/nfs/zero/data3/WBM_TrANS/wbm_run_files/Projects/DOE_Flood/flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical.init\n",
" WBM_Start_time: 2021-04-17 at 10:30:32\n",
" SYSTEM_NAME: yukon\n",
" Script_dir: /net/home/eos/dgrogan/wbm_repos/wbm_trans/\n",
" runIO_Comment: CONUS flood simulations for DOE project with Purdue\n",
" runIO_Project: DOE\n",
" runIO_MT_Code_Name: {MT_ID => 'flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical',Output_dir => '/net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/',Run_End => '2005-12-31',Run_Start => '1950-01-01'}\n",
" runIO_spinup_state_ID: \n",
" runIO_Spinup_Loops: 6\n",
" runIO_Spinup_Start: 1950-01-01\n",
" runIO_Spinup_End: 1954-12-31\n",
" runIO_Output_vars: runoff discharge baseflow airT precip\n",
" runIO_MT_Precip: {Primary => 'prec.hist.MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_d'}\n",
" runIO_precipFraction: \n",
" runIO_MT_airT: {Primary => 'tmean.hist.MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_d'}\n",
" runIO_Network: /net/nfs/zero/data3/WBM_TrANS/data/hyd_5m_CONUS_mississippi_patched.asc\n",
" runIO_Routing: LRR\n",
" runIO_wbmParam: \n",
" runIO_ConnectivityNetwork: \n",
" runIO_Reservoirs: /net/nfs/zero/home/WBM_TrANS/data_init_files/dams/HydConDams_NAmer_v0.2c.init\n",
" runIO_soilAWCapacity: NETCDF:/net/nfs/zero/home/WBM_TrANS/data/HarmSoilData/Harmonized-SoilMap_AWC-mm_6min.nc:Band1\n",
" runIO_FieldCap: \n",
" runIO_WiltingPoint: \n",
" runIO_rootingDepth: NETCDF:/net/nfs/zero/home/WBM_TrANS/data/Global_Terrain_RootDepthWBM_LTXXXX_30min.nc:STNetwork\n",
" runIO_PET: \n",
" runIO_MT_windU: \n",
" runIO_MT_windV: \n",
" runIO_MT_cloudFr: \n",
" runIO_MT_humidity: \n",
" runIO_MT_albedo: \n",
" runIO_airT_yc: \n",
" runIO_openWaterEvap: \n",
" runIO_Glaciers: \n",
" runIO_Aquifers: \n",
" runIO_Springs: \n",
" runIO_snowBands: \n",
" runIO_lapseDownscale: \n",
" runIO_DIN: \n",
" runIO_Runoff_mask: \n",
" runIO_Impervious: /net/nfs/ipswich/raid/atlas/data/impervious/imp.asc\n",
" runIO_openWater: {MaskDataset => '/net/nfs/ipswich/raid/atlas/data/UMD_landcover/zero_6min.tif',openWaterMaskValue => 0}\n",
" runIO_canopyHt: \n",
" runIO_MT_LAI: \n",
" runIO_WaterDemand: \n",
" runIO_landCollapse: average\n",
" runIO_LandCover: \n",
" runIO_Irrigation: {CropAreaFrac => '/net/nfs/squam/raid/data/GLEAM/GAEZ_crop_frac/GAEZ_Pasture_Total.tif',CropParFile => '/net/nfs/zero/data3/WBM_TrANS/spreadsheets/GAEZ-2010_CropParameters_Pasture.csv',ExtraCoeff => 1,IrrEfficiency => 'NETCDF:/net/nfs/zero/data3/WBM_TrANS/data/Global_Crops_IrrEfficiencyGlobalExtent_30min.nc:IrrEfficiency',Order => 1,ReturnCoeff => '0.5',SW_GW_ratio => 'NETCDF:/net/nfs/zero/data3/WBM_TrANS/data/FAO_SWGW_ratio.nc:swgwRatio',SearchDist => 100,ricePaddyDepth => 50,ricePercolation => 'NETCDF:/net/nfs/zero/data3/WBM_TrANS/data/RicePercolationRate.nc:RicePercolationRate'}\n",
" runIO_WM_mod_precip: \n",
" runIO_WM_obs_precip: \n",
" runIO_WM_mod_airT: \n",
" runIO_WM_obs_airT: \n",
" runIO_PostProcessing: {Forks => 8,Polygon_Aggregation => '',Run => '',TA_multi_year_start => '',TA_multi_year_timestep => '',Temporal_Aggregation => ''}\n",
" runIO_WaterRights: \n",
" runIO_USGS: \n",
" runIO_spool: /net/nfs/yukon/WBM_spool/hyd_5m_CONUS_mississippi_patched/\n",
" runIO_Output_TS: daily\n",
" runIO_Run_Start: 1950-01-01\n",
" runIO_Run_End: 2005-12-31\n",
" runIO_Output_dir: /net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET\n",
" runIO_Input_MT: /net/nfs/yukon/raid0/data/RIMS/MagicTable/CGI_Names.csv\n",
" runIO_Output_MT: /net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical.MT.csv\n",
" dimensions(sizes): time(365), lat(425), lon(807)\n",
" variables(dimensions): int32 time(time), float64 lat(lat), float64 lon(lon), |S1 crs(), float32 runoff(time, lat, lon), float32 discharge(time, lat, lon), float32 baseflow(time, lat, lon), float32 airT(time, lat, lon), float32 precip(time, lat, lon)\n",
" groups: "
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fn = '/depot/ssg/geoshare/data/GLASS/INFEWS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/daily/daily/wbm_1950.nc'\n",
"ds = nc.Dataset(fn)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## General File Structure\n",
"A NetCDF file has three basic parts: metadata, dimensions and variables. Variables contain both metadata and data. netcdf4 allows us to access the metadata and data associated with a NetCDF file."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Access Metdata\n",
"Printing the dataset, ds, gives us information about the variables contained in the file and their dimensions."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'netCDF4._netCDF4.Dataset'>\n",
"root group (NETCDF4 data model, file format HDF5):\n",
" Conventions: CF-1.6\n",
" history: Created on 2021-04-18 by Danielle Grogan (Danielle.Grogan@unh.edu)\n",
" NetCDF_version: NetCDF.4.21\n",
" institution: Water Systems Analysis Group (WSAG), the University of New Hampshire (UNH)\n",
" FilePath: /net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/daily/wbm_1950.nc\n",
" title: WBM-TrANS data\n",
" Projection: epsg:4326\n",
" WBM_VERSION: 21.3.2\n",
" PDL_VERSION: 2.019\n",
" PERL_VERSION: 5.026001\n",
" GDAL_VERSION: GDAL 3.0.0, released 2019/05/05\n",
" WBM_RUN_ID: flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical\n",
" WBM_RUN_Init: /net/nfs/zero/data3/WBM_TrANS/wbm_run_files/Projects/DOE_Flood/flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical.init\n",
" WBM_Start_time: 2021-04-17 at 10:30:32\n",
" SYSTEM_NAME: yukon\n",
" Script_dir: /net/home/eos/dgrogan/wbm_repos/wbm_trans/\n",
" runIO_Comment: CONUS flood simulations for DOE project with Purdue\n",
" runIO_Project: DOE\n",
" runIO_MT_Code_Name: {MT_ID => 'flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical',Output_dir => '/net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/',Run_End => '2005-12-31',Run_Start => '1950-01-01'}\n",
" runIO_spinup_state_ID: \n",
" runIO_Spinup_Loops: 6\n",
" runIO_Spinup_Start: 1950-01-01\n",
" runIO_Spinup_End: 1954-12-31\n",
" runIO_Output_vars: runoff discharge baseflow airT precip\n",
" runIO_MT_Precip: {Primary => 'prec.hist.MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_d'}\n",
" runIO_precipFraction: \n",
" runIO_MT_airT: {Primary => 'tmean.hist.MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_d'}\n",
" runIO_Network: /net/nfs/zero/data3/WBM_TrANS/data/hyd_5m_CONUS_mississippi_patched.asc\n",
" runIO_Routing: LRR\n",
" runIO_wbmParam: \n",
" runIO_ConnectivityNetwork: \n",
" runIO_Reservoirs: /net/nfs/zero/home/WBM_TrANS/data_init_files/dams/HydConDams_NAmer_v0.2c.init\n",
" runIO_soilAWCapacity: NETCDF:/net/nfs/zero/home/WBM_TrANS/data/HarmSoilData/Harmonized-SoilMap_AWC-mm_6min.nc:Band1\n",
" runIO_FieldCap: \n",
" runIO_WiltingPoint: \n",
" runIO_rootingDepth: NETCDF:/net/nfs/zero/home/WBM_TrANS/data/Global_Terrain_RootDepthWBM_LTXXXX_30min.nc:STNetwork\n",
" runIO_PET: \n",
" runIO_MT_windU: \n",
" runIO_MT_windV: \n",
" runIO_MT_cloudFr: \n",
" runIO_MT_humidity: \n",
" runIO_MT_albedo: \n",
" runIO_airT_yc: \n",
" runIO_openWaterEvap: \n",
" runIO_Glaciers: \n",
" runIO_Aquifers: \n",
" runIO_Springs: \n",
" runIO_snowBands: \n",
" runIO_lapseDownscale: \n",
" runIO_DIN: \n",
" runIO_Runoff_mask: \n",
" runIO_Impervious: /net/nfs/ipswich/raid/atlas/data/impervious/imp.asc\n",
" runIO_openWater: {MaskDataset => '/net/nfs/ipswich/raid/atlas/data/UMD_landcover/zero_6min.tif',openWaterMaskValue => 0}\n",
" runIO_canopyHt: \n",
" runIO_MT_LAI: \n",
" runIO_WaterDemand: \n",
" runIO_landCollapse: average\n",
" runIO_LandCover: \n",
" runIO_Irrigation: {CropAreaFrac => '/net/nfs/squam/raid/data/GLEAM/GAEZ_crop_frac/GAEZ_Pasture_Total.tif',CropParFile => '/net/nfs/zero/data3/WBM_TrANS/spreadsheets/GAEZ-2010_CropParameters_Pasture.csv',ExtraCoeff => 1,IrrEfficiency => 'NETCDF:/net/nfs/zero/data3/WBM_TrANS/data/Global_Crops_IrrEfficiencyGlobalExtent_30min.nc:IrrEfficiency',Order => 1,ReturnCoeff => '0.5',SW_GW_ratio => 'NETCDF:/net/nfs/zero/data3/WBM_TrANS/data/FAO_SWGW_ratio.nc:swgwRatio',SearchDist => 100,ricePaddyDepth => 50,ricePercolation => 'NETCDF:/net/nfs/zero/data3/WBM_TrANS/data/RicePercolationRate.nc:RicePercolationRate'}\n",
" runIO_WM_mod_precip: \n",
" runIO_WM_obs_precip: \n",
" runIO_WM_mod_airT: \n",
" runIO_WM_obs_airT: \n",
" runIO_PostProcessing: {Forks => 8,Polygon_Aggregation => '',Run => '',TA_multi_year_start => '',TA_multi_year_timestep => '',Temporal_Aggregation => ''}\n",
" runIO_WaterRights: \n",
" runIO_USGS: \n",
" runIO_spool: /net/nfs/yukon/WBM_spool/hyd_5m_CONUS_mississippi_patched/\n",
" runIO_Output_TS: daily\n",
" runIO_Run_Start: 1950-01-01\n",
" runIO_Run_End: 2005-12-31\n",
" runIO_Output_dir: /net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET\n",
" runIO_Input_MT: /net/nfs/yukon/raid0/data/RIMS/MagicTable/CGI_Names.csv\n",
" runIO_Output_MT: /net/nfs/squam/raid/data/WBM_TrANS/DOE_Flood/historical/MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET/flood_MPI-ESM-LR.WRF.day.NAM-22i.mbcn-gridMET_historical.MT.csv\n",
" dimensions(sizes): time(365), lat(425), lon(807)\n",
" variables(dimensions): int32 time(time), float64 lat(lat), float64 lon(lon), |S1 crs(), float32 runoff(time, lat, lon), float32 discharge(time, lat, lon), float32 baseflow(time, lat, lon), float32 airT(time, lat, lon), float32 precip(time, lat, lon)\n",
" groups: \n"
]
}
],
"source": [
"print(ds)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Dimensions\n",
"Access to dimensions is similar to file metadata. Each dimension is stored as a dimension class which contains pertinent information. \n",
"Metadata for all dimensions can be access by looping through all available dimensions, like so."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'netCDF4._netCDF4.Dimension'> (unlimited): name = 'time', size = 365\n",
"<class 'netCDF4._netCDF4.Dimension'>: name = 'lat', size = 425\n",
"<class 'netCDF4._netCDF4.Dimension'>: name = 'lon', size = 807\n"
]
}
],
"source": [
"for dim in ds.dimensions.values():\n",
" print(dim)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Variable Metadata\n",
"Access variable metadata in the same manner as dimensions. \n",
"The code below shows how this is done. I’ve forgone the output because it is quite lengthy."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'netCDF4._netCDF4.Variable'>\n",
"int32 time(time)\n",
" long_name: Time\n",
" units: days since 1900-01-01\n",
" calendar: standard\n",
" resolution: daily\n",
"unlimited dimensions: time\n",
"current shape = (365,)\n",
"filling on, default _FillValue of -2147483647 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float64 lat(lat)\n",
" standard_name: latitude\n",
" long_name: latitude\n",
" units: degrees_north\n",
"unlimited dimensions: \n",
"current shape = (425,)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float64 lon(lon)\n",
" units: degrees_east\n",
" long_name: longitude\n",
" standard_name: longitude\n",
"unlimited dimensions: \n",
"current shape = (807,)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"|S1 crs()\n",
" srs_ref: epsg:4326\n",
" spatial_ref: GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]\n",
" GeoTransform: -127.83333333333 0.083333333333 0 57.166666666525 0 -0.083333333333\n",
" srs_wkt: GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]\n",
"unlimited dimensions: \n",
"current shape = ()\n",
"filling on, default _FillValue of \u0000 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float32 runoff(time, lat, lon)\n",
" _FillValue: -9999.0\n",
" grid_mapping: crs\n",
" long_name: Runoff\n",
" missing_value: -9999.0\n",
" reference_area: full grid cell area\n",
" units: mm/day\n",
"unlimited dimensions: time\n",
"current shape = (365, 425, 807)\n",
"filling on\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float32 discharge(time, lat, lon)\n",
" grid_mapping: crs\n",
" long_name: Discharge by LRR routing\n",
" missing_value: -9999.0\n",
" units: m3/sec\n",
"unlimited dimensions: time\n",
"current shape = (365, 425, 807)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float32 baseflow(time, lat, lon)\n",
" grid_mapping: crs\n",
" long_name: Baseflow\n",
" missing_value: -9999.0\n",
" reference_area: full grid cell area\n",
" units: mm/day\n",
"unlimited dimensions: time\n",
"current shape = (365, 425, 807)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float32 airT(time, lat, lon)\n",
" grid_mapping: crs\n",
" long_name: Temperature\n",
" missing_value: -9999.0\n",
" units: deg C\n",
"unlimited dimensions: time\n",
"current shape = (365, 425, 807)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n",
"<class 'netCDF4._netCDF4.Variable'>\n",
"float32 precip(time, lat, lon)\n",
" grid_mapping: crs\n",
" long_name: Precipitation\n",
" missing_value: -9999.0\n",
" units: mm/day\n",
"unlimited dimensions: time\n",
"current shape = (365, 425, 807)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n"
]
}
],
"source": [
"for var in ds.variables.values():\n",
" print(var)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### access variable information \n",
"The procedure to access information for a specific variable is demonstrated below for baseflow."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'netCDF4._netCDF4.Variable'>\n",
"float32 baseflow(time, lat, lon)\n",
" grid_mapping: crs\n",
" long_name: Baseflow\n",
" missing_value: -9999.0\n",
" reference_area: full grid cell area\n",
" units: mm/day\n",
"unlimited dimensions: time\n",
"current shape = (365, 425, 807)\n",
"filling on, default _FillValue of 9.969209968386869e+36 used\n"
]
}
],
"source": [
"print(ds['baseflow'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Write to a file\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"output_dir = \"./OUTPUT\"\n",
"\n",
"if not os.path.exists(output_dir):\n",
" os.makedirs(output_dir)\n"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"./OUTPUT/out.python.txt\n"
]
}
],
"source": [
"filename = 'out.python.txt'\n",
"output_file = output_dir +\"/\"+ filename \n",
"\n",
"print(output_file)\n",
"# write to a file\n",
"f = open(output_file, \"w\")\n",
"print(ds, file = f)\n",
"f.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Conclusion \n",
"NetCDF files are commonly used for geographic time-series data. Initially, they can be a bit intimidating to work with because of the large amounts of data contained, and the different format from the csv and raster files that are most commonly used. NetCDF is a great way to document geographic data because of the built in documentation and metadata. This makes it easy for end users to understand exactly what the data represent with little ambiguity. NetCDF data are accessed as numpy arrays, which present many possibilities for analysis and incorporation to existing tools and workflows."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env: infews]",
"language": "python",
"name": "conda-env-infews-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
}