You can find this week's notebooks on ArcGIS Online at GIS 4090\5090 Unit 14 Notebooks
The data used for this week's lecture is on Google drive
- Advanced Programming for GIS and Remote Sensing
- Learning Anaconda
- Learning JavaScript
- Leaflet
- ArcGIS API for JavaScript
In this lecture we will discuss multidimmensional data. We will learn how you can interact with it through ArcGIS Pro, arcpy, and xarray and different kinds of analysis that can be done agaist spatio-temporal scientific datasets.
This week, we will use the DAYMET monthly climate summary NetCDF datasets
- Multidimensional Data and Multidimmensional Analysis in ArcGIS Pro
- Python: Working with Multidimensional Scientific Data
- Xarray
-
Create a new ArcGIS Pro Map Project
-
Add Data
-
Choose Multidimensional Raster Layer and then add daymet_v3_tmin_monavg_2017_na.nc4*.
-
Notice how th data gets added with a time-slider in the view.
-
Right click on layer in Table of Contents. Select Create Chart -> Temporal Profile
-
Set chart parameters.
-
Choose Point for Area of Interest and click on map to see temperature profile.
-
Export Raster as CRF. We will use this as input into the arcpy API.
Demonstrate how we can use Raster objects using the arcpy API to do similar analysis. This can be demonstrated through the multidimensional_data_using_arcpy_api.ipynb Notebook.
You can use xarray, an open source Python library to work with multidimensional data. For those of you who are fluent at Python, numpy, and pandas, you will probably like xarray. I will not cover every detail of the Python library, but I will go through how to work with NetDCF files in the multidimensional_data_using_xarray.ipynb Notebook.
The same techniques that we used last week to create raster functions with Landsat can be applied to Multidimensional NetCDF data. If there is enough time, we can discuss this.
- Run through the ArcGIS Tutorial on Multidimensional raster analysis in ArcGIS Pro
-
Create a mosaic dataset from all of the DAYMET NetCDF files in the tmax folder. Using the mosaic dataset, crreate temporal charts showing the tempertature change over time from beginning of the dataset to the end for the cities of New York, Houston, Minneapolis, and Los Angeles. Do you notice any trend in the profiles other than the seasonality? Submit the plots as graphics. They can be saved out of ArcGIS Pro as graphics.
-
Using the arcpy API, use the mosaic dataset that you creates and create a temperature profile using Python over Houston, TX. Submit your Notebook. You can get the pixel values using
arcpy.GetCellValue_management()
, for example:
for i in range(12):
out_raster_subset = arcpy.ia.Subset(myRaster,
variables='tmin',
dimension_definitions = {'stdTime': myRaster.getDimensionValues('tmin', 'StdTime')[i]})
print(arcpy.GetCellValue_management(out_raster_subset, location_point="0 0"))
- Using xarray and the multidimensional_data_with_xarray.ipynb Notebook as a template, create a temperature profile over a specific location for at least 3 years from the tmin data. Wich approach to you like more, ArcGIS Pro, arcpy, or xarray? Submit your notebook. If you are bold, install dask and try to load the datasets using the following code.
# OR multiple files - this require DASK
mfdataDIR = '../data/ARM/twparmbeatmC1.c1.*.000000.cdf'
DS = xr.open_mfdataset(mfdataDIR)