GeoEco.DataProducts.CMEMS.CMEMSARCOArray.InterpolateAtArcGISPoints
- classmethod CMEMSARCOArray.InterpolateAtArcGISPoints(username, password, datasetID, variableShortName, points, valueField, zField=None, tField=None, method='Nearest', log10Transform=False, where=None, noDataValue=None, xCoordType='center', yCoordType='center', zCoordType='center', tCoordType='min', orderByFields=None, numBlocksToCacheInMemory=256, xBlockSize=64, yBlockSize=64, zBlockSize=1, tBlockSize=1)
Interpolates values of a 2D, 3D, or 4D gridded dataset published by Copernicus Marine Service at points.
Given a desired CMEMS dataset, this tool interpolates the value of that dataset at the given points. This tool performs the same basic operation as the ArcGIS Spatial Analyst’s
ExtractValuestoPoints()tool, but it reads the data from the CMEMS servers rather than reading rasters stored on your machine.Requires: ArcGIS Pro 3.2.0 or later or ArcGIS Server equivalent to ArcGIS Pro 3.2.0 or later, Python numpy module, Python copernicusmarine module.
- Parameters:
username (
str) – Copernicus Marine Service user name. Minimum length꞉ 1.password (
str) – Copernicus Marine Service password. Minimum length꞉ 1.datasetID (
str) – Dataset ID to access. You can find the Dataset ID by going to the Copernicus Marine Data Store, viewing your product of interest, clicking on Data Access, and scrolling to the Dataset ID table. The dataset must have 2, 3, or 4 dimensions. Two of the dimensions must be longitude and latitude. The third and fourth dimension can be depth or time. Minimum length꞉ 1.variableShortName (
str) – “Short name” of the variable to access. You can find the variable’s short name by going to to the Copernicus Marine Data Store, viewing your product of interest, clicking on Data Access, scrolling to the Dataset ID table, and clicking on Form under the Subset column. When the form appears, look under the Variables heading. Each variable has a long description in black font, followed by the variable short name and units (in brackets) in a lighter color. Do not include the units as part of the short name. Minimum length꞉ 1.points (
str) –Feature class or layer containing the points at which values should be interpolated. The points must have a field that contains the date of each point and a field to receive the value interpolated from the raster.
CMEMS datasets use the WGS 1984 geographic coordinate system. It is recommended but not required that the points use the same coordinate system. If they do not, this tool will attempt to project the points to the WGS 1984 coordinate system prior to doing the interpolation. This may fail if a datum transformation is required, in which case you will have to manually project the points to the WGS 1984 coordinate system before using this tool.
Minimum length꞉ 1. Must exist.
valueField (
str) – Field of the points to receive the interpolated values. The field must have a floating-point or integer data type. If the field cannot represent the interpolated value at full precision, the closest approximation will be stored and a warning will be issued. This will happen, for example, when you interpolate floating-point values into an integer field. Minimum length꞉ 1. Must exist.zField (
str, optional) – Field of the points that specifies the depth of the point. The field is required if the CMEMS dataset includes depth layers; it should be omitted otherwise. Minimum length꞉ 1. Must exist.tField (
str, optional) – Field of the points that specifies the date and time of the point. The field is required if the CMEMS dataset is a time series; it should be omitted otherwise. The field must have a datetime data type. If the field can only represent dates with no time component, the time will assumed to be 00:00:00. Minimum length꞉ 1. Must exist.method (
str, optional) –Interpolation method to use, one of:
Nearest- nearest neighbor interpolation. The interpolated value will simply be the value of the cell that contains the point. This is the default.Linear- linear interpolation. This method is suitable for continuous data such as sea surface temperature, but not for categorical data such as pixel quality flags (use nearest neighbor instead). This method averages the values of the eight nearest cells in the x, y, depth, and time dimensions (if applicable), weighting the contribution of each cell by the area of it that would be covered by a hypothetical cell centered on the point being interpolated. If the cell containing the point contains NoData, the result is NoData. Otherwise, and the result is based on the weighted average of the four (if the dataset is 2D), eight (if 3D), or 16 (if 4D) nearest cells that do contain data, including the one that contains the cell. If any of the other cells contain NoData, they are omitted from the average. This a multi-dimensional version of the bilinear interpolation implemented by the ArcGIS Spatial Analyst’sExtractValuestoPoints()tool.
Allowed values꞉
'Nearest','Linear'.log10Transform (
bool, optional) –“If True, a
log10(base 10 logarithm) function will be applied to the data after it is downloaded before further processing. This transformation may be useful when working with data that are always positive but heavily skewed, such as chlorophyll concentration or other biological oceanographic data. For example, it is a common practice tolog10transform chlorophyll data before detecting chlorophyll fronts or utilizing chlorophyll in a species distribution model.Note that it is only possible to take the logarithm of a positive number. If the data contain values less than or equal to zero, a warning will be issued and they will be treated as missing values.
where (
str, optional) –SQL WHERE clause expression that specifies the subset of points to process. If not provided, all of the points will be processed. If provided but the underlying storage format does not support WHERE clauses, an exception will be raised.
The exact syntax of this expression depends on the underlying storage format. If the underlying data store will be accessed through ArcGIS, this article may document some of the possible syntax, but not all of it may be supported through ArcGIS’s underlying Python API.
Minimum length꞉ 1.
noDataValue (
float, optional) – Value to use when the interpolated value is NoData. If a value is not provided for this parameter, a database NULL value will be stored in the field when the interpolated value is NoData. If the field cannot store NULL values, as is the case with shapefiles, the value -9999 will be used.xCoordType (
str, optional) – Specifies whether the latitude coordinates used by Copernicus for this dataset are the left edges ('min'), the centers ('center'), or the right edges ('max') of the cells. This cannot be determined automatically but for most Copernicus datasets the longitude coordinates are the centers of the cells. To determine the appropriate value for your dataset of interest, consult the dataset’s documentation or contact Copernicus for help. Alternatively, download the dataset to a raster using'center', load it into a GIS, and overlay a high resolution shoreline. Examine the overlap to determine whether'min'or'max'would provide a better match up between the raster and the shoreline. Allowed values꞉'min','center','max'.yCoordType (
str, optional) – Specifies whether the latitude coordinates used by Copernicus for this dataset are the bottom edges ('min'), the centers ('center'), or the top edges ('max') of the cells. This cannot be determined automatically but for most Copernicus datasets the latitude coordinates are the centers of the cells. To determine the appropriate value for your dataset of interest, consult the dataset’s documentation or contact Copernicus for help. Alternatively, download the dataset to a raster using'center', load it into a GIS, and overlay a high resolution shoreline. Examine the overlap to determine whether'min'or'max'would provide a better match up between the raster and the shoreline. Allowed values꞉'min','center','max'.zCoordType (
str, optional) – Specifies whether the depth coordinates used by Copernicus for this dataset are the shallow edges ('min'), the centers ('center'), or the deep edges ('max') of the cells. This cannot be determined automatically but for most Copernicus datasets the depth coordinates are the centers of the cells. To determine the appropriate value for your dataset of interest, consult the dataset’s documentation or contact Copernicus for help. Allowed values꞉'min','center','max'.tCoordType (
str, optional) – Specifies whether the time coordinates used by Copernicus for this dataset are the starting times ('min'), the center times ('center'), or the ending times ('max') of the time slices. This cannot be determined automatically but most Copernicus datasets that are “instantaneous” use center times, while most datasets that represent mean values (e.g. daily or monthly means) use starting times. To determine the appropriate value for your dataset of interest, consult the dataset’s documentation or contact Copernicus for help. Allowed values꞉'min','center','max'.orderByFields (
listofstr, optional) – Fields for defining the order in which the points are processed. The points may be processed faster if they are ordered geographically, such that points that are close in geographic space are processed sequentially. Ordering the points this way increases the probability that the value of a given point can be interpolated from data that is cached in memory, rather than from data that must be read from the disk or network, which is much slower. Choose fields that facilitate this. For example, if your points represent the locations of animals tracked by satellite telemetry, order the processing first by the animal ID and then by the transmission date or number. Minimum length꞉ 1.numBlocksToCacheInMemory (
int, optional) –Maximum number of blocks of data to cache in memory.
To minimize the number of times that the disk or network must be accessed, this tool employs a simple caching strategy. When it processes the first point, it reads a square block of cells centered on that point and caches it in memory. When it processes the second and subsequent points, it first checks whether the cells needed for that point are contained by the block cached in memory. If so, it processes that point using the in-memory block, rather than reading from disk or the network again. If not, it reads another square block centered on that point and adds it to the cache.
The tool processes the remaining points, adding additional blocks to the cache, as needed. To prevent the cache from exhausting all memory, it is only permitted to grow to the size specified by this parameter. When the cache is full but a new block is needed, the oldest block is discarded to make room for the newest block.
If this parameter is 0, no blocks will be cached in memory.
Minimum value꞉ 0.
xBlockSize (
int, optional) – Size of the blocks of data to cache in memory in thexdirection. The size is given as the number of cells. If this parameter is 0, no blocks will be cached in memory. Minimum value꞉ 0.yBlockSize (
int, optional) – Size of the blocks of data to cache in memory in theydirection. The size is given as the number of cells. If this parameter is 0, no blocks will be cached in memory. Minimum value꞉ 0.zBlockSize (
int, optional) – Size of the blocks of data to cache in memory in thez(depth) direction. The size is given as the number of cells. If this parameter is 0, no blocks will be cached in memory. This parameter is ignored if the grids do not have azdimension. Minimum value꞉ 0.tBlockSize (
int, optional) – Size of the blocks of data to cache in memory in thet(time) direction. The size is given as the number of cells. If this parameter is 0, no blocks will be cached in memory. This parameter is ignored if the grids do not have atdimension. Minimum value꞉ 0.
- Returns:
Updated points.
- Return type: