GeoEco.DataProducts.CMEMS.CMEMSARCOArray.CreateArcGISRasters
- classmethod CMEMSARCOArray.CreateArcGISRasters(username, password, datasetID, variableShortName, outputWorkspace, mode='Add', log10Transform=False, xCoordType='center', yCoordType='center', zCoordType='center', tCoordType='min', rotationOffset=None, spatialExtent=None, minDepth=None, maxDepth=None, startDate=None, endDate=None, rasterExtension='.img', rasterNameExpressions=None, calculateStatistics=True, buildPyramids=False)
Creates rasters for a 2D, 3D, or 4D gridded dataset published by Copernicus Marine Service.
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.outputWorkspace (
str) – Directory or geodatabase to receive the rasters. Unless you have a specific reason to store the rasters in a geodatabase, we recommend you store them in a directory because it will be faster and allow the rasters to be organized in a tree. The tree structure and raster names will be generated automatically unless you provide a value for the Raster Name Expressions parameter. Minimum length꞉ 1.mode (
str, optional) –Overwrite mode, one of:
Add- create rasters that do not exist and skip those that already exist. This is the default.Replace- create rasters that do not exist and overwrite those that already exist.
The ArcGIS Overwrite Output environment setting has no effect on this tool. If ‘Replace’ is selected the rasters will be overwritten, regardless of the ArcGIS Overwrite Output setting.
Allowed values꞉
'Add','Replace'.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.
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'.rotationOffset (
float, optional) – Degrees to rotate the outputs about the polar axis. This parameter may only be used for global products. The outputs can only be rotated in whole cells. The value you provide will be rounded off to the closest cell. The value may be positive or negative.spatialExtent (
str, optional) – Spatial extent of the outputs, in degrees. This parameter is applied after the rotation parameter and uses coordinates that result after rotation. The outputs can only be clipped in whole grid cells. The values you provide will be rounded off to the closest cell. Minimum length꞉ 1. Must match regular expression꞉([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)\s+([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)\s+([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)\s+([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?).minDepth (
float, optional) –Minimum depth, in meters, for the outputs to create. This parameter is ignored if the dataset does not have a depth coordinate. Its value must be between 0 and 20000, inclusive. Outputs will be created for layers with depths that are greater than or equal to the minimum depth and less than or equal to the maximum depth. If you do not specify a minimum depth, the minimum depth of the dataset will be used.
The value 20000 is a special code representing conditions at the seafloor. Use this value if you need an estimate of “bottom temperature” or the value of another variable at the seafloor. If this value is requested, an output will be created with a fake depth of 20000 meters. The cells of this output will be assigned by stacking all of the depth layers and selecting the deepest cells that have data.
Note that some Copernicus datasets offer a variable representing values at the seafloor that Copernicus computed ahead of time. This tool is not aware of those variables and cannot access them automatically. But you can manually access such a variable just like any other by providing its name for the Variable Short Name parameter. Accessing those precomputed variables will be faster than using a depth of 20000 to compute them yourself. Variables of that kind will be treated by this tool as not having a depth coordinate.
Minimum value꞉ 0.0. Maximum value꞉ 20000.0.
maxDepth (
float, optional) –Maximum depth, in meters, for the outputs to create. This parameter is ignored if the dataset does not have a depth coordinate. Its value must be between 0 and 20000, inclusive. Outputs will be created for images with depths that are greater than or equal to the minimum depth and less than or equal to the maximum depth. If you do not specify a maximum depth, the maximum depth of the dataset will be used.
The value 20000 is a special code representing conditions at the seafloor. Please see the documenation for the Minimum Depth parameter for discussions of this value.
Minimum value꞉ 0.0. Maximum value꞉ 20000.0.
startDate (
datetime, optional) – Start date for the outputs to create. This parameter is ignored if the dataset does not have a time coordinate. Outputs will be created for images that occur on or after the start date and on or before the end date. If you do not provide a start date, the date of the first available time slice will be used.endDate (
datetime, optional) – End date for the outputs to create. This parameter is ignored if the dataset does not have a time coordinate. Outputs will be created for images that occur on or after the start date and on or before the end date. If you do not specify an end date, the date of the most recent time slice will be used.rasterExtension (
str, optional) – File extension to use for output rasters. This parameter is ignored if the rasters are stored in a geodatabase rather than the file system, or if the Raster Name Expressions parameter is provided (in which case it determines the file extension). The default is ‘.img’, for ERDAS IMAGINE format. Another popular choice is ‘.tif’, the GeoTIFF format. Please see the ArcGIS documentation for the extensions of the supported formats. Minimum length꞉ 1.rasterNameExpressions (
listofstr, optional) –List of expressions specifying how the output rasters should be named. If you do not provide anything, a default naming scheme will be used.
If the output workspace is a file system directory, you may provide one or more expressions. Each expression defines a level in a directory tree. The final expression specifies the raster file name. If the output workspace is a geodatabase, you should provide only one expression, which specifies the raster name.
Each expression may contain any sequence of characters permitted by the output workspace. Each expression may optionally contain one or more of the following case-sensitive codes. The tool replaces the codes with appropriate values when creating each raster:
%(DatasetID)s- Copernicus dataset ID.%(ShortVariableName)s- Copernicus short variable name.%(Depth)s- depth of the raster. Only avilable for datasets that have depth coordinates.%%Y- four-digit year of the raster. This and the following codes are only available for datasets that have time coordinates.%%m- two-digit month of the raster.%%d- two-digit day of the month of the raster.%%j- three-digit day of the year of the raster.%%H- two-digit hour of the raster.%%M- two-digit minute of the raster.%%S- two-digit second of the raster.
Minimum length꞉ 1.
calculateStatistics (
bool, optional) – If True, statistics will be calculated for the output rasters. This is usually a good idea for most raster formats because ArcGIS will only display them with helpful colors and gradients if statistics have been calculated. For certain formats, the explicit calculation of statistics is not necessary because it happens automatically when the rasters are created. If you’re using one of those formats, you can set this option to False to speed up the creation of the output rasters.buildPyramids (
bool, optional) – If True, pyramids will be built for the output rasters using the ArcGIS Build Pyramids tool. Pyramids, also known as overviews, are reduced resolution versions of the rasters that can improve the speed at which they are displayed in the ArcGIS user interface.
- Returns:
Updated output workspace.
- Return type: