| 1 | # Datasets/HYCOM.py - Grids representing HYCOM datasets.
|
|---|
| 2 | #
|
|---|
| 3 | # Copyright (C) 2010 Jason J. Roberts
|
|---|
| 4 | #
|
|---|
| 5 | # This program is free software; you can redistribute it and/or
|
|---|
| 6 | # modify it under the terms of the GNU General Public License
|
|---|
| 7 | # as published by the Free Software Foundation; either version 2
|
|---|
| 8 | # of the License, or (at your option) any later version.
|
|---|
| 9 | #
|
|---|
| 10 | # This program is distributed in the hope that it will be useful,
|
|---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 13 | # GNU General Public License (available in the file LICENSE.TXT)
|
|---|
| 14 | # for more details.
|
|---|
| 15 | #
|
|---|
| 16 | # You should have received a copy of the GNU General Public License
|
|---|
| 17 | # along with this program; if not, write to the Free Software
|
|---|
| 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|---|
| 19 |
|
|---|
| 20 | import bisect
|
|---|
| 21 | import datetime
|
|---|
| 22 | import os
|
|---|
| 23 |
|
|---|
| 24 | from GeoEco.Datasets import Dataset, QueryableAttribute, Grid
|
|---|
| 25 | from GeoEco.Datasets.OPeNDAP import THREDDSCatalog, OPeNDAPURL, OPeNDAPGrid
|
|---|
| 26 | from GeoEco.DynamicDocString import DynamicDocString
|
|---|
| 27 | from GeoEco.Internationalization import _
|
|---|
| 28 | from GeoEco.Types import *
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | class _HYCOMGridGOMl0043D(OPeNDAPGrid):
|
|---|
| 32 | __doc__ = DynamicDocString()
|
|---|
| 33 |
|
|---|
| 34 | def __init__(self, url, variableName, timeout, maxRetryTime, cacheDirectory):
|
|---|
| 35 | self._CachedTCenterCoords = None
|
|---|
| 36 | super(_HYCOMGridGOMl0043D, self).__init__(OPeNDAPURL(url, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory),
|
|---|
| 37 | variableName,
|
|---|
| 38 | 'Grid',
|
|---|
| 39 | lazyPropertyValues={'SpatialReference': Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +no_defs', 'obj'),
|
|---|
| 40 | 'Dimensions': 'tyx',
|
|---|
| 41 | 'CoordDependencies': (None, None, None),
|
|---|
| 42 | 'CoordIncrements': (None, 4447.7949713872476, 4447.7949713872476), # t increment is None because, sadly, HYCOM omits slices when their system occasionally fails to generate data for a day
|
|---|
| 43 | 'TCornerCoordType': 'center',
|
|---|
| 44 | 'PhysicalDimensions': 'tyx',
|
|---|
| 45 | 'PhysicalDimensionsFlipped': (False, False, False),
|
|---|
| 46 | 'UnscaledDataType': 'float32',
|
|---|
| 47 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 48 | 'ScalingFunction': None})
|
|---|
| 49 |
|
|---|
| 50 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 51 | if name == 'CornerCoords':
|
|---|
| 52 | return (self._GetCoords('t', 0, [0], [0], 0.), 2045985.6431758059, -10897097.679898757) # Center of lower-left cell, in degrees: 98.0 W, 18.091648101806641 N
|
|---|
| 53 | return super(_HYCOMGridGOMl0043D, self)._GetLazyPropertyPhysicalValue(name)
|
|---|
| 54 |
|
|---|
| 55 | def _GetCoords(self, coord, coordNum, slices, sliceDims, fixedIncrementOffset):
|
|---|
| 56 | if coord != 't':
|
|---|
| 57 | raise RuntimeError(_('_HYCOMGridGOMl0043D._GetCoords() called with coord == \'%(coord)s\'. This should never happen. Please contact the author of this tool for assistance.') % {u'coord': coord})
|
|---|
| 58 | if self._CachedTCenterCoords is None:
|
|---|
| 59 | import numpy
|
|---|
| 60 | self.ParentCollection._Open()
|
|---|
| 61 | self._CachedTCenterCoords = numpy.array(map(lambda days: datetime.timedelta(days) + datetime.datetime(1900, 12, 31), list(self.ParentCollection._PydapDataset['MT'][:])), dtype='object')
|
|---|
| 62 | if slices is None:
|
|---|
| 63 | result = self._CachedTCenterCoords.copy()
|
|---|
| 64 | else:
|
|---|
| 65 | result = self._CachedTCenterCoords.__getitem__(*slices)
|
|---|
| 66 | if fixedIncrementOffset != 0:
|
|---|
| 67 | result += datetime.timedelta(fixedIncrementOffset)
|
|---|
| 68 | return result
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | class HYCOMGOMl0043D(Grid):
|
|---|
| 72 | __doc__ = DynamicDocString()
|
|---|
| 73 |
|
|---|
| 74 | def _GetVariableName(self):
|
|---|
| 75 | return self._VariableName
|
|---|
| 76 |
|
|---|
| 77 | VariableName = property(_GetVariableName, doc=DynamicDocString())
|
|---|
| 78 |
|
|---|
| 79 | def _GetStartYear(self):
|
|---|
| 80 | return self._StartYear
|
|---|
| 81 |
|
|---|
| 82 | StartYear = property(_GetStartYear, doc=DynamicDocString())
|
|---|
| 83 |
|
|---|
| 84 | def _GetEndYear(self):
|
|---|
| 85 | return self._EndYear
|
|---|
| 86 |
|
|---|
| 87 | EndYear = property(_GetEndYear, doc=DynamicDocString())
|
|---|
| 88 |
|
|---|
| 89 | def __init__(self, variableName, startYear=None, endYear=None, timeout=600, maxRetryTime=None, cacheDirectory=None):
|
|---|
| 90 | self.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 91 |
|
|---|
| 92 | # Perform additional validation
|
|---|
| 93 |
|
|---|
| 94 | if startYear is None:
|
|---|
| 95 | startYear = 2003
|
|---|
| 96 | elif startYear > (datetime.datetime.now() + datetime.timedelta(5)).year:
|
|---|
| 97 | raise ValueError(_(u'The start year must be less than or equal to %(max)i.') % {u'max': (datetime.datetime.now() + datetime.timedelta(5)).year})
|
|---|
| 98 |
|
|---|
| 99 | if endYear is not None and endYear < startYear:
|
|---|
| 100 | raise ValueError(_(u'The end year must be greater than or equal to the start year. If the start year is not specified, the end year must be greater than or equal to 2003.'))
|
|---|
| 101 |
|
|---|
| 102 | # Initialize our properties.
|
|---|
| 103 |
|
|---|
| 104 | self._VariableName = variableName
|
|---|
| 105 | self._StartYear = startYear
|
|---|
| 106 | self._EndYear = endYear
|
|---|
| 107 | self._Timeout = timeout
|
|---|
| 108 | self._MaxRetryTime = maxRetryTime
|
|---|
| 109 | self._CacheDirectory = cacheDirectory
|
|---|
| 110 | self._DisplayName = _(u'%(name)s grid of the HYCOM + NCODA Gulf of Mexico 1/25 degree Analysis (GOMl0.04)') % {u'name': variableName}
|
|---|
| 111 | self._OpenURL = None
|
|---|
| 112 | self._OpenGrid = None
|
|---|
| 113 |
|
|---|
| 114 | # Initialize the base class.
|
|---|
| 115 |
|
|---|
| 116 | super(HYCOMGOMl0043D, self).__init__(queryableAttributes=(QueryableAttribute(u'VariableName', _(u'HYCOM variable'), UnicodeStringTypeMetadata(allowedValues=[u'emp', u'mld', u'mlp', u'qtot', u'ssh', u'surface_salinity_trend', u'surface_temperature_trend'], makeLowercase=True)),),
|
|---|
| 117 | queryableAttributeValues={u'VariableName': variableName},
|
|---|
| 118 | lazyPropertyValues={'SpatialReference': Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +no_defs', 'obj'),
|
|---|
| 119 | 'Dimensions': u'tyx',
|
|---|
| 120 | 'CoordDependencies': (None, None, None),
|
|---|
| 121 | 'CoordIncrements': (1.0, 4447.7949713872476, 4447.7949713872476),
|
|---|
| 122 | 'TIncrementUnit': u'day',
|
|---|
| 123 | 'TSemiRegularity': None,
|
|---|
| 124 | 'TCountPerSemiRegularPeriod': None,
|
|---|
| 125 | 'TCornerCoordType': u'center',
|
|---|
| 126 | 'CornerCoords': (datetime.datetime(startYear, 1, 1), 2045985.6431758059, -10897097.679898757), # Center of lower-left cell, in degrees: 98.0 W, 18.091648101806641 N
|
|---|
| 127 | 'PhysicalDimensions': u'tyx',
|
|---|
| 128 | 'PhysicalDimensionsFlipped': (False, False, False),
|
|---|
| 129 | 'UnscaledDataType': u'float32',
|
|---|
| 130 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 131 | 'ScalingFunction': None})
|
|---|
| 132 |
|
|---|
| 133 | def _Close(self):
|
|---|
| 134 | if hasattr(self, '_OpenGrid') and self._OpenGrid is not None:
|
|---|
| 135 | self._OpenGrid.Close()
|
|---|
| 136 | self._OpenURL = None
|
|---|
| 137 | self._OpenGrid = None
|
|---|
| 138 | super(HYCOMGOMl0043D, self)._Close()
|
|---|
| 139 |
|
|---|
| 140 | def _GetDisplayName(self):
|
|---|
| 141 | return self._DisplayName
|
|---|
| 142 |
|
|---|
| 143 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 144 |
|
|---|
| 145 | # The only property that we can retrieve here is the shape.
|
|---|
| 146 | # For the t axis, add the number of days in the years leading
|
|---|
| 147 | # up to the final year to the number of days available from
|
|---|
| 148 | # HYCOM in the final year. For the x and y axes, just use
|
|---|
| 149 | # hardcoded values.
|
|---|
| 150 |
|
|---|
| 151 | if name == 'Shape':
|
|---|
| 152 | if self._EndYear is not None and self._EndYear < datetime.datetime.now().year:
|
|---|
| 153 | return ((datetime.datetime(self._EndYear + 1, 1, 1) - datetime.datetime(self._StartYear, 1, 1)).days, 385, 541)
|
|---|
| 154 |
|
|---|
| 155 | endYearGrid = _HYCOMGridGOMl0043D('http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_30.1/%i' % datetime.datetime.now().year, self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory)
|
|---|
| 156 | try:
|
|---|
| 157 | endDay = endYearGrid.CenterCoords['t', -1]
|
|---|
| 158 |
|
|---|
| 159 | if endDay.month == 12 and endDay.day == 31:
|
|---|
| 160 | endYearGrid = _HYCOMGridGOMl0043D('http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_30.1/%i' % datetime.datetime.now().year + 1, self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory)
|
|---|
| 161 | endDay = endYearGrid.CenterCoords['t', -1]
|
|---|
| 162 | finally:
|
|---|
| 163 | endYearGrid.Close()
|
|---|
| 164 |
|
|---|
| 165 | return ((endDay - datetime.datetime(self._StartYear, 1, 1)).days + 1, 385, 541)
|
|---|
| 166 |
|
|---|
| 167 | return None
|
|---|
| 168 |
|
|---|
| 169 | def _ReadNumpyArray(self, sliceList):
|
|---|
| 170 |
|
|---|
| 171 | # For many OPeNDAP datasets, we would be able to request the
|
|---|
| 172 | # entire 3D slab directly. This won't work for the HYCOM
|
|---|
| 173 | # GOMl0.04 dataset, for two reasons: 1) The dataset is split
|
|---|
| 174 | # OPeNDAP URLs for each year, and 2) HYCOM omits slices when
|
|---|
| 175 | # their system occasionally fails to generate data for a day,
|
|---|
| 176 | # so most years do not have a full 365 (or 366) slices. To
|
|---|
| 177 | # deal with this, we have to loop over the requested range of
|
|---|
| 178 | # time indices and issue OPeNDAP requests to the proper URLs
|
|---|
| 179 | # and per-URL time indices.
|
|---|
| 180 | #
|
|---|
| 181 | # First, allocate the array we will return. We'll populate
|
|---|
| 182 | # this as we go along. (I prefer this approach rather than
|
|---|
| 183 | # growing an array through concatenation because it avoids
|
|---|
| 184 | # repeatedly allocating and copying memory.)
|
|---|
| 185 |
|
|---|
| 186 | import numpy
|
|---|
| 187 | result = numpy.zeros((sliceList[0].stop - sliceList[0].start, sliceList[1].stop - sliceList[1].start, sliceList[2].stop - sliceList[2].start), dtype=str(self.UnscaledDataType))
|
|---|
| 188 |
|
|---|
| 189 | # Loop over the requested t indices, populating the result
|
|---|
| 190 | # array.
|
|---|
| 191 |
|
|---|
| 192 | i = 0
|
|---|
| 193 | tCoords = self.CenterCoords['t', sliceList[0]]
|
|---|
| 194 |
|
|---|
| 195 | while i < len(tCoords):
|
|---|
| 196 |
|
|---|
| 197 | # Open the _HYCOMGridGOMl0043D for the next block of t
|
|---|
| 198 | # coordinates. These grids are 1 year long, except in 2010
|
|---|
| 199 | # when HYCOM switched to an improved configuration after
|
|---|
| 200 | # six months.
|
|---|
| 201 |
|
|---|
| 202 | if tCoords[i] < datetime.datetime(2010, 7, 1):
|
|---|
| 203 | url = 'http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_20.1/%i' % tCoords[i].year
|
|---|
| 204 | else:
|
|---|
| 205 | url = 'http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_30.1/%i' % tCoords[i].year
|
|---|
| 206 |
|
|---|
| 207 | if self._OpenURL != url:
|
|---|
| 208 | if self._OpenGrid is not None:
|
|---|
| 209 | self._OpenGrid.Close()
|
|---|
| 210 | self._OpenURL = None
|
|---|
| 211 | self._OpenGrid = None
|
|---|
| 212 |
|
|---|
| 213 | self._OpenGrid = _HYCOMGridGOMl0043D(url, self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory)
|
|---|
| 214 | self._OpenURL = url
|
|---|
| 215 |
|
|---|
| 216 | if tCoords[i] >= datetime.datetime(2010, 1, 1) and tCoords[i] <= datetime.datetime(2010, 6, 30):
|
|---|
| 217 | lastDayOfDataset = datetime.datetime(2010, 6, 30)
|
|---|
| 218 | else:
|
|---|
| 219 | lastDayOfDataset = datetime.datetime(tCoords[i].year, 12, 31)
|
|---|
| 220 |
|
|---|
| 221 | # Read the necessary data from this grid as one 3D slab.
|
|---|
| 222 |
|
|---|
| 223 | gridTStart = bisect.bisect_left(self._OpenGrid.CenterCoords['t'].tolist(), tCoords[i])
|
|---|
| 224 | gridTStop = bisect.bisect_right(self._OpenGrid.CenterCoords['t'].tolist(), tCoords[-1])
|
|---|
| 225 | gridTCoords = self._OpenGrid.CenterCoords['t', gridTStart:gridTStop]
|
|---|
| 226 | data = self._OpenGrid.UnscaledData.__getitem__((slice(gridTStart, gridTStop), sliceList[1], sliceList[2]))
|
|---|
| 227 |
|
|---|
| 228 | # Iterate through the t indices, copying out time slices
|
|---|
| 229 | # when they are available, otherwise setting slices to the
|
|---|
| 230 | # UnscaledNoDataValue.
|
|---|
| 231 |
|
|---|
| 232 | j = 0
|
|---|
| 233 |
|
|---|
| 234 | while i < len(tCoords) and tCoords[i] <= lastDayOfDataset:
|
|---|
| 235 | if j < len(gridTCoords) and gridTCoords[j] == tCoords[i]:
|
|---|
| 236 | result[i] = data[j]
|
|---|
| 237 | j += 1
|
|---|
| 238 | else:
|
|---|
| 239 | result[i] = self.UnscaledNoDataValue
|
|---|
| 240 | i += 1
|
|---|
| 241 |
|
|---|
| 242 | # Return successfully.
|
|---|
| 243 |
|
|---|
| 244 | return result, self.UnscaledNoDataValue
|
|---|
| 245 |
|
|---|
| 246 | @classmethod
|
|---|
| 247 | def CreateArcGISRasters(cls, variableName,
|
|---|
| 248 | outputWorkspace, mode=u'add', rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s_%%Y%%j.img'], rasterCatalog=None,
|
|---|
| 249 | spatialExtent=None, linearUnit=u'Degrees', startDate=None, endDate=None,
|
|---|
| 250 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 251 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 252 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 253 | if startDate is not None:
|
|---|
| 254 | startYear = startDate.year
|
|---|
| 255 | else:
|
|---|
| 256 | startYear = None
|
|---|
| 257 | if endDate is not None:
|
|---|
| 258 | endYear = endDate.year
|
|---|
| 259 | else:
|
|---|
| 260 | endYear = None
|
|---|
| 261 | grid = HYCOMGOMl0043D(variableName, startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 262 | try:
|
|---|
| 263 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to create the first raster. Please be patient. After the first one is created, the rest will go much faster. Because the first raster takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first raster is created. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 264 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 265 | from GeoEco.Datasets.Virtual import GridSliceCollection
|
|---|
| 266 | grid = HYCOMGOMl0044D._Clip(grid, spatialExtent, linearUnit, startDate=startDate, endDate=endDate)
|
|---|
| 267 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(grid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata())]))
|
|---|
| 268 | workspace.ImportDatasets(GridSliceCollection(grid, tQACoordType=u'center').QueryDatasets(), mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 269 | if rasterCatalog is not None:
|
|---|
| 270 | workspace.ToRasterCatalog(rasterCatalog, grid.GetSpatialReference(u'ArcGIS'), tQACoordType=u'center', tCoordFunction=lambda qav: [qav[u'DateTime'] - datetime.timedelta(0.5), qav[u'DateTime'], qav[u'DateTime'] + datetime.timedelta(0.5) - datetime.timedelta(seconds=1)], overwriteExisting=True)
|
|---|
| 271 | finally:
|
|---|
| 272 | grid.Close()
|
|---|
| 273 | return outputWorkspace
|
|---|
| 274 |
|
|---|
| 275 | @classmethod
|
|---|
| 276 | def CreateClimatologicalArcGISRasters(cls, variableName,
|
|---|
| 277 | statistic, binType,
|
|---|
| 278 | outputWorkspace, mode=u'add', rasterNameExpressions=[u'%(VariableName)s', u'%(ClimatologyBinType)s_Climatology', u'%(VariableName)s_%(ClimatologyBinName)s_%(Statistic)s.img'],
|
|---|
| 279 | binDuration=1, startDayOfYear=1,
|
|---|
| 280 | spatialExtent=None, linearUnit=u'Degrees', startDate=None, endDate=None,
|
|---|
| 281 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 282 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 283 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 284 | if startDate is not None:
|
|---|
| 285 | startYear = startDate.year
|
|---|
| 286 | else:
|
|---|
| 287 | startYear = None
|
|---|
| 288 | if endDate is not None:
|
|---|
| 289 | endYear = endDate.year
|
|---|
| 290 | else:
|
|---|
| 291 | endYear = None
|
|---|
| 292 | grid = HYCOMGOMl0043D(variableName, startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 293 | try:
|
|---|
| 294 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to create the first raster. Please be patient. After the first one is created, the rest will go much faster. Because the first raster takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first raster is created. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 295 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 296 | from GeoEco.Datasets.Virtual import ClimatologicalGridCollection
|
|---|
| 297 | grid = HYCOMGOMl0044D._Clip(grid, spatialExtent, linearUnit, startDate=startDate, endDate=endDate)
|
|---|
| 298 | collection = ClimatologicalGridCollection(grid, statistic, binType, binDuration, startDayOfYear, reportProgress=True)
|
|---|
| 299 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(collection.GetAllQueryableAttributes()))
|
|---|
| 300 | workspace.ImportDatasets(collection.QueryDatasets(), mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 301 | finally:
|
|---|
| 302 | grid.Close()
|
|---|
| 303 | return outputWorkspace
|
|---|
| 304 |
|
|---|
| 305 | @classmethod
|
|---|
| 306 | def InterpolateAtArcGISPoints(cls, variableNames,
|
|---|
| 307 | points, valueFields, tField, method=u'Nearest', where=None, noDataValue=None,
|
|---|
| 308 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 309 | orderByFields=None, numBlocksToCacheInMemory=128, xBlockSize=16, yBlockSize=16, tBlockSize=3):
|
|---|
| 310 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 311 | grids = [HYCOMGOMl0043D(variableName, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) for variableName in variableNames]
|
|---|
| 312 | try:
|
|---|
| 313 | if orderByFields is not None:
|
|---|
| 314 | orderBy = u', '.join(map(lambda f: f + u' ASC', orderByFields))
|
|---|
| 315 | else:
|
|---|
| 316 | from GeoEco.ArcGIS import GeoprocessorManager
|
|---|
| 317 | if GeoprocessorManager.GetArcGISMajorVersion() > 9 or GeoprocessorManager.GetArcGISMinorVersion() >= 2:
|
|---|
| 318 | orderBy = tField + u' ASC'
|
|---|
| 319 | else:
|
|---|
| 320 | orderBy = None
|
|---|
| 321 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to process the first point. Please be patient. After the first one is processed, the rest will go much faster. Because the first one takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first point is processed. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 322 | from GeoEco.Datasets.ArcGIS import ArcGISTable
|
|---|
| 323 | from GeoEco.SpatialAnalysis.Interpolation import Interpolator
|
|---|
| 324 | Interpolator.InterpolateGridsValuesForTableOfPoints(grids, ArcGISTable(points), valueFields, tField=tField, where=where, orderBy=orderBy, method=method, noDataValue=noDataValue, numBlocksToCacheInMemory=numBlocksToCacheInMemory, xBlockSize=xBlockSize, yBlockSize=yBlockSize, tBlockSize=tBlockSize)
|
|---|
| 325 | finally:
|
|---|
| 326 | for grid in grids:
|
|---|
| 327 | grid.Close()
|
|---|
| 328 | return points
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 | class _HYCOMGridGOMl0044D(OPeNDAPGrid):
|
|---|
| 332 | __doc__ = DynamicDocString()
|
|---|
| 333 |
|
|---|
| 334 | def __init__(self, url, variableName, timeout, maxRetryTime, cacheDirectory):
|
|---|
| 335 | self._CachedTCenterCoords = None
|
|---|
| 336 | super(_HYCOMGridGOMl0044D, self).__init__(OPeNDAPURL(url, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory),
|
|---|
| 337 | variableName,
|
|---|
| 338 | 'Grid',
|
|---|
| 339 | lazyPropertyValues={'SpatialReference': Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +no_defs', 'obj'),
|
|---|
| 340 | 'Dimensions': 'tzyx',
|
|---|
| 341 | 'CoordDependencies': (None, None, None, None),
|
|---|
| 342 | 'CoordIncrements': (None, None, 4447.7949713872476, 4447.7949713872476), # t increment is None because, sadly, HYCOM omits slices when their system occasionally fails to generate data for a day
|
|---|
| 343 | 'TCornerCoordType': 'center',
|
|---|
| 344 | 'PhysicalDimensions': 'tzyx',
|
|---|
| 345 | 'PhysicalDimensionsFlipped': (False, False, False, False),
|
|---|
| 346 | 'UnscaledDataType': 'float32',
|
|---|
| 347 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 348 | 'ScalingFunction': None})
|
|---|
| 349 |
|
|---|
| 350 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 351 | if name == 'CornerCoords':
|
|---|
| 352 | return (self._GetCoords('t', 0, [0], [0], 0.), 0.0, 2045985.6431758059, -10897097.679898757) # Center of lower-left cell, in degrees: 98.0 W, 18.091648101806641 N
|
|---|
| 353 | return super(_HYCOMGridGOMl0044D, self)._GetLazyPropertyPhysicalValue(name)
|
|---|
| 354 |
|
|---|
| 355 | def _GetCoords(self, coord, coordNum, slices, sliceDims, fixedIncrementOffset):
|
|---|
| 356 | if coord not in ['t', 'z']:
|
|---|
| 357 | raise RuntimeError(_('_HYCOMGridGOMl0044D._GetCoords() called with coord == \'%(coord)s\'. This should never happen. Please contact the author of this tool for assistance.') % {u'coord': coord})
|
|---|
| 358 |
|
|---|
| 359 | import numpy
|
|---|
| 360 |
|
|---|
| 361 | if coord == 't':
|
|---|
| 362 | if self._CachedTCenterCoords is None:
|
|---|
| 363 | self.ParentCollection._Open()
|
|---|
| 364 | self._CachedTCenterCoords = numpy.array(map(lambda days: datetime.timedelta(days) + datetime.datetime(1900, 12, 31), list(self.ParentCollection._PydapDataset['MT'][:])), dtype='object')
|
|---|
| 365 | if slices is None:
|
|---|
| 366 | result = self._CachedTCenterCoords.copy()
|
|---|
| 367 | else:
|
|---|
| 368 | result = self._CachedTCenterCoords.__getitem__(*slices)
|
|---|
| 369 | if fixedIncrementOffset != 0:
|
|---|
| 370 | result += datetime.timedelta(fixedIncrementOffset)
|
|---|
| 371 | return result
|
|---|
| 372 |
|
|---|
| 373 | zCoords = [0.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 125.0, 150.0, 200.0, 250.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900.0, 1000.0, 1100.0, 1200.0, 1300.0, 1400.0, 1500.0, 1750.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0]
|
|---|
| 374 | if fixedIncrementOffset == -0.5:
|
|---|
| 375 | zCoords = [0.0] + map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:])
|
|---|
| 376 | elif fixedIncrementOffset == 0.5:
|
|---|
| 377 | zCoords = map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:]) + [11000.0]
|
|---|
| 378 | if slices is None:
|
|---|
| 379 | return numpy.array(zCoords)
|
|---|
| 380 | return numpy.array(zCoords).__getitem__(*slices)
|
|---|
| 381 |
|
|---|
| 382 |
|
|---|
| 383 | class HYCOMGOMl0044D(Grid):
|
|---|
| 384 | __doc__ = DynamicDocString()
|
|---|
| 385 |
|
|---|
| 386 | def _GetVariableName(self):
|
|---|
| 387 | return self._VariableName
|
|---|
| 388 |
|
|---|
| 389 | VariableName = property(_GetVariableName, doc=DynamicDocString())
|
|---|
| 390 |
|
|---|
| 391 | def _GetStartYear(self):
|
|---|
| 392 | return self._StartYear
|
|---|
| 393 |
|
|---|
| 394 | StartYear = property(_GetStartYear, doc=DynamicDocString())
|
|---|
| 395 |
|
|---|
| 396 | def _GetEndYear(self):
|
|---|
| 397 | return self._EndYear
|
|---|
| 398 |
|
|---|
| 399 | EndYear = property(_GetEndYear, doc=DynamicDocString())
|
|---|
| 400 |
|
|---|
| 401 | def __init__(self, variableName, startYear=None, endYear=None, timeout=600, maxRetryTime=None, cacheDirectory=None):
|
|---|
| 402 | self.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 403 |
|
|---|
| 404 | # Perform additional validation
|
|---|
| 405 |
|
|---|
| 406 | if startYear is None:
|
|---|
| 407 | startYear = 2003
|
|---|
| 408 | elif startYear > (datetime.datetime.now() + datetime.timedelta(5)).year:
|
|---|
| 409 | raise ValueError(_(u'The start year must be less than or equal to %(max)i.') % {u'max': (datetime.datetime.now() + datetime.timedelta(5)).year})
|
|---|
| 410 |
|
|---|
| 411 | if endYear is not None and endYear < startYear:
|
|---|
| 412 | raise ValueError(_(u'The end year must be greater than or equal to the start year. If the start year is not specified, the end year must be greater than or equal to 2003.'))
|
|---|
| 413 |
|
|---|
| 414 | # Initialize our properties.
|
|---|
| 415 |
|
|---|
| 416 | self._VariableName = variableName
|
|---|
| 417 | self._StartYear = startYear
|
|---|
| 418 | self._EndYear = endYear
|
|---|
| 419 | self._Timeout = timeout
|
|---|
| 420 | self._MaxRetryTime = maxRetryTime
|
|---|
| 421 | self._CacheDirectory = cacheDirectory
|
|---|
| 422 | self._DisplayName = _(u'%(name)s grid of the HYCOM + NCODA Gulf of Mexico 1/25 degree Analysis (GOMl0.04)') % {u'name': variableName}
|
|---|
| 423 | self._OpenURL = None
|
|---|
| 424 | self._OpenGrid = None
|
|---|
| 425 |
|
|---|
| 426 | # Initialize the base class.
|
|---|
| 427 |
|
|---|
| 428 | super(HYCOMGOMl0044D, self).__init__(queryableAttributes=(QueryableAttribute(u'VariableName', _(u'HYCOM variable'), UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature', u'u', u'v', u'w_velocity'], makeLowercase=True)),),
|
|---|
| 429 | queryableAttributeValues={u'VariableName': variableName},
|
|---|
| 430 | lazyPropertyValues={'SpatialReference': Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +no_defs', 'obj'),
|
|---|
| 431 | 'Dimensions': u'tzyx',
|
|---|
| 432 | 'CoordDependencies': (None, None, None, None),
|
|---|
| 433 | 'CoordIncrements': (1.0, None, 4447.7949713872476, 4447.7949713872476),
|
|---|
| 434 | 'TIncrementUnit': u'day',
|
|---|
| 435 | 'TSemiRegularity': None,
|
|---|
| 436 | 'TCountPerSemiRegularPeriod': None,
|
|---|
| 437 | 'TCornerCoordType': u'center',
|
|---|
| 438 | 'CornerCoords': (datetime.datetime(startYear, 1, 1), 0.0, 2045985.6431758059, -10897097.679898757), # Center of lower-left cell, in degrees: 98.0 W, 18.091648101806641 N
|
|---|
| 439 | 'PhysicalDimensions': u'tzyx',
|
|---|
| 440 | 'PhysicalDimensionsFlipped': (False, False, False, False),
|
|---|
| 441 | 'UnscaledDataType': u'float32',
|
|---|
| 442 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 443 | 'ScalingFunction': None})
|
|---|
| 444 |
|
|---|
| 445 | def _Close(self):
|
|---|
| 446 | if hasattr(self, '_OpenGrid') and self._OpenGrid is not None:
|
|---|
| 447 | self._OpenGrid.Close()
|
|---|
| 448 | self._OpenURL = None
|
|---|
| 449 | self._OpenGrid = None
|
|---|
| 450 | super(HYCOMGOMl0044D, self)._Close()
|
|---|
| 451 |
|
|---|
| 452 | def _GetDisplayName(self):
|
|---|
| 453 | return self._DisplayName
|
|---|
| 454 |
|
|---|
| 455 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 456 |
|
|---|
| 457 | # The only property that we can retrieve here is the shape.
|
|---|
| 458 | # For the t axis, add the number of days in the years leading
|
|---|
| 459 | # up to the final year to the number of days available from
|
|---|
| 460 | # HYCOM in the final year. For the x and y axes, just use
|
|---|
| 461 | # hardcoded values.
|
|---|
| 462 |
|
|---|
| 463 | if name == 'Shape':
|
|---|
| 464 | if self._EndYear is not None and self._EndYear < datetime.datetime.now().year:
|
|---|
| 465 | return ((datetime.datetime(self._EndYear + 1, 1, 1) - datetime.datetime(self._StartYear, 1, 1)).days, 40, 385, 541)
|
|---|
| 466 |
|
|---|
| 467 | endYearGrid = _HYCOMGridGOMl0044D('http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_30.1/%i' % datetime.datetime.now().year, self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory)
|
|---|
| 468 | try:
|
|---|
| 469 | endDay = endYearGrid.CenterCoords['t', -1]
|
|---|
| 470 |
|
|---|
| 471 | if endDay.month == 12 and endDay.day == 31:
|
|---|
| 472 | endYearGrid = _HYCOMGridGOMl0044D('http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_30.1/%i' % datetime.datetime.now().year + 1, self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory)
|
|---|
| 473 | endDay = endYearGrid.CenterCoords['t', -1]
|
|---|
| 474 | finally:
|
|---|
| 475 | endYearGrid.Close()
|
|---|
| 476 |
|
|---|
| 477 | return ((endDay - datetime.datetime(self._StartYear, 1, 1)).days + 1, 40, 385, 541)
|
|---|
| 478 |
|
|---|
| 479 | return None
|
|---|
| 480 |
|
|---|
| 481 | def _GetCoords(self, coord, coordNum, slices, sliceDims, fixedIncrementOffset):
|
|---|
| 482 | if coord != 'z':
|
|---|
| 483 | raise RuntimeError(_('HYCOMGOMl0044D._GetCoords() called with coord == \'%(coord)s\'. This should never happen. Please contact the author of this tool for assistance.') % {u'coord': coord})
|
|---|
| 484 | zCoords = [0.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 125.0, 150.0, 200.0, 250.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900.0, 1000.0, 1100.0, 1200.0, 1300.0, 1400.0, 1500.0, 1750.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0]
|
|---|
| 485 | if fixedIncrementOffset == -0.5:
|
|---|
| 486 | zCoords = [0.0] + map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:])
|
|---|
| 487 | elif fixedIncrementOffset == 0.5:
|
|---|
| 488 | zCoords = map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:]) + [11000.0]
|
|---|
| 489 | import numpy
|
|---|
| 490 | if slices is None:
|
|---|
| 491 | return numpy.array(zCoords)
|
|---|
| 492 | return numpy.array(zCoords).__getitem__(*slices)
|
|---|
| 493 |
|
|---|
| 494 | def _ReadNumpyArray(self, sliceList):
|
|---|
| 495 |
|
|---|
| 496 | # For many OPeNDAP datasets, we would be able to request the
|
|---|
| 497 | # entire 4D slab directly. This won't work for the HYCOM
|
|---|
| 498 | # GOMl0.04 dataset, for two reasons: 1) The dataset is split
|
|---|
| 499 | # OPeNDAP URLs for each year, and 2) HYCOM omits slices when
|
|---|
| 500 | # their system occasionally fails to generate data for a day,
|
|---|
| 501 | # so most years do not have a full 365 (or 366) slices. To
|
|---|
| 502 | # deal with this, we have to loop over the requested range of
|
|---|
| 503 | # time indices and issue OPeNDAP requests to the proper URLs
|
|---|
| 504 | # and per-URL time indices.
|
|---|
| 505 | #
|
|---|
| 506 | # First, allocate the array we will return. We'll populate
|
|---|
| 507 | # this as we go along. (I prefer this approach rather than
|
|---|
| 508 | # growing an array through concatenation because it avoids
|
|---|
| 509 | # repeatedly allocating and copying memory.)
|
|---|
| 510 |
|
|---|
| 511 | import numpy
|
|---|
| 512 | result = numpy.zeros((sliceList[0].stop - sliceList[0].start, sliceList[1].stop - sliceList[1].start, sliceList[2].stop - sliceList[2].start, sliceList[3].stop - sliceList[3].start), dtype=str(self.UnscaledDataType))
|
|---|
| 513 |
|
|---|
| 514 | # Loop over the requested t indices, populating the result
|
|---|
| 515 | # array.
|
|---|
| 516 |
|
|---|
| 517 | i = 0
|
|---|
| 518 | tCoords = self.CenterCoords['t', sliceList[0]]
|
|---|
| 519 |
|
|---|
| 520 | while i < len(tCoords):
|
|---|
| 521 |
|
|---|
| 522 | # Open the _HYCOMGridGOMl0044D for the next block of t
|
|---|
| 523 | # coordinates. These grids are 1 year long, except in 2010
|
|---|
| 524 | # when HYCOM switched to an improved configuration after
|
|---|
| 525 | # five months.
|
|---|
| 526 |
|
|---|
| 527 | if tCoords[i] < datetime.datetime(2010, 7, 1):
|
|---|
| 528 | url = 'http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_20.1/%i' % tCoords[i].year
|
|---|
| 529 | else:
|
|---|
| 530 | url = 'http://tds.hycom.org/thredds/dodsC/GOMl0.04/expt_30.1/%i' % tCoords[i].year
|
|---|
| 531 |
|
|---|
| 532 | if self._OpenURL != url:
|
|---|
| 533 | if self._OpenGrid is not None:
|
|---|
| 534 | self._OpenGrid.Close()
|
|---|
| 535 | self._OpenURL = None
|
|---|
| 536 | self._OpenGrid = None
|
|---|
| 537 |
|
|---|
| 538 | self._OpenGrid = _HYCOMGridGOMl0044D(url, self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory)
|
|---|
| 539 | self._OpenURL = url
|
|---|
| 540 |
|
|---|
| 541 | if tCoords[i] >= datetime.datetime(2010, 1, 1) and tCoords[i] <= datetime.datetime(2010, 6, 30):
|
|---|
| 542 | lastDayOfDataset = datetime.datetime(2010, 6, 30)
|
|---|
| 543 | else:
|
|---|
| 544 | lastDayOfDataset = datetime.datetime(tCoords[i].year, 12, 31)
|
|---|
| 545 |
|
|---|
| 546 | # Read the necessary data from this grid as one 4D slab.
|
|---|
| 547 |
|
|---|
| 548 | gridTStart = bisect.bisect_left(self._OpenGrid.CenterCoords['t'].tolist(), tCoords[i])
|
|---|
| 549 | gridTStop = bisect.bisect_right(self._OpenGrid.CenterCoords['t'].tolist(), tCoords[-1])
|
|---|
| 550 | gridTCoords = self._OpenGrid.CenterCoords['t', gridTStart:gridTStop]
|
|---|
| 551 | data = self._OpenGrid.UnscaledData.__getitem__((slice(gridTStart, gridTStop), sliceList[1], sliceList[2], sliceList[3]))
|
|---|
| 552 |
|
|---|
| 553 | # Iterate through the t indices, copying out time slices
|
|---|
| 554 | # when they are available, otherwise setting slices to the
|
|---|
| 555 | # UnscaledNoDataValue.
|
|---|
| 556 |
|
|---|
| 557 | j = 0
|
|---|
| 558 |
|
|---|
| 559 | while i < len(tCoords) and tCoords[i] <= lastDayOfDataset:
|
|---|
| 560 | if j < len(gridTCoords) and gridTCoords[j] == tCoords[i]:
|
|---|
| 561 | result[i] = data[j]
|
|---|
| 562 | j += 1
|
|---|
| 563 | else:
|
|---|
| 564 | result[i] = self.UnscaledNoDataValue
|
|---|
| 565 | i += 1
|
|---|
| 566 |
|
|---|
| 567 | # Return successfully.
|
|---|
| 568 |
|
|---|
| 569 | return result, self.UnscaledNoDataValue
|
|---|
| 570 |
|
|---|
| 571 | @classmethod
|
|---|
| 572 | def _Clip(cls, grid, spatialExtent, linearUnit, minDepth=None, maxDepth=None, startDate=None, endDate=None):
|
|---|
| 573 | from GeoEco.Datasets.Virtual import ClippedGrid
|
|---|
| 574 |
|
|---|
| 575 | xMin, yMin, xMax, yMax = None, None, None, None
|
|---|
| 576 | if spatialExtent is not None:
|
|---|
| 577 | sr = grid.GetSpatialReference('obj')
|
|---|
| 578 |
|
|---|
| 579 | from GeoEco.Types import EnvelopeTypeMetadata
|
|---|
| 580 | xMin, yMin, xMax, yMax = EnvelopeTypeMetadata.ParseFromArcGISString(spatialExtent)
|
|---|
| 581 |
|
|---|
| 582 | if linearUnit == u'degrees':
|
|---|
| 583 | centralMeridian = sr.GetNormProjParm('central_meridian')
|
|---|
| 584 | xMinAllowed = -180. + centralMeridian
|
|---|
| 585 | xMaxAllowed = 180. + centralMeridian
|
|---|
| 586 |
|
|---|
| 587 | if str(xMin) == str(xMinAllowed):
|
|---|
| 588 | xMin = xMinAllowed
|
|---|
| 589 | elif str(xMin) == str(xMaxAllowed):
|
|---|
| 590 | xMin = xMaxAllowed
|
|---|
| 591 | if str(xMax) == str(xMinAllowed):
|
|---|
| 592 | xMax = xMinAllowed
|
|---|
| 593 | elif str(xMax) == str(xMaxAllowed):
|
|---|
| 594 | xMax = xMaxAllowed
|
|---|
| 595 |
|
|---|
| 596 | if xMin < xMinAllowed or xMin > xMaxAllowed:
|
|---|
| 597 | raise ValueError(_(u'The X Minimum of the Spatial Extent parameter (%(value)g degrees) is not within the geographic extent of the grid\'s coordinate system. The geographic extent in the X direction is %(xMin)g to %(xMax)g degrees. Please specify an X Minimum in that range.') % {u'value': xMin, u'xMin': xMinAllowed, u'xMax': xMaxAllowed})
|
|---|
| 598 | if xMax < xMinAllowed or xMax > xMaxAllowed:
|
|---|
| 599 | raise ValueError(_(u'The X Maximum of the Spatial Extent parameter (%(value)g degrees) is not within the geographic extent of the grid\'s coordinate system. The geographic extent in the X direction is %(xMin)g to %(xMax)g degrees. Please specify an X Minimum in that range.') % {u'value': xMax, u'xMin': xMinAllowed, u'xMax': xMaxAllowed})
|
|---|
| 600 |
|
|---|
| 601 | yMin = max(yMin, -85.0)
|
|---|
| 602 | yMax = min(yMax, 85.0)
|
|---|
| 603 | try:
|
|---|
| 604 | transformer = cls._osr().CoordinateTransformation(Dataset.ConvertSpatialReference('proj4', '+proj=latlong +R=6371001 +no_defs', 'obj'), grid.GetSpatialReference('obj'))
|
|---|
| 605 | xMin, yMin = transformer.TransformPoint(xMin, yMin)[:2]
|
|---|
| 606 | xMax, yMax = transformer.TransformPoint(xMax, yMax)[:2]
|
|---|
| 607 | except:
|
|---|
| 608 | cls._gdal().ErrorReset()
|
|---|
| 609 | raise
|
|---|
| 610 |
|
|---|
| 611 | if spatialExtent is not None or minDepth is not None or maxDepth is not None or startDate is not None or endDate is not None:
|
|---|
| 612 | if startDate is not None:
|
|---|
| 613 | startDate = datetime.datetime(startDate.year, startDate.month, startDate.day, 0, 0, 0)
|
|---|
| 614 | if endDate is not None:
|
|---|
| 615 | endDate = datetime.datetime(endDate.year, endDate.month, endDate.day, 23, 59, 59)
|
|---|
| 616 |
|
|---|
| 617 | grid = ClippedGrid(grid, u'Map coordinates', xMin=xMin, xMax=xMax, yMin=yMin, yMax=yMax, zMin=minDepth, zMax=maxDepth, tMin=startDate, tMax=endDate)
|
|---|
| 618 |
|
|---|
| 619 | return grid
|
|---|
| 620 |
|
|---|
| 621 | @classmethod
|
|---|
| 622 | def CreateArcGISRasters(cls, variableName,
|
|---|
| 623 | outputWorkspace, mode=u'add', rasterNameExpressions=['%(VariableName)s', '%%Y', 'Depth_%(Depth)04.0fm', '%(VariableName)s_%%Y%%j_%(Depth)04.0fm.img'], rasterCatalog=None,
|
|---|
| 624 | spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 625 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 626 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 627 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 628 | if startDate is not None:
|
|---|
| 629 | startYear = startDate.year
|
|---|
| 630 | else:
|
|---|
| 631 | startYear = None
|
|---|
| 632 | if endDate is not None:
|
|---|
| 633 | endYear = endDate.year
|
|---|
| 634 | else:
|
|---|
| 635 | endYear = None
|
|---|
| 636 | grid = HYCOMGOMl0044D(variableName, startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 637 | try:
|
|---|
| 638 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to create the first raster. Please be patient. After the first one is created, the rest will go much faster. Because the first raster takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first raster is created. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 639 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 640 | from GeoEco.Datasets.Virtual import GridSliceCollection, SeafloorGrid
|
|---|
| 641 |
|
|---|
| 642 | # If the caller requested a minimum depth that is within
|
|---|
| 643 | # the range of the HYCOM layers, instantiate those grids.
|
|---|
| 644 |
|
|---|
| 645 | grids = []
|
|---|
| 646 | if minDepth is None or minDepth <= 5500.:
|
|---|
| 647 | clippedGrid = cls._Clip(grid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 648 | grids.extend(GridSliceCollection(clippedGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets())
|
|---|
| 649 |
|
|---|
| 650 | # If the caller requested a maximum depth that is greater
|
|---|
| 651 | # than or equal to 20000., instantiate a grid representing
|
|---|
| 652 | # the values at the seafloor.
|
|---|
| 653 |
|
|---|
| 654 | if minDepth == 20000. or maxDepth >= 20000.:
|
|---|
| 655 | clippedGrid = cls._Clip(grid, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 656 | seafloorGrid = SeafloorGrid(clippedGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 657 | grids.extend(GridSliceCollection(seafloorGrid, tQACoordType=u'center').QueryDatasets())
|
|---|
| 658 |
|
|---|
| 659 | # Create the rasters.
|
|---|
| 660 |
|
|---|
| 661 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(grid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata()), QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())]))
|
|---|
| 662 | workspace.ImportDatasets(grids, mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 663 | if rasterCatalog is not None:
|
|---|
| 664 | workspace.ToRasterCatalog(rasterCatalog, grid.GetSpatialReference(u'ArcGIS'), tQACoordType=u'center', tCoordFunction=lambda qav: [qav[u'DateTime'] - datetime.timedelta(0.5), qav[u'DateTime'], qav[u'DateTime'] + datetime.timedelta(0.5) - datetime.timedelta(seconds=1)], overwriteExisting=True)
|
|---|
| 665 |
|
|---|
| 666 | finally:
|
|---|
| 667 | grid.Close()
|
|---|
| 668 | return outputWorkspace
|
|---|
| 669 |
|
|---|
| 670 | @classmethod
|
|---|
| 671 | def CreateClimatologicalArcGISRasters(cls, variableName,
|
|---|
| 672 | statistic, binType,
|
|---|
| 673 | outputWorkspace, mode=u'add', rasterNameExpressions=[u'%(VariableName)s', u'%(ClimatologyBinType)s_Climatology', 'Depth_%(Depth)04.0fm', u'%(VariableName)s_%(Depth)04.0fm_%(ClimatologyBinName)s_%(Statistic)s.img'],
|
|---|
| 674 | binDuration=1, startDayOfYear=1,
|
|---|
| 675 | spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 676 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 677 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 678 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 679 | if startDate is not None:
|
|---|
| 680 | startYear = startDate.year
|
|---|
| 681 | else:
|
|---|
| 682 | startYear = None
|
|---|
| 683 | if endDate is not None:
|
|---|
| 684 | endYear = endDate.year
|
|---|
| 685 | else:
|
|---|
| 686 | endYear = None
|
|---|
| 687 | grid = HYCOMGOMl0044D(variableName, startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 688 | try:
|
|---|
| 689 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 690 | from GeoEco.Datasets.Virtual import GridSliceCollection, ClimatologicalGridCollection, SeafloorGrid
|
|---|
| 691 |
|
|---|
| 692 | # If the caller requested a minimum depth that is within
|
|---|
| 693 | # the range of the HYCOM layers, instantiate a
|
|---|
| 694 | # ClimatologicalGridCollection from the clipped 4D (tzyx)
|
|---|
| 695 | # grid, query the 3D grids (zyx) from it, and get the 2D
|
|---|
| 696 | # (yx) slices of it.
|
|---|
| 697 |
|
|---|
| 698 | grids = []
|
|---|
| 699 | if minDepth is None or minDepth <= 5500.:
|
|---|
| 700 | clippedGrid = cls._Clip(grid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 701 | collection = ClimatologicalGridCollection(clippedGrid, statistic, binType, binDuration, startDayOfYear, reportProgress=False)
|
|---|
| 702 | for g in collection.QueryDatasets(reportProgress=False):
|
|---|
| 703 | grids.extend(GridSliceCollection(g, zQACoordType=u'center').QueryDatasets(reportProgress=False))
|
|---|
| 704 |
|
|---|
| 705 | # If the caller requested a maximum depth that is greater
|
|---|
| 706 | # than or equal to 20000., instantiate a 3D SeafloorGrid
|
|---|
| 707 | # (tyx), create a ClimatologicalGridCollection from it,
|
|---|
| 708 | # and query the 2D (yx) grids from it.
|
|---|
| 709 |
|
|---|
| 710 | if minDepth == 20000. or maxDepth >= 20000.:
|
|---|
| 711 | clippedGrid = cls._Clip(grid, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 712 | seafloorGrid = SeafloorGrid(clippedGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 713 | collection = ClimatologicalGridCollection(seafloorGrid, statistic, binType, binDuration, startDayOfYear, reportProgress=False)
|
|---|
| 714 | grids.extend(collection.QueryDatasets(reportProgress=False))
|
|---|
| 715 |
|
|---|
| 716 | # Create the rasters.
|
|---|
| 717 |
|
|---|
| 718 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(collection.GetAllQueryableAttributes() + [QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())]))
|
|---|
| 719 | workspace.ImportDatasets(grids, mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 720 |
|
|---|
| 721 | finally:
|
|---|
| 722 | grid.Close()
|
|---|
| 723 | return outputWorkspace
|
|---|
| 724 |
|
|---|
| 725 | @classmethod
|
|---|
| 726 | def CreateCurrentVectorsAsArcGISFeatureClasses(cls, outputWorkspace, mode=u'add', featureClassNameExpressions=['uv_vectors', '%%Y', 'Depth_%(Depth)04.0fm', 'uv_vectors_%%%Y%%j_%(Depth)04.0fm.shp'],
|
|---|
| 727 | scaleFactor=4500., uniformLength=False,
|
|---|
| 728 | spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 729 | timeout=600, maxRetryTime=None, cacheDirectory=None):
|
|---|
| 730 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 731 |
|
|---|
| 732 | # Create u and v component grids.
|
|---|
| 733 |
|
|---|
| 734 | if startDate is not None:
|
|---|
| 735 | startYear = startDate.year
|
|---|
| 736 | else:
|
|---|
| 737 | startYear = None
|
|---|
| 738 | if endDate is not None:
|
|---|
| 739 | endYear = endDate.year
|
|---|
| 740 | else:
|
|---|
| 741 | endYear = None
|
|---|
| 742 |
|
|---|
| 743 | uGrid = HYCOMGOMl0044D(u'u', startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 744 | try:
|
|---|
| 745 | vGrid = HYCOMGOMl0044D(u'v', startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 746 | try:
|
|---|
| 747 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to create the first feature class. Please be patient. After the first one is created, the rest will go much faster. Because the first raster takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first raster is created. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 748 |
|
|---|
| 749 | # If the caller requested a minimum depth that is
|
|---|
| 750 | # within the range of the HYCOM layers, instantiate
|
|---|
| 751 | # those grids.
|
|---|
| 752 |
|
|---|
| 753 | from GeoEco.Datasets.Virtual import GridSliceCollection, SeafloorGrid
|
|---|
| 754 |
|
|---|
| 755 | uSlices = []
|
|---|
| 756 | vSlices = []
|
|---|
| 757 |
|
|---|
| 758 | if minDepth is None or minDepth <= 5500.:
|
|---|
| 759 | clippedUGrid = cls._Clip(uGrid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 760 | uSlices.extend(GridSliceCollection(clippedUGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets())
|
|---|
| 761 |
|
|---|
| 762 | clippedVGrid = cls._Clip(vGrid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 763 | vSlices.extend(GridSliceCollection(clippedVGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets())
|
|---|
| 764 |
|
|---|
| 765 | # If the caller requested a maximum depth that is
|
|---|
| 766 | # greater than or equal to 20000., instantiate grids
|
|---|
| 767 | # representing the values at the seafloor.
|
|---|
| 768 |
|
|---|
| 769 | if minDepth == 20000. or maxDepth >= 20000.:
|
|---|
| 770 | clippedUGrid = cls._Clip(uGrid, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 771 | seafloorUGrid = SeafloorGrid(clippedUGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 772 | uSlices.extend(GridSliceCollection(seafloorUGrid, tQACoordType=u'center').QueryDatasets())
|
|---|
| 773 |
|
|---|
| 774 | clippedVGrid = cls._Clip(vGrid, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 775 | seafloorVGrid = SeafloorGrid(clippedVGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 776 | vSlices.extend(GridSliceCollection(seafloorVGrid, tQACoordType=u'center').QueryDatasets())
|
|---|
| 777 |
|
|---|
| 778 | # Construct a list of
|
|---|
| 779 | # ShapefileFromVectorComponentGrids from the slices.
|
|---|
| 780 |
|
|---|
| 781 | from GeoEco.SpatialAnalysis.Lines import ShapefileFromVectorComponentGrids
|
|---|
| 782 |
|
|---|
| 783 | queryableAttributes = tuple(uGrid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata()), QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())])
|
|---|
| 784 | vectorShapefiles = []
|
|---|
| 785 |
|
|---|
| 786 | for i in range(len(uSlices)):
|
|---|
| 787 | queryableAttributeValues = {}
|
|---|
| 788 | for qa in queryableAttributes:
|
|---|
| 789 | queryableAttributeValues[qa.Name] = uSlices[i].GetQueryableAttributeValue(qa.Name)
|
|---|
| 790 |
|
|---|
| 791 | vectorShapefiles.append(ShapefileFromVectorComponentGrids(uSlices[i], vSlices[i], scaleFactor, uniformLength, queryableAttributes=queryableAttributes, queryableAttributeValues=queryableAttributeValues))
|
|---|
| 792 |
|
|---|
| 793 | # Import the ShapefileFromVectorComponentGrids into
|
|---|
| 794 | # the output workspace.
|
|---|
| 795 |
|
|---|
| 796 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISTable
|
|---|
| 797 |
|
|---|
| 798 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISTable, pathCreationExpressions=featureClassNameExpressions, cacheTree=True, queryableAttributes=queryableAttributes)
|
|---|
| 799 | workspace.ImportDatasets(vectorShapefiles, mode)
|
|---|
| 800 |
|
|---|
| 801 | # Return successfully.
|
|---|
| 802 |
|
|---|
| 803 | return outputWorkspace
|
|---|
| 804 |
|
|---|
| 805 | finally:
|
|---|
| 806 | vGrid.Close()
|
|---|
| 807 | finally:
|
|---|
| 808 | uGrid.Close()
|
|---|
| 809 |
|
|---|
| 810 | @classmethod
|
|---|
| 811 | def InterpolateAtArcGISPoints(cls, variableNames,
|
|---|
| 812 | points, valueFields, tField, zField=None, zValue=None, method=u'Nearest', where=None, noDataValue=None,
|
|---|
| 813 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 814 | orderByFields=None, numBlocksToCacheInMemory=128, xBlockSize=16, yBlockSize=16, zBlockSize=3, tBlockSize=3):
|
|---|
| 815 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 816 | grids = [HYCOMGOMl0044D(variableName, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) for variableName in variableNames]
|
|---|
| 817 | try:
|
|---|
| 818 | if orderByFields is not None:
|
|---|
| 819 | orderBy = u', '.join(map(lambda f: f + u' ASC', orderByFields))
|
|---|
| 820 | else:
|
|---|
| 821 | from GeoEco.ArcGIS import GeoprocessorManager
|
|---|
| 822 | if GeoprocessorManager.GetArcGISMajorVersion() > 9 or GeoprocessorManager.GetArcGISMinorVersion() >= 2:
|
|---|
| 823 | orderBy = tField + u' ASC'
|
|---|
| 824 | if zField is not None:
|
|---|
| 825 | orderBy = orderBy + ', ' + zField + ' ASC'
|
|---|
| 826 | else:
|
|---|
| 827 | orderBy = None
|
|---|
| 828 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to process the first point. Please be patient. After the first one is processed, the rest will go much faster. Because the first one takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first point is processed. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 829 | from GeoEco.Datasets.ArcGIS import ArcGISTable
|
|---|
| 830 | from GeoEco.SpatialAnalysis.Interpolation import Interpolator
|
|---|
| 831 | Interpolator.InterpolateGridsValuesForTableOfPoints(grids, ArcGISTable(points), valueFields, zField=zField, tField=tField, zValue=zValue, where=where, orderBy=orderBy, method=method, noDataValue=noDataValue, useAbsZ=True, seafloorZValue=20000., numBlocksToCacheInMemory=numBlocksToCacheInMemory, xBlockSize=xBlockSize, yBlockSize=yBlockSize, zBlockSize=zBlockSize, tBlockSize=tBlockSize)
|
|---|
| 832 | finally:
|
|---|
| 833 | for grid in grids:
|
|---|
| 834 | grid.Close()
|
|---|
| 835 | return points
|
|---|
| 836 |
|
|---|
| 837 | @classmethod
|
|---|
| 838 | def CreateCayulaCornillonFrontsAsArcGISRasters(cls, variableName, minPopMeanDifference,
|
|---|
| 839 | outputWorkspace, mode=u'add', rasterNameExpressions=['%(VariableName)s_fronts', '%%Y', 'Depth_%(Depth)04.0fm', '%(VariableName)s_%%Y%%j_%(Depth)04.0fm_%(ImageType)s.img'],
|
|---|
| 840 | medianFilterWindowSize=3, histogramWindowSize=20, histogramWindowStride=1, minPropNonMaskedCells=0.65, minPopProp=0.25, minTheta=0.76, minSinglePopCohesion=0.88, minGlobalPopCohesion=0.90, threads=1,
|
|---|
| 841 | fillHoles=20, thin=True, minSize=10,
|
|---|
| 842 | spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 843 | timeout=600, maxRetryTime=None, cacheDirectory=None,
|
|---|
| 844 | calculateStatistics=True, buildRAT=False, buildPyramids=False,
|
|---|
| 845 | outputCandidateCounts=False, outputFrontCounts=False, outputWindowStatusCodes=False, outputWindowStatusValues=False):
|
|---|
| 846 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 847 |
|
|---|
| 848 | # Construct a HYCOMGOMl0044D instance and rotate and clip it
|
|---|
| 849 | # as requested.
|
|---|
| 850 |
|
|---|
| 851 | if startDate is not None:
|
|---|
| 852 | startYear = startDate.year
|
|---|
| 853 | else:
|
|---|
| 854 | startYear = None
|
|---|
| 855 | if endDate is not None:
|
|---|
| 856 | endYear = endDate.year
|
|---|
| 857 | else:
|
|---|
| 858 | endYear = None
|
|---|
| 859 |
|
|---|
| 860 | grid = HYCOMGOMl0044D(variableName, startYear=startYear, endYear=endYear, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 861 |
|
|---|
| 862 | try:
|
|---|
| 863 | cls._LogWarning(_(u'The HYCOM OPeNDAP server often requires five to ten minutes to return the data required to create the first raster. Please be patient. After the first one is created, the rest will go much faster. Because the first raster takes so long, the first status report may estimate an absurdly long time to completion. Please wait for the second status report, issued five minutes after the first one, for a better estimate. This tool cannot be cancelled until the first raster is created. If this tool fails with to a timeout error, increase the timeout value and try again.'))
|
|---|
| 864 | grid = cls._Clip(grid, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 865 |
|
|---|
| 866 | # Construct a CayulaCornillonFrontsInGrid collection using
|
|---|
| 867 | # the requested parameters.
|
|---|
| 868 |
|
|---|
| 869 | from GeoEco.OceanographicAnalysis.Fronts import CayulaCornillonFrontsInGrid
|
|---|
| 870 | import numpy
|
|---|
| 871 |
|
|---|
| 872 | collection = CayulaCornillonFrontsInGrid(grid,
|
|---|
| 873 | tQACoordType=u'center',
|
|---|
| 874 | zQACoordType=u'center',
|
|---|
| 875 | unscalingFunction=lambda a: numpy.cast['int16'](a * 100),
|
|---|
| 876 | newScaledNoDataValue=-99.,
|
|---|
| 877 | medianFilterWindowSize=medianFilterWindowSize,
|
|---|
| 878 | histogramWindowSize=histogramWindowSize,
|
|---|
| 879 | histogramWindowStride=histogramWindowStride,
|
|---|
| 880 | minPropNonMaskedCells=minPropNonMaskedCells,
|
|---|
| 881 | minPopProp=minPopProp,
|
|---|
| 882 | minPopMeanDifference=minPopMeanDifference,
|
|---|
| 883 | minTheta=minTheta,
|
|---|
| 884 | minSinglePopCohesion=minSinglePopCohesion,
|
|---|
| 885 | minGlobalPopCohesion=minGlobalPopCohesion,
|
|---|
| 886 | threads=threads,
|
|---|
| 887 | fillHoles=fillHoles,
|
|---|
| 888 | thin=thin,
|
|---|
| 889 | minSize=minSize)
|
|---|
| 890 | try:
|
|---|
| 891 | try:
|
|---|
| 892 | # Construct an ArcGISWorkspace instance and import
|
|---|
| 893 | # time/depth slices from the
|
|---|
| 894 | # CayulaCornillonFrontsInGrid instance.
|
|---|
| 895 |
|
|---|
| 896 | expression = "ImageType = 'floc'"
|
|---|
| 897 | if outputCandidateCounts:
|
|---|
| 898 | expression += " OR ImageType = 'ccnt'"
|
|---|
| 899 | if outputFrontCounts:
|
|---|
| 900 | expression += " OR ImageType = 'fcnt'"
|
|---|
| 901 | if outputWindowStatusCodes:
|
|---|
| 902 | expression += " OR ImageType = 'wsco'"
|
|---|
| 903 | if outputWindowStatusValues:
|
|---|
| 904 | expression += " OR ImageType = 'wsvl'"
|
|---|
| 905 |
|
|---|
| 906 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 907 |
|
|---|
| 908 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(collection.GetAllQueryableAttributes()))
|
|---|
| 909 | workspace.ImportDatasets(collection.QueryDatasets(expression), mode, calculateStatistics=calculateStatistics, buildRAT=buildRAT, buildPyramids=buildPyramids)
|
|---|
| 910 |
|
|---|
| 911 | # If we caught an exception, log it now. Then delete
|
|---|
| 912 | # the collection object, to ensure its memory is
|
|---|
| 913 | # freed. Normally we don't bother doing this but the
|
|---|
| 914 | # memory it holds can be substantial.
|
|---|
| 915 |
|
|---|
| 916 | except:
|
|---|
| 917 | from GeoEco.Logging import Logger
|
|---|
| 918 | Logger.LogExceptionAsError()
|
|---|
| 919 | finally:
|
|---|
| 920 | del collection
|
|---|
| 921 | finally:
|
|---|
| 922 | grid.Close()
|
|---|
| 923 |
|
|---|
| 924 | # Return successfully.
|
|---|
| 925 |
|
|---|
| 926 | return outputWorkspace
|
|---|
| 927 |
|
|---|
| 928 |
|
|---|
| 929 | class _HYCOMGridGLBa0083D(OPeNDAPGrid):
|
|---|
| 930 | __doc__ = DynamicDocString()
|
|---|
| 931 |
|
|---|
| 932 | def __init__(self, variableName, timeout, maxRetryTime, cacheDirectory):
|
|---|
| 933 | self._CachedTCenterCoords = None
|
|---|
| 934 | super(_HYCOMGridGLBa0083D, self).__init__(OPeNDAPURL('http://tds.hycom.org/thredds/dodsC/glb_analysis', timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory),
|
|---|
| 935 | variableName,
|
|---|
| 936 | 'Grid',
|
|---|
| 937 | lazyPropertyValues={'SpatialReference': None,
|
|---|
| 938 | 'Dimensions': 'tyx',
|
|---|
| 939 | 'CoordDependencies': (None, None, None),
|
|---|
| 940 | 'CoordIncrements': (None, 1., 1.), # t increment is None because, sadly, HYCOM omits slices when their system occasionally fails to generate data for a day
|
|---|
| 941 | 'TCornerCoordType': 'center',
|
|---|
| 942 | 'PhysicalDimensions': 'tyx',
|
|---|
| 943 | 'PhysicalDimensionsFlipped': (False, False, False),
|
|---|
| 944 | 'UnscaledDataType': 'float32',
|
|---|
| 945 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 946 | 'ScalingFunction': None})
|
|---|
| 947 |
|
|---|
| 948 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 949 | if name == 'CornerCoords':
|
|---|
| 950 | return (self._GetCoords('t', 0, [0], [0], 0.), 0., 0.)
|
|---|
| 951 | return super(_HYCOMGridGLBa0083D, self)._GetLazyPropertyPhysicalValue(name)
|
|---|
| 952 |
|
|---|
| 953 | def _GetCoords(self, coord, coordNum, slices, sliceDims, fixedIncrementOffset):
|
|---|
| 954 | if coord != 't':
|
|---|
| 955 | raise RuntimeError(_('_HYCOMGridGLBa0083D._GetCoords() called with coord == \'%(coord)s\'. This should never happen. Please contact the author of this tool for assistance.') % {u'coord': coord})
|
|---|
| 956 | if self._CachedTCenterCoords is None:
|
|---|
| 957 | import numpy
|
|---|
| 958 | self.ParentCollection._Open()
|
|---|
| 959 | self._CachedTCenterCoords = numpy.array(map(lambda days: datetime.timedelta(days) + datetime.datetime(1900, 12, 31), list(self.ParentCollection._PydapDataset['MT'][:])), dtype='object')
|
|---|
| 960 | if slices is None:
|
|---|
| 961 | result = self._CachedTCenterCoords.copy()
|
|---|
| 962 | else:
|
|---|
| 963 | result = self._CachedTCenterCoords.__getitem__(*slices)
|
|---|
| 964 | if fixedIncrementOffset != 0:
|
|---|
| 965 | result += datetime.timedelta(fixedIncrementOffset)
|
|---|
| 966 | return result
|
|---|
| 967 |
|
|---|
| 968 | @classmethod
|
|---|
| 969 | def GetSpatialReferenceParametersForHYCOMGlobalGrid(cls, url):
|
|---|
| 970 |
|
|---|
| 971 | # Open the URL with pydap.
|
|---|
| 972 |
|
|---|
| 973 | import pydap.client
|
|---|
| 974 | dataset = pydap.client.open_url(url)
|
|---|
| 975 |
|
|---|
| 976 | # Read the Latitude grid. I was told by Alan Wallcraft that
|
|---|
| 977 | # the grid coordinates are only accurate to four decimal
|
|---|
| 978 | # digits (Fortran REAL*4 precision). Round the coordinates to
|
|---|
| 979 | # four digits. Do the calculations with 64-bit floats; for
|
|---|
| 980 | # some reason, the numpy round function did not seem to work
|
|---|
| 981 | # very well with the 32-bit floats that HYCOM uses.
|
|---|
| 982 |
|
|---|
| 983 | import numpy
|
|---|
| 984 | lats = numpy.cast['float64'](dataset['Latitude']['Latitude'][:]).round(4)
|
|---|
| 985 |
|
|---|
| 986 | # Calculate the cell size. Alan Wallcraft said that the
|
|---|
| 987 | # Mercator portion of HYCOM's hybrid grid is based on a sphere
|
|---|
| 988 | # with radius 6371001.0 meters.
|
|---|
| 989 | #
|
|---|
| 990 | # This calculation assumes that the grid is global.
|
|---|
| 991 |
|
|---|
| 992 | equatorialCellWidthInDegrees = 360. / lats.shape[1]
|
|---|
| 993 | osr = cls._osr()
|
|---|
| 994 | transformer = osr.CoordinateTransformation(Dataset.ConvertSpatialReference('proj4', '+proj=latlong +R=6371001 +no_defs', 'obj'), Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +no_defs', 'obj'))
|
|---|
| 995 | cellSize = transformer.TransformPoint(equatorialCellWidthInDegrees, 0.)[0]
|
|---|
| 996 |
|
|---|
| 997 | # The HYCOM grid is not centered on 0 longitude. The left-most
|
|---|
| 998 | # edge is typically around 74 E. Determine the central
|
|---|
| 999 | # meridian. Keep in mind that the HYCOM grid coordinates are
|
|---|
| 1000 | # for the centers of the cells, not the corners.
|
|---|
| 1001 | #
|
|---|
| 1002 | # This calculation assumes that one of the rows of the
|
|---|
| 1003 | # Mercator section of the grid occurs at 0 latitude.
|
|---|
| 1004 |
|
|---|
| 1005 | indexOfZeroLat = lats[:,0].tolist().index(0.)
|
|---|
| 1006 | centralMeridian = -180.0 + numpy.cast['float64'](dataset['Longitude']['Longitude'][indexOfZeroLat, 0]).round(4) - equatorialCellWidthInDegrees/2
|
|---|
| 1007 |
|
|---|
| 1008 | # Find the y index of the start of the Mercator section of the
|
|---|
| 1009 | # grid. Southward of this section is a section in which the
|
|---|
| 1010 | # latitude increases by a constant value, typically 0.032
|
|---|
| 1011 | # degrees. Find where this section stops by looking for the y
|
|---|
| 1012 | # index at which latitude stops increasing by a constant
|
|---|
| 1013 | # value.
|
|---|
| 1014 |
|
|---|
| 1015 | hasConstantIncrement = (abs(lats[1:indexOfZeroLat, 0] - lats[0:indexOfZeroLat-1, 0] - (lats[1, 0] - lats[0, 0])) < 0.00001).tolist()
|
|---|
| 1016 | hasConstantIncrement.reverse()
|
|---|
| 1017 | mercatorSliceStart = len(hasConstantIncrement) - hasConstantIncrement.index(True)
|
|---|
| 1018 |
|
|---|
| 1019 | # Find the y index of the end of the Mercator section. For the
|
|---|
| 1020 | # Mercator section, each row has the same latitude values for
|
|---|
| 1021 | # all cells of that row. Above the Mercator section is a
|
|---|
| 1022 | # "bi-polar" section, which does not have this characteristic.
|
|---|
| 1023 | # Therefore, we look for the north-most row that has the same
|
|---|
| 1024 | # latitude for every cell.
|
|---|
| 1025 |
|
|---|
| 1026 | mercatorSliceStop = (lats[:,:-1] == lats[:,1:]).all(1).tolist().index(False)
|
|---|
| 1027 |
|
|---|
| 1028 | # Calculate the corner coordinates [x, y]. These are cell
|
|---|
| 1029 | # centers.
|
|---|
| 1030 |
|
|---|
| 1031 | transformer = osr.CoordinateTransformation(Dataset.ConvertSpatialReference('proj4', '+proj=latlong +R=6371001 +no_defs', 'obj'), Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +lon_0=%s +no_defs' % str(centralMeridian), 'obj'))
|
|---|
| 1032 | cornerCoords = transformer.TransformPoint(-360. + numpy.cast['float64'](dataset['Longitude']['Longitude'][indexOfZeroLat, 0]).round(4), lats[mercatorSliceStart, 0])[:2]
|
|---|
| 1033 |
|
|---|
| 1034 | # Return the parameters we calculated.
|
|---|
| 1035 |
|
|---|
| 1036 | return lats.shape, cellSize, centralMeridian, mercatorSliceStart, mercatorSliceStop, (cornerCoords[1], cornerCoords[0])
|
|---|
| 1037 |
|
|---|
| 1038 | @classmethod
|
|---|
| 1039 | def _CreateNorthPacificLookupGrid(cls, url):
|
|---|
| 1040 | return cls._CreateLookupGrid(url, 698, 2074, 2684) # Corresponds to longitude range 130 E - 120 W.
|
|---|
| 1041 |
|
|---|
| 1042 | @classmethod
|
|---|
| 1043 | def _CreateNorthAtlanticLookupGrid(cls, url):
|
|---|
| 1044 | return cls._CreateLookupGrid(url, 2698, 3949, 2657) # Corresponds to longitude range 70 W - 30 E.
|
|---|
| 1045 |
|
|---|
| 1046 | @classmethod
|
|---|
| 1047 | def _CreateLookupGrid(cls, url, xStart, xStop, yStop):
|
|---|
| 1048 |
|
|---|
| 1049 | # Get arrays that give the Mercator coordinates of the centers
|
|---|
| 1050 | # of the cells of the extended region of the grid.
|
|---|
| 1051 |
|
|---|
| 1052 | import numpy
|
|---|
| 1053 |
|
|---|
| 1054 | normalGrid = HYCOMGLBa008Equatorial3D('ssh', extendYExtent=False)
|
|---|
| 1055 | extendedGrid = HYCOMGLBa008Equatorial3D('ssh', extendYExtent=True)
|
|---|
| 1056 | numExtendedCells = extendedGrid.Shape[1] - normalGrid.Shape[1]
|
|---|
| 1057 |
|
|---|
| 1058 | mercatorXCellCenters = numpy.tile(extendedGrid.CenterCoords['x', xStart:xStop], numExtendedCells).reshape(numExtendedCells, xStop - xStart)
|
|---|
| 1059 | mercatorYCellCenters = numpy.tile(extendedGrid.CenterCoords['y', normalGrid.Shape[1]:extendedGrid.Shape[1]], xStop - xStart).reshape(numExtendedCells, xStop - xStart)
|
|---|
| 1060 |
|
|---|
| 1061 | # Project the Mercator coordinates back to geographic.
|
|---|
| 1062 |
|
|---|
| 1063 | osr = cls._osr()
|
|---|
| 1064 | transformer = osr.CoordinateTransformation(Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +lon_0=-105.88 +no_defs', 'obj'), Dataset.ConvertSpatialReference('proj4', '+proj=latlong +R=6371001 +no_defs', 'obj'))
|
|---|
| 1065 |
|
|---|
| 1066 | geographicXCellCenters = numpy.tile(numpy.array([transformer.TransformPoint(x, 0.)[0] for x in extendedGrid.CenterCoords['x', xStart:xStop]]), numExtendedCells).reshape(numExtendedCells, xStop - xStart)
|
|---|
| 1067 | geographicYCellCenters = numpy.tile(numpy.array([transformer.TransformPoint(0., y)[1] for y in extendedGrid.CenterCoords['y', normalGrid.Shape[1]:extendedGrid.Shape[1]]]), xStop - xStart).reshape(xStop - xStart, numExtendedCells).transpose()
|
|---|
| 1068 |
|
|---|
| 1069 | geographicXCellCenters[geographicXCellCenters < 73] += 360.
|
|---|
| 1070 |
|
|---|
| 1071 | # Open the URL with pydap.
|
|---|
| 1072 |
|
|---|
| 1073 | import pydap.client
|
|---|
| 1074 | dataset = pydap.client.open_url(url)
|
|---|
| 1075 |
|
|---|
| 1076 | # Get the HYCOM latitude and longitude grids for the bi-polar
|
|---|
| 1077 | # region.
|
|---|
| 1078 |
|
|---|
| 1079 | lats = numpy.cast['float64'](dataset['Latitude']['Latitude'][2172:yStop, xStart:xStop]).round(4)
|
|---|
| 1080 | lons = numpy.cast['float64'](dataset['Longitude']['Longitude'][2172:yStop, xStart:xStop]).round(4)
|
|---|
| 1081 |
|
|---|
| 1082 | # For each cell of the extended region (indices i,j), find the
|
|---|
| 1083 | # indices of the bi-polor cell (indices m,n) that is the
|
|---|
| 1084 | # closest in euclidean geographic coordinate distance.
|
|---|
| 1085 |
|
|---|
| 1086 | yIndices = numpy.zeros(geographicYCellCenters.shape, 'int16')
|
|---|
| 1087 | xIndices = numpy.zeros(geographicXCellCenters.shape, 'int16')
|
|---|
| 1088 | distances = numpy.zeros(geographicXCellCenters.shape)
|
|---|
| 1089 |
|
|---|
| 1090 | for i in range(geographicYCellCenters.shape[0]):
|
|---|
| 1091 | m = yIndices[max(0, i-1), 0]
|
|---|
| 1092 | n = 0
|
|---|
| 1093 |
|
|---|
| 1094 | for j in range(geographicXCellCenters.shape[1]):
|
|---|
| 1095 | yCellCenter = geographicYCellCenters[i,j]
|
|---|
| 1096 | xCellCenter = geographicXCellCenters[i,j]
|
|---|
| 1097 | currentDist = ((yCellCenter - lats[m,n])**2 + (xCellCenter - lons[m,n])**2)**0.5
|
|---|
| 1098 |
|
|---|
| 1099 | while True:
|
|---|
| 1100 | if n < lons.shape[1] - 1:
|
|---|
| 1101 | dist = ((yCellCenter - lats[m,n+1])**2 + (xCellCenter - lons[m,n+1])**2)**0.5
|
|---|
| 1102 | if dist < currentDist:
|
|---|
| 1103 | n += 1
|
|---|
| 1104 | currentDist = dist
|
|---|
| 1105 | continue
|
|---|
| 1106 |
|
|---|
| 1107 | if n > 0:
|
|---|
| 1108 | dist = ((yCellCenter - lats[m,n-1])**2 + (xCellCenter - lons[m,n-1])**2)**0.5
|
|---|
| 1109 | if dist < currentDist:
|
|---|
| 1110 | n -= 1
|
|---|
| 1111 | currentDist = dist
|
|---|
| 1112 | continue
|
|---|
| 1113 |
|
|---|
| 1114 | if m < lats.shape[0] - 1:
|
|---|
| 1115 | dist = ((yCellCenter - lats[m+1,n])**2 + (xCellCenter - lons[m+1,n])**2)**0.5
|
|---|
| 1116 | if dist < currentDist:
|
|---|
| 1117 | m += 1
|
|---|
| 1118 | currentDist = dist
|
|---|
| 1119 | continue
|
|---|
| 1120 |
|
|---|
| 1121 | if m > 0:
|
|---|
| 1122 | dist = ((yCellCenter - lats[m-1,n])**2 + (xCellCenter - lons[m-1,n])**2)**0.5
|
|---|
| 1123 | if dist < currentDist:
|
|---|
| 1124 | m -= 1
|
|---|
| 1125 | currentDist = dist
|
|---|
| 1126 | continue
|
|---|
| 1127 |
|
|---|
| 1128 | break
|
|---|
| 1129 |
|
|---|
| 1130 | yIndices[i,j] = m
|
|---|
| 1131 | xIndices[i,j] = n
|
|---|
| 1132 | distances[i,j] = currentDist
|
|---|
| 1133 |
|
|---|
| 1134 | # Return the indices of the closest bi-polar cells. These will
|
|---|
| 1135 | # be used with the numpy take() function to efficiently
|
|---|
| 1136 | # implement nearest neighbor interpolation from the bi-polar
|
|---|
| 1137 | # grid to the Mercator grid. (Also return the distances from
|
|---|
| 1138 | # each Mercator cell to the nearest bi-polar cell. This array
|
|---|
| 1139 | # is only used for diagnostic purposes.)
|
|---|
| 1140 |
|
|---|
| 1141 | return yIndices, xIndices, distances
|
|---|
| 1142 |
|
|---|
| 1143 | @classmethod
|
|---|
| 1144 | def _ReadNumpyArrayForDataset(cls, dataset, sliceList):
|
|---|
| 1145 |
|
|---|
| 1146 | # This is a utility function called by
|
|---|
| 1147 | # HYCOMGLBa008Equatorial3D._ReadNumpyArray and
|
|---|
| 1148 | # HYCOMGLBa008Equatorial4D._ReadNumpyArray. Because the logic
|
|---|
| 1149 | # is so similar for both functions, I wanted to centralize it
|
|---|
| 1150 | # in one place.
|
|---|
| 1151 |
|
|---|
| 1152 | # Open the raw data grid, if needed.
|
|---|
| 1153 |
|
|---|
| 1154 | datasetIs4D = u'z' in dataset.Dimensions
|
|---|
| 1155 |
|
|---|
| 1156 | if dataset._OpenGrid is None:
|
|---|
| 1157 | from GeoEco.Datasets.Virtual import ClippedGrid
|
|---|
| 1158 | if datasetIs4D:
|
|---|
| 1159 | dataset._OpenGrid = ClippedGrid(_HYCOMGridGLBa0084D(dataset._VariableName, dataset._Timeout, dataset._MaxRetryTime, dataset._CacheDirectory), u'Cell indices', yMin=390)
|
|---|
| 1160 | else:
|
|---|
| 1161 | dataset._OpenGrid = ClippedGrid(_HYCOMGridGLBa0083D(dataset._VariableName, dataset._Timeout, dataset._MaxRetryTime, dataset._CacheDirectory), u'Cell indices', yMin=390)
|
|---|
| 1162 |
|
|---|
| 1163 | # For many OPeNDAP datasets, we would be able to request the
|
|---|
| 1164 | # entire slab directly. This won't work for the HYCOM GLBa0.08
|
|---|
| 1165 | # dataset for two reasons. First, HYCOM omits slices when
|
|---|
| 1166 | # their system occasionally fails to generate data for a day,
|
|---|
| 1167 | # so most years do not have a full 365 (or 366) slices. To
|
|---|
| 1168 | # deal with this, we have to loop over the requested range of
|
|---|
| 1169 | # time indices and issue OPeNDAP requests for the proper time
|
|---|
| 1170 | # indices.\
|
|---|
| 1171 | #
|
|---|
| 1172 | # Second, we allow the caller to extend the Mercator grid up
|
|---|
| 1173 | # beyond the 47 N limit of HYCOM's Mercator region, by
|
|---|
| 1174 | # interpolating values from HYCOM's bi-polar region. To do
|
|---|
| 1175 | # that, we have to read data from the bi-polar region using
|
|---|
| 1176 | # indices that do not match what the caller provides.
|
|---|
| 1177 | #
|
|---|
| 1178 | # Start by allocating the array we will return. We'll populate
|
|---|
| 1179 | # this as we go along. (I prefer this approach rather than
|
|---|
| 1180 | # growing an array through concatenation because it avoids
|
|---|
| 1181 | # repeatedly allocating and copying memory.)
|
|---|
| 1182 |
|
|---|
| 1183 | import numpy
|
|---|
| 1184 | if datasetIs4D:
|
|---|
| 1185 | result = numpy.zeros((sliceList[0].stop - sliceList[0].start, sliceList[1].stop - sliceList[1].start, sliceList[2].stop - sliceList[2].start, sliceList[3].stop - sliceList[3].start), dtype=str(dataset.UnscaledDataType))
|
|---|
| 1186 | else:
|
|---|
| 1187 | result = numpy.zeros((sliceList[0].stop - sliceList[0].start, sliceList[1].stop - sliceList[1].start, sliceList[2].stop - sliceList[2].start), dtype=str(dataset.UnscaledDataType))
|
|---|
| 1188 |
|
|---|
| 1189 | # First populate portions of the array that are in the HYCOM
|
|---|
| 1190 | # Mercator region. We can copy this data directly but must
|
|---|
| 1191 | # loop over the requested t indices and handle missing time
|
|---|
| 1192 | # slices by storing UnscaledNoDataValue when a time slice is
|
|---|
| 1193 | # missing.
|
|---|
| 1194 |
|
|---|
| 1195 | tCoords = dataset.CenterCoords['t', sliceList[0]]
|
|---|
| 1196 | gridTStart = bisect.bisect_left(dataset._OpenGrid.CenterCoords['t'].tolist(), tCoords[0])
|
|---|
| 1197 | gridTStop = bisect.bisect_right(dataset._OpenGrid.CenterCoords['t'].tolist(), tCoords[-1])
|
|---|
| 1198 | if gridTStop > gridTStart:
|
|---|
| 1199 | gridTCoords = dataset._OpenGrid.CenterCoords['t', gridTStart:gridTStop]
|
|---|
| 1200 | else:
|
|---|
| 1201 | gridTCoords = []
|
|---|
| 1202 |
|
|---|
| 1203 | if sliceList[-2].start < 2172-390:
|
|---|
| 1204 | mercatorYSlice = slice(sliceList[-2].start, min(sliceList[-2].stop, 2172-390))
|
|---|
| 1205 | ySliceToWrite = slice(mercatorYSlice.start - sliceList[-2].start, mercatorYSlice.stop - sliceList[-2].start)
|
|---|
| 1206 |
|
|---|
| 1207 | if gridTStop > gridTStart:
|
|---|
| 1208 | if datasetIs4D:
|
|---|
| 1209 | data = dataset._OpenGrid.UnscaledData.__getitem__((slice(gridTStart, gridTStop), sliceList[1], mercatorYSlice, sliceList[-1]))
|
|---|
| 1210 | else:
|
|---|
| 1211 | data = dataset._OpenGrid.UnscaledData.__getitem__((slice(gridTStart, gridTStop), mercatorYSlice, sliceList[-1]))
|
|---|
| 1212 |
|
|---|
| 1213 | i = 0
|
|---|
| 1214 | j = 0
|
|---|
| 1215 | while i < len(tCoords):
|
|---|
| 1216 | if j < len(gridTCoords) and gridTCoords[j] == tCoords[i]:
|
|---|
| 1217 | if datasetIs4D:
|
|---|
| 1218 | result[i, :, ySliceToWrite] = data[j]
|
|---|
| 1219 | else:
|
|---|
| 1220 | result[i, ySliceToWrite] = data[j]
|
|---|
| 1221 | j += 1
|
|---|
| 1222 | else:
|
|---|
| 1223 | if datasetIs4D:
|
|---|
| 1224 | result[i, :, ySliceToWrite] = dataset.UnscaledNoDataValue
|
|---|
| 1225 | else:
|
|---|
| 1226 | result[i, ySliceToWrite] = dataset.UnscaledNoDataValue
|
|---|
| 1227 | i += 1
|
|---|
| 1228 |
|
|---|
| 1229 | # Now populate portions of the array that must be interpolated
|
|---|
| 1230 | # from the HYCOM bi-polar region.
|
|---|
| 1231 |
|
|---|
| 1232 | if sliceList[-2].stop > 2172-390:
|
|---|
| 1233 | extendedYSlice = slice(max(sliceList[-2].start, 2172-390), sliceList[-2].stop)
|
|---|
| 1234 | ySliceToWrite = slice(extendedYSlice.start - sliceList[-2].start, extendedYSlice.stop - sliceList[-2].start)
|
|---|
| 1235 |
|
|---|
| 1236 | # First populate the entire interpolated region with the
|
|---|
| 1237 | # UnscaledNoDataValue.
|
|---|
| 1238 |
|
|---|
| 1239 | if datasetIs4D:
|
|---|
| 1240 | result[:, :, ySliceToWrite, :] = dataset.UnscaledNoDataValue
|
|---|
| 1241 | else:
|
|---|
| 1242 | result[:, ySliceToWrite, :] = dataset.UnscaledNoDataValue
|
|---|
| 1243 |
|
|---|
| 1244 | # Handle values in the north Pacific, which is defined as
|
|---|
| 1245 | # the region between 130 E and 120 W. These values
|
|---|
| 1246 | # correspond to x indices 698 through 2074 in the Mercator
|
|---|
| 1247 | # region.
|
|---|
| 1248 |
|
|---|
| 1249 | cls._InterpolateExtendedRegion(dataset, sliceList, datasetIs4D, result, tCoords, gridTCoords, gridTStart, gridTStop, extendedYSlice, ySliceToWrite, 698, 2074, '_PacificLookupGrids', 'HYCOM_Glb008_y1.bin', 'HYCOM_Glb008_x1.bin', (276, 1376))
|
|---|
| 1250 |
|
|---|
| 1251 | # Handle values in the north Atlantic, which is defined as
|
|---|
| 1252 | # the region between 70 W and 30 E. These values
|
|---|
| 1253 | # correspond to x indices 2698 through 3949 in the
|
|---|
| 1254 | # Mercator region.
|
|---|
| 1255 |
|
|---|
| 1256 | cls._InterpolateExtendedRegion(dataset, sliceList, datasetIs4D, result, tCoords, gridTCoords, gridTStart, gridTStop, extendedYSlice, ySliceToWrite, 2698, 3949, '_AtlanticLookupGrids', 'HYCOM_Glb008_y2.bin', 'HYCOM_Glb008_x2.bin', (276, 1251))
|
|---|
| 1257 |
|
|---|
| 1258 | # Return successfully.
|
|---|
| 1259 |
|
|---|
| 1260 | return result, dataset.UnscaledNoDataValue
|
|---|
| 1261 |
|
|---|
| 1262 | @classmethod
|
|---|
| 1263 | def _InterpolateExtendedRegion(cls, dataset, sliceList, datasetIs4D, result, tCoords, gridTCoords, gridTStart, gridTStop, extendedYSlice, ySliceToWrite, xStart, xStop, lookupAttrName, xLookupFile, yLookupFile, lookupArrayShape):
|
|---|
| 1264 |
|
|---|
| 1265 | if sliceList[-1].start < xStop and sliceList[-1].stop >= xStart:
|
|---|
| 1266 | extendedXSlice = slice(max(sliceList[-1].start, xStart), min(sliceList[-1].stop, xStop))
|
|---|
| 1267 | xSliceToWrite = slice(extendedXSlice.start - sliceList[-1].start, extendedXSlice.stop - sliceList[-1].start)
|
|---|
| 1268 |
|
|---|
| 1269 | # Load the precomputed grids that allow us to look up the
|
|---|
| 1270 | # indices of the nearest bi-polar cell, given the indices
|
|---|
| 1271 | # of a mercator cell in the extended region.
|
|---|
| 1272 |
|
|---|
| 1273 | import numpy
|
|---|
| 1274 |
|
|---|
| 1275 | if getattr(dataset, lookupAttrName) is None:
|
|---|
| 1276 | setattr(dataset, lookupAttrName, (numpy.fromfile(os.path.join(os.path.dirname(__file__), xLookupFile), 'int16').reshape(lookupArrayShape),
|
|---|
| 1277 | numpy.fromfile(os.path.join(os.path.dirname(__file__), yLookupFile), 'int16').reshape(lookupArrayShape)))
|
|---|
| 1278 |
|
|---|
| 1279 | # Compute the slices of the bi-polar grid to download.
|
|---|
| 1280 |
|
|---|
| 1281 | yLookup = numpy.cast['int32'](getattr(dataset, lookupAttrName)[0][extendedYSlice.start-(2172-390):extendedYSlice.stop-(2172-390), extendedXSlice.start-xStart:extendedXSlice.stop-xStart])
|
|---|
| 1282 | xLookup = numpy.cast['int32'](getattr(dataset, lookupAttrName)[1][extendedYSlice.start-(2172-390):extendedYSlice.stop-(2172-390), extendedXSlice.start-xStart:extendedXSlice.stop-xStart])
|
|---|
| 1283 |
|
|---|
| 1284 | bipolarYStart = yLookup.min()
|
|---|
| 1285 | bipolarYStop = yLookup.max() + 1
|
|---|
| 1286 | bipolarXStart = xLookup.min()
|
|---|
| 1287 | bipolarXStop = xLookup.max() + 1
|
|---|
| 1288 |
|
|---|
| 1289 | dataset._LogDebug(_(u'%(class)s 0x%(id)08X: Interpolating Mercator region [%(yStart)i:%(yStop)i, %(xStart)i:%(xStop)i] from bi-polar region [%(byStart)i:%(byStop)i, %(bxStart)i:%(bxStop)i] of raw HYCOM grid.'), {u'class': dataset.__class__.__name__, u'id': id(dataset), u'yStart': extendedYSlice.start, u'yStop': extendedYSlice.stop, u'xStart': extendedXSlice.start, u'xStop': extendedXSlice.stop, u'byStart': bipolarYStart+2172, u'byStop': bipolarYStop+2172, u'bxStart': bipolarXStart+xStart, u'bxStop': bipolarXStop+xStart})
|
|---|
| 1290 |
|
|---|
| 1291 | indicesToTake = (yLookup - bipolarYStart) * (bipolarXStop - bipolarXStart) + (xLookup - bipolarXStart)
|
|---|
| 1292 |
|
|---|
| 1293 | # Download the data.
|
|---|
| 1294 |
|
|---|
| 1295 | if gridTStop > gridTStart:
|
|---|
| 1296 | if datasetIs4D:
|
|---|
| 1297 | data = dataset._OpenGrid.UnscaledData.__getitem__((slice(gridTStart, gridTStop), sliceList[1], slice(int(bipolarYStart + (2172-390)), int(bipolarYStop + (2172-390))), slice(int(bipolarXStart + xStart), int(bipolarXStop + xStart))))
|
|---|
| 1298 | else:
|
|---|
| 1299 | data = dataset._OpenGrid.UnscaledData.__getitem__((slice(gridTStart, gridTStop), slice(int(bipolarYStart + (2172-390)), int(bipolarYStop + (2172-390))), slice(int(bipolarXStart + xStart), int(bipolarXStop + xStart))))
|
|---|
| 1300 |
|
|---|
| 1301 | # Populate the array to return using nearest neighbor
|
|---|
| 1302 | # interpolation.
|
|---|
| 1303 |
|
|---|
| 1304 | i = 0
|
|---|
| 1305 | j = 0
|
|---|
| 1306 | while i < len(tCoords):
|
|---|
| 1307 | if j < len(gridTCoords) and gridTCoords[j] == tCoords[i]:
|
|---|
| 1308 | if datasetIs4D:
|
|---|
| 1309 | for k in range(0, sliceList[1].stop - sliceList[1].start):
|
|---|
| 1310 | result[i, k, ySliceToWrite, xSliceToWrite] = numpy.take(data[i, k], indicesToTake)
|
|---|
| 1311 | else:
|
|---|
| 1312 | result[i, ySliceToWrite, xSliceToWrite] = numpy.take(data[i], indicesToTake)
|
|---|
| 1313 | j += 1
|
|---|
| 1314 | i += 1
|
|---|
| 1315 |
|
|---|
| 1316 |
|
|---|
| 1317 |
|
|---|
| 1318 | class HYCOMGLBa008Equatorial3D(Grid):
|
|---|
| 1319 | __doc__ = DynamicDocString()
|
|---|
| 1320 |
|
|---|
| 1321 | def _GetVariableName(self):
|
|---|
| 1322 | return self._VariableName
|
|---|
| 1323 |
|
|---|
| 1324 | VariableName = property(_GetVariableName, doc=DynamicDocString())
|
|---|
| 1325 |
|
|---|
| 1326 | def __init__(self, variableName, extendYExtent=False, timeout=60, maxRetryTime=120, cacheDirectory=None):
|
|---|
| 1327 | self.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1328 |
|
|---|
| 1329 | # Initialize our properties.
|
|---|
| 1330 |
|
|---|
| 1331 | self._VariableName = variableName
|
|---|
| 1332 | self._Timeout = timeout
|
|---|
| 1333 | self._MaxRetryTime = maxRetryTime
|
|---|
| 1334 | self._CacheDirectory = cacheDirectory
|
|---|
| 1335 | self._DisplayName = _(u'%(name)s grid of the equatorial region of the HYCOM + NCODA Global 1/12 degree Analysis (GLBa0.08)') % {u'name': variableName}
|
|---|
| 1336 | self._OpenGrid = None
|
|---|
| 1337 | self._PacificLookupGrids = None
|
|---|
| 1338 | self._AtlanticLookupGrids = None
|
|---|
| 1339 |
|
|---|
| 1340 | # If we're not extending the Y extent, set the maximum Y index
|
|---|
| 1341 | # to the top of the HYCOM Mercator region, about 47 N. If we
|
|---|
| 1342 | # are extending it, set the maximum Y index to 60 N.
|
|---|
| 1343 |
|
|---|
| 1344 | self._YMaxIndex = {False: 2172-390, True: 2448-390}[extendYExtent]
|
|---|
| 1345 |
|
|---|
| 1346 | # Initialize the base class.
|
|---|
| 1347 |
|
|---|
| 1348 | super(HYCOMGLBa008Equatorial3D, self).__init__(queryableAttributes=(QueryableAttribute(u'VariableName', _(u'HYCOM variable'), UnicodeStringTypeMetadata(allowedValues=[u'emp', u'mixed_layer_density', u'mixed_layer_salinity', u'mixed_layer_temperature', u'mixed_layer_thickness', u'mixed_layer_u_velocity', u'mixed_layer_v_velocity', u'surface_boundary_layer_thickness', u'qtot', u'ssh', u'surface_salinity_trend', u'surface_temperature_trend'], makeLowercase=True)),),
|
|---|
| 1349 | queryableAttributeValues={u'VariableName': variableName},
|
|---|
| 1350 | lazyPropertyValues={'SpatialReference': Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +lon_0=-105.88 +no_defs', 'obj'), # lon_0 and other georeferencing parameters were calculated by _HYCOMGridGLBa0083D.GetSpatialReferenceParametersForHYCOMGlobalGrid()
|
|---|
| 1351 | 'Dimensions': u'tyx',
|
|---|
| 1352 | 'CoordDependencies': (None, None, None),
|
|---|
| 1353 | 'CoordIncrements': (1.0, 8895.5955278281017, 8895.5955278281017),
|
|---|
| 1354 | 'TIncrementUnit': u'day',
|
|---|
| 1355 | 'TSemiRegularity': None,
|
|---|
| 1356 | 'TCountPerSemiRegularPeriod': None,
|
|---|
| 1357 | 'TCornerCoordType': u'center',
|
|---|
| 1358 | 'CornerCoords': (datetime.datetime(2003, 11, 3), -9909647.065054208, -20010642.139849316),
|
|---|
| 1359 | 'PhysicalDimensions': u'tyx',
|
|---|
| 1360 | 'PhysicalDimensionsFlipped': (False, False, False),
|
|---|
| 1361 | 'UnscaledDataType': u'float32',
|
|---|
| 1362 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 1363 | 'ScalingFunction': None})
|
|---|
| 1364 |
|
|---|
| 1365 | def _Close(self):
|
|---|
| 1366 | if hasattr(self, '_OpenGrid') and self._OpenGrid is not None:
|
|---|
| 1367 | self._OpenGrid.Close()
|
|---|
| 1368 | self._OpenGrid = None
|
|---|
| 1369 | super(HYCOMGLBa008Equatorial3D, self)._Close()
|
|---|
| 1370 |
|
|---|
| 1371 | def _GetDisplayName(self):
|
|---|
| 1372 | return self._DisplayName
|
|---|
| 1373 |
|
|---|
| 1374 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 1375 | if name == 'Shape':
|
|---|
| 1376 | if self._OpenGrid is None:
|
|---|
| 1377 | from GeoEco.Datasets.Virtual import ClippedGrid
|
|---|
| 1378 | self._OpenGrid = ClippedGrid(_HYCOMGridGLBa0083D(self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory), u'Cell indices', yMin=390)
|
|---|
| 1379 | return ((self._OpenGrid.CenterCoords['t', -1] - self.GetLazyPropertyValue('CornerCoords')[0]).days + 1, self._YMaxIndex, 4500)
|
|---|
| 1380 | return None
|
|---|
| 1381 |
|
|---|
| 1382 | def _ReadNumpyArray(self, sliceList):
|
|---|
| 1383 | return _HYCOMGridGLBa0083D._ReadNumpyArrayForDataset(self, sliceList)
|
|---|
| 1384 |
|
|---|
| 1385 | @classmethod
|
|---|
| 1386 | def CreateArcGISRasters(cls, variableName,
|
|---|
| 1387 | outputWorkspace, mode=u'add', rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s_%%Y%%j.img'], rasterCatalog=None,
|
|---|
| 1388 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', startDate=None, endDate=None,
|
|---|
| 1389 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1390 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 1391 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1392 | grid = HYCOMGLBa008Equatorial3D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=120, cacheDirectory=cacheDirectory)
|
|---|
| 1393 | try:
|
|---|
| 1394 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 1395 | from GeoEco.Datasets.Virtual import GridSliceCollection
|
|---|
| 1396 | grid = HYCOMGLBa008Equatorial4D._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, startDate=startDate, endDate=endDate)
|
|---|
| 1397 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(grid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata())]))
|
|---|
| 1398 | workspace.ImportDatasets(GridSliceCollection(grid, tQACoordType=u'center').QueryDatasets(), mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 1399 | if rasterCatalog is not None:
|
|---|
| 1400 | workspace.ToRasterCatalog(rasterCatalog, grid.GetSpatialReference(u'ArcGIS'), tQACoordType=u'center', tCoordFunction=lambda qav: [qav[u'DateTime'] - datetime.timedelta(0.5), qav[u'DateTime'], qav[u'DateTime'] + datetime.timedelta(0.5) - datetime.timedelta(seconds=1)], overwriteExisting=True)
|
|---|
| 1401 | finally:
|
|---|
| 1402 | grid.Close()
|
|---|
| 1403 | return outputWorkspace
|
|---|
| 1404 |
|
|---|
| 1405 | @classmethod
|
|---|
| 1406 | def CreateClimatologicalArcGISRasters(cls, variableName,
|
|---|
| 1407 | statistic, binType,
|
|---|
| 1408 | outputWorkspace, mode=u'add', rasterNameExpressions=[u'%(VariableName)s', u'%(ClimatologyBinType)s_Climatology', u'%(VariableName)s_%(ClimatologyBinName)s_%(Statistic)s.img'],
|
|---|
| 1409 | binDuration=1, startDayOfYear=1,
|
|---|
| 1410 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', startDate=None, endDate=None,
|
|---|
| 1411 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1412 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 1413 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1414 | grid = HYCOMGLBa008Equatorial3D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 1415 | try:
|
|---|
| 1416 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 1417 | from GeoEco.Datasets.Virtual import ClimatologicalGridCollection
|
|---|
| 1418 | grid = HYCOMGLBa008Equatorial4D._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, startDate=startDate, endDate=endDate)
|
|---|
| 1419 | collection = ClimatologicalGridCollection(grid, statistic, binType, binDuration, startDayOfYear, reportProgress=True)
|
|---|
| 1420 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(collection.GetAllQueryableAttributes()))
|
|---|
| 1421 | workspace.ImportDatasets(collection.QueryDatasets(), mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 1422 | finally:
|
|---|
| 1423 | grid.Close()
|
|---|
| 1424 | return outputWorkspace
|
|---|
| 1425 |
|
|---|
| 1426 | @classmethod
|
|---|
| 1427 | def InterpolateAtArcGISPoints(cls, variableNames,
|
|---|
| 1428 | points, valueFields, tField, method=u'Nearest', extendYExtent=False, where=None, noDataValue=None,
|
|---|
| 1429 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1430 | orderByFields=None, numBlocksToCacheInMemory=128, xBlockSize=16, yBlockSize=16, tBlockSize=3):
|
|---|
| 1431 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1432 | grids = [HYCOMGLBa008Equatorial3D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) for variableName in variableNames]
|
|---|
| 1433 | try:
|
|---|
| 1434 | if orderByFields is not None:
|
|---|
| 1435 | orderBy = u', '.join(map(lambda f: f + u' ASC', orderByFields))
|
|---|
| 1436 | else:
|
|---|
| 1437 | from GeoEco.ArcGIS import GeoprocessorManager
|
|---|
| 1438 | if GeoprocessorManager.GetArcGISMajorVersion() > 9 or GeoprocessorManager.GetArcGISMinorVersion() >= 2:
|
|---|
| 1439 | orderBy = tField + u' ASC'
|
|---|
| 1440 | else:
|
|---|
| 1441 | orderBy = None
|
|---|
| 1442 | from GeoEco.Datasets.ArcGIS import ArcGISTable
|
|---|
| 1443 | from GeoEco.SpatialAnalysis.Interpolation import Interpolator
|
|---|
| 1444 | Interpolator.InterpolateGridsValuesForTableOfPoints(grids, ArcGISTable(points), valueFields, tField=tField, where=where, orderBy=orderBy, method=method, noDataValue=noDataValue, gridsWrap=True, numBlocksToCacheInMemory=numBlocksToCacheInMemory, xBlockSize=xBlockSize, yBlockSize=yBlockSize, tBlockSize=tBlockSize)
|
|---|
| 1445 | finally:
|
|---|
| 1446 | for grid in grids:
|
|---|
| 1447 | grid.Close()
|
|---|
| 1448 | return points
|
|---|
| 1449 |
|
|---|
| 1450 |
|
|---|
| 1451 | class _HYCOMGridGLBa0084D(OPeNDAPGrid):
|
|---|
| 1452 | __doc__ = DynamicDocString()
|
|---|
| 1453 |
|
|---|
| 1454 | def __init__(self, variableName, timeout, maxRetryTime, cacheDirectory):
|
|---|
| 1455 | self._CachedTCenterCoords = None
|
|---|
| 1456 | super(_HYCOMGridGLBa0084D, self).__init__(OPeNDAPURL('http://tds.hycom.org/thredds/dodsC/glb_analysis', timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory),
|
|---|
| 1457 | variableName,
|
|---|
| 1458 | 'Grid',
|
|---|
| 1459 | lazyPropertyValues={'SpatialReference': None,
|
|---|
| 1460 | 'Dimensions': 'tzyx',
|
|---|
| 1461 | 'CoordDependencies': (None, None, None, None),
|
|---|
| 1462 | 'CoordIncrements': (None, None, 1., 1.), # t increment is None because, sadly, HYCOM omits slices when their system occasionally fails to generate data for a day
|
|---|
| 1463 | 'TCornerCoordType': 'center',
|
|---|
| 1464 | 'PhysicalDimensions': 'tzyx',
|
|---|
| 1465 | 'PhysicalDimensionsFlipped': (False, False, False, False),
|
|---|
| 1466 | 'UnscaledDataType': 'float32',
|
|---|
| 1467 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 1468 | 'ScalingFunction': None})
|
|---|
| 1469 |
|
|---|
| 1470 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 1471 | if name == 'CornerCoords':
|
|---|
| 1472 | return (self._GetCoords('t', 0, [0], [0], 0.), 0., 0., 0.)
|
|---|
| 1473 | return super(_HYCOMGridGLBa0084D, self)._GetLazyPropertyPhysicalValue(name)
|
|---|
| 1474 |
|
|---|
| 1475 | def _GetCoords(self, coord, coordNum, slices, sliceDims, fixedIncrementOffset):
|
|---|
| 1476 | if coord not in ['t', 'z']:
|
|---|
| 1477 | raise RuntimeError(_('_HYCOMGridGLBa0084D._GetCoords() called with coord == \'%(coord)s\'. This should never happen. Please contact the author of this tool for assistance.') % {u'coord': coord})
|
|---|
| 1478 |
|
|---|
| 1479 | import numpy
|
|---|
| 1480 |
|
|---|
| 1481 | if coord == 't':
|
|---|
| 1482 | if self._CachedTCenterCoords is None:
|
|---|
| 1483 | self.ParentCollection._Open()
|
|---|
| 1484 | self._CachedTCenterCoords = numpy.array(map(lambda days: datetime.timedelta(days) + datetime.datetime(1900, 12, 31), list(self.ParentCollection._PydapDataset['MT'][:])), dtype='object')
|
|---|
| 1485 | if slices is None:
|
|---|
| 1486 | result = self._CachedTCenterCoords.copy()
|
|---|
| 1487 | else:
|
|---|
| 1488 | result = self._CachedTCenterCoords.__getitem__(*slices)
|
|---|
| 1489 | if fixedIncrementOffset != 0:
|
|---|
| 1490 | result += datetime.timedelta(fixedIncrementOffset)
|
|---|
| 1491 | return result
|
|---|
| 1492 |
|
|---|
| 1493 | zCoords = [0.0, 10.0, 20.0, 30.0, 50.0, 75.0, 100.0, 125.0, 150.0, 200.0, 250.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900.0, 1000.0, 1100.0, 1200.0, 1300.0, 1400.0, 1500.0, 1750.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0]
|
|---|
| 1494 | if fixedIncrementOffset == -0.5:
|
|---|
| 1495 | zCoords = [0.0] + map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:])
|
|---|
| 1496 | elif fixedIncrementOffset == 0.5:
|
|---|
| 1497 | zCoords = map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:]) + [11000.0]
|
|---|
| 1498 | if slices is None:
|
|---|
| 1499 | return numpy.array(zCoords)
|
|---|
| 1500 | return numpy.array(zCoords).__getitem__(*slices)
|
|---|
| 1501 |
|
|---|
| 1502 |
|
|---|
| 1503 | class HYCOMGLBa008Equatorial4D(Grid):
|
|---|
| 1504 | __doc__ = DynamicDocString()
|
|---|
| 1505 |
|
|---|
| 1506 | def _GetVariableName(self):
|
|---|
| 1507 | return self._VariableName
|
|---|
| 1508 |
|
|---|
| 1509 | VariableName = property(_GetVariableName, doc=DynamicDocString())
|
|---|
| 1510 |
|
|---|
| 1511 | def __init__(self, variableName, extendYExtent=False, timeout=60, maxRetryTime=120, cacheDirectory=None):
|
|---|
| 1512 | self.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1513 |
|
|---|
| 1514 | # Initialize our properties.
|
|---|
| 1515 |
|
|---|
| 1516 | self._VariableName = variableName
|
|---|
| 1517 | self._Timeout = timeout
|
|---|
| 1518 | self._MaxRetryTime = maxRetryTime
|
|---|
| 1519 | self._CacheDirectory = cacheDirectory
|
|---|
| 1520 | self._DisplayName = _(u'%(name)s grid of the equatorial region of the HYCOM + NCODA Global 1/12 degree Analysis (GLBa0.08)') % {u'name': variableName}
|
|---|
| 1521 | self._OpenGrid = None
|
|---|
| 1522 | self._PacificLookupGrids = None
|
|---|
| 1523 | self._AtlanticLookupGrids = None
|
|---|
| 1524 |
|
|---|
| 1525 | # If we're not extending the Y extent, set the maximum Y index
|
|---|
| 1526 | # to the top of the HYCOM Mercator region, about 47 N. If we
|
|---|
| 1527 | # are extending it, set the maximum Y index to 60 N.
|
|---|
| 1528 |
|
|---|
| 1529 | self._YMaxIndex = {False: 2172-390, True: 2448-390}[extendYExtent]
|
|---|
| 1530 |
|
|---|
| 1531 | # Initialize the base class.
|
|---|
| 1532 |
|
|---|
| 1533 | super(HYCOMGLBa008Equatorial4D, self).__init__(queryableAttributes=(QueryableAttribute(u'VariableName', _(u'HYCOM variable'), UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature', u'u', u'v'], makeLowercase=True)),),
|
|---|
| 1534 | queryableAttributeValues={u'VariableName': variableName},
|
|---|
| 1535 | lazyPropertyValues={'SpatialReference': Dataset.ConvertSpatialReference('proj4', '+proj=merc +R=6371001 +lon_0=-105.88 +no_defs', 'obj'), # lon_0 and other georeferencing parameters were calculated by _HYCOMGridGLBa0083D.GetSpatialReferenceParametersForHYCOMGlobalGrid()
|
|---|
| 1536 | 'Dimensions': u'tzyx',
|
|---|
| 1537 | 'CoordDependencies': (None, None, None, None),
|
|---|
| 1538 | 'CoordIncrements': (1.0, None, 8895.5955278281017, 8895.5955278281017),
|
|---|
| 1539 | 'TIncrementUnit': u'day',
|
|---|
| 1540 | 'TSemiRegularity': None,
|
|---|
| 1541 | 'TCountPerSemiRegularPeriod': None,
|
|---|
| 1542 | 'TCornerCoordType': u'center',
|
|---|
| 1543 | 'CornerCoords': (datetime.datetime(2003, 11, 3), 0.0, -9909647.065054208, -20010642.139849316),
|
|---|
| 1544 | 'PhysicalDimensions': u'tzyx',
|
|---|
| 1545 | 'PhysicalDimensionsFlipped': (False, False, False, False),
|
|---|
| 1546 | 'UnscaledDataType': u'float32',
|
|---|
| 1547 | 'UnscaledNoDataValue': 1.2676506002282294e+030,
|
|---|
| 1548 | 'ScalingFunction': None})
|
|---|
| 1549 |
|
|---|
| 1550 | def _Close(self):
|
|---|
| 1551 | if hasattr(self, '_OpenGrid') and self._OpenGrid is not None:
|
|---|
| 1552 | self._OpenGrid.Close()
|
|---|
| 1553 | self._OpenGrid = None
|
|---|
| 1554 | super(HYCOMGLBa008Equatorial4D, self)._Close()
|
|---|
| 1555 |
|
|---|
| 1556 | def _GetDisplayName(self):
|
|---|
| 1557 | return self._DisplayName
|
|---|
| 1558 |
|
|---|
| 1559 | def _GetLazyPropertyPhysicalValue(self, name):
|
|---|
| 1560 | if name == 'Shape':
|
|---|
| 1561 | if self._OpenGrid is None:
|
|---|
| 1562 | from GeoEco.Datasets.Virtual import ClippedGrid
|
|---|
| 1563 | self._OpenGrid = ClippedGrid(_HYCOMGridGLBa0084D(self._VariableName, self._Timeout, self._MaxRetryTime, self._CacheDirectory), u'Cell indices', yMin=390)
|
|---|
| 1564 | return ((self._OpenGrid.CenterCoords['t', -1] - self.GetLazyPropertyValue('CornerCoords')[0]).days + 1, 33, self._YMaxIndex, 4500)
|
|---|
| 1565 | return None
|
|---|
| 1566 |
|
|---|
| 1567 | def _GetCoords(self, coord, coordNum, slices, sliceDims, fixedIncrementOffset):
|
|---|
| 1568 | if coord != 'z':
|
|---|
| 1569 | raise RuntimeError(_('HYCOMGLBa008Equatorial4D._GetCoords() called with coord == \'%(coord)s\'. This should never happen. Please contact the author of this tool for assistance.') % {u'coord': coord})
|
|---|
| 1570 | zCoords = [0.0, 10.0, 20.0, 30.0, 50.0, 75.0, 100.0, 125.0, 150.0, 200.0, 250.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900.0, 1000.0, 1100.0, 1200.0, 1300.0, 1400.0, 1500.0, 1750.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0]
|
|---|
| 1571 | if fixedIncrementOffset == -0.5:
|
|---|
| 1572 | zCoords = [0.0] + map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:])
|
|---|
| 1573 | elif fixedIncrementOffset == 0.5:
|
|---|
| 1574 | zCoords = map(lambda a, b: (a+b)/2., zCoords[:-1], zCoords[1:]) + [11000.0]
|
|---|
| 1575 | import numpy
|
|---|
| 1576 | if slices is None:
|
|---|
| 1577 | return numpy.array(zCoords)
|
|---|
| 1578 | return numpy.array(zCoords).__getitem__(*slices)
|
|---|
| 1579 |
|
|---|
| 1580 | def _ReadNumpyArray(self, sliceList):
|
|---|
| 1581 | return _HYCOMGridGLBa0083D._ReadNumpyArrayForDataset(self, sliceList) # This function handles both 3D and 4D grids.
|
|---|
| 1582 |
|
|---|
| 1583 | @classmethod
|
|---|
| 1584 | def _RotateAndClip(cls, grid, rotationOffset, spatialExtent, linearUnit, minDepth=None, maxDepth=None, startDate=None, endDate=None):
|
|---|
| 1585 | from GeoEco.Datasets.Virtual import RotatedGlobalGrid, ClippedGrid
|
|---|
| 1586 |
|
|---|
| 1587 | # Rotate the grid, if requested.
|
|---|
| 1588 |
|
|---|
| 1589 | if rotationOffset is not None:
|
|---|
| 1590 | if linearUnit == u'degrees':
|
|---|
| 1591 | try:
|
|---|
| 1592 | sr = grid.GetSpatialReference('obj').Clone()
|
|---|
| 1593 | if not sr.IsGeographic():
|
|---|
| 1594 | srAtPrimeMeridian = sr.Clone()
|
|---|
| 1595 | srAtPrimeMeridian.SetNormProjParm('central_meridian', 0.)
|
|---|
| 1596 | srGeographic = cls._osr().SpatialReference()
|
|---|
| 1597 | srGeographic.CopyGeogCSFrom(sr)
|
|---|
| 1598 | transformer = cls._osr().CoordinateTransformation(srGeographic, srAtPrimeMeridian)
|
|---|
| 1599 | rotationOffset = transformer.TransformPoint(rotationOffset, 0.)[0]
|
|---|
| 1600 | except:
|
|---|
| 1601 | cls._gdal().ErrorReset()
|
|---|
| 1602 | raise
|
|---|
| 1603 |
|
|---|
| 1604 | grid = RotatedGlobalGrid(grid, rotationOffset, u'Map units')
|
|---|
| 1605 |
|
|---|
| 1606 | # Clip the grid, if requested.
|
|---|
| 1607 |
|
|---|
| 1608 | xMin, yMin, xMax, yMax = None, None, None, None
|
|---|
| 1609 | if spatialExtent is not None:
|
|---|
| 1610 | sr = grid.GetSpatialReference('obj')
|
|---|
| 1611 |
|
|---|
| 1612 | from GeoEco.Types import EnvelopeTypeMetadata
|
|---|
| 1613 | xMin, yMin, xMax, yMax = EnvelopeTypeMetadata.ParseFromArcGISString(spatialExtent)
|
|---|
| 1614 |
|
|---|
| 1615 | if linearUnit == u'degrees':
|
|---|
| 1616 | centralMeridian = sr.GetNormProjParm('central_meridian')
|
|---|
| 1617 | xMinAllowed = -180. + centralMeridian
|
|---|
| 1618 | xMaxAllowed = 180. + centralMeridian
|
|---|
| 1619 |
|
|---|
| 1620 | if str(xMin) == str(xMinAllowed):
|
|---|
| 1621 | xMin = xMinAllowed
|
|---|
| 1622 | elif str(xMin) == str(xMaxAllowed):
|
|---|
| 1623 | xMin = xMaxAllowed
|
|---|
| 1624 | if str(xMax) == str(xMinAllowed):
|
|---|
| 1625 | xMax = xMinAllowed
|
|---|
| 1626 | elif str(xMax) == str(xMaxAllowed):
|
|---|
| 1627 | xMax = xMaxAllowed
|
|---|
| 1628 |
|
|---|
| 1629 | if xMin < xMinAllowed or xMin > xMaxAllowed:
|
|---|
| 1630 | if rotationOffset is not None:
|
|---|
| 1631 | raise ValueError(_(u'The X Minimum of the Spatial Extent parameter (%(value)g degrees) is not within the geographic extent of the rotated grid. After rotation, the geographic extent in the X direction is %(xMin)g to %(xMax)g degrees. Please specify an X Minimum in that range.') % {u'value': xMin, u'xMin': xMinAllowed, u'xMax': xMaxAllowed})
|
|---|
| 1632 | else:
|
|---|
| 1633 | raise ValueError(_(u'The X Minimum of the Spatial Extent parameter (%(value)g degrees) is not within the geographic extent of the grid. The geographic extent in the X direction is %(xMin)g to %(xMax)g degrees. Please specify an X Minimum in that range.') % {u'value': xMin, u'xMin': xMinAllowed, u'xMax': xMaxAllowed})
|
|---|
| 1634 | if xMax < xMinAllowed or xMax > xMaxAllowed:
|
|---|
| 1635 | if rotationOffset is not None:
|
|---|
| 1636 | raise ValueError(_(u'The X Maximum of the Spatial Extent parameter (%(value)g degrees) is not within the geographic extent of the rotated grid. After rotation, the geographic extent in the X direction is %(xMin)g to %(xMax)g degrees. Please specify an X Minimum in that range.') % {u'value': xMax, u'xMin': xMinAllowed, u'xMax': xMaxAllowed})
|
|---|
| 1637 | else:
|
|---|
| 1638 | raise ValueError(_(u'The X Maximum of the Spatial Extent parameter (%(value)g degrees) is not within the geographic extent of the grid. The geographic extent in the X direction is %(xMin)g to %(xMax)g degrees. Please specify an X Minimum in that range.') % {u'value': xMax, u'xMin': xMinAllowed, u'xMax': xMaxAllowed})
|
|---|
| 1639 |
|
|---|
| 1640 | yMin = max(yMin, -85.0)
|
|---|
| 1641 | yMax = min(yMax, 85.0)
|
|---|
| 1642 | try:
|
|---|
| 1643 | transformer = cls._osr().CoordinateTransformation(Dataset.ConvertSpatialReference('proj4', '+proj=latlong +R=6371001 +no_defs', 'obj'), grid.GetSpatialReference('obj'))
|
|---|
| 1644 | xMin, yMin = transformer.TransformPoint(xMin, yMin)[:2]
|
|---|
| 1645 | xMax, yMax = transformer.TransformPoint(xMax, yMax)[:2]
|
|---|
| 1646 | except:
|
|---|
| 1647 | cls._gdal().ErrorReset()
|
|---|
| 1648 | raise
|
|---|
| 1649 |
|
|---|
| 1650 | if spatialExtent is not None or minDepth is not None or maxDepth is not None or startDate is not None or endDate is not None:
|
|---|
| 1651 | if startDate is not None:
|
|---|
| 1652 | startDate = datetime.datetime(startDate.year, startDate.month, startDate.day, 0, 0, 0)
|
|---|
| 1653 | if endDate is not None:
|
|---|
| 1654 | endDate = datetime.datetime(endDate.year, endDate.month, endDate.day, 23, 59, 59)
|
|---|
| 1655 |
|
|---|
| 1656 | grid = ClippedGrid(grid, u'Map coordinates', xMin=xMin, xMax=xMax, yMin=yMin, yMax=yMax, zMin=minDepth, zMax=maxDepth, tMin=startDate, tMax=endDate)
|
|---|
| 1657 |
|
|---|
| 1658 | # Return the grid.
|
|---|
| 1659 |
|
|---|
| 1660 | return grid
|
|---|
| 1661 |
|
|---|
| 1662 | @classmethod
|
|---|
| 1663 | def CreateArcGISRasters(cls, variableName,
|
|---|
| 1664 | outputWorkspace, mode=u'add', rasterNameExpressions=['%(VariableName)s', '%%Y', 'Depth_%(Depth)04.0fm', '%(VariableName)s_%%Y%%j_%(Depth)04.0fm.img'], rasterCatalog=None,
|
|---|
| 1665 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 1666 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1667 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 1668 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1669 | grid = HYCOMGLBa008Equatorial4D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 1670 | try:
|
|---|
| 1671 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 1672 | from GeoEco.Datasets.Virtual import GridSliceCollection, SeafloorGrid
|
|---|
| 1673 |
|
|---|
| 1674 | # If the caller requested a minimum depth that is within
|
|---|
| 1675 | # the range of the HYCOM layers, instantiate those grids.
|
|---|
| 1676 |
|
|---|
| 1677 | grids = []
|
|---|
| 1678 | if minDepth is None or minDepth <= 5500.:
|
|---|
| 1679 | clippedGrid = cls._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 1680 | grids.extend(GridSliceCollection(clippedGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets())
|
|---|
| 1681 |
|
|---|
| 1682 | # If the caller requested a maximum depth that is greater
|
|---|
| 1683 | # than or equal to 20000., instantiate a grid representing
|
|---|
| 1684 | # the values at the seafloor.
|
|---|
| 1685 |
|
|---|
| 1686 | if minDepth == 20000. or maxDepth >= 20000.:
|
|---|
| 1687 | clippedGrid = cls._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 1688 | seafloorGrid = SeafloorGrid(clippedGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 1689 | grids.extend(GridSliceCollection(seafloorGrid, tQACoordType=u'center').QueryDatasets())
|
|---|
| 1690 |
|
|---|
| 1691 | # Create the rasters.
|
|---|
| 1692 |
|
|---|
| 1693 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(grid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata()), QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())]))
|
|---|
| 1694 | workspace.ImportDatasets(grids, mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 1695 | if rasterCatalog is not None:
|
|---|
| 1696 | workspace.ToRasterCatalog(rasterCatalog, grids[0].GetSpatialReference(u'ArcGIS'), tQACoordType=u'center', tCoordFunction=lambda qav: [qav[u'DateTime'] - datetime.timedelta(0.5), qav[u'DateTime'], qav[u'DateTime'] + datetime.timedelta(0.5) - datetime.timedelta(seconds=1)], overwriteExisting=True)
|
|---|
| 1697 |
|
|---|
| 1698 | finally:
|
|---|
| 1699 | grid.Close()
|
|---|
| 1700 | return outputWorkspace
|
|---|
| 1701 |
|
|---|
| 1702 | @classmethod
|
|---|
| 1703 | def CreateClimatologicalArcGISRasters(cls, variableName,
|
|---|
| 1704 | statistic, binType,
|
|---|
| 1705 | outputWorkspace, mode=u'add', rasterNameExpressions=[u'%(VariableName)s', u'%(ClimatologyBinType)s_Climatology', 'Depth_%(Depth)04.0fm', u'%(VariableName)s_%(Depth)04.0fm_%(ClimatologyBinName)s_%(Statistic)s.img'],
|
|---|
| 1706 | binDuration=1, startDayOfYear=1,
|
|---|
| 1707 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 1708 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1709 | calculateStatistics=True, buildPyramids=False):
|
|---|
| 1710 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1711 | grid = HYCOMGLBa008Equatorial4D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 1712 | try:
|
|---|
| 1713 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 1714 | from GeoEco.Datasets.Virtual import GridSliceCollection, ClimatologicalGridCollection, SeafloorGrid
|
|---|
| 1715 |
|
|---|
| 1716 | # If the caller requested a minimum depth that is within
|
|---|
| 1717 | # the range of the HYCOM layers, instantiate a
|
|---|
| 1718 | # ClimatologicalGridCollection from the clipped 4D (tzyx)
|
|---|
| 1719 | # grid, query the 3D grids (zyx) from it, and get the 2D
|
|---|
| 1720 | # (yx) slices of it.
|
|---|
| 1721 |
|
|---|
| 1722 | grids = []
|
|---|
| 1723 | if minDepth is None or minDepth <= 5500.:
|
|---|
| 1724 | clippedGrid = cls._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 1725 | collection = ClimatologicalGridCollection(clippedGrid, statistic, binType, binDuration, startDayOfYear, reportProgress=False)
|
|---|
| 1726 | for g in collection.QueryDatasets(reportProgress=False):
|
|---|
| 1727 | grids.extend(GridSliceCollection(g, zQACoordType=u'center').QueryDatasets(reportProgress=False))
|
|---|
| 1728 |
|
|---|
| 1729 | # If the caller requested a maximum depth that is greater
|
|---|
| 1730 | # than or equal to 20000., instantiate a 3D SeafloorGrid
|
|---|
| 1731 | # (tyx), create a ClimatologicalGridCollection from it,
|
|---|
| 1732 | # and query the 2D (yx) grids from it.
|
|---|
| 1733 |
|
|---|
| 1734 | if minDepth == 20000. or maxDepth >= 20000.:
|
|---|
| 1735 | clippedGrid = cls._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 1736 | seafloorGrid = SeafloorGrid(clippedGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 1737 | collection = ClimatologicalGridCollection(seafloorGrid, statistic, binType, binDuration, startDayOfYear, reportProgress=False)
|
|---|
| 1738 | grids.extend(collection.QueryDatasets(reportProgress=False))
|
|---|
| 1739 |
|
|---|
| 1740 | # Create the rasters.
|
|---|
| 1741 |
|
|---|
| 1742 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(collection.GetAllQueryableAttributes() + [QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())]))
|
|---|
| 1743 | workspace.ImportDatasets(grids, mode, calculateStatistics=calculateStatistics, buildPyramids=buildPyramids)
|
|---|
| 1744 |
|
|---|
| 1745 | finally:
|
|---|
| 1746 | grid.Close()
|
|---|
| 1747 | return outputWorkspace
|
|---|
| 1748 |
|
|---|
| 1749 | @classmethod
|
|---|
| 1750 | def CreateCurrentVectorsAsArcGISFeatureClasses(cls, outputWorkspace, mode=u'add', featureClassNameExpressions=['uv_vectors', '%%Y', 'Depth_%(Depth)04.0fm', 'uv_vectors_%%%Y%%j_%(Depth)04.0fm.shp'],
|
|---|
| 1751 | scaleFactor=8900., uniformLength=False,
|
|---|
| 1752 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 1753 | timeout=60, maxRetryTime=120, cacheDirectory=None):
|
|---|
| 1754 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1755 |
|
|---|
| 1756 | # Create u and v component grids.
|
|---|
| 1757 |
|
|---|
| 1758 | uGrid = HYCOMGLBa008Equatorial4D(u'u', extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 1759 | try:
|
|---|
| 1760 | vGrid = HYCOMGLBa008Equatorial4D(u'v', extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 1761 | try:
|
|---|
| 1762 |
|
|---|
| 1763 | # If the caller requested a minimum depth that is
|
|---|
| 1764 | # within the range of the HYCOM layers, instantiate
|
|---|
| 1765 | # those grids.
|
|---|
| 1766 |
|
|---|
| 1767 | from GeoEco.Datasets.Virtual import GridSliceCollection, SeafloorGrid
|
|---|
| 1768 |
|
|---|
| 1769 | uSlices = []
|
|---|
| 1770 | vSlices = []
|
|---|
| 1771 |
|
|---|
| 1772 | if minDepth is None or minDepth <= 5500.:
|
|---|
| 1773 | clippedUGrid = cls._RotateAndClip(uGrid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 1774 | uSlices.extend(GridSliceCollection(clippedUGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets())
|
|---|
| 1775 |
|
|---|
| 1776 | clippedVGrid = cls._RotateAndClip(vGrid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 1777 | vSlices.extend(GridSliceCollection(clippedVGrid, tQACoordType=u'center', zQACoordType=u'center').QueryDatasets())
|
|---|
| 1778 |
|
|---|
| 1779 | # If the caller requested a maximum depth that is
|
|---|
| 1780 | # greater than or equal to 20000., instantiate grids
|
|---|
| 1781 | # representing the values at the seafloor.
|
|---|
| 1782 |
|
|---|
| 1783 | if minDepth == 20000. or maxDepth >= 20000.:
|
|---|
| 1784 | clippedUGrid = cls._RotateAndClip(uGrid, rotationOffset, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 1785 | seafloorUGrid = SeafloorGrid(clippedUGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 1786 | uSlices.extend(GridSliceCollection(seafloorUGrid, tQACoordType=u'center').QueryDatasets())
|
|---|
| 1787 |
|
|---|
| 1788 | clippedVGrid = cls._RotateAndClip(vGrid, rotationOffset, spatialExtent, linearUnit, None, None, startDate, endDate)
|
|---|
| 1789 | seafloorVGrid = SeafloorGrid(clippedVGrid, (QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata()),), {u'Depth': 20000.})
|
|---|
| 1790 | vSlices.extend(GridSliceCollection(seafloorVGrid, tQACoordType=u'center').QueryDatasets())
|
|---|
| 1791 |
|
|---|
| 1792 | # Construct a list of
|
|---|
| 1793 | # ShapefileFromVectorComponentGrids from the slices.
|
|---|
| 1794 |
|
|---|
| 1795 | from GeoEco.SpatialAnalysis.Lines import ShapefileFromVectorComponentGrids
|
|---|
| 1796 |
|
|---|
| 1797 | queryableAttributes = tuple(uGrid.GetAllQueryableAttributes() + [QueryableAttribute(u'DateTime', _(u'Date'), DateTimeTypeMetadata()), QueryableAttribute(u'Depth', _(u'Depth'), FloatTypeMetadata())])
|
|---|
| 1798 | vectorShapefiles = []
|
|---|
| 1799 |
|
|---|
| 1800 | for i in range(len(uSlices)):
|
|---|
| 1801 | queryableAttributeValues = {}
|
|---|
| 1802 | for qa in queryableAttributes:
|
|---|
| 1803 | queryableAttributeValues[qa.Name] = uSlices[i].GetQueryableAttributeValue(qa.Name)
|
|---|
| 1804 |
|
|---|
| 1805 | vectorShapefiles.append(ShapefileFromVectorComponentGrids(uSlices[i], vSlices[i], scaleFactor, uniformLength, queryableAttributes=queryableAttributes, queryableAttributeValues=queryableAttributeValues))
|
|---|
| 1806 |
|
|---|
| 1807 | # Import the ShapefileFromVectorComponentGrids into
|
|---|
| 1808 | # the output workspace.
|
|---|
| 1809 |
|
|---|
| 1810 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISTable
|
|---|
| 1811 |
|
|---|
| 1812 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISTable, pathCreationExpressions=featureClassNameExpressions, cacheTree=True, queryableAttributes=queryableAttributes)
|
|---|
| 1813 | workspace.ImportDatasets(vectorShapefiles, mode)
|
|---|
| 1814 |
|
|---|
| 1815 | # Return successfully.
|
|---|
| 1816 |
|
|---|
| 1817 | return outputWorkspace
|
|---|
| 1818 |
|
|---|
| 1819 | finally:
|
|---|
| 1820 | vGrid.Close()
|
|---|
| 1821 | finally:
|
|---|
| 1822 | uGrid.Close()
|
|---|
| 1823 |
|
|---|
| 1824 | @classmethod
|
|---|
| 1825 | def InterpolateAtArcGISPoints(cls, variableNames,
|
|---|
| 1826 | points, valueFields, tField, zField=None, zValue=None, method=u'Nearest', extendYExtent=False, where=None, noDataValue=None,
|
|---|
| 1827 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1828 | orderByFields=None, numBlocksToCacheInMemory=128, xBlockSize=16, yBlockSize=16, zBlockSize=3, tBlockSize=3):
|
|---|
| 1829 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1830 | grids = [HYCOMGLBa008Equatorial4D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) for variableName in variableNames]
|
|---|
| 1831 | try:
|
|---|
| 1832 | if orderByFields is not None:
|
|---|
| 1833 | orderBy = u', '.join(map(lambda f: f + u' ASC', orderByFields))
|
|---|
| 1834 | else:
|
|---|
| 1835 | from GeoEco.ArcGIS import GeoprocessorManager
|
|---|
| 1836 | if GeoprocessorManager.GetArcGISMajorVersion() > 9 or GeoprocessorManager.GetArcGISMinorVersion() >= 2:
|
|---|
| 1837 | orderBy = tField + u' ASC'
|
|---|
| 1838 | else:
|
|---|
| 1839 | orderBy = None
|
|---|
| 1840 | from GeoEco.Datasets.ArcGIS import ArcGISTable
|
|---|
| 1841 | from GeoEco.SpatialAnalysis.Interpolation import Interpolator
|
|---|
| 1842 | Interpolator.InterpolateGridsValuesForTableOfPoints(grids, ArcGISTable(points), valueFields, zField=zField, tField=tField, zValue=zValue, where=where, orderBy=orderBy, method=method, noDataValue=noDataValue, gridsWrap=True, useAbsZ=True, seafloorZValue=20000., numBlocksToCacheInMemory=numBlocksToCacheInMemory, xBlockSize=xBlockSize, yBlockSize=yBlockSize, zBlockSize=zBlockSize, tBlockSize=tBlockSize)
|
|---|
| 1843 | finally:
|
|---|
| 1844 | for grid in grids:
|
|---|
| 1845 | grid.Close()
|
|---|
| 1846 | return points
|
|---|
| 1847 |
|
|---|
| 1848 | @classmethod
|
|---|
| 1849 | def CreateCayulaCornillonFrontsAsArcGISRasters(cls, variableName, minPopMeanDifference,
|
|---|
| 1850 | outputWorkspace, mode=u'add', rasterNameExpressions=['%(VariableName)s_fronts', '%%Y', 'Depth_%(Depth)04.0fm', '%(VariableName)s_%%Y%%j_%(Depth)04.0fm_%(ImageType)s.img'],
|
|---|
| 1851 | medianFilterWindowSize=3, histogramWindowSize=20, histogramWindowStride=1, minPropNonMaskedCells=0.65, minPopProp=0.25, minTheta=0.76, minSinglePopCohesion=0.88, minGlobalPopCohesion=0.90, threads=1,
|
|---|
| 1852 | fillHoles=20, thin=True, minSize=10,
|
|---|
| 1853 | rotationOffset=None, extendYExtent=False, spatialExtent=None, linearUnit=u'Degrees', minDepth=None, maxDepth=None, startDate=None, endDate=None,
|
|---|
| 1854 | timeout=60, maxRetryTime=120, cacheDirectory=None,
|
|---|
| 1855 | calculateStatistics=True, buildRAT=False, buildPyramids=False,
|
|---|
| 1856 | outputCandidateCounts=False, outputFrontCounts=False, outputWindowStatusCodes=False, outputWindowStatusValues=False):
|
|---|
| 1857 | cls.__doc__.Obj.ValidateMethodInvocation()
|
|---|
| 1858 |
|
|---|
| 1859 | # Construct a HYCOMGLBa008Equatorial4D instance and rotate and
|
|---|
| 1860 | # clip it as requested.
|
|---|
| 1861 |
|
|---|
| 1862 | grid = HYCOMGLBa008Equatorial4D(variableName, extendYExtent=extendYExtent, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory)
|
|---|
| 1863 |
|
|---|
| 1864 | try:
|
|---|
| 1865 | grid = cls._RotateAndClip(grid, rotationOffset, spatialExtent, linearUnit, minDepth, maxDepth, startDate, endDate)
|
|---|
| 1866 |
|
|---|
| 1867 | # Construct a CayulaCornillonFrontsInGrid collection using
|
|---|
| 1868 | # the requested parameters.
|
|---|
| 1869 |
|
|---|
| 1870 | from GeoEco.OceanographicAnalysis.Fronts import CayulaCornillonFrontsInGrid
|
|---|
| 1871 | import numpy
|
|---|
| 1872 |
|
|---|
| 1873 | collection = CayulaCornillonFrontsInGrid(grid,
|
|---|
| 1874 | tQACoordType=u'center',
|
|---|
| 1875 | zQACoordType=u'center',
|
|---|
| 1876 | wrapEdges=grid.Shape[-1] == 4500,
|
|---|
| 1877 | unscalingFunction=lambda a: numpy.cast['int16'](a * 100),
|
|---|
| 1878 | newScaledNoDataValue=-99.,
|
|---|
| 1879 | medianFilterWindowSize=medianFilterWindowSize,
|
|---|
| 1880 | histogramWindowSize=histogramWindowSize,
|
|---|
| 1881 | histogramWindowStride=histogramWindowStride,
|
|---|
| 1882 | minPropNonMaskedCells=minPropNonMaskedCells,
|
|---|
| 1883 | minPopProp=minPopProp,
|
|---|
| 1884 | minPopMeanDifference=minPopMeanDifference,
|
|---|
| 1885 | minTheta=minTheta,
|
|---|
| 1886 | minSinglePopCohesion=minSinglePopCohesion,
|
|---|
| 1887 | minGlobalPopCohesion=minGlobalPopCohesion,
|
|---|
| 1888 | threads=threads,
|
|---|
| 1889 | fillHoles=fillHoles,
|
|---|
| 1890 | thin=thin,
|
|---|
| 1891 | minSize=minSize)
|
|---|
| 1892 | try:
|
|---|
| 1893 | try:
|
|---|
| 1894 | # Construct an ArcGISWorkspace instance and import
|
|---|
| 1895 | # time/depth slices from the
|
|---|
| 1896 | # CayulaCornillonFrontsInGrid instance.
|
|---|
| 1897 |
|
|---|
| 1898 | expression = "ImageType = 'floc'"
|
|---|
| 1899 | if outputCandidateCounts:
|
|---|
| 1900 | expression += " OR ImageType = 'ccnt'"
|
|---|
| 1901 | if outputFrontCounts:
|
|---|
| 1902 | expression += " OR ImageType = 'fcnt'"
|
|---|
| 1903 | if outputWindowStatusCodes:
|
|---|
| 1904 | expression += " OR ImageType = 'wsco'"
|
|---|
| 1905 | if outputWindowStatusValues:
|
|---|
| 1906 | expression += " OR ImageType = 'wsvl'"
|
|---|
| 1907 |
|
|---|
| 1908 | from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster
|
|---|
| 1909 |
|
|---|
| 1910 | workspace = ArcGISWorkspace(outputWorkspace, ArcGISRaster, pathCreationExpressions=rasterNameExpressions, cacheTree=True, queryableAttributes=tuple(collection.GetAllQueryableAttributes()))
|
|---|
| 1911 | workspace.ImportDatasets(collection.QueryDatasets(expression), mode, calculateStatistics=calculateStatistics, buildRAT=buildRAT, buildPyramids=buildPyramids)
|
|---|
| 1912 |
|
|---|
| 1913 | # If we caught an exception, log it now. Then delete
|
|---|
| 1914 | # the collection object, to ensure its memory is
|
|---|
| 1915 | # freed. Normally we don't bother doing this but the
|
|---|
| 1916 | # memory it holds can be substantial.
|
|---|
| 1917 |
|
|---|
| 1918 | except:
|
|---|
| 1919 | from GeoEco.Logging import Logger
|
|---|
| 1920 | Logger.LogExceptionAsError()
|
|---|
| 1921 | finally:
|
|---|
| 1922 | del collection
|
|---|
| 1923 | finally:
|
|---|
| 1924 | grid.Close()
|
|---|
| 1925 |
|
|---|
| 1926 | # Return successfully.
|
|---|
| 1927 |
|
|---|
| 1928 | return outputWorkspace
|
|---|
| 1929 |
|
|---|
| 1930 |
|
|---|
| 1931 | ###############################################################################
|
|---|
| 1932 | # Metadata: module
|
|---|
| 1933 | ###############################################################################
|
|---|
| 1934 |
|
|---|
| 1935 | from GeoEco.ArcGIS import ArcGISDependency
|
|---|
| 1936 | from GeoEco.Dependencies import PythonAggregatedModuleDependency
|
|---|
| 1937 | from GeoEco.Datasets.ArcGIS import _UseUnscaledDataDescription, _CalculateStatisticsDescription, _BuildRATDescription, _BuildPyramidsDescription
|
|---|
| 1938 | from GeoEco.Metadata import *
|
|---|
| 1939 | from GeoEco.OceanographicAnalysis.Fronts import CayulaCornillonEdgeDetection, _SIEDDescription, _SIEDReferences, _WindowStatusCodes, _WindowStatusValues
|
|---|
| 1940 | from GeoEco.Types import *
|
|---|
| 1941 |
|
|---|
| 1942 | AddModuleMetadata(shortDescription=_(u'Grids representing HYCOM datasets.'))
|
|---|
| 1943 |
|
|---|
| 1944 | ###############################################################################
|
|---|
| 1945 | # Metadata: _HYCOMGridGOMl0043D class
|
|---|
| 1946 | ###############################################################################
|
|---|
| 1947 |
|
|---|
| 1948 | AddClassMetadata(_HYCOMGridGOMl0043D,
|
|---|
| 1949 | shortDescription=_(u'An OPeNDAPGrid for a 3D variable of a HYCOM GOMl0.04 OPeNDAP URL.'),
|
|---|
| 1950 | longDescription=_(
|
|---|
| 1951 | u"""This class is intended for private use within GeoEco and is not
|
|---|
| 1952 | intended for external callers."""))
|
|---|
| 1953 |
|
|---|
| 1954 | ###############################################################################
|
|---|
| 1955 | # Metadata: HYCOMGOMl0043D class
|
|---|
| 1956 | ###############################################################################
|
|---|
| 1957 |
|
|---|
| 1958 | _HYCOMGOMl004_LongDescription = _(
|
|---|
| 1959 | u"""At the time this %(name)s was developed, the
|
|---|
| 1960 | `HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04) <http://www.hycom.org/dataserver/goml0pt04/>`_
|
|---|
| 1961 | consisted of two gridded datasets:
|
|---|
| 1962 |
|
|---|
| 1963 | * expt_20.1 - The 20.1 experiment running from 1 January 2003 through
|
|---|
| 1964 | 30 June 2010.
|
|---|
| 1965 |
|
|---|
| 1966 | * expt_30.1 - The 30.1 experiment running from 1 July 2010 and running
|
|---|
| 1967 | to the present day plus five days.
|
|---|
| 1968 |
|
|---|
| 1969 | The datasets have identical spatiotemporal extents and resolutions and
|
|---|
| 1970 | the same oceanographic variables. This %(name)s treats them as one
|
|---|
| 1971 | continuous dataset and takes time slices prior to 1 July 2010 from
|
|---|
| 1972 | expt_20.1 and on or after that date from expt_30.1. (On the HYCOM
|
|---|
| 1973 | server, the datasets actually overlap slightly, with expt_20.1 ending
|
|---|
| 1974 | slightly after 30 June 2010 and expt_30.1 starting slightly before 1
|
|---|
| 1975 | July 2010. The %(name)s ignores the overlapping time slices and
|
|---|
| 1976 | switches from expt_20.1 to expt_30.1 on 1 July.)
|
|---|
| 1977 |
|
|---|
| 1978 | The grids are in Mercator projection based on a sphere with radius
|
|---|
| 1979 | 6371001 m, with square cells approximately 4.5 km on a side. The
|
|---|
| 1980 | geographic extent is approximately 18 to 32 N, 98 to 76 W. The time
|
|---|
| 1981 | step is 1 day, with time slices representing the instantaneous
|
|---|
| 1982 | condition of the ocean estimated at 00:00 UTC on each day.
|
|---|
| 1983 |
|
|---|
| 1984 | The HYCOM documentation states that HYCOM provides a five day forecast
|
|---|
| 1985 | and five day hindcast from the current date, although we have observed
|
|---|
| 1986 | netCDF files on their servers that suggested this window may extend
|
|---|
| 1987 | seven days in both directions. HYCOM revises the data within this
|
|---|
| 1988 | window daily, using the latest ocean observations assimilated from
|
|---|
| 1989 | buoys, satellites, and other sensors. Use caution when working with
|
|---|
| 1990 | time slices close to the current date, as it appears that time slices
|
|---|
| 1991 | continue to be revised until they are 7 days older than the current
|
|---|
| 1992 | date.
|
|---|
| 1993 |
|
|---|
| 1994 | Occasionally, HYCOM fails to generate data for a time slice,
|
|---|
| 1995 | presumably due to an outage or other problem in their data processing
|
|---|
| 1996 | infrastructure. For example, in 2004, HYCOM failed to generate data
|
|---|
| 1997 | for three of the 366 time slices of that year. Although HYCOM omits
|
|---|
| 1998 | these time slices from their server, this %(name)s represents them as
|
|---|
| 1999 | grids filled with the No Data value.
|
|---|
| 2000 |
|
|---|
| 2001 | The datasets include both 3D variables (dimensions x, y, and time) and
|
|---|
| 2002 | 4D variables (dimensions x, y, depth, and time). The 4D variables are
|
|---|
| 2003 | estimated at 40 depth levels: 0, 5, 10, 15, 20, 25, 30, 40, 50, 60,
|
|---|
| 2004 | 70, 80, 90, 100, 125, 150, 200, 250, 300, 400, 500, 600, 700, 800,
|
|---|
| 2005 | 900, 1000, 1100, 1200, 1300, 1400, 1500, 1750, 2000, 2500, 3000, 3500,
|
|---|
| 2006 | 4000, 4500, 5000, and 5500 m.
|
|---|
| 2007 |
|
|---|
| 2008 | This %(name)s accesses the HYCOM datasets using the
|
|---|
| 2009 | `OPeNDAP <http://opendap.org/>`_ protocol, allowing data to be
|
|---|
| 2010 | retrieved very efficiently. However, during periods of high load, the
|
|---|
| 2011 | HYCOM OPeNDAP server often requires five to ten minutes to return the
|
|---|
| 2012 | first slice of data. Please be patient; after the first one is
|
|---|
| 2013 | returned, the rest will go much faster. During periods of extreme
|
|---|
| 2014 | load, the tool may fail with a timeout error. If this happens,
|
|---|
| 2015 | increase the timeout value and try again, or wait until later when the
|
|---|
| 2016 | server is less busy.""")
|
|---|
| 2017 |
|
|---|
| 2018 | _HYCOMGOMl004_References = _(
|
|---|
| 2019 | u"""Chassignet, E.P., Hurlburt, H.E., Metzger, E.J., Smedstad, O.M.,
|
|---|
| 2020 | Cummings, J.A., Halliwell, G.R., Bleck, R., Baraille, R., Wallcraft.,
|
|---|
| 2021 | A.J., Lozano, C., Tolman, H.L., Srinivasan, A., Hankin, S., Cornillon,
|
|---|
| 2022 | P., Weisberg, R., Barth, A., He, R., Werner, F. and Wilkin, J. (2009).
|
|---|
| 2023 | US GODAE: Global Ocean Prediction with the HYbrid Coordinate Ocean
|
|---|
| 2024 | Model (HYCOM). Oceanography 22: 64-75.
|
|---|
| 2025 |
|
|---|
| 2026 | The HYCOM User's Guide and many other technical documents are
|
|---|
| 2027 | available on the
|
|---|
| 2028 | `HYCOM web site <http://www.hycom.org/hycom/documentation>`_.""")
|
|---|
| 2029 |
|
|---|
| 2030 | AddClassMetadata(HYCOMGOMl0043D,
|
|---|
| 2031 | shortDescription=_(u'Represents a HYCOM GOMl0.04 3D variable as a Grid Dataset.'),
|
|---|
| 2032 | longDescription=_HYCOMGOMl004_LongDescription % {u'name': 'class'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References)
|
|---|
| 2033 |
|
|---|
| 2034 | # Constructor
|
|---|
| 2035 |
|
|---|
| 2036 | AddMethodMetadata(HYCOMGOMl0043D.__init__,
|
|---|
| 2037 | shortDescription=_(u'Constructs a new HYCOMGOMl0043D instance.'),
|
|---|
| 2038 | isExposedToPythonCallers=True,
|
|---|
| 2039 | dependencies=[PythonAggregatedModuleDependency('numpy')])
|
|---|
| 2040 |
|
|---|
| 2041 | AddArgumentMetadata(HYCOMGOMl0043D.__init__, u'self',
|
|---|
| 2042 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGOMl0043D),
|
|---|
| 2043 | description=_(u'HYCOMGOMl0043D instance.'))
|
|---|
| 2044 |
|
|---|
| 2045 | AddArgumentMetadata(HYCOMGOMl0043D.__init__, u'variableName',
|
|---|
| 2046 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'emp', u'mld', u'mlp', u'qtot', u'ssh', u'surface_salinity_trend', u'surface_temperature_trend'], makeLowercase=True),
|
|---|
| 2047 | description=_(
|
|---|
| 2048 | u"""HYCOM 3D variable (dimensions x, y, and time), one of:
|
|---|
| 2049 |
|
|---|
| 2050 | * emp - Water flux into the ocean, in kg/m2/s.
|
|---|
| 2051 |
|
|---|
| 2052 | * mld - Mixed layer thickness, in m, defined as the depth at which the
|
|---|
| 2053 | temperature change from the surface temperature is 0.02 degrees C.
|
|---|
| 2054 |
|
|---|
| 2055 | * mlp - Mixed layer thickness, in m, defined as the depth at which the
|
|---|
| 2056 | pressure change from the surface pressure is 0.03 kg/m3.
|
|---|
| 2057 |
|
|---|
| 2058 | * qtot - Surface downward heat flux, in w/m2.
|
|---|
| 2059 |
|
|---|
| 2060 | * ssh - Sea surface height, in m, above the HYCOM reference spheroid.
|
|---|
| 2061 |
|
|---|
| 2062 | * surface_salinity_trend - Surface salinity trend, in psu/day.
|
|---|
| 2063 |
|
|---|
| 2064 | * surface_temperature_trend - Surface temperature trend, in degrees
|
|---|
| 2065 | C/day.
|
|---|
| 2066 |
|
|---|
| 2067 | Please see the HYCOM documentation for more information about these
|
|---|
| 2068 | variables."""),
|
|---|
| 2069 | arcGISDisplayName=_(u'HYCOM variable'))
|
|---|
| 2070 |
|
|---|
| 2071 | AddArgumentMetadata(HYCOMGOMl0043D.__init__, u'startYear',
|
|---|
| 2072 | typeMetadata=IntegerTypeMetadata(canBeNone=True, minValue=2003),
|
|---|
| 2073 | description=_(
|
|---|
| 2074 | u"""Starting year for this grid. This parameter is optional; if a
|
|---|
| 2075 | value is not specified, 2003 will be used."""))
|
|---|
| 2076 |
|
|---|
| 2077 | AddArgumentMetadata(HYCOMGOMl0043D.__init__, u'endYear',
|
|---|
| 2078 | typeMetadata=IntegerTypeMetadata(canBeNone=True),
|
|---|
| 2079 | description=_(
|
|---|
| 2080 | u"""Ending year for this grid. This parameter is optional; if a value
|
|---|
| 2081 | is not specified, the grid will extend to the maximum temporal extent
|
|---|
| 2082 | of the HYCOM data. If you do not need data for the current year,
|
|---|
| 2083 | specify an earlier year for this parameter. This will make it
|
|---|
| 2084 | unnecessary to query the HYCOM server to determine the maximum
|
|---|
| 2085 | temporal extent."""))
|
|---|
| 2086 |
|
|---|
| 2087 | CopyArgumentMetadata(THREDDSCatalog.__init__, u'timeout', HYCOMGOMl0043D.__init__, u'timeout')
|
|---|
| 2088 | CopyArgumentMetadata(THREDDSCatalog.__init__, u'maxRetryTime', HYCOMGOMl0043D.__init__, u'maxRetryTime')
|
|---|
| 2089 |
|
|---|
| 2090 | AddArgumentMetadata(HYCOMGOMl0043D.__init__, u'cacheDirectory',
|
|---|
| 2091 | typeMetadata=DirectoryTypeMetadata(canBeNone=True),
|
|---|
| 2092 | description=_(
|
|---|
| 2093 | u"""Directory to cache OPeNDAP datasets.
|
|---|
| 2094 |
|
|---|
| 2095 | A cache directory can dramatically speed up scenarios that involve
|
|---|
| 2096 | accessing the same subsets the HYCOM data over and over again. When
|
|---|
| 2097 | OPeNDAP data is requested from the HYCOM server, the cache directory
|
|---|
| 2098 | will be checked for data that was downloaded and cached during prior
|
|---|
| 2099 | requests. If cached data exists that can fulfill part of the current
|
|---|
| 2100 | request, the request will be serviced by reading from cache files
|
|---|
| 2101 | rather than the OPeNDAP server. If the entire request can be serviced
|
|---|
| 2102 | from the cache, the OPeNDAP server will not be accessed at all and the
|
|---|
| 2103 | request will be completed extremely quickly. Any parts of the request
|
|---|
| 2104 | that cannot be serviced from the cache will be downloaded from the
|
|---|
| 2105 | OPeNDAP server and added to the cache, speeding up future requests for
|
|---|
| 2106 | the same data.
|
|---|
| 2107 |
|
|---|
| 2108 | If you use a cache directory, be aware of these common pitfalls:
|
|---|
| 2109 |
|
|---|
| 2110 | * The HYCOM documentation states that HYCOM provides a five day forecast
|
|---|
| 2111 | and five day hindcast from the current date, although we have
|
|---|
| 2112 | observed netCDF files on their servers that suggested this window
|
|---|
| 2113 | may extend seven days in both directions. HYCOM revises the data
|
|---|
| 2114 | within this time window daily, using the latest ocean observations
|
|---|
| 2115 | assimilated from buoys, satellites, and other sensors. We recommend
|
|---|
| 2116 | you do not cache data in this time window. The caching algorithm
|
|---|
| 2117 | cannot detect whether cached data should be replaced with revised
|
|---|
| 2118 | versions available on the server.
|
|---|
| 2119 |
|
|---|
| 2120 | * The caching algorithm permits the cache to grow to infinite size and
|
|---|
| 2121 | never deletes any cached data. If you access a large amount of data
|
|---|
| 2122 | it will all be added to the cache. Be careful that you do not fill
|
|---|
| 2123 | up your hard disk. To mitigate this, manually delete the entire
|
|---|
| 2124 | cache or selected directories or files within it.
|
|---|
| 2125 |
|
|---|
| 2126 | * The caching algorithm stores data in uncompressed files, so that
|
|---|
| 2127 | subsets of those files may be quickly accessed. To save space on
|
|---|
| 2128 | your hard disk, you can enable compression of the cache directory
|
|---|
| 2129 | using the operating system. On Windows, right click on the directory
|
|---|
| 2130 | in Windows Explorer, select Properties, click Advanced, and enable
|
|---|
| 2131 | "Compress contents to save disk space".
|
|---|
| 2132 | """),
|
|---|
| 2133 | arcGISDisplayName=_(u'Cache directory'),
|
|---|
| 2134 | arcGISCategory=_(u'OPeNDAP options'))
|
|---|
| 2135 |
|
|---|
| 2136 | AddResultMetadata(HYCOMGOMl0043D.__init__, u'grid',
|
|---|
| 2137 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGOMl0043D),
|
|---|
| 2138 | description=_(u'HYCOMGOMl0043D instance.'))
|
|---|
| 2139 |
|
|---|
| 2140 | # Public method: HYCOMGOMl0043D.CreateArcGISRasters
|
|---|
| 2141 |
|
|---|
| 2142 | AddMethodMetadata(HYCOMGOMl0043D.CreateArcGISRasters,
|
|---|
| 2143 | shortDescription=_(u'Creates rasters for a HYCOM GOMl0.04 3D variable.'),
|
|---|
| 2144 | longDescription=_HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 2145 | isExposedToPythonCallers=True,
|
|---|
| 2146 | isExposedByCOM=True,
|
|---|
| 2147 | isExposedAsArcGISTool=True,
|
|---|
| 2148 | arcGISDisplayName=_(u'Create Rasters for HYCOM GOMl0.04 3D Variable'),
|
|---|
| 2149 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\3D Variables'),
|
|---|
| 2150 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 2151 |
|
|---|
| 2152 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cls',
|
|---|
| 2153 | typeMetadata=ClassOrClassInstanceTypeMetadata(cls=HYCOMGOMl0043D),
|
|---|
| 2154 | description=_(u'HYCOMGOMl0043D class or instance.'))
|
|---|
| 2155 |
|
|---|
| 2156 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'variableName', HYCOMGOMl0043D.CreateArcGISRasters, u'variableName')
|
|---|
| 2157 |
|
|---|
| 2158 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'outputWorkspace',
|
|---|
| 2159 | typeMetadata=ArcGISWorkspaceTypeMetadata(createParentDirectories=True),
|
|---|
| 2160 | description=_(
|
|---|
| 2161 | u"""Directory or geodatabase to receive the rasters.
|
|---|
| 2162 |
|
|---|
| 2163 | Unless you have a specific reason to store the rasters in a
|
|---|
| 2164 | geodatabase, we recommend you store them in a directory because it
|
|---|
| 2165 | will be much faster and allows the rasters to be organized in a tree.
|
|---|
| 2166 | If you do store the rasters in a geodatabase, you must change the
|
|---|
| 2167 | Raster Name Expressions parameter; see below for more
|
|---|
| 2168 | information."""),
|
|---|
| 2169 | arcGISDisplayName=_(u'Output workspace'))
|
|---|
| 2170 |
|
|---|
| 2171 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'mode',
|
|---|
| 2172 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Add', u'Replace'], makeLowercase=True),
|
|---|
| 2173 | description=_(
|
|---|
| 2174 | u"""Overwrite mode, one of:
|
|---|
| 2175 |
|
|---|
| 2176 | * Add - create rasters that do not exist and skip those that already
|
|---|
| 2177 | exist. This is the default.
|
|---|
| 2178 |
|
|---|
| 2179 | * Replace - create rasters that do not exist and overwrite those that
|
|---|
| 2180 | already exist.
|
|---|
| 2181 |
|
|---|
| 2182 | 'Add' is appropriate when working with HYCOM data older than one week
|
|---|
| 2183 | from the current date. When working with newer data, consider using
|
|---|
| 2184 | 'Replace'. The HYCOM documentation states that HYCOM provides a five
|
|---|
| 2185 | day forecast and five day hindcast from the current date, although we
|
|---|
| 2186 | have regularly observed netCDF files on their servers that suggested
|
|---|
| 2187 | this window actually extends seven days in both directions. HYCOM
|
|---|
| 2188 | revises the data within this window daily, using the latest ocean
|
|---|
| 2189 | observations assimilated from buoys, satellites, and other sensors.
|
|---|
| 2190 | Therefore, by using 'Replace' when working with data within this
|
|---|
| 2191 | window, you will be sure to overwrite obsolete data with the latest
|
|---|
| 2192 | estimates.
|
|---|
| 2193 |
|
|---|
| 2194 | The ArcGIS Overwrite Outputs geoprocessing setting has no effect on
|
|---|
| 2195 | this tool. If 'Replace' is selected the rasters will be overwritten,
|
|---|
| 2196 | regardless of the ArcGIS Overwrite Outputs setting."""),
|
|---|
| 2197 | arcGISDisplayName=_(u'Overwrite mode'))
|
|---|
| 2198 |
|
|---|
| 2199 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'rasterNameExpressions',
|
|---|
| 2200 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1),
|
|---|
| 2201 | description=_(
|
|---|
| 2202 | u"""List of expressions specifying how the output rasters should be
|
|---|
| 2203 | named.
|
|---|
| 2204 |
|
|---|
| 2205 | The default expression assumes you are storing rasters in a file
|
|---|
| 2206 | system directory and creates them in a tree structure with levels for
|
|---|
| 2207 | the variable name and year. When storing rasters in a directory, the
|
|---|
| 2208 | final expression specifies the file name of the raster and any
|
|---|
| 2209 | preceding expressions specify subdirectories. The extension of the
|
|---|
| 2210 | final expression determines the output raster format: .asc for ArcInfo
|
|---|
| 2211 | ASCII Grid, .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE
|
|---|
| 2212 | file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for
|
|---|
| 2213 | GeoTIFF, or no extension for ArcInfo Binary Grid. The default
|
|---|
| 2214 | expression uses .img.
|
|---|
| 2215 |
|
|---|
| 2216 | When storing rasters in a geodatabase, you should provide only one
|
|---|
| 2217 | expression. That expression specifies the raster's name.
|
|---|
| 2218 |
|
|---|
| 2219 | Each expression may contain any sequence of characters permitted by
|
|---|
| 2220 | the output workspace. Each expression may optionally contain one or
|
|---|
| 2221 | more of the following case-sensitive codes. The tool replaces the
|
|---|
| 2222 | codes with appropriate values when creating each raster:
|
|---|
| 2223 |
|
|---|
| 2224 | * %(VariableName)s - HYCOM variable represented in the output raster.
|
|---|
| 2225 |
|
|---|
| 2226 | * %%Y - four-digit year of the raster.
|
|---|
| 2227 |
|
|---|
| 2228 | * %%m - two-digit month of the raster.
|
|---|
| 2229 |
|
|---|
| 2230 | * %%d - two-digit day of the month of the raster.
|
|---|
| 2231 |
|
|---|
| 2232 | * %%j - three-digit day of the year of the raster.
|
|---|
| 2233 | """),
|
|---|
| 2234 | arcGISDisplayName=_(u'Raster name expressions'))
|
|---|
| 2235 |
|
|---|
| 2236 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'rasterCatalog',
|
|---|
| 2237 | typeMetadata=ArcGISRasterCatalogTypeMetadata(canBeNone=True, mustBeDifferentThanArguments=[u'outputWorkspace'], createParentDirectories=True),
|
|---|
| 2238 | description=_(
|
|---|
| 2239 | u"""Raster catalog to create.
|
|---|
| 2240 |
|
|---|
| 2241 | This parameter requires ArcGIS 9.3 or later.
|
|---|
| 2242 |
|
|---|
| 2243 | If this parameter is specified, after the tool finishes creating
|
|---|
| 2244 | rasters, it will create an unmanaged raster catalog and import all of
|
|---|
| 2245 | the rasters in the output workspace into it. The catalog will have
|
|---|
| 2246 | fields for all of the codes specified in the Raster Name Expressions
|
|---|
| 2247 | as well as fields for the start date, center date, and end date of
|
|---|
| 2248 | each raster. You can then use the catalog to create animations using
|
|---|
| 2249 | the ArcGIS 10 Time Slider.
|
|---|
| 2250 |
|
|---|
| 2251 | WARNING: The raster catalog will be deleted and re-created each time
|
|---|
| 2252 | the tool is executed. Beware of this if you plan to add your own
|
|---|
| 2253 | fields to the catalog after it has been created."""),
|
|---|
| 2254 | direction=u'Output',
|
|---|
| 2255 | arcGISDisplayName=_(u'Output raster catalog'),
|
|---|
| 2256 | dependencies=[ArcGISDependency(9, 3)])
|
|---|
| 2257 |
|
|---|
| 2258 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'spatialExtent',
|
|---|
| 2259 | typeMetadata=EnvelopeTypeMetadata(canBeNone=True),
|
|---|
| 2260 | description=_(
|
|---|
| 2261 | u"""Spatial extent of the outputs, in the units specified by the
|
|---|
| 2262 | Linear Units parameter.
|
|---|
| 2263 |
|
|---|
| 2264 | If you do not specify a spatial extent, it will default to
|
|---|
| 2265 | approximately 18 to 32 N, 98 to 76 W. The outputs can only be clipped
|
|---|
| 2266 | in whole grid cells. The values you provide will be rounded off to the
|
|---|
| 2267 | closest cell."""),
|
|---|
| 2268 | arcGISDisplayName=_(u'Spatial extent'),
|
|---|
| 2269 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 2270 |
|
|---|
| 2271 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'linearUnit',
|
|---|
| 2272 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Degrees', u'Meters'], makeLowercase=True),
|
|---|
| 2273 | description=_(
|
|---|
| 2274 | u"""Specifies the unit of the Spatial Extent parameter, one of:
|
|---|
| 2275 |
|
|---|
| 2276 | * Degrees - Decimal degrees.
|
|---|
| 2277 |
|
|---|
| 2278 | * Meters - Meters, in the HYCOM coordinate system.
|
|---|
| 2279 | """),
|
|---|
| 2280 | arcGISDisplayName=_(u'Linear unit'),
|
|---|
| 2281 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 2282 |
|
|---|
| 2283 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'startDate',
|
|---|
| 2284 | typeMetadata=DateTimeTypeMetadata(canBeNone=True),
|
|---|
| 2285 | description=_(
|
|---|
| 2286 | u"""Start date for the outputs to create.
|
|---|
| 2287 |
|
|---|
| 2288 | Outputs will be created for images that occur on or after the start
|
|---|
| 2289 | date and on or before the end date. The HYCOM GOMl0.04 dataset
|
|---|
| 2290 | provides a five-day forecast; its temporal extent ranges from 1
|
|---|
| 2291 | January 2003 to today's date plus five days. If you do not specify a
|
|---|
| 2292 | start date, 1 January 2003 will be used.
|
|---|
| 2293 |
|
|---|
| 2294 | The time component of the start date is ignored."""),
|
|---|
| 2295 | arcGISDisplayName=_(u'Start date'),
|
|---|
| 2296 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 2297 |
|
|---|
| 2298 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'endDate',
|
|---|
| 2299 | typeMetadata=DateTimeTypeMetadata(canBeNone=True),
|
|---|
| 2300 | description=_(
|
|---|
| 2301 | u"""End date for the outputs to create.
|
|---|
| 2302 |
|
|---|
| 2303 | Outputs will be created for images that occur on or after the start
|
|---|
| 2304 | date and on or before the end date. The HYCOM GOMl0.04 dataset
|
|---|
| 2305 | provides a five-day forecast; its temporal extent ranges from 1
|
|---|
| 2306 | January 2003 to today's date plus five days. If you do not specify an
|
|---|
| 2307 | end date, the most recent day available will be used (typically
|
|---|
| 2308 | today's date plus five days).
|
|---|
| 2309 |
|
|---|
| 2310 | The time component of the end date is ignored."""),
|
|---|
| 2311 | arcGISDisplayName=_(u'End date'),
|
|---|
| 2312 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 2313 |
|
|---|
| 2314 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'timeout', HYCOMGOMl0043D.CreateArcGISRasters, u'timeout')
|
|---|
| 2315 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'maxRetryTime', HYCOMGOMl0043D.CreateArcGISRasters, u'maxRetryTime')
|
|---|
| 2316 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'cacheDirectory', HYCOMGOMl0043D.CreateArcGISRasters, u'cacheDirectory')
|
|---|
| 2317 |
|
|---|
| 2318 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'calculateStatistics',
|
|---|
| 2319 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 2320 | description=_CalculateStatisticsDescription,
|
|---|
| 2321 | arcGISDisplayName=_(u'Calculate statistics'),
|
|---|
| 2322 | arcGISCategory=_(u'Additional raster processing options'))
|
|---|
| 2323 |
|
|---|
| 2324 | AddArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'buildPyramids',
|
|---|
| 2325 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 2326 | description=_BuildPyramidsDescription,
|
|---|
| 2327 | arcGISDisplayName=_(u'Build pyramids'),
|
|---|
| 2328 | arcGISCategory=_(u'Additional raster processing options'))
|
|---|
| 2329 |
|
|---|
| 2330 | AddResultMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'updatedOutputWorkspace',
|
|---|
| 2331 | typeMetadata=ArcGISWorkspaceTypeMetadata(),
|
|---|
| 2332 | description=_(u'Updated output workspace.'),
|
|---|
| 2333 | arcGISDisplayName=_(u'Updated output workspace'),
|
|---|
| 2334 | arcGISParameterDependencies=[u'outputWorkspace'])
|
|---|
| 2335 |
|
|---|
| 2336 | # Public method: HYCOMGOMl0043D.CreateClimatologicalArcGISRasters
|
|---|
| 2337 |
|
|---|
| 2338 | AddMethodMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters,
|
|---|
| 2339 | shortDescription=_(u'Creates climatological rasters for a HYCOM GOMl0.04 3D variable'),
|
|---|
| 2340 | longDescription=_(
|
|---|
| 2341 | u"""This tool produces rasters showing the climatological average
|
|---|
| 2342 | value (or other statistic) of a HYCOM GLMl0.04 3D variable. Given a
|
|---|
| 2343 | desired variable, a statistic, and a climatological bin definition,
|
|---|
| 2344 | this tool downloads daily images for the variable, classifies them
|
|---|
| 2345 | into bins, and produces a single raster for each bin. Each cell of the
|
|---|
| 2346 | raster is produced by calculating the statistic on the values of that
|
|---|
| 2347 | cell extracted from all of the rasters in the bin.
|
|---|
| 2348 |
|
|---|
| 2349 | """) + _HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 2350 | isExposedToPythonCallers=True,
|
|---|
| 2351 | isExposedByCOM=True,
|
|---|
| 2352 | isExposedAsArcGISTool=True,
|
|---|
| 2353 | arcGISDisplayName=_(u'Create Climatological Rasters for HYCOM GOMl0.04 3D Variable'),
|
|---|
| 2354 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\3D Variables'),
|
|---|
| 2355 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 2356 |
|
|---|
| 2357 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cls', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'cls')
|
|---|
| 2358 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'variableName', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'variableName')
|
|---|
| 2359 |
|
|---|
| 2360 | AddArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'statistic',
|
|---|
| 2361 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Count', u'Maximum', u'Mean', u'Minimum', u'Range', u'Standard Deviation', u'Sum'], makeLowercase=True),
|
|---|
| 2362 | description=_(
|
|---|
| 2363 | u"""Statistic to calculate for each cell, one of:
|
|---|
| 2364 |
|
|---|
| 2365 | * Count - number of images in which the cell had data.
|
|---|
| 2366 |
|
|---|
| 2367 | * Maximum - maximum value for the cell.
|
|---|
| 2368 |
|
|---|
| 2369 | * Mean - mean value for the cell, calculated as the sum divided by the
|
|---|
| 2370 | count.
|
|---|
| 2371 |
|
|---|
| 2372 | * Minimum - minimum value for the cell.
|
|---|
| 2373 |
|
|---|
| 2374 | * Range - range for the cell, calculated as the maximum minus the
|
|---|
| 2375 | minimum.
|
|---|
| 2376 |
|
|---|
| 2377 | * Standard Deviation - sample standard deviation for the cell
|
|---|
| 2378 | (i.e. the standard deviation estimated using Bessel's correction).
|
|---|
| 2379 | In order to calculate this, there must be at least two images with
|
|---|
| 2380 | data for the cell.
|
|---|
| 2381 |
|
|---|
| 2382 | * Sum - the sum for the cell.
|
|---|
| 2383 | """),
|
|---|
| 2384 | arcGISDisplayName=_(u'Statistic'))
|
|---|
| 2385 |
|
|---|
| 2386 | AddArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'binType',
|
|---|
| 2387 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Daily', u'Monthly', u'Cumulative'], makeLowercase=True),
|
|---|
| 2388 | description=_(
|
|---|
| 2389 | u"""Climatology bins to use, one of:
|
|---|
| 2390 |
|
|---|
| 2391 | * Daily - daily bins. Images will be classified into bins according to
|
|---|
| 2392 | their days of the year. The number of days in each bin is determined
|
|---|
| 2393 | by the Climatology Bin Duration parameter (which defaults to 1). The
|
|---|
| 2394 | number of bins is calculated by dividing 365 by the bin duration. If
|
|---|
| 2395 | there is no remainder, then that number of bins will be created;
|
|---|
| 2396 | images for the 366th day of leap years will be counted in the bin
|
|---|
| 2397 | that includes day 365. For example, if the bin duration is 5, 73
|
|---|
| 2398 | bins will be created. The first will be for days 1-5, the second
|
|---|
| 2399 | will be for days 5-10, and so on; the 73rd bin will be for days
|
|---|
| 2400 | 361-365 during normal years and 361-366 during leap years. If
|
|---|
| 2401 | dividing 365 by the bin duration does yield a remainder, then one
|
|---|
| 2402 | additional bin will be created to hold the remaining days. For
|
|---|
| 2403 | example, if the bin duration is 8, 46 bins will be created. The
|
|---|
| 2404 | first will be for days 1-8, the second for days 9-16, and so on; the
|
|---|
| 2405 | 46th will be for days 361-365 during normal years and 361-366 during
|
|---|
| 2406 | leap years.
|
|---|
| 2407 |
|
|---|
| 2408 | * Monthly - monthly bins. Images will be classified into bins according to
|
|---|
| 2409 | their months of the year. The number of months in each bin is
|
|---|
| 2410 | determined by the Climatology Bin Duration parameter (which defaults
|
|---|
| 2411 | to 1). The number of bins is calculated by dividing 12 by the bin
|
|---|
| 2412 | duration. If there is no remainder, then that number of bins will be
|
|---|
| 2413 | created. For example, if the bin duration is 3, there will be four
|
|---|
| 2414 | bins: January-March, April-June, July-September, and
|
|---|
| 2415 | October-December. If there is a remainder, then one additional bin
|
|---|
| 2416 | will be created. For example, if the bin duration is 5, 3 bins will
|
|---|
| 2417 | be created: January-May, June-October, November-December.
|
|---|
| 2418 |
|
|---|
| 2419 | * Cumulative - one bin. A single climatology raster will be calculated
|
|---|
| 2420 | from the entire dataset. The Bin Duration parameter is ignored.
|
|---|
| 2421 |
|
|---|
| 2422 | For Daily and Monthly, to adjust when the bins start (e.g. to center a
|
|---|
| 2423 | 4-bin seasonal climatology on solstices and equinoxes), use the Start
|
|---|
| 2424 | Climatology At This Day Of The Year parameter."""),
|
|---|
| 2425 | arcGISDisplayName=_(u'Climatology bin type'))
|
|---|
| 2426 |
|
|---|
| 2427 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'outputWorkspace', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'outputWorkspace')
|
|---|
| 2428 |
|
|---|
| 2429 | AddArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'mode',
|
|---|
| 2430 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Add', u'Replace'], makeLowercase=True),
|
|---|
| 2431 | description=_(
|
|---|
| 2432 | u"""Overwrite mode, one of:
|
|---|
| 2433 |
|
|---|
| 2434 | * Add - create rasters that do not exist and skip those that already
|
|---|
| 2435 | exist. This is the default.
|
|---|
| 2436 |
|
|---|
| 2437 | * Replace - create rasters that do not exist and overwrite those that
|
|---|
| 2438 | already exist. Choose this option when you want to regenerate the
|
|---|
| 2439 | climatologies using the latest HYCOM images.
|
|---|
| 2440 |
|
|---|
| 2441 | The ArcGIS Overwrite Outputs geoprocessing setting has no effect on
|
|---|
| 2442 | this tool. If 'Replace' is selected the rasters will be overwritten,
|
|---|
| 2443 | regardless of the ArcGIS Overwrite Outputs setting."""),
|
|---|
| 2444 | arcGISDisplayName=_(u'Overwrite mode'))
|
|---|
| 2445 |
|
|---|
| 2446 | AddArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'rasterNameExpressions',
|
|---|
| 2447 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1),
|
|---|
| 2448 | description=_(
|
|---|
| 2449 | u"""List of expressions specifying how the output rasters should be
|
|---|
| 2450 | named.
|
|---|
| 2451 |
|
|---|
| 2452 | The default expression assumes you are storing rasters in a file
|
|---|
| 2453 | system directory and creates them in a tree structure with levels for
|
|---|
| 2454 | variable and climatology bin type. When storing rasters in a
|
|---|
| 2455 | directory, the final expression specifies the file name of the raster
|
|---|
| 2456 | and any preceding expressions specify subdirectories. The extension of
|
|---|
| 2457 | the final expression determines the output raster format: .asc for
|
|---|
| 2458 | ArcInfo ASCII Grid, .bmp for BMP, .gif for GIF, .img for an ERDAS
|
|---|
| 2459 | IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif
|
|---|
| 2460 | for GeoTIFF, or no extension for ArcInfo Binary Grid. The default
|
|---|
| 2461 | expression uses .img.
|
|---|
| 2462 |
|
|---|
| 2463 | When storing rasters in a geodatabase, you should provide only one
|
|---|
| 2464 | expression. That expression specifies the raster's name.
|
|---|
| 2465 |
|
|---|
| 2466 | Each expression may contain any sequence of characters permitted by
|
|---|
| 2467 | the output workspace. Each expression may optionally contain one or
|
|---|
| 2468 | more of the following case-sensitive codes. The tool replaces the
|
|---|
| 2469 | codes with appropriate values when creating each raster:
|
|---|
| 2470 |
|
|---|
| 2471 | * %(VariableName)s - HYCOM variable represented in the output raster.
|
|---|
| 2472 |
|
|---|
| 2473 | * %(ClimatologyBinType)s - type of the climatology bin, either "Daily"
|
|---|
| 2474 | if 1-day bins, "Xday" if multi-day bins (X is replaced by the
|
|---|
| 2475 | duration), "Monthly" if 1-month bins, "Xmonth" if multi-month bins,
|
|---|
| 2476 | or "Cumulative".
|
|---|
| 2477 |
|
|---|
| 2478 | * %(ClimatologyBinName)s - name of the climatology bin corresponding
|
|---|
| 2479 | represented by the output raster, either "dayXXX" for 1-day bins
|
|---|
| 2480 | (XXX is replaced by the day of the year), "daysXXXtoYYY" for
|
|---|
| 2481 | multi-day bins (XXX is replaced by the first day of the bin, YYY is
|
|---|
| 2482 | replaced by the last day), "monthXX" for 1-month bins (XX is
|
|---|
| 2483 | replaced by the month), "monthXXtoYY" (XX is replaced by the first
|
|---|
| 2484 | month of the bin, YY by the last month), or "cumulative".
|
|---|
| 2485 |
|
|---|
| 2486 | * %(Statistic)s - statistic that was calculated, in lowercase and with
|
|---|
| 2487 | spaces replaced by underscores; one of: "count", "maximum", "mean",
|
|---|
| 2488 | "minimum", "range", "standard_deviation", "Sum".
|
|---|
| 2489 |
|
|---|
| 2490 | If the Bin Type is "Daily", the following additional codes are
|
|---|
| 2491 | available:
|
|---|
| 2492 |
|
|---|
| 2493 | * %(FirstDay)i - first day of the year of the climatology bin
|
|---|
| 2494 | represented by the output raster.
|
|---|
| 2495 |
|
|---|
| 2496 | * %(LastDay)i - last day of the year of the climatology bin
|
|---|
| 2497 | represented by the output raster. For 1-day climatologies, this will
|
|---|
| 2498 | be the same as %(FirstDay)i.
|
|---|
| 2499 |
|
|---|
| 2500 | If the Bin Type is "Monthly", the following additional codes are
|
|---|
| 2501 | available:
|
|---|
| 2502 |
|
|---|
| 2503 | * %(FirstMonth)i - first month of the climatology bin represented by
|
|---|
| 2504 | the output raster.
|
|---|
| 2505 |
|
|---|
| 2506 | * %(DayOfFirstMonth)i - first day of the first month of the
|
|---|
| 2507 | climatology bin represented by the output raster.
|
|---|
| 2508 |
|
|---|
| 2509 | * %(LastMonth)i - last month of the climatology bin represented by
|
|---|
| 2510 | the output raster.
|
|---|
| 2511 |
|
|---|
| 2512 | * %(DayOfLastMonth)i - last day of the last month of the climatology
|
|---|
| 2513 | bin represented by the output raster.
|
|---|
| 2514 |
|
|---|
| 2515 | Note that the additional codes are integers and may be formatted using
|
|---|
| 2516 | "printf"-style formatting codes. For example, to format the FirstDay
|
|---|
| 2517 | as a three-digit number with leading zeros::
|
|---|
| 2518 |
|
|---|
| 2519 | %(FirstDay)03i
|
|---|
| 2520 | """),
|
|---|
| 2521 | arcGISDisplayName=_(u'Raster name expressions'))
|
|---|
| 2522 |
|
|---|
| 2523 | AddArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'binDuration',
|
|---|
| 2524 | typeMetadata=IntegerTypeMetadata(minValue=1),
|
|---|
| 2525 | description=_(
|
|---|
| 2526 | u"""Duration of each bin, in days or months, when the Bin Type is
|
|---|
| 2527 | Daily or Monthly, respectively. The default is 1. See the Bin Type
|
|---|
| 2528 | parameter for more information."""),
|
|---|
| 2529 | arcGISDisplayName=_(u'Climatology bin duration'),
|
|---|
| 2530 | arcGISCategory=_(u'Climatology options'))
|
|---|
| 2531 |
|
|---|
| 2532 | AddArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'startDayOfYear',
|
|---|
| 2533 | typeMetadata=IntegerTypeMetadata(minValue=1, maxValue=365),
|
|---|
| 2534 | description=_(
|
|---|
| 2535 | u"""Use this parameter to create bin defintions that deviate from the
|
|---|
| 2536 | traditional calendar. The interpretation of this parameter depends on
|
|---|
| 2537 | the Bin Type:
|
|---|
| 2538 |
|
|---|
| 2539 | * Daily - this parameter defines the day of the year of the first
|
|---|
| 2540 | climatology bin. For example, if this parameter is 100 and the Bin
|
|---|
| 2541 | Duration is 10, the first bin will be numbered 100-109. The bin
|
|---|
| 2542 | spanning the end of the year will be numbered 360-004. The last bin
|
|---|
| 2543 | will be numbered 095-099. To define a four-bin climatology with bins
|
|---|
| 2544 | that are centered approximately on the equinoxes and solstices
|
|---|
| 2545 | (i.e., a seasonal climatology), set the Bin Duration to 91 and the
|
|---|
| 2546 | start day to 36 (February 5). This will produce bins with dates
|
|---|
| 2547 | 036-126, 127-217, 218-308, and 309-035.
|
|---|
| 2548 |
|
|---|
| 2549 | * Monthly - this parameter defines the day of the year of the first
|
|---|
| 2550 | climatology bin, and the day of the month of that bin will be used
|
|---|
| 2551 | as the first day of the month of all of the bins. For example, if
|
|---|
| 2552 | this parameter is 46, which is February 15, and the Bin Duration is
|
|---|
| 2553 | 1, then the bins will be February 15 - March 14, March 15 - April
|
|---|
| 2554 | 14, April 15 - May 14, and so on. Calculations involving this
|
|---|
| 2555 | parameter always assume a 365 day year (a non-leap year). To define
|
|---|
| 2556 | a four-bin climatology using the months traditionally associated
|
|---|
| 2557 | with spring, summer, fall, and winter in many northern hemisphere
|
|---|
| 2558 | cultures, set the Bin Duration to 3 and the start day to 60 (March
|
|---|
| 2559 | 1). This will produce bins with months 03-05, 06-08, 09-11, and
|
|---|
| 2560 | 12-02.
|
|---|
| 2561 |
|
|---|
| 2562 | * Cumulative - this parameter is ignored.
|
|---|
| 2563 | """),
|
|---|
| 2564 | arcGISDisplayName=_(u'Start climatology at this day of the year'),
|
|---|
| 2565 | arcGISCategory=_(u'Climatology options'))
|
|---|
| 2566 |
|
|---|
| 2567 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'spatialExtent', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'spatialExtent')
|
|---|
| 2568 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'linearUnit', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'linearUnit')
|
|---|
| 2569 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'startDate', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'startDate')
|
|---|
| 2570 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'endDate', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'endDate')
|
|---|
| 2571 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'timeout', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'timeout')
|
|---|
| 2572 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'maxRetryTime')
|
|---|
| 2573 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'cacheDirectory')
|
|---|
| 2574 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'calculateStatistics', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'calculateStatistics')
|
|---|
| 2575 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'buildPyramids', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'buildPyramids')
|
|---|
| 2576 |
|
|---|
| 2577 | CopyResultMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 2578 |
|
|---|
| 2579 | # Public method: HYCOMGOMl0043D.InterpolateAtArcGISPoints
|
|---|
| 2580 |
|
|---|
| 2581 | AddMethodMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints,
|
|---|
| 2582 | shortDescription=_(u'Interpolates HYCOM GOMl0.04 3D variables at points.'),
|
|---|
| 2583 | longDescription=_HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 2584 | isExposedToPythonCallers=True,
|
|---|
| 2585 | isExposedByCOM=True,
|
|---|
| 2586 | isExposedAsArcGISTool=True,
|
|---|
| 2587 | arcGISDisplayName=_(u'Interpolate HYCOM GOMl0.04 3D Variables at Points'),
|
|---|
| 2588 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\3D Variables'),
|
|---|
| 2589 | dependencies=[ArcGISDependency(9, 1, requiresCOMInstantiation=True), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 2590 |
|
|---|
| 2591 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cls', HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'cls')
|
|---|
| 2592 |
|
|---|
| 2593 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'variableNames',
|
|---|
| 2594 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(allowedValues=[u'emp', u'mld', u'mlp', u'qtot', u'ssh', u'surface_salinity_trend', u'surface_temperature_trend'], makeLowercase=True), minLength=1),
|
|---|
| 2595 | description=_(
|
|---|
| 2596 | u"""HYCOM 3D variables to interpolate:
|
|---|
| 2597 |
|
|---|
| 2598 | * emp - Water flux into the ocean, in kg/m2/s.
|
|---|
| 2599 |
|
|---|
| 2600 | * mld - Mixed layer thickness, in m, defined as the depth at which the
|
|---|
| 2601 | temperature change from the surface temperature is 0.02 degrees C.
|
|---|
| 2602 |
|
|---|
| 2603 | * mlp - Mixed layer thickness, in m, defined as the depth at which the
|
|---|
| 2604 | pressure change from the surface pressure is 0.03 kg/m3.
|
|---|
| 2605 |
|
|---|
| 2606 | * qtot - Surface downward heat flux, in w/m2.
|
|---|
| 2607 |
|
|---|
| 2608 | * ssh - Sea surface height, in m, above the HYCOM reference spheroid.
|
|---|
| 2609 |
|
|---|
| 2610 | * surface_salinity_trend - Surface salinity trend, in psu/day.
|
|---|
| 2611 |
|
|---|
| 2612 | * surface_temperature_trend - Surface temperature trend, in degrees
|
|---|
| 2613 | C/day.
|
|---|
| 2614 |
|
|---|
| 2615 | Please see the HYCOM documentation for more information about these
|
|---|
| 2616 | variables.
|
|---|
| 2617 |
|
|---|
| 2618 | For each variable that you select, you must also specify a field of
|
|---|
| 2619 | the points to receive the interpolated value."""),
|
|---|
| 2620 | arcGISDisplayName=_(u'HYCOM variables to interpolate'))
|
|---|
| 2621 |
|
|---|
| 2622 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'points',
|
|---|
| 2623 | typeMetadata=ArcGISFeatureLayerTypeMetadata(mustExist=True, allowedShapeTypes=[u'Point']),
|
|---|
| 2624 | description=_(
|
|---|
| 2625 | u"""Points at which values should be interpolated.
|
|---|
| 2626 |
|
|---|
| 2627 | HYCOM uses a Mercator coordinate system based on a sphere with radius
|
|---|
| 2628 | 6371001 m. It is recommended but not required that the points use the
|
|---|
| 2629 | same coordinate system. If they do not, this tool will attempt to
|
|---|
| 2630 | project the points to the HYCOM coordinate system prior to doing the
|
|---|
| 2631 | interpolation. This may fail if a datum transformation is required, in
|
|---|
| 2632 | which case you will have to manually project the points to the HYCOM
|
|---|
| 2633 | coordinate system before using this tool."""),
|
|---|
| 2634 | arcGISDisplayName=_(u'Point features'))
|
|---|
| 2635 |
|
|---|
| 2636 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'valueFields',
|
|---|
| 2637 | typeMetadata=ListTypeMetadata(elementType=ArcGISFieldTypeMetadata(mustExist=True, allowedFieldTypes=[u'short', u'long', u'float', u'double']), mustBeSameLengthAsArgument=u'variableNames'),
|
|---|
| 2638 | description=_(
|
|---|
| 2639 | u"""Fields of the points to receive the interpolated values. You must
|
|---|
| 2640 | specify one field for each HYCOM variable that you selected for
|
|---|
| 2641 | interpolation.
|
|---|
| 2642 |
|
|---|
| 2643 | Each field must have a floating-point or integer data type. If a field
|
|---|
| 2644 | cannot represent the interpolated value at full precision, the closest
|
|---|
| 2645 | approximation will be stored and a warning will be issued. Because all
|
|---|
| 2646 | of the HYCOM variables use a floating-point data type, we strongly
|
|---|
| 2647 | recommend you use floating-point fields."""),
|
|---|
| 2648 | arcGISDisplayName=_(u'Fields to receive the interpolated values'),
|
|---|
| 2649 | arcGISParameterDependencies=[u'points'])
|
|---|
| 2650 |
|
|---|
| 2651 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'tField',
|
|---|
| 2652 | typeMetadata=ArcGISFieldTypeMetadata(mustExist=True, allowedFieldTypes=[u'date']),
|
|---|
| 2653 | description=_(
|
|---|
| 2654 | u"""Field of the points that specifies the date and time of the point.
|
|---|
| 2655 |
|
|---|
| 2656 | The field must have a date or datetime data type. If the field can
|
|---|
| 2657 | only represent dates with no time component, the time will assumed to
|
|---|
| 2658 | be 00:00:00.
|
|---|
| 2659 |
|
|---|
| 2660 | HYCOM uses UTC time. It is assumed that this field also uses UTC
|
|---|
| 2661 | time."""),
|
|---|
| 2662 | arcGISDisplayName=_(u'Date field'),
|
|---|
| 2663 | arcGISParameterDependencies=[u'points'])
|
|---|
| 2664 |
|
|---|
| 2665 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'method',
|
|---|
| 2666 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Nearest', u'Linear'], makeLowercase=True),
|
|---|
| 2667 | description=_(
|
|---|
| 2668 | u"""Interpolation method to use, one of:
|
|---|
| 2669 |
|
|---|
| 2670 | * Nearest - nearest neighbor interpolation. The interpolated value
|
|---|
| 2671 | will simply be the value of the cell that contains the point. This
|
|---|
| 2672 | is the default.
|
|---|
| 2673 |
|
|---|
| 2674 | * Linear - linear interpolation (also known as trilinear
|
|---|
| 2675 | interpolation). This method averages the values of the eight nearest
|
|---|
| 2676 | cells in the x, y, and time dimensions, weighting the contribution
|
|---|
| 2677 | of each cell by the area of it that would be covered by a
|
|---|
| 2678 | hypothetical cell centered on the point being interpolated. If the
|
|---|
| 2679 | cell containing the point contains NoData, the result is NoData. If
|
|---|
| 2680 | any of the other seven cells contain NoData, they are omitted from
|
|---|
| 2681 | the average, and the result is based on the weighted average of the
|
|---|
| 2682 | cells that do contain data. This is the same algorithm implemented
|
|---|
| 2683 | by the ArcGIS Spatial Analyst's Extract Values to Points tool.
|
|---|
| 2684 | """),
|
|---|
| 2685 | arcGISDisplayName=_(u'Interpolation method'))
|
|---|
| 2686 |
|
|---|
| 2687 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'where',
|
|---|
| 2688 | typeMetadata=SQLWhereClauseTypeMetadata(canBeNone=True),
|
|---|
| 2689 | description=_(
|
|---|
| 2690 | u"""SQL WHERE clause expression that specifies the subset of points to
|
|---|
| 2691 | use. If this parameter is not provided, all of the points will be
|
|---|
| 2692 | used.
|
|---|
| 2693 |
|
|---|
| 2694 | The exact syntax of this expression depends on the type of feature
|
|---|
| 2695 | class you're using. ESRI recommends you reference fields using the
|
|---|
| 2696 | following syntax:
|
|---|
| 2697 |
|
|---|
| 2698 | * For shapefiles, ArcInfo coverages, or feature classes stored in file
|
|---|
| 2699 | geodatabases, ArcSDE geodatabases, or ArcIMS, enclose field names in
|
|---|
| 2700 | double quotes: "MY_FIELD"
|
|---|
| 2701 |
|
|---|
| 2702 | * For feature classes stored in personal geodatabases, enclose field
|
|---|
| 2703 | names in square brackets: [MY_FIELD].
|
|---|
| 2704 | """),
|
|---|
| 2705 | arcGISDisplayName=_(u'Where clause'),
|
|---|
| 2706 | arcGISCategory=_(u'Interpolation options'),
|
|---|
| 2707 | arcGISParameterDependencies=[u'points'])
|
|---|
| 2708 |
|
|---|
| 2709 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'noDataValue',
|
|---|
| 2710 | typeMetadata=FloatTypeMetadata(canBeNone=True),
|
|---|
| 2711 | description=_(
|
|---|
| 2712 | u"""Value to use when the interpolated value is NoData.
|
|---|
| 2713 |
|
|---|
| 2714 | If a value is not provided for this parameter, a database NULL value
|
|---|
| 2715 | will be stored in the field when the interpolated value is NoData. If
|
|---|
| 2716 | the field cannot store NULL values, as is the case with shapefiles,
|
|---|
| 2717 | the value -9999 will be used."""),
|
|---|
| 2718 | arcGISDisplayName=_(u'Value to use when the interpolated value is NoData'),
|
|---|
| 2719 | arcGISCategory=_(u'Interpolation options'))
|
|---|
| 2720 |
|
|---|
| 2721 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'timeout', HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'timeout')
|
|---|
| 2722 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'maxRetryTime')
|
|---|
| 2723 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'cacheDirectory')
|
|---|
| 2724 |
|
|---|
| 2725 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'orderByFields',
|
|---|
| 2726 | typeMetadata=ListTypeMetadata(elementType=ArcGISFieldTypeMetadata(mustExist=True), minLength=1, canBeNone=True),
|
|---|
| 2727 | description=_(
|
|---|
| 2728 | u"""Fields for defining the order in which the points are processed.
|
|---|
| 2729 |
|
|---|
| 2730 | The points may be processed faster if they are ordered
|
|---|
| 2731 | spatiotemporally, such that points that are close in space and time
|
|---|
| 2732 | are processed sequentially. Ordering the points this way increases the
|
|---|
| 2733 | probability that the value of a given point can be interpolated from
|
|---|
| 2734 | data that is cached in memory, rather than from data that must be read
|
|---|
| 2735 | from the disk or network, which is much slower. Choose fields that
|
|---|
| 2736 | faciliate this. For example, if your points represent the locations of
|
|---|
| 2737 | animals tracked by satellite telemetry, order the processing first by
|
|---|
| 2738 | the animal ID and then by the transmission date or number.
|
|---|
| 2739 |
|
|---|
| 2740 | If you omit this parameter, the Date Field will be used automatically.
|
|---|
| 2741 |
|
|---|
| 2742 | This parameter requires ArcGIS 9.2 or later."""),
|
|---|
| 2743 | arcGISDisplayName=_(u'Order by fields'),
|
|---|
| 2744 | arcGISCategory=_(u'Performance tuning options'),
|
|---|
| 2745 | arcGISParameterDependencies=[u'points'],
|
|---|
| 2746 | dependencies=[ArcGISDependency(9, 2)])
|
|---|
| 2747 |
|
|---|
| 2748 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory',
|
|---|
| 2749 | typeMetadata=IntegerTypeMetadata(minValue=0, canBeNone=True),
|
|---|
| 2750 | description=_(
|
|---|
| 2751 | u"""Maximum number of blocks of HYCOM data to cache in memory.
|
|---|
| 2752 |
|
|---|
| 2753 | To minimize the number of times that the disk or network must be
|
|---|
| 2754 | accessed, this tool employs a simple caching strategy, in addition to
|
|---|
| 2755 | disk caching described by the Cache Directory parameter. When it
|
|---|
| 2756 | processes the first point, it reads a square block of cells centered
|
|---|
| 2757 | on that point and caches it in memory. When it processes the second
|
|---|
| 2758 | and subsequent points, it first checks whether the cells needed for
|
|---|
| 2759 | that point are contained by the block cached in memory. If so, it
|
|---|
| 2760 | processes that point using the in-memory block, rather than reading
|
|---|
| 2761 | from disk or the network again. If not, it reads another square block
|
|---|
| 2762 | centered on that point and adds it to the cache.
|
|---|
| 2763 |
|
|---|
| 2764 | The tool processes the remaining points, adding additional blocks to
|
|---|
| 2765 | the cache, as needed. To prevent the cache from exhausing all memory,
|
|---|
| 2766 | it is only permitted to grow to the size specified by this parameter.
|
|---|
| 2767 | When the cache is full but a new block is needed, the oldest block is
|
|---|
| 2768 | discarded to make room for the newest block.
|
|---|
| 2769 |
|
|---|
| 2770 | The maximum size of the cache in bytes may be calculated by
|
|---|
| 2771 | multiplying this parameter by 4 (the number of bytes required for one
|
|---|
| 2772 | cell of data) and then by all of the block size parameters.
|
|---|
| 2773 |
|
|---|
| 2774 | If this parameter is 0, no blocks will be cached in memory."""),
|
|---|
| 2775 | arcGISDisplayName=_(u'Number of blocks of data to cache in memory'),
|
|---|
| 2776 | arcGISCategory=_(u'Performance tuning options'))
|
|---|
| 2777 |
|
|---|
| 2778 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'xBlockSize',
|
|---|
| 2779 | typeMetadata=IntegerTypeMetadata(minValue=0, canBeNone=True),
|
|---|
| 2780 | description=_(
|
|---|
| 2781 | u"""Size of the blocks of HYCOM data to cache in memory, in the x
|
|---|
| 2782 | direction (longitude). The size is given as the number of cells.
|
|---|
| 2783 |
|
|---|
| 2784 | If this parameter is 0, no blocks will be cached in memory."""),
|
|---|
| 2785 | arcGISDisplayName=_(u'In-memory cache block size, in X direction'),
|
|---|
| 2786 | arcGISCategory=_(u'Performance tuning options'))
|
|---|
| 2787 |
|
|---|
| 2788 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'yBlockSize',
|
|---|
| 2789 | typeMetadata=IntegerTypeMetadata(minValue=0, canBeNone=True),
|
|---|
| 2790 | description=_(
|
|---|
| 2791 | u"""Size of the blocks of HYCOM data to cache in memory, in the y
|
|---|
| 2792 | direction (latitude). The size is given as the number of cells.
|
|---|
| 2793 |
|
|---|
| 2794 | If this parameter is 0, no blocks will be cached in memory."""),
|
|---|
| 2795 | arcGISDisplayName=_(u'In-memory cache block size, in Y direction'),
|
|---|
| 2796 | arcGISCategory=_(u'Performance tuning options'))
|
|---|
| 2797 |
|
|---|
| 2798 | AddArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'tBlockSize',
|
|---|
| 2799 | typeMetadata=IntegerTypeMetadata(minValue=0, canBeNone=True),
|
|---|
| 2800 | description=_(
|
|---|
| 2801 | u"""Size of the blocks of HYCOM data to cache in memory, in the t
|
|---|
| 2802 | direction (time). The size is given as the number of cells.
|
|---|
| 2803 |
|
|---|
| 2804 | If this parameter is 0, no blocks will be cached in memory."""),
|
|---|
| 2805 | arcGISDisplayName=_(u'In-memory cache block size, in T direction'),
|
|---|
| 2806 | arcGISCategory=_(u'Performance tuning options'))
|
|---|
| 2807 |
|
|---|
| 2808 | AddResultMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'updatedPoints',
|
|---|
| 2809 | typeMetadata=ArcGISFeatureLayerTypeMetadata(),
|
|---|
| 2810 | description=_(u'Updated points.'),
|
|---|
| 2811 | arcGISDisplayName=_(u'Updated points'),
|
|---|
| 2812 | arcGISParameterDependencies=[u'points'])
|
|---|
| 2813 |
|
|---|
| 2814 | ###############################################################################
|
|---|
| 2815 | # Metadata: _HYCOMGridGOMl0044D class
|
|---|
| 2816 | ###############################################################################
|
|---|
| 2817 |
|
|---|
| 2818 | AddClassMetadata(_HYCOMGridGOMl0044D,
|
|---|
| 2819 | shortDescription=_(u'An OPeNDAPGrid for a 4D variable of a HYCOM GOMl0.04 OPeNDAP URL.'),
|
|---|
| 2820 | longDescription=_(
|
|---|
| 2821 | u"""This class is intended for private use within GeoEco and is not
|
|---|
| 2822 | intended for external callers."""))
|
|---|
| 2823 |
|
|---|
| 2824 | ###############################################################################
|
|---|
| 2825 | # Metadata: HYCOMGOMl0044D class
|
|---|
| 2826 | ###############################################################################
|
|---|
| 2827 |
|
|---|
| 2828 | AddClassMetadata(HYCOMGOMl0044D,
|
|---|
| 2829 | shortDescription=_(u'Represents a HYCOM GOMl0.04 4D variable as a Grid Dataset.'),
|
|---|
| 2830 | longDescription=_HYCOMGOMl004_LongDescription % {u'name': 'class'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References)
|
|---|
| 2831 |
|
|---|
| 2832 | # Constructor
|
|---|
| 2833 |
|
|---|
| 2834 | AddMethodMetadata(HYCOMGOMl0044D.__init__,
|
|---|
| 2835 | shortDescription=_(u'Constructs a new HYCOMGOMl0044D instance.'),
|
|---|
| 2836 | isExposedToPythonCallers=True,
|
|---|
| 2837 | dependencies=[PythonAggregatedModuleDependency('numpy')])
|
|---|
| 2838 |
|
|---|
| 2839 | AddArgumentMetadata(HYCOMGOMl0044D.__init__, u'self',
|
|---|
| 2840 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGOMl0044D),
|
|---|
| 2841 | description=_(u'HYCOMGOMl0044D instance.'))
|
|---|
| 2842 |
|
|---|
| 2843 | AddArgumentMetadata(HYCOMGOMl0044D.__init__, u'variableName',
|
|---|
| 2844 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature', u'u', u'v', u'w_velocity'], makeLowercase=True),
|
|---|
| 2845 | description=_(
|
|---|
| 2846 | u"""HYCOM 4D variable (dimensions x, y, depth, and time), one of:
|
|---|
| 2847 |
|
|---|
| 2848 | * salinity - Sea water salinity, in psu.
|
|---|
| 2849 |
|
|---|
| 2850 | * temperature - Sea water potential temperature, in degrees C.
|
|---|
| 2851 |
|
|---|
| 2852 | * u - Eastward sea water velocity, in m/s.
|
|---|
| 2853 |
|
|---|
| 2854 | * v - Northward sea water velocity, in m/s.
|
|---|
| 2855 |
|
|---|
| 2856 | * w_velocity - Upward sea water velocity, in m/s.
|
|---|
| 2857 |
|
|---|
| 2858 | Please see the HYCOM documentation for more information about these
|
|---|
| 2859 | variables."""),
|
|---|
| 2860 | arcGISDisplayName=_(u'HYCOM variable'))
|
|---|
| 2861 |
|
|---|
| 2862 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'startYear', HYCOMGOMl0044D.__init__, u'startYear')
|
|---|
| 2863 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'endYear', HYCOMGOMl0044D.__init__, u'endYear')
|
|---|
| 2864 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'timeout', HYCOMGOMl0044D.__init__, u'timeout')
|
|---|
| 2865 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'maxRetryTime', HYCOMGOMl0044D.__init__, u'maxRetryTime')
|
|---|
| 2866 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'cacheDirectory', HYCOMGOMl0044D.__init__, u'cacheDirectory')
|
|---|
| 2867 |
|
|---|
| 2868 | CopyResultMetadata(HYCOMGOMl0043D.__init__, u'grid', HYCOMGOMl0044D.__init__, u'grid')
|
|---|
| 2869 |
|
|---|
| 2870 | # Public method: HYCOMGOMl0044D.CreateArcGISRasters
|
|---|
| 2871 |
|
|---|
| 2872 | AddMethodMetadata(HYCOMGOMl0044D.CreateArcGISRasters,
|
|---|
| 2873 | shortDescription=_(u'Creates rasters for a HYCOM GOMl0.04 4D variable.'),
|
|---|
| 2874 | longDescription=_HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 2875 | isExposedToPythonCallers=True,
|
|---|
| 2876 | isExposedByCOM=True,
|
|---|
| 2877 | isExposedAsArcGISTool=True,
|
|---|
| 2878 | arcGISDisplayName=_(u'Create Rasters for HYCOM GOMl0.04 4D Variable'),
|
|---|
| 2879 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\4D Variables'),
|
|---|
| 2880 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 2881 |
|
|---|
| 2882 | AddArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cls',
|
|---|
| 2883 | typeMetadata=ClassOrClassInstanceTypeMetadata(cls=HYCOMGOMl0044D),
|
|---|
| 2884 | description=_(u'HYCOMGOMl0044D class or instance.'))
|
|---|
| 2885 |
|
|---|
| 2886 | CopyArgumentMetadata(HYCOMGOMl0044D.__init__, u'variableName', HYCOMGOMl0044D.CreateArcGISRasters, u'variableName')
|
|---|
| 2887 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'outputWorkspace', HYCOMGOMl0044D.CreateArcGISRasters, u'outputWorkspace')
|
|---|
| 2888 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'mode', HYCOMGOMl0044D.CreateArcGISRasters, u'mode')
|
|---|
| 2889 |
|
|---|
| 2890 | AddArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'rasterNameExpressions',
|
|---|
| 2891 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1),
|
|---|
| 2892 | description=_(
|
|---|
| 2893 | u"""List of expressions specifying how the output rasters should be
|
|---|
| 2894 | named.
|
|---|
| 2895 |
|
|---|
| 2896 | The default expression assumes you are storing rasters in a file
|
|---|
| 2897 | system directory and creates them in a tree structure with levels for
|
|---|
| 2898 | variable name, year, and depth. When storing rasters in a directory,
|
|---|
| 2899 | the final expression specifies the file name of the raster and any
|
|---|
| 2900 | preceding expressions specify subdirectories. The extension of the
|
|---|
| 2901 | final expression determines the output raster format: .asc for ArcInfo
|
|---|
| 2902 | ASCII Grid, .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE
|
|---|
| 2903 | file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for
|
|---|
| 2904 | GeoTIFF, or no extension for ArcInfo Binary Grid. The default
|
|---|
| 2905 | expression uses .img.
|
|---|
| 2906 |
|
|---|
| 2907 | When storing rasters in a geodatabase, you should provide only one
|
|---|
| 2908 | expression. That expression specifies the raster's name.
|
|---|
| 2909 |
|
|---|
| 2910 | Each expression may contain any sequence of characters permitted by
|
|---|
| 2911 | the output workspace. Each expression may optionally contain one or
|
|---|
| 2912 | more of the following case-sensitive codes. The tool replaces the
|
|---|
| 2913 | codes with appropriate values when creating each raster:
|
|---|
| 2914 |
|
|---|
| 2915 | * %(VariableName)s - HYCOM variable represented in the output raster.
|
|---|
| 2916 |
|
|---|
| 2917 | * %(Depth)f - depth of the output raster. The f may be preceded by
|
|---|
| 2918 | Python's string formatting codes. Please see the Python
|
|---|
| 2919 | documentation for more information.
|
|---|
| 2920 |
|
|---|
| 2921 | * %%Y - four-digit year of the raster.
|
|---|
| 2922 |
|
|---|
| 2923 | * %%m - two-digit month of the raster.
|
|---|
| 2924 |
|
|---|
| 2925 | * %%d - two-digit day of the month of the raster.
|
|---|
| 2926 |
|
|---|
| 2927 | * %%j - three-digit day of the year of the raster.
|
|---|
| 2928 | """),
|
|---|
| 2929 | arcGISDisplayName=_(u'Raster name expressions'))
|
|---|
| 2930 |
|
|---|
| 2931 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'rasterCatalog', HYCOMGOMl0044D.CreateArcGISRasters, u'rasterCatalog')
|
|---|
| 2932 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'spatialExtent', HYCOMGOMl0044D.CreateArcGISRasters, u'spatialExtent')
|
|---|
| 2933 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'linearUnit', HYCOMGOMl0044D.CreateArcGISRasters, u'linearUnit')
|
|---|
| 2934 |
|
|---|
| 2935 | AddArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'minDepth',
|
|---|
| 2936 | typeMetadata=FloatTypeMetadata(minValue=0.0, maxValue=20000.0, canBeNone=True),
|
|---|
| 2937 | description=_(
|
|---|
| 2938 | u"""Minimum depth, in meters, for the outputs to create.
|
|---|
| 2939 |
|
|---|
| 2940 | The value must be between 0 and 20000, inclusive. Outputs will be
|
|---|
| 2941 | created for images with depths that are greater than or equal to the
|
|---|
| 2942 | minimum depth and less than or equal to the maximum depth. If you do
|
|---|
| 2943 | not specify a minimum depth, 0 will be used.
|
|---|
| 2944 |
|
|---|
| 2945 | The value 20000 is a special code representing conditions at the
|
|---|
| 2946 | seafloor. Use this value if you need an estimate of "bottom
|
|---|
| 2947 | temperature" or the value of another variable at the seafloor. If this
|
|---|
| 2948 | value is requested, an output will be created with a fake depth of
|
|---|
| 2949 | 20000 meters. The cells of this output will be assigned by stacking
|
|---|
| 2950 | all of the HYCOM depth layers and selecting the deepest cells that
|
|---|
| 2951 | have data. Because HYCOM depth layers are spaced farther apart at
|
|---|
| 2952 | deeper depths, the deepest HYCOM layer with data at a specific
|
|---|
| 2953 | location might be substantially shallower than the actual seafloor
|
|---|
| 2954 | depth. Bear this in mind when considering the likely accuracy of the
|
|---|
| 2955 | output."""),
|
|---|
| 2956 | arcGISDisplayName=_(u'Minimum depth'),
|
|---|
| 2957 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 2958 |
|
|---|
| 2959 | AddArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxDepth',
|
|---|
| 2960 | typeMetadata=FloatTypeMetadata(minValue=0.0, maxValue=20000.0, canBeNone=True),
|
|---|
| 2961 | description=_(
|
|---|
| 2962 | u"""Maximum depth, in meters, for the outputs to create.
|
|---|
| 2963 |
|
|---|
| 2964 | The value must be between 0 and 20000, inclusive. Outputs will be
|
|---|
| 2965 | created for images with depths that are greater than or equal to the
|
|---|
| 2966 | minimum depth and less than or equal to the maximum depth. If you do
|
|---|
| 2967 | not specify a maximum depth, 5500 will be used. This is the depth of
|
|---|
| 2968 | the deepest HYCOM layer.
|
|---|
| 2969 |
|
|---|
| 2970 | The value 20000 is a special code representing conditions at the
|
|---|
| 2971 | seafloor. Please see the documenation for the Minimum Depth parameter
|
|---|
| 2972 | for discussions of this value."""),
|
|---|
| 2973 | arcGISDisplayName=_(u'Maximum depth'),
|
|---|
| 2974 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 2975 |
|
|---|
| 2976 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'startDate', HYCOMGOMl0044D.CreateArcGISRasters, u'startDate')
|
|---|
| 2977 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'endDate', HYCOMGOMl0044D.CreateArcGISRasters, u'endDate')
|
|---|
| 2978 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'timeout', HYCOMGOMl0044D.CreateArcGISRasters, u'timeout')
|
|---|
| 2979 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime')
|
|---|
| 2980 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory')
|
|---|
| 2981 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'calculateStatistics', HYCOMGOMl0044D.CreateArcGISRasters, u'calculateStatistics')
|
|---|
| 2982 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'buildPyramids', HYCOMGOMl0044D.CreateArcGISRasters, u'buildPyramids')
|
|---|
| 2983 |
|
|---|
| 2984 | CopyResultMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGOMl0044D.CreateArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 2985 |
|
|---|
| 2986 | # Public method: HYCOMGOMl0044D.CreateClimatologicalArcGISRasters
|
|---|
| 2987 |
|
|---|
| 2988 | AddMethodMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters,
|
|---|
| 2989 | shortDescription=_(u'Creates climatological rasters for a HYCOM GOMl0.04 4D variable'),
|
|---|
| 2990 | longDescription=_(
|
|---|
| 2991 | u"""This tool produces rasters showing the climatological average
|
|---|
| 2992 | value (or other statistic) of a HYCOM GLMl0.04 4D variable. Given a
|
|---|
| 2993 | desired variable, a statistic, and a climatological bin definition,
|
|---|
| 2994 | this tool downloads daily images for each depth layer of the variable,
|
|---|
| 2995 | classifies them into bins, and produces a single raster for each bin.
|
|---|
| 2996 | Each cell of the raster is produced by calculating the statistic on
|
|---|
| 2997 | the values of that cell extracted from all of the rasters in the
|
|---|
| 2998 | bin.
|
|---|
| 2999 |
|
|---|
| 3000 | """) + _HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 3001 | isExposedToPythonCallers=True,
|
|---|
| 3002 | isExposedByCOM=True,
|
|---|
| 3003 | isExposedAsArcGISTool=True,
|
|---|
| 3004 | arcGISDisplayName=_(u'Create Climatological Rasters for HYCOM GOMl0.04 4D Variable'),
|
|---|
| 3005 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\4D Variables'),
|
|---|
| 3006 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 3007 |
|
|---|
| 3008 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cls', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'cls')
|
|---|
| 3009 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'variableName', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'variableName')
|
|---|
| 3010 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'statistic', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'statistic')
|
|---|
| 3011 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'binType', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'binType')
|
|---|
| 3012 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'outputWorkspace', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'outputWorkspace')
|
|---|
| 3013 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'mode', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'mode')
|
|---|
| 3014 |
|
|---|
| 3015 | AddArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'rasterNameExpressions',
|
|---|
| 3016 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1),
|
|---|
| 3017 | description=_(
|
|---|
| 3018 | u"""List of expressions specifying how the output rasters should be
|
|---|
| 3019 | named.
|
|---|
| 3020 |
|
|---|
| 3021 | The default expression assumes you are storing rasters in a file
|
|---|
| 3022 | system directory and creates them in a tree structure with levels for
|
|---|
| 3023 | variable, climatology bin type, and depth. When storing rasters in a
|
|---|
| 3024 | directory, the final expression specifies the file name of the raster
|
|---|
| 3025 | and any preceding expressions specify subdirectories. The extension of
|
|---|
| 3026 | the final expression determines the output raster format: .asc for
|
|---|
| 3027 | ArcInfo ASCII Grid, .bmp for BMP, .gif for GIF, .img for an ERDAS
|
|---|
| 3028 | IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif
|
|---|
| 3029 | for GeoTIFF, or no extension for ArcInfo Binary Grid. The default
|
|---|
| 3030 | expression uses .img.
|
|---|
| 3031 |
|
|---|
| 3032 | When storing rasters in a geodatabase, you should provide only one
|
|---|
| 3033 | expression. That expression specifies the raster's name.
|
|---|
| 3034 |
|
|---|
| 3035 | Each expression may contain any sequence of characters permitted by
|
|---|
| 3036 | the output workspace. Each expression may optionally contain one or
|
|---|
| 3037 | more of the following case-sensitive codes. The tool replaces the
|
|---|
| 3038 | codes with appropriate values when creating each raster:
|
|---|
| 3039 |
|
|---|
| 3040 | * %(VariableName)s - HYCOM variable represented in the output raster.
|
|---|
| 3041 |
|
|---|
| 3042 | * %(ClimatologyBinType)s - type of the climatology bin, either "Daily"
|
|---|
| 3043 | if 1-day bins, "Xday" if multi-day bins (X is replaced by the
|
|---|
| 3044 | duration), "Monthly" if 1-month bins, "Xmonth" if multi-month bins,
|
|---|
| 3045 | or "Cumulative".
|
|---|
| 3046 |
|
|---|
| 3047 | * %(ClimatologyBinName)s - name of the climatology bin corresponding
|
|---|
| 3048 | represented by the output raster, either "dayXXX" for 1-day bins
|
|---|
| 3049 | (XXX is replaced by the day of the year), "daysXXXtoYYY" for
|
|---|
| 3050 | multi-day bins (XXX is replaced by the first day of the bin, YYY is
|
|---|
| 3051 | replaced by the last day), "monthXX" for 1-month bins (XX is
|
|---|
| 3052 | replaced by the month), "monthXXtoYY" (XX is replaced by the first
|
|---|
| 3053 | month of the bin, YY by the last month), or "cumulative".
|
|---|
| 3054 |
|
|---|
| 3055 | * %(Statistic)s - statistic that was calculated, in lowercase and with
|
|---|
| 3056 | spaces replaced by underscores; one of: "count", "maximum", "mean",
|
|---|
| 3057 | "minimum", "range", "standard_deviation", "Sum".
|
|---|
| 3058 |
|
|---|
| 3059 | If the Bin Type is "Daily", the following additional codes are
|
|---|
| 3060 | available:
|
|---|
| 3061 |
|
|---|
| 3062 | * %(FirstDay)i - first day of the year of the climatology bin
|
|---|
| 3063 | represented by the output raster.
|
|---|
| 3064 |
|
|---|
| 3065 | * %(LastDay)i - last day of the year of the climatology bin
|
|---|
| 3066 | represented by the output raster. For 1-day climatologies, this will
|
|---|
| 3067 | be the same as %(FirstDay)i.
|
|---|
| 3068 |
|
|---|
| 3069 | If the Bin Type is "Monthly", the following additional codes are
|
|---|
| 3070 | available:
|
|---|
| 3071 |
|
|---|
| 3072 | * %(FirstMonth)i - first month of the climatology bin represented by
|
|---|
| 3073 | the output raster.
|
|---|
| 3074 |
|
|---|
| 3075 | * %(DayOfFirstMonth)i - first day of the first month of the
|
|---|
| 3076 | climatology bin represented by the output raster.
|
|---|
| 3077 |
|
|---|
| 3078 | * %(LastMonth)i - last month of the climatology bin represented by
|
|---|
| 3079 | the output raster.
|
|---|
| 3080 |
|
|---|
| 3081 | * %(DayOfLastMonth)i - last day of the last month of the climatology
|
|---|
| 3082 | bin represented by the output raster.
|
|---|
| 3083 |
|
|---|
| 3084 | Note that the additional codes are integers and may be formatted using
|
|---|
| 3085 | "printf"-style formatting codes. For example, to format the FirstDay
|
|---|
| 3086 | as a three-digit number with leading zeros::
|
|---|
| 3087 |
|
|---|
| 3088 | %(FirstDay)03i
|
|---|
| 3089 | """),
|
|---|
| 3090 | arcGISDisplayName=_(u'Raster name expressions'))
|
|---|
| 3091 |
|
|---|
| 3092 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'binDuration', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'binDuration')
|
|---|
| 3093 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'startDayOfYear', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'startDayOfYear')
|
|---|
| 3094 |
|
|---|
| 3095 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'spatialExtent', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'spatialExtent')
|
|---|
| 3096 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'linearUnit', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'linearUnit')
|
|---|
| 3097 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'minDepth', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'minDepth')
|
|---|
| 3098 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxDepth', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'maxDepth')
|
|---|
| 3099 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'startDate', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'startDate')
|
|---|
| 3100 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'endDate', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'endDate')
|
|---|
| 3101 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'timeout', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'timeout')
|
|---|
| 3102 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'maxRetryTime')
|
|---|
| 3103 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'cacheDirectory')
|
|---|
| 3104 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'calculateStatistics', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'calculateStatistics')
|
|---|
| 3105 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'buildPyramids', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'buildPyramids')
|
|---|
| 3106 |
|
|---|
| 3107 | CopyResultMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 3108 |
|
|---|
| 3109 | # Public method: HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses
|
|---|
| 3110 |
|
|---|
| 3111 | AddMethodMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses,
|
|---|
| 3112 | shortDescription=_(u'Creates line feature classes representing the vectors of HYCOM GOMl0.04 currents.'),
|
|---|
| 3113 | longDescription=_(
|
|---|
| 3114 | u"""The lines output by this tool are similar to those in a "quiver
|
|---|
| 3115 | plot". When displayed on a map, they can help visualize the direction
|
|---|
| 3116 | and speed of ocean currents. In ArcMap, select the "Arrow at End"
|
|---|
| 3117 | symbology. You may also want to reduce the line decoration (the arrow)
|
|---|
| 3118 | to a small size, such as 2.0.
|
|---|
| 3119 |
|
|---|
| 3120 | """) + _HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 3121 | isExposedToPythonCallers=True,
|
|---|
| 3122 | isExposedByCOM=True,
|
|---|
| 3123 | isExposedAsArcGISTool=True,
|
|---|
| 3124 | arcGISDisplayName=_(u'Create Current Vectors for HYCOM GOMl0.04'),
|
|---|
| 3125 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\4D Variables'),
|
|---|
| 3126 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 3127 |
|
|---|
| 3128 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cls', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cls')
|
|---|
| 3129 |
|
|---|
| 3130 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'outputWorkspace',
|
|---|
| 3131 | typeMetadata=ArcGISWorkspaceTypeMetadata(createParentDirectories=True),
|
|---|
| 3132 | description=_(
|
|---|
| 3133 | u"""Directory or geodatabase to receive the feature classes.
|
|---|
| 3134 |
|
|---|
| 3135 | Unless you have a specific reason to store the feature classes in a
|
|---|
| 3136 | geodatabase, we recommend you store them in a directory because it
|
|---|
| 3137 | will be faster and allows them to be organized as a tree (of
|
|---|
| 3138 | shapefiles). If you do store the feature classes in a geodatabase, you
|
|---|
| 3139 | must change the Feature Class Name Expressions parameter; see below
|
|---|
| 3140 | for more information."""),
|
|---|
| 3141 | arcGISDisplayName=_(u'Output workspace'))
|
|---|
| 3142 |
|
|---|
| 3143 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'mode',
|
|---|
| 3144 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Add', u'Replace'], makeLowercase=True),
|
|---|
| 3145 | description=_(
|
|---|
| 3146 | u"""Overwrite mode, one of:
|
|---|
| 3147 |
|
|---|
| 3148 | * Add - create feature classes that do not exist and skip those that
|
|---|
| 3149 | already exist. This is the default.
|
|---|
| 3150 |
|
|---|
| 3151 | * Replace - create feature classes that do not exist and overwrite
|
|---|
| 3152 | those that already exist.
|
|---|
| 3153 |
|
|---|
| 3154 | The ArcGIS Overwrite Outputs geoprocessing setting has no effect on
|
|---|
| 3155 | this tool. If 'Replace' is selected the feature classes will be
|
|---|
| 3156 | overwritten, regardless of the ArcGIS Overwrite Outputs setting."""),
|
|---|
| 3157 | arcGISDisplayName=_(u'Overwrite mode'))
|
|---|
| 3158 |
|
|---|
| 3159 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'featureClassNameExpressions',
|
|---|
| 3160 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1),
|
|---|
| 3161 | description=_(
|
|---|
| 3162 | u"""List of expressions specifying how the output feature classes
|
|---|
| 3163 | should be named.
|
|---|
| 3164 |
|
|---|
| 3165 | The default expression assumes the output workspace is a directory and
|
|---|
| 3166 | creates shapefiles in a tree structure with levels for the year and
|
|---|
| 3167 | depth.
|
|---|
| 3168 |
|
|---|
| 3169 | If the output workspace is a geodatabase, you should provide only one
|
|---|
| 3170 | or two expressions. If you provide one expression, it specifies the
|
|---|
| 3171 | feature class name. If you provide two, the first one specifies the
|
|---|
| 3172 | feature dataset name and the second specifies the feature class name.
|
|---|
| 3173 |
|
|---|
| 3174 | Each expression may contain any sequence of characters permitted by
|
|---|
| 3175 | the output workspace. Each expression may optionally contain one or
|
|---|
| 3176 | more of the following case-sensitive codes. The tool replaces the
|
|---|
| 3177 | codes with appropriate values when creating each feature class:
|
|---|
| 3178 |
|
|---|
| 3179 | * %(Depth)f - depth of the output feature class. The f may be preceded
|
|---|
| 3180 | by Python's string formatting codes. Please see the Python
|
|---|
| 3181 | documentation for more information.
|
|---|
| 3182 |
|
|---|
| 3183 | * %%Y - four-digit year of the output feature class.
|
|---|
| 3184 |
|
|---|
| 3185 | * %%m - two-digit month of the output feature class.
|
|---|
| 3186 |
|
|---|
| 3187 | * %%d - two-digit day of the month of the output feature class.
|
|---|
| 3188 |
|
|---|
| 3189 | * %%j - three-digit day of the year of the output feature class.
|
|---|
| 3190 | """),
|
|---|
| 3191 | arcGISDisplayName=_(u'Feature class name expressions'))
|
|---|
| 3192 |
|
|---|
| 3193 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'scaleFactor',
|
|---|
| 3194 | typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.0),
|
|---|
| 3195 | description=_(
|
|---|
| 3196 | u"""Factor for scaling lines lengths.
|
|---|
| 3197 |
|
|---|
| 3198 | The length of each line is calculated by multiplying the magnitude of
|
|---|
| 3199 | the vector by this parameter. Use this parameter to scale the lines
|
|---|
| 3200 | output by this tool to lengths that are visually appealing. If the
|
|---|
| 3201 | lines are too short, they will resemble a grid of dots and you will
|
|---|
| 3202 | not be able to discern the flow of the vector field. If the lines are
|
|---|
| 3203 | too long, they will overlap each other and resemble a plate of
|
|---|
| 3204 | spaghetti.
|
|---|
| 3205 |
|
|---|
| 3206 | If the vectors all have about the same magnitude, then a good approach
|
|---|
| 3207 | is to scale the lines so that the longest one is about as long as the
|
|---|
| 3208 | raster cell size. But if there are a few very long vectors, then you
|
|---|
| 3209 | may prefer to scale the lines so that the average-length vector is as
|
|---|
| 3210 | long as the raster cell size.
|
|---|
| 3211 |
|
|---|
| 3212 | For HYCOM GOMl0.04 currents, the grid cell size is about 4500 m and
|
|---|
| 3213 | currents are given in m/s. So, if the maximum (or mean) velocity in
|
|---|
| 3214 | your region of interest is about 0.75 m/s:
|
|---|
| 3215 |
|
|---|
| 3216 | scale factor = 4500 / 0.75 = 6000
|
|---|
| 3217 | """),
|
|---|
| 3218 | arcGISDisplayName=_(u'Scale factor'),
|
|---|
| 3219 | arcGISCategory=_(u'Vector options'))
|
|---|
| 3220 |
|
|---|
| 3221 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'uniformLength',
|
|---|
| 3222 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3223 | description=_(
|
|---|
| 3224 | u"""If False (the default) then the lengths of the lines are
|
|---|
| 3225 | determined by multiplying the magnitude of the vector by the Scale
|
|---|
| 3226 | Factor parameter.
|
|---|
| 3227 |
|
|---|
| 3228 | If True, all lines will have the same length, which will be determined
|
|---|
| 3229 | by multiplying the cell size of the HYCOM grids by the the Scale
|
|---|
| 3230 | Factor. Use this option when you want to the lines' colors to indicate
|
|---|
| 3231 | the magnitude of the vector, rather than the lines' lengths. Start
|
|---|
| 3232 | with a Scale Factor of 1 and increase it or decrease it slightly to
|
|---|
| 3233 | achieve the desired visual effect."""),
|
|---|
| 3234 | arcGISDisplayName=_(u'Create all lines with the same length'),
|
|---|
| 3235 | arcGISCategory=_(u'Vector options'))
|
|---|
| 3236 |
|
|---|
| 3237 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'spatialExtent', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'spatialExtent')
|
|---|
| 3238 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'linearUnit', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'linearUnit')
|
|---|
| 3239 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'minDepth', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'minDepth')
|
|---|
| 3240 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxDepth', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxDepth')
|
|---|
| 3241 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'startDate', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'startDate')
|
|---|
| 3242 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'endDate', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'endDate')
|
|---|
| 3243 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'timeout', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'timeout')
|
|---|
| 3244 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxRetryTime')
|
|---|
| 3245 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cacheDirectory')
|
|---|
| 3246 |
|
|---|
| 3247 | CopyResultMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'updatedOutputWorkspace')
|
|---|
| 3248 |
|
|---|
| 3249 | # Public method: HYCOMGOMl0044D.InterpolateAtArcGISPoints
|
|---|
| 3250 |
|
|---|
| 3251 | AddMethodMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints,
|
|---|
| 3252 | shortDescription=_(u'Interpolates HYCOM GOMl0.04 4D variables at points.'),
|
|---|
| 3253 | longDescription=_HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGOMl004_References,
|
|---|
| 3254 | isExposedToPythonCallers=True,
|
|---|
| 3255 | isExposedByCOM=True,
|
|---|
| 3256 | isExposedAsArcGISTool=True,
|
|---|
| 3257 | arcGISDisplayName=_(u'Interpolate HYCOM GOMl0.04 4D Variables at Points'),
|
|---|
| 3258 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\4D Variables'),
|
|---|
| 3259 | dependencies=[ArcGISDependency(9, 1, requiresCOMInstantiation=True), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 3260 |
|
|---|
| 3261 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cls', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'cls')
|
|---|
| 3262 |
|
|---|
| 3263 | AddArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'variableNames',
|
|---|
| 3264 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature', u'u', u'v', u'w_velocity'], makeLowercase=True), minLength=1),
|
|---|
| 3265 | description=_(
|
|---|
| 3266 | u"""HYCOM 4D variables to interpolate:
|
|---|
| 3267 |
|
|---|
| 3268 | * salinity - Sea water salinity, in psu.
|
|---|
| 3269 |
|
|---|
| 3270 | * temperature - Sea water potential temperature, in degrees C.
|
|---|
| 3271 |
|
|---|
| 3272 | * u - Eastward sea water velocity, in m/s.
|
|---|
| 3273 |
|
|---|
| 3274 | * v - Northward sea water velocity, in m/s.
|
|---|
| 3275 |
|
|---|
| 3276 | * w_velocity - Upward sea water velocity, in m/s.
|
|---|
| 3277 |
|
|---|
| 3278 | Please see the HYCOM documentation for more information about these
|
|---|
| 3279 | variables.
|
|---|
| 3280 |
|
|---|
| 3281 | For each variable that you select, you must also specify a field of
|
|---|
| 3282 | the points to receive the interpolated value."""),
|
|---|
| 3283 | arcGISDisplayName=_(u'HYCOM variables to interpolate'))
|
|---|
| 3284 |
|
|---|
| 3285 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'points', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'points')
|
|---|
| 3286 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'valueFields', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'valueFields')
|
|---|
| 3287 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'tField', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'tField')
|
|---|
| 3288 |
|
|---|
| 3289 | AddArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'zField',
|
|---|
| 3290 | typeMetadata=ArcGISFieldTypeMetadata(canBeNone=True, mustExist=True, allowedFieldTypes=[u'short', u'long', u'float', u'double']),
|
|---|
| 3291 | description=_(
|
|---|
| 3292 | u"""Field of the points that specifies the depth of the point, in
|
|---|
| 3293 | meters.
|
|---|
| 3294 |
|
|---|
| 3295 | The depth 0 represents the surface. The sign of the depth coordinate
|
|---|
| 3296 | is ignored (e.g. the values 10 and -10 are both interpreted as 10 m
|
|---|
| 3297 | below the surface).
|
|---|
| 3298 |
|
|---|
| 3299 | The depth 20000 is a special code representing conditions at the
|
|---|
| 3300 | seafloor. Use this value if you need an estimate of "bottom
|
|---|
| 3301 | temperature" or the value of another variable at the seafloor. The
|
|---|
| 3302 | interpolated value will be taken from the deepest HYCOM layer with
|
|---|
| 3303 | data at the X,Y location. Because HYCOM depth layers are spaced
|
|---|
| 3304 | farther apart at deeper depths, the deepest HYCOM layer with data
|
|---|
| 3305 | might be substantially shallower than the actual seafloor depth. Bear
|
|---|
| 3306 | this in mind when considering the likely accuracy of interpolated
|
|---|
| 3307 | value.
|
|---|
| 3308 |
|
|---|
| 3309 | If a depth field is not specified, the Depth Value parameter will be
|
|---|
| 3310 | used. If that parameter is not provided, the z value of the points
|
|---|
| 3311 | will be used. If the points do not have a z value, an error will be
|
|---|
| 3312 | reported."""),
|
|---|
| 3313 | arcGISDisplayName=_(u'Depth field'),
|
|---|
| 3314 | arcGISParameterDependencies=[u'points'])
|
|---|
| 3315 |
|
|---|
| 3316 | AddArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'zValue',
|
|---|
| 3317 | typeMetadata=FloatTypeMetadata(canBeNone=True),
|
|---|
| 3318 | description=_(
|
|---|
| 3319 | u"""Depth of the points. This parameter is ignored if the Depth Field
|
|---|
| 3320 | parameter is provided.
|
|---|
| 3321 |
|
|---|
| 3322 | Use this parameter when your points do not have a depth field and you
|
|---|
| 3323 | want to use the same depth for all of the points.
|
|---|
| 3324 |
|
|---|
| 3325 | The depth 0 represents the surface. The sign of the depth coordinate
|
|---|
| 3326 | is ignored (e.g. the values 10 and -10 are both interpreted as 10 m
|
|---|
| 3327 | below the surface).
|
|---|
| 3328 |
|
|---|
| 3329 | The depth 20000 is a special code representing conditions at the
|
|---|
| 3330 | seafloor. Use this value if you need an estimate of "bottom
|
|---|
| 3331 | temperature" or the value of another variable at the seafloor. The
|
|---|
| 3332 | interpolated value will be taken from the deepest HYCOM layer with
|
|---|
| 3333 | data at the X,Y location. Because HYCOM depth layers are spaced
|
|---|
| 3334 | farther apart at deeper depths, the deepest HYCOM layer with data
|
|---|
| 3335 | might be substantially shallower than the actual seafloor depth. Bear
|
|---|
| 3336 | this in mind when considering the likely accuracy of interpolated
|
|---|
| 3337 | value."""),
|
|---|
| 3338 | arcGISDisplayName=_(u'Depth value'))
|
|---|
| 3339 |
|
|---|
| 3340 | AddArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'method',
|
|---|
| 3341 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'Nearest', u'Linear'], makeLowercase=True),
|
|---|
| 3342 | description=_(
|
|---|
| 3343 | u"""Interpolation method to use, one of:
|
|---|
| 3344 |
|
|---|
| 3345 | * Nearest - nearest neighbor interpolation. The interpolated value
|
|---|
| 3346 | will simply be the value of the cell that contains the point. This
|
|---|
| 3347 | is the default.
|
|---|
| 3348 |
|
|---|
| 3349 | * Linear - linear interpolation (also known as quadrilinear
|
|---|
| 3350 | interpolation). This method averages the values of the 16 nearest
|
|---|
| 3351 | cells in the x, y, depth, and time dimensions, weighting the
|
|---|
| 3352 | contribution of each cell by the area of it that would be covered by
|
|---|
| 3353 | a hypothetical cell centered on the point being interpolated. If the
|
|---|
| 3354 | cell containing the point contains NoData, the result is NoData. If
|
|---|
| 3355 | any of the other 15 cells contain NoData, they are omitted from the
|
|---|
| 3356 | average, and the result is based on the weighted average of the
|
|---|
| 3357 | cells that do contain data. This is the same algorithm implemented
|
|---|
| 3358 | by the ArcGIS Spatial Analyst's Extract Values to Points tool.
|
|---|
| 3359 | """),
|
|---|
| 3360 | arcGISDisplayName=_(u'Interpolation method'))
|
|---|
| 3361 |
|
|---|
| 3362 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'where', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'where')
|
|---|
| 3363 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'noDataValue', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'noDataValue')
|
|---|
| 3364 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'timeout', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'timeout')
|
|---|
| 3365 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'maxRetryTime')
|
|---|
| 3366 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'cacheDirectory')
|
|---|
| 3367 |
|
|---|
| 3368 | AddArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'orderByFields',
|
|---|
| 3369 | typeMetadata=ListTypeMetadata(elementType=ArcGISFieldTypeMetadata(mustExist=True), minLength=1, canBeNone=True),
|
|---|
| 3370 | description=_(
|
|---|
| 3371 | u"""Fields for defining the order in which the points are processed.
|
|---|
| 3372 |
|
|---|
| 3373 | The points may be processed faster if they are ordered
|
|---|
| 3374 | spatiotemporally, such that points that are close in space and time
|
|---|
| 3375 | are processed sequentially. Ordering the points this way increases the
|
|---|
| 3376 | probability that the value of a given point can be interpolated from
|
|---|
| 3377 | data that is cached in memory, rather than from data that must be read
|
|---|
| 3378 | from the disk or network, which is much slower. Choose fields that
|
|---|
| 3379 | faciliate this. For example, if your points represent the locations of
|
|---|
| 3380 | animals tracked by satellite telemetry, order the processing first by
|
|---|
| 3381 | the animal ID and then by the transmission date or number.
|
|---|
| 3382 |
|
|---|
| 3383 | If you omit this parameter, the Date and Depth Fields will be used
|
|---|
| 3384 | automatically.
|
|---|
| 3385 |
|
|---|
| 3386 | This parameter requires ArcGIS 9.2 or later."""),
|
|---|
| 3387 | arcGISDisplayName=_(u'Order by fields'),
|
|---|
| 3388 | arcGISCategory=_(u'Performance tuning options'),
|
|---|
| 3389 | arcGISParameterDependencies=[u'points'],
|
|---|
| 3390 | dependencies=[ArcGISDependency(9, 2)])
|
|---|
| 3391 |
|
|---|
| 3392 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory')
|
|---|
| 3393 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'xBlockSize', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'xBlockSize')
|
|---|
| 3394 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'yBlockSize', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'yBlockSize')
|
|---|
| 3395 |
|
|---|
| 3396 | AddArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'zBlockSize',
|
|---|
| 3397 | typeMetadata=IntegerTypeMetadata(minValue=0, canBeNone=True),
|
|---|
| 3398 | description=_(
|
|---|
| 3399 | u"""Size of the blocks of HYCOM data to cache in memory, in the z
|
|---|
| 3400 | direction (depth). The size is given as the number of cells.
|
|---|
| 3401 |
|
|---|
| 3402 | If this parameter is 0, no blocks will be cached in memory."""),
|
|---|
| 3403 | arcGISDisplayName=_(u'In-memory cache block size, in Z direction'),
|
|---|
| 3404 | arcGISCategory=_(u'Performance tuning options'))
|
|---|
| 3405 |
|
|---|
| 3406 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'tBlockSize', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'tBlockSize')
|
|---|
| 3407 |
|
|---|
| 3408 | CopyResultMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'updatedPoints', HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'updatedPoints')
|
|---|
| 3409 |
|
|---|
| 3410 | # Public method: HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters
|
|---|
| 3411 |
|
|---|
| 3412 | _CayulaCornillonFrontsOverview = (
|
|---|
| 3413 | u"""**Overview**
|
|---|
| 3414 |
|
|---|
| 3415 | This tool efficiently downloads 2D time/depth slices of a specified 4D
|
|---|
| 3416 | HYCOM variable, executes the Cayula and Cornillon SIED algorithm to
|
|---|
| 3417 | identify fronts in each 2D slice, and creates rasters showing the
|
|---|
| 3418 | locations of the fronts.
|
|---|
| 3419 |
|
|---|
| 3420 | This tool is complicated and has a lot of parameters. For the best
|
|---|
| 3421 | chance of success, please read all of the documentation carefully.
|
|---|
| 3422 |
|
|---|
| 3423 | We configured the default parameters of this tool to balance a number
|
|---|
| 3424 | of tradeoffs. Our default values are different than those used in
|
|---|
| 3425 | Cayula and Cornillon's original study. For example, the original study
|
|---|
| 3426 | used a 32x32 moving window while ours is somewhat smaller because we
|
|---|
| 3427 | found that the algorithm appeared to detect more fronts in HYCOM
|
|---|
| 3428 | images when a smaller window was used. This is probably due to the
|
|---|
| 3429 | fact that Cayula and Cornillon's original data had a spatial
|
|---|
| 3430 | resolution of about 1 km, while HYCOM has a substantially larger
|
|---|
| 3431 | resolution. The theoretical basis of the algorithm requires that only
|
|---|
| 3432 | one front appear in the window; the 32x32 window appeared to be too
|
|---|
| 3433 | large to work well with HYCOM's coarser resolution, often enclosing
|
|---|
| 3434 | multiple fronts.
|
|---|
| 3435 |
|
|---|
| 3436 | We believe our default values work better for HYCOM than Cayula and
|
|---|
| 3437 | Cornillon's original values, but we have not attempted to formally
|
|---|
| 3438 | validate the results. Please keep that in mind when applying this tool
|
|---|
| 3439 | in your own studies.
|
|---|
| 3440 |
|
|---|
| 3441 | Note that the Front Cleanup Options, which are enabled by default,
|
|---|
| 3442 | require that MATLAB 2007b or the MATLAB Component Runtime (MCR) 7.7 be
|
|---|
| 3443 | installed. You can download a free copy of the MCR 7.7 from
|
|---|
| 3444 | http://code.nicholas.duke.edu/projects/mget/wiki/MCR. If you do not
|
|---|
| 3445 | wish to install MATLAB or the MCR, you must disable the Front Cleanup
|
|---|
| 3446 | Options.""")
|
|---|
| 3447 |
|
|---|
| 3448 | AddMethodMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters,
|
|---|
| 3449 | shortDescription=_(u'Creates rasters indicating the positions of fronts in the 2D slices of a HYCOM GOMl0.04 4D variable using the Cayula and Cornillon (1992) single image edge detection (SIED) algorithm.'),
|
|---|
| 3450 | longDescription=_CayulaCornillonFrontsOverview + _(
|
|---|
| 3451 | u"""
|
|---|
| 3452 |
|
|---|
| 3453 | **The HYCOM GOMl0.04 Dataset**
|
|---|
| 3454 |
|
|---|
| 3455 | """) + _HYCOMGOMl004_LongDescription % {u'name': 'tool'} + _(
|
|---|
| 3456 | u"""
|
|---|
| 3457 |
|
|---|
| 3458 | **The SIED Algorithm**
|
|---|
| 3459 |
|
|---|
| 3460 | """) + _SIEDDescription + _(
|
|---|
| 3461 | u"""
|
|---|
| 3462 | **References**
|
|---|
| 3463 |
|
|---|
| 3464 | """) + _HYCOMGOMl004_References + '\n\n' + _SIEDReferences,
|
|---|
| 3465 | isExposedToPythonCallers=True,
|
|---|
| 3466 | isExposedByCOM=True,
|
|---|
| 3467 | isExposedAsArcGISTool=True,
|
|---|
| 3468 | arcGISDisplayName=_(u'Find Cayula-Cornillon Fronts in HYCOM GOMl0.04 4D Variable'),
|
|---|
| 3469 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Gulf of Mexico 1/25 Degree Analysis (GLMl0.04)\\4D Variables'),
|
|---|
| 3470 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 3471 |
|
|---|
| 3472 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cls', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'cls')
|
|---|
| 3473 |
|
|---|
| 3474 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'variableName',
|
|---|
| 3475 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature'], makeLowercase=True),
|
|---|
| 3476 | description=_(
|
|---|
| 3477 | u"""HYCOM 4D variable (dimensions x, y, depth, and time), one of:
|
|---|
| 3478 |
|
|---|
| 3479 | * salinity - Sea water salinity, in psu.
|
|---|
| 3480 |
|
|---|
| 3481 | * temperature - Sea water potential temperature, in degrees C.
|
|---|
| 3482 |
|
|---|
| 3483 | The Cayula and Cornillon SIED algorithm has traditionally been applied to
|
|---|
| 3484 | surface temperature, but in principle, it can be applied to salinity
|
|---|
| 3485 | as well."""),
|
|---|
| 3486 | arcGISDisplayName=_(u'HYCOM variable'))
|
|---|
| 3487 |
|
|---|
| 3488 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPopMeanDifference',
|
|---|
| 3489 | typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.),
|
|---|
| 3490 | description=_(
|
|---|
| 3491 | u"""Minimum difference, in degrees C or psu, between the mean
|
|---|
| 3492 | temperatures or salinities of two adjacent populations of pixels for a
|
|---|
| 3493 | front to be detected between those two populations.
|
|---|
| 3494 |
|
|---|
| 3495 | The Cayula and Cornillon algorithm passes a moving window over the
|
|---|
| 3496 | image, checking each window for a bimodal distribution in the values
|
|---|
| 3497 | of the pixels within it. When the algorithm detects a bimodal
|
|---|
| 3498 | distribution, it computes the mean values of the two populations and
|
|---|
| 3499 | compares the difference between the means to this threshold. If the
|
|---|
| 3500 | difference is less than this threshold, the algorithm concludes there
|
|---|
| 3501 | is no front present and moves on to the next window.
|
|---|
| 3502 |
|
|---|
| 3503 | You can use this parameter to eliminate weak fronts by selecting a
|
|---|
| 3504 | value that corresponds to a desired minimum mean temperature or
|
|---|
| 3505 | salinity difference. Larger values will detect fewer fronts; smaller
|
|---|
| 3506 | values will detect more fronts."""),
|
|---|
| 3507 | arcGISDisplayName=_(u'Front detection threshold'))
|
|---|
| 3508 |
|
|---|
| 3509 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWorkspace',
|
|---|
| 3510 | typeMetadata=ArcGISWorkspaceTypeMetadata(createParentDirectories=True),
|
|---|
| 3511 | description=_(
|
|---|
| 3512 | u"""Directory or geodatabase to receive the rasters.
|
|---|
| 3513 |
|
|---|
| 3514 | Unless you have a specific reason to store the rasters in a
|
|---|
| 3515 | geodatabase, we recommend you store them in a directory because it
|
|---|
| 3516 | will be much faster and allows the rasters to be organized in a tree.
|
|---|
| 3517 | If you do store the rasters in a geodatabase, you must change the
|
|---|
| 3518 | Raster Name Expressions parameter; the documentation for that
|
|---|
| 3519 | parameter for more information.
|
|---|
| 3520 |
|
|---|
| 3521 | The front location images will be written as 8-bit signed integer
|
|---|
| 3522 | rasters. Each pixel can have one of three values:
|
|---|
| 3523 |
|
|---|
| 3524 | * NoData - the pixel was never a candidate for containing a front,
|
|---|
| 3525 | either because it was masked or because because it did not appear in
|
|---|
| 3526 | any histogram windows that had sufficiently large numbers of
|
|---|
| 3527 | non-masked pixels to proceed with the histogramming step of the
|
|---|
| 3528 | Cayula and Cornillon algorithm.
|
|---|
| 3529 |
|
|---|
| 3530 | * 0 - The pixel was a candidate for containing a front -- it was not
|
|---|
| 3531 | masked and it appeared in at least one histogram window with a
|
|---|
| 3532 | sufficient number of non-masked pixels to proceed with the
|
|---|
| 3533 | histogramming step -- but it was never marked as a front pixel in
|
|---|
| 3534 | any of the histogram windows it appeared in.
|
|---|
| 3535 |
|
|---|
| 3536 | * 1 - The pixel was a candidate for containing a front and it was marked
|
|---|
| 3537 | as a front pixel in at least one of the histogram windows it
|
|---|
| 3538 | appeared in.
|
|---|
| 3539 |
|
|---|
| 3540 | You may also instruct this tool to write several kinds of diagnostic
|
|---|
| 3541 | outputs. These can help you understand why a front was or was not
|
|---|
| 3542 | identified at a specific location. Please see the documentation for
|
|---|
| 3543 | the diagnostic outputs for more information.
|
|---|
| 3544 |
|
|---|
| 3545 | The front location images described above are constructed by
|
|---|
| 3546 | performing a classification of two of the diagnostic outputs, the
|
|---|
| 3547 | "candidate counts" and "front counts" images, and then applying the
|
|---|
| 3548 | Fill Holes, Thin, and Minimum Front Size options."""),
|
|---|
| 3549 | arcGISDisplayName=_(u'Output workspace'))
|
|---|
| 3550 |
|
|---|
| 3551 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'mode', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'mode')
|
|---|
| 3552 |
|
|---|
| 3553 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'rasterNameExpressions',
|
|---|
| 3554 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(), minLength=1),
|
|---|
| 3555 | description=_(
|
|---|
| 3556 | u"""List of expressions specifying how the output rasters should be
|
|---|
| 3557 | named.
|
|---|
| 3558 |
|
|---|
| 3559 | The default expression assumes you are storing rasters in a file
|
|---|
| 3560 | system directory and creates them a tree structure with levels for the
|
|---|
| 3561 | variable name and year. When storing rasters in a directory, the final
|
|---|
| 3562 | expression specifies the file name of the raster and any preceding
|
|---|
| 3563 | expressions specify subdirectories. The extension of the final
|
|---|
| 3564 | expression determines the output raster format: .asc for ArcInfo ASCII
|
|---|
| 3565 | Grid, .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg
|
|---|
| 3566 | for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for GeoTIFF, or no
|
|---|
| 3567 | extension for ArcInfo Binary Grid. The default expression uses .img.
|
|---|
| 3568 |
|
|---|
| 3569 | When storing rasters in a geodatabase, you should provide only one
|
|---|
| 3570 | expression. That expression specifies the raster's name.
|
|---|
| 3571 |
|
|---|
| 3572 | Each expression may contain any sequence of characters permitted by
|
|---|
| 3573 | the output workspace. Each expression may optionally contain one or
|
|---|
| 3574 | more of the following case-sensitive codes. The tool replaces the
|
|---|
| 3575 | codes with appropriate values when creating each raster:
|
|---|
| 3576 |
|
|---|
| 3577 | * %(VariableName)s - HYCOM variable used to produce the output raster.
|
|---|
| 3578 |
|
|---|
| 3579 | * %(Depth)f - depth of the output raster. The f may be preceded by
|
|---|
| 3580 | Python's string formatting codes. Please see the Python
|
|---|
| 3581 | documentation for more information.
|
|---|
| 3582 |
|
|---|
| 3583 | * %(ImageType)s - type of image represented in the output raster,
|
|---|
| 3584 | either "floc" (front locations), "ccnt" (candidate counts), "fcnt"
|
|---|
| 3585 | (front counts), "wsco" (window status codes), or "wsvl" (window
|
|---|
| 3586 | status values).
|
|---|
| 3587 |
|
|---|
| 3588 | * %%Y - four-digit year of the raster.
|
|---|
| 3589 |
|
|---|
| 3590 | * %%m - two-digit month of the first day of the raster.
|
|---|
| 3591 |
|
|---|
| 3592 | * %%d - two-digit day of the month of the first day of the raster.
|
|---|
| 3593 |
|
|---|
| 3594 | * %%j - three-digit day of the year of the first day of the raster.
|
|---|
| 3595 | """),
|
|---|
| 3596 | arcGISDisplayName=_(u'Raster name expressions'))
|
|---|
| 3597 |
|
|---|
| 3598 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'medianFilterWindowSize', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'medianFilterWindowSize')
|
|---|
| 3599 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowSize', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'histogramWindowSize')
|
|---|
| 3600 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowStride', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'histogramWindowStride')
|
|---|
| 3601 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPropNonMaskedCells', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPropNonMaskedCells')
|
|---|
| 3602 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPopProp', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPopProp')
|
|---|
| 3603 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minTheta', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minTheta')
|
|---|
| 3604 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minSinglePopCohesion', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minSinglePopCohesion')
|
|---|
| 3605 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minGlobalPopCohesion', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minGlobalPopCohesion')
|
|---|
| 3606 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'threads', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'threads')
|
|---|
| 3607 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'fillHoles', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'fillHoles')
|
|---|
| 3608 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'thin', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'thin')
|
|---|
| 3609 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minSize', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minSize')
|
|---|
| 3610 |
|
|---|
| 3611 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'spatialExtent', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'spatialExtent')
|
|---|
| 3612 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'linearUnit', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'linearUnit')
|
|---|
| 3613 |
|
|---|
| 3614 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minDepth',
|
|---|
| 3615 | typeMetadata=FloatTypeMetadata(minValue=0.0, maxValue=5500.0, canBeNone=True),
|
|---|
| 3616 | description=_(
|
|---|
| 3617 | u"""Minimum depth, in meters, for the rasters to create.
|
|---|
| 3618 |
|
|---|
| 3619 | The value must be between 0 and 5500, inclusive. Rasters will be
|
|---|
| 3620 | created for images with depths that are greater than or equal to the
|
|---|
| 3621 | minimum depth and less than or equal to the maximum depth. If you do
|
|---|
| 3622 | not specify a minimum depth, 0 will be used.
|
|---|
| 3623 |
|
|---|
| 3624 | Unlike some of the other 4D HYCOM tools, this tool does not support
|
|---|
| 3625 | the use of the value 20000 to represent the values at the
|
|---|
| 3626 | seafloor."""),
|
|---|
| 3627 | arcGISDisplayName=_(u'Minimum depth'),
|
|---|
| 3628 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3629 |
|
|---|
| 3630 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'maxDepth',
|
|---|
| 3631 | typeMetadata=FloatTypeMetadata(minValue=0.0, maxValue=5500.0, canBeNone=True),
|
|---|
| 3632 | description=_(
|
|---|
| 3633 | u"""Maximum depth, in meters, for the rasters to create.
|
|---|
| 3634 |
|
|---|
| 3635 | The value must be between 0 and 5500, inclusive. Rasters will be
|
|---|
| 3636 | created for images with depths that are greater than or equal to the
|
|---|
| 3637 | minimum depth and less than or equal to the maximum depth. If you do
|
|---|
| 3638 | not specify a maximum depth, 5500 will be used. This is the depth of
|
|---|
| 3639 | the deepest HYCOM layer.
|
|---|
| 3640 |
|
|---|
| 3641 | Unlike some of the other 4D HYCOM tools, this tool does not support
|
|---|
| 3642 | the use of the value 20000 to represent the values at the
|
|---|
| 3643 | seafloor."""),
|
|---|
| 3644 | arcGISDisplayName=_(u'Maximum depth'),
|
|---|
| 3645 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3646 |
|
|---|
| 3647 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'startDate', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'startDate')
|
|---|
| 3648 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'endDate', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'endDate')
|
|---|
| 3649 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'timeout', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'timeout')
|
|---|
| 3650 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'maxRetryTime')
|
|---|
| 3651 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'cacheDirectory')
|
|---|
| 3652 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'calculateStatistics', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'calculateStatistics')
|
|---|
| 3653 |
|
|---|
| 3654 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'buildRAT',
|
|---|
| 3655 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3656 | description=_BuildRATDescription,
|
|---|
| 3657 | arcGISDisplayName=_(u'Build raster attribute tables'),
|
|---|
| 3658 | arcGISCategory=_(u'Additional raster processing options'))
|
|---|
| 3659 |
|
|---|
| 3660 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'buildPyramids', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'buildPyramids')
|
|---|
| 3661 |
|
|---|
| 3662 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputCandidateCounts',
|
|---|
| 3663 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3664 | description=_(
|
|---|
| 3665 | u"""If True, candidate counts diagnostic images will be created.
|
|---|
| 3666 |
|
|---|
| 3667 | Candidate counts images contain 16-bit unsigned integers and indicate
|
|---|
| 3668 | how many times each pixel of the corresponding SST image was a
|
|---|
| 3669 | candidate for containing a front, i.e. the number of times it appeared
|
|---|
| 3670 | in a histogram window that had a sufficiently large number of
|
|---|
| 3671 | non-masked pixels to proceed with the histogramming step of the
|
|---|
| 3672 | Cayula and Cornillon algorithm. If the histogram window stride is less
|
|---|
| 3673 | than the window size, successive histogram windows will overlap, and
|
|---|
| 3674 | many pixels will have candidate counts greater than 1. Masked pixels
|
|---|
| 3675 | can never be candidates for containing a front so they will always
|
|---|
| 3676 | have the value 0."""),
|
|---|
| 3677 | arcGISDisplayName=_(u'Create candidate counts rasters'),
|
|---|
| 3678 | arcGISCategory=_(u'Optional diagnostic outputs'))
|
|---|
| 3679 |
|
|---|
| 3680 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputFrontCounts',
|
|---|
| 3681 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3682 | description=_(
|
|---|
| 3683 | u"""If True, front counts diagnostic images will be created.
|
|---|
| 3684 |
|
|---|
| 3685 | Front counts images contain 16-bit unsigned integers and indicate how
|
|---|
| 3686 | many times each pixel of the corresponding SST image was found to
|
|---|
| 3687 | contain a front. The value will range from 0 (it never contained a
|
|---|
| 3688 | front) to the candidate count value for the pixel (it always contained
|
|---|
| 3689 | a front in every histogram window that contained it).
|
|---|
| 3690 |
|
|---|
| 3691 | The Front Cleanup Options are not applied to the front counts
|
|---|
| 3692 | image."""),
|
|---|
| 3693 | arcGISDisplayName=_(u'Create front counts rasters'),
|
|---|
| 3694 | arcGISCategory=_(u'Optional diagnostic outputs'))
|
|---|
| 3695 |
|
|---|
| 3696 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWindowStatusCodes',
|
|---|
| 3697 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3698 | description=_(
|
|---|
| 3699 | u"""If True, diagnostic images of window status codes will be created.
|
|---|
| 3700 |
|
|---|
| 3701 | Window status code images contain 8-bit unsigned integers that
|
|---|
| 3702 | indicate the result of the algorithm for the histogram window centered
|
|---|
| 3703 | on the pixel. You can use this image to diagnose why the algorithm did
|
|---|
| 3704 | not find fronts in a particular region of your image.
|
|---|
| 3705 |
|
|---|
| 3706 | The algorithm result will be one of these code numbers:
|
|---|
| 3707 |
|
|---|
| 3708 | """ + _WindowStatusCodes),
|
|---|
| 3709 | arcGISDisplayName=_(u'Create window status code rasters'),
|
|---|
| 3710 | arcGISCategory=_(u'Optional diagnostic outputs'))
|
|---|
| 3711 |
|
|---|
| 3712 | AddArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWindowStatusValues',
|
|---|
| 3713 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3714 | description=_(
|
|---|
| 3715 | u"""If True, diagnostic images of window status values will be
|
|---|
| 3716 | created.
|
|---|
| 3717 |
|
|---|
| 3718 | Window status values images contain 32-bit floating point values
|
|---|
| 3719 | to be used in conjunction with the window status codes when diagnosing
|
|---|
| 3720 | the results of the algorithm. The value of each pixel depends on the
|
|---|
| 3721 | window status code for that pixel:
|
|---|
| 3722 |
|
|---|
| 3723 | """ + _WindowStatusValues),
|
|---|
| 3724 | arcGISDisplayName=_(u'Create window status value rasters'),
|
|---|
| 3725 | arcGISCategory=_(u'Optional diagnostic outputs'))
|
|---|
| 3726 |
|
|---|
| 3727 | CopyResultMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 3728 |
|
|---|
| 3729 | ###############################################################################
|
|---|
| 3730 | # Metadata: _HYCOMGridGLBa0083D class
|
|---|
| 3731 | ###############################################################################
|
|---|
| 3732 |
|
|---|
| 3733 | AddClassMetadata(_HYCOMGridGLBa0083D,
|
|---|
| 3734 | shortDescription=_(u'An OPeNDAPGrid for a 3D variable of a HYCOM GOMl0.04 OPeNDAP URL.'),
|
|---|
| 3735 | longDescription=_(
|
|---|
| 3736 | u"""This class is intended for private use within GeoEco and is not
|
|---|
| 3737 | intended for external callers."""))
|
|---|
| 3738 |
|
|---|
| 3739 | ###############################################################################
|
|---|
| 3740 | # Metadata: HYCOMGLBa008Equatorial3D class
|
|---|
| 3741 | ###############################################################################
|
|---|
| 3742 |
|
|---|
| 3743 | _HYCOMGLBa008Equatorial_LongDescription = _(
|
|---|
| 3744 | u"""This %(name)s accesses the "All Experiments (Aggregated)" dataset
|
|---|
| 3745 | of the
|
|---|
| 3746 | `HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08) <http://www.hycom.org/dataserver/glb-analysis/>`_
|
|---|
| 3747 | using the `OPeNDAP <http://opendap.org/>`_ protocol.
|
|---|
| 3748 |
|
|---|
| 3749 | The dataset consists of a collection of 3D and 4D gridded variables.
|
|---|
| 3750 | The 3D variables represent conditions at the surface of the ocean and
|
|---|
| 3751 | have dimensions of x, y, and time. The 4D variables represent
|
|---|
| 3752 | conditions at depth and have dimensions of x, y, depth, and time.
|
|---|
| 3753 |
|
|---|
| 3754 | HYCOM uses an unusual georeferencing scheme in which the Earth is
|
|---|
| 3755 | represented by a grid that uses three different projections. The
|
|---|
| 3756 | southern portion of the grid, encompassing approximately 66 S to 78 S,
|
|---|
| 3757 | is in an equirectangular projection, with rectangular cells having the
|
|---|
| 3758 | dimensions of 0.08 degrees longitude and 0.032 degrees latitude. The
|
|---|
| 3759 | equatorial portion of the grid, encompassing approximately 47 N to 66
|
|---|
| 3760 | S, is in a Mercator projection with square cells approximately 8.9 km
|
|---|
| 3761 | on a side (equivalent to 0.08 degrees of longitude at the equator).
|
|---|
| 3762 | The northern portion of the grid, encompassing approximately 90 N to
|
|---|
| 3763 | 47 N, is in a complicated "bi-polar" projection.
|
|---|
| 3764 |
|
|---|
| 3765 | This %(name)s accesses the equatorial (Mercator) portion of the HYCOM
|
|---|
| 3766 | grid, and is therefore very appropriate if your region of interest is
|
|---|
| 3767 | between 47 N and 66 S. This tool can optionally extend the northern
|
|---|
| 3768 | extent of of the Mercator grid to 60 N by interpolating values from
|
|---|
| 3769 | the bi-polar region. If your region of interest is between 47 N and 60
|
|---|
| 3770 | N, enable that option but review the HYCOM data carefully to ensure
|
|---|
| 3771 | the interpolated values appear to be reasonable for your application.
|
|---|
| 3772 | Also be aware of the increasing map distortion caused by the Mercator
|
|---|
| 3773 | projection as you approach high latitudes; at 60 degrees latitude, the
|
|---|
| 3774 | cells are actually only one-half as wide (4.5 km) as the projection
|
|---|
| 3775 | claims (8.9 km).
|
|---|
| 3776 |
|
|---|
| 3777 | If your area of interest is north of 60 N or south of 66 S, do not use
|
|---|
| 3778 | this %(name)s because it cannot access HYCOM data for those regions.
|
|---|
| 3779 |
|
|---|
| 3780 | For more information on HYCOM's georeferencing, please see the
|
|---|
| 3781 | `HYCOM User's Guide <http://www.hycom.org/hycom/documentation>`_,
|
|---|
| 3782 | chapter 3: The HYCOM Grid, sections 2.3: I/O File Formats in HYCOM,
|
|---|
| 3783 | and 5.1: File "regional.grid.[ab]".
|
|---|
| 3784 |
|
|---|
| 3785 | The temporal extent of this dataset is 11 November 2003 to several
|
|---|
| 3786 | days beyond the current date, with a time step of 1 day. The time
|
|---|
| 3787 | slices represent the instantaneous condition of the ocean estimated at
|
|---|
| 3788 | 00:00 UTC on each day.
|
|---|
| 3789 |
|
|---|
| 3790 | The HYCOM documentation states that HYCOM provides a five day forecast
|
|---|
| 3791 | and five day hindcast from the current date, although we have
|
|---|
| 3792 | regularly observed netCDF files on their servers that suggested this
|
|---|
| 3793 | window actually extends seven days in both directions. HYCOM revises
|
|---|
| 3794 | the data within this window daily, using the latest ocean observations
|
|---|
| 3795 | assimilated from buoys, satellites, and other sensors. Use caution
|
|---|
| 3796 | when working with time slices close to the current date, as it appears
|
|---|
| 3797 | that time slices continue to be revised until they are 7 days older
|
|---|
| 3798 | than the current date.
|
|---|
| 3799 |
|
|---|
| 3800 | Occasionally, HYCOM fails to generate data for a time slice,
|
|---|
| 3801 | presumably due to an outage or other problem in their data processing
|
|---|
| 3802 | infrastructure. For example, in 2004, HYCOM failed to generate data
|
|---|
| 3803 | for three of the 366 time slices of that year. Although HYCOM omits
|
|---|
| 3804 | these time slices from their server, this %(name)s represents them as
|
|---|
| 3805 | grids filled with the No Data value.
|
|---|
| 3806 |
|
|---|
| 3807 | The dataset's 4D variables are estimated at 33 depth levels: 0, 10,
|
|---|
| 3808 | 20, 30, 50, 75, 100, 125, 150, 200, 250, 300, 400, 500, 600, 700, 800,
|
|---|
| 3809 | 900, 1000, 1100, 1200, 1300, 1400, 1500, 1750, 2000, 2500, 3000, 3500,
|
|---|
| 3810 | 4000, 4500, 5000, and 5500 m.""")
|
|---|
| 3811 |
|
|---|
| 3812 | _HYCOMGLBa008Equatorial_References = _(
|
|---|
| 3813 | u"""Chassignet, E.P., Hurlburt, H.E., Metzger, E.J., Smedstad, O.M.,
|
|---|
| 3814 | Cummings, J.A., Halliwell, G.R., Bleck, R., Baraille, R., Wallcraft.,
|
|---|
| 3815 | A.J., Lozano, C., Tolman, H.L., Srinivasan, A., Hankin, S., Cornillon,
|
|---|
| 3816 | P., Weisberg, R., Barth, A., He, R., Werner, F. and Wilkin, J. (2009).
|
|---|
| 3817 | US GODAE: Global Ocean Prediction with the HYbrid Coordinate Ocean
|
|---|
| 3818 | Model (HYCOM). Oceanography, 22, 64-75.
|
|---|
| 3819 |
|
|---|
| 3820 | The HYCOM User's Guide and many other technical documents are
|
|---|
| 3821 | available on the
|
|---|
| 3822 | `HYCOM web site <http://www.hycom.org/hycom/documentation>`_.""")
|
|---|
| 3823 |
|
|---|
| 3824 | AddClassMetadata(HYCOMGLBa008Equatorial3D,
|
|---|
| 3825 | shortDescription=_(u'Represents a 3D variable of the equatorial (Mercator) region of HYCOM GLBa0.08 as a Grid Dataset.'),
|
|---|
| 3826 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'class'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References)
|
|---|
| 3827 |
|
|---|
| 3828 | # Constructor
|
|---|
| 3829 |
|
|---|
| 3830 | AddMethodMetadata(HYCOMGLBa008Equatorial3D.__init__,
|
|---|
| 3831 | shortDescription=_(u'Constructs a new HYCOMGLBa008Equatorial3D instance.'),
|
|---|
| 3832 | isExposedToPythonCallers=True,
|
|---|
| 3833 | dependencies=[PythonAggregatedModuleDependency('numpy')])
|
|---|
| 3834 |
|
|---|
| 3835 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'self',
|
|---|
| 3836 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGLBa008Equatorial3D),
|
|---|
| 3837 | description=_(u'HYCOMGLBa008Equatorial3D instance.'))
|
|---|
| 3838 |
|
|---|
| 3839 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'variableName',
|
|---|
| 3840 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'emp', u'mixed_layer_density', u'mixed_layer_salinity', u'mixed_layer_temperature', u'mixed_layer_thickness', u'mixed_layer_u_velocity', u'mixed_layer_v_velocity', u'qtot', u'ssh', u'surface_boundary_layer_thickness', u'surface_salinity_trend', u'surface_temperature_trend'], makeLowercase=True),
|
|---|
| 3841 | description=_(
|
|---|
| 3842 | u"""HYCOM 3D variable (dimensions x, y, and time), one of:
|
|---|
| 3843 |
|
|---|
| 3844 | * emp - Water flux into the ocean, in kg/m2/s.
|
|---|
| 3845 |
|
|---|
| 3846 | * mixed_layer_density - Density of the mixed layer, in sigma units.
|
|---|
| 3847 |
|
|---|
| 3848 | * mixed_layer_salinity - Salinity of the mixed layer, in psu.
|
|---|
| 3849 |
|
|---|
| 3850 | * mixed_layer_temperature - Temperature of the mixed layer, in degrees
|
|---|
| 3851 | C.
|
|---|
| 3852 |
|
|---|
| 3853 | * mixed_layer_thickness - Thickness of the mixed layer, in m.
|
|---|
| 3854 |
|
|---|
| 3855 | * mixed_layer_u_velocity - Eastward sea water velocity of the mixed
|
|---|
| 3856 | layer, in m/s.
|
|---|
| 3857 |
|
|---|
| 3858 | * mixed_layer_v_velocity - Northward sea water velocity of the mixed
|
|---|
| 3859 | layer, in m/s.
|
|---|
| 3860 |
|
|---|
| 3861 | * qtot - Surface downward heat flux, in w/m2.
|
|---|
| 3862 |
|
|---|
| 3863 | * ssh - Sea surface height, in m, above the HYCOM reference spheroid.
|
|---|
| 3864 |
|
|---|
| 3865 | * surface_boundary_layer_thickness - Thickness of the surface boundary
|
|---|
| 3866 | layer, in m.
|
|---|
| 3867 |
|
|---|
| 3868 | * surface_salinity_trend - Surface salinity trend, in psu/day.
|
|---|
| 3869 |
|
|---|
| 3870 | * surface_temperature_trend - Surface temperature trend, in degrees
|
|---|
| 3871 | C/day.
|
|---|
| 3872 |
|
|---|
| 3873 | Please see the HYCOM documentation for more information about these
|
|---|
| 3874 | variables."""),
|
|---|
| 3875 | arcGISDisplayName=_(u'HYCOM variable'))
|
|---|
| 3876 |
|
|---|
| 3877 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'extendYExtent',
|
|---|
| 3878 | typeMetadata=BooleanTypeMetadata(),
|
|---|
| 3879 | description=_(
|
|---|
| 3880 | u"""If this option is enabled, the northern extent of the HYCOM data
|
|---|
| 3881 | will be extended from 47 N to 60 N by interpolating values from the
|
|---|
| 3882 | bi-polar portion of HYCOM's grid.
|
|---|
| 3883 |
|
|---|
| 3884 | The northern extent of the Mercator region of HYCOM's grid is about 47
|
|---|
| 3885 | N. Above this latitude, HYCOM uses a complicated bi-polar projection
|
|---|
| 3886 | that cannot be represented by most GIS programs. Because of that, this
|
|---|
| 3887 | tool does not provide direct access to the bi-polar data above 47 N.
|
|---|
| 3888 | But if this option is enabled, the tool will extend the Mercator
|
|---|
| 3889 | region up to 60 N by interpolating values above 47 N from the bi-polar
|
|---|
| 3890 | region using the nearest neighbor algorithm. Under this scheme, the
|
|---|
| 3891 | value of each Mercator cell above 47 N will be copied from the
|
|---|
| 3892 | bi-polar cell that is closest in latitude and longitude. A nearest
|
|---|
| 3893 | neighbor algorithm was used for its computational simplicity and
|
|---|
| 3894 | efficiency and to preserve sharp gradients that would be smoothed out
|
|---|
| 3895 | by alternative techniques."""),
|
|---|
| 3896 | arcGISDisplayName=_(u'Extend northern extent of HYCOM data from 47 N to 60 N'),
|
|---|
| 3897 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3898 |
|
|---|
| 3899 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'timeout', HYCOMGLBa008Equatorial3D.__init__, u'timeout')
|
|---|
| 3900 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'maxRetryTime', HYCOMGLBa008Equatorial3D.__init__, u'maxRetryTime')
|
|---|
| 3901 | CopyArgumentMetadata(HYCOMGOMl0043D.__init__, u'cacheDirectory', HYCOMGLBa008Equatorial3D.__init__, u'cacheDirectory')
|
|---|
| 3902 |
|
|---|
| 3903 | AddResultMetadata(HYCOMGLBa008Equatorial3D.__init__, u'grid',
|
|---|
| 3904 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGLBa008Equatorial3D),
|
|---|
| 3905 | description=_(u'HYCOMGLBa008Equatorial3D instance.'))
|
|---|
| 3906 |
|
|---|
| 3907 | # Public method: HYCOMGLBa008Equatorial3D.CreateArcGISRasters
|
|---|
| 3908 |
|
|---|
| 3909 | AddMethodMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters,
|
|---|
| 3910 | shortDescription=_(u'Creates rasters for a 3D variable of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset.'),
|
|---|
| 3911 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 3912 | isExposedToPythonCallers=True,
|
|---|
| 3913 | isExposedByCOM=True,
|
|---|
| 3914 | isExposedAsArcGISTool=True,
|
|---|
| 3915 | arcGISDisplayName=_(u'Create Rasters for HYCOM GLBa0.08 Equatorial 3D Variable'),
|
|---|
| 3916 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\3D Variables'),
|
|---|
| 3917 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 3918 |
|
|---|
| 3919 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'cls',
|
|---|
| 3920 | typeMetadata=ClassOrClassInstanceTypeMetadata(cls=HYCOMGLBa008Equatorial3D),
|
|---|
| 3921 | description=_(u'HYCOMGLBa008Equatorial3D class or instance.'))
|
|---|
| 3922 |
|
|---|
| 3923 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'variableName', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'variableName')
|
|---|
| 3924 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'outputWorkspace', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'outputWorkspace')
|
|---|
| 3925 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'mode', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'mode')
|
|---|
| 3926 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'rasterNameExpressions', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'rasterNameExpressions')
|
|---|
| 3927 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'rasterCatalog', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'rasterCatalog')
|
|---|
| 3928 |
|
|---|
| 3929 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'rotationOffset',
|
|---|
| 3930 | typeMetadata=FloatTypeMetadata(canBeNone=True),
|
|---|
| 3931 | description=_(
|
|---|
| 3932 | u"""Distance to rotate the output rasters about the polar axis, in the
|
|---|
| 3933 | units specified by the Linear Units parameter. If not provided, the
|
|---|
| 3934 | output rasters will be centered on approximately 105.88 W.
|
|---|
| 3935 |
|
|---|
| 3936 | Use this parameter to shift the center longitude of the rasters to a
|
|---|
| 3937 | different location. Positive values shift it to the east, negative
|
|---|
| 3938 | values to the west. The rasters can only be rotated in whole grid
|
|---|
| 3939 | cells. The value you provide will be rounded off to the closest cell.
|
|---|
| 3940 |
|
|---|
| 3941 | For example, to center the rasters on the Prime Meridian, provide
|
|---|
| 3942 | 105.88 for this parameter and specify 'Degrees' for the Linear Unit
|
|---|
| 3943 | parameter. But because 105.88 is not evenly divisible by the the cell
|
|---|
| 3944 | size (0.08 degrees), it will be rounded to 105.92 and the central
|
|---|
| 3945 | meridian of the rasters will actually be 0.04, rather than 0."""),
|
|---|
| 3946 | arcGISDisplayName=_(u'Rotate raster by'),
|
|---|
| 3947 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3948 |
|
|---|
| 3949 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'extendYExtent', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'extendYExtent')
|
|---|
| 3950 |
|
|---|
| 3951 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'spatialExtent',
|
|---|
| 3952 | typeMetadata=EnvelopeTypeMetadata(canBeNone=True),
|
|---|
| 3953 | description=_(
|
|---|
| 3954 | u"""Spatial extent of the output rasters, in the units specified by
|
|---|
| 3955 | the Linear Units parameter.
|
|---|
| 3956 |
|
|---|
| 3957 | If you do not specify a spatial extent, it will default to
|
|---|
| 3958 | approximately 47 N to 66 S, (unless you enable the option that extends
|
|---|
| 3959 | the northernmost extent to 60 N). The rasters can only be clipped in
|
|---|
| 3960 | whole grid cells. The values you provide will be rounded off to the
|
|---|
| 3961 | closest cell."""),
|
|---|
| 3962 | arcGISDisplayName=_(u'Spatial extent'),
|
|---|
| 3963 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3964 |
|
|---|
| 3965 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'linearUnit')
|
|---|
| 3966 |
|
|---|
| 3967 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'startDate',
|
|---|
| 3968 | typeMetadata=DateTimeTypeMetadata(canBeNone=True),
|
|---|
| 3969 | description=_(
|
|---|
| 3970 | u"""Start date for the outputs to create.
|
|---|
| 3971 |
|
|---|
| 3972 | Outputs will be created for images that occur on or after the start
|
|---|
| 3973 | date and on or before the end date. The HYCOM GOMa0.08 dataset
|
|---|
| 3974 | provides a five-day forecast; its temporal extent ranges from 11
|
|---|
| 3975 | November 2003 to today's date plus five days. If you do not specify a
|
|---|
| 3976 | start date, 11 November 2003 will be used.
|
|---|
| 3977 |
|
|---|
| 3978 | The time component of the start date is ignored."""),
|
|---|
| 3979 | arcGISDisplayName=_(u'Start date'),
|
|---|
| 3980 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3981 |
|
|---|
| 3982 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'endDate',
|
|---|
| 3983 | typeMetadata=DateTimeTypeMetadata(canBeNone=True),
|
|---|
| 3984 | description=_(
|
|---|
| 3985 | u"""End date for the outputs to create.
|
|---|
| 3986 |
|
|---|
| 3987 | Outputs will be created for images that occur on or after the start
|
|---|
| 3988 | date and on or before the end date. The HYCOM GLBa0.08 dataset
|
|---|
| 3989 | provides a five-day forecast; its temporal extent ranges from 11
|
|---|
| 3990 | November 2003 to today's date plus five days. If you do not specify an
|
|---|
| 3991 | end date, the most recent day available will be used (typically
|
|---|
| 3992 | today's date plus five days).
|
|---|
| 3993 |
|
|---|
| 3994 | The time component of the end date is ignored."""),
|
|---|
| 3995 | arcGISDisplayName=_(u'End date'),
|
|---|
| 3996 | arcGISCategory=_(u'Spatiotemporal extent'))
|
|---|
| 3997 |
|
|---|
| 3998 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'timeout')
|
|---|
| 3999 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'maxRetryTime')
|
|---|
| 4000 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'cacheDirectory')
|
|---|
| 4001 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'calculateStatistics', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'calculateStatistics')
|
|---|
| 4002 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'buildPyramids', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'buildPyramids')
|
|---|
| 4003 |
|
|---|
| 4004 | CopyResultMetadata(HYCOMGOMl0043D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 4005 |
|
|---|
| 4006 | # Public method: HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters
|
|---|
| 4007 |
|
|---|
| 4008 | AddMethodMetadata(HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters,
|
|---|
| 4009 | shortDescription=_(u'Creates climatological rasters for a 3D variable of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset'),
|
|---|
| 4010 | longDescription=_(
|
|---|
| 4011 | u"""This tool produces rasters showing the climatological average
|
|---|
| 4012 | value (or other statistic) of a HYCOM GLBa0.08 3D variable. Given a
|
|---|
| 4013 | desired variable, a statistic, and a climatological bin definition,
|
|---|
| 4014 | this tool downloads daily images for the variable, classifies them
|
|---|
| 4015 | into bins, and produces a single raster for each bin. Each cell of the
|
|---|
| 4016 | raster is produced by calculating the statistic on the values of that
|
|---|
| 4017 | cell extracted from all of the rasters in the bin.
|
|---|
| 4018 |
|
|---|
| 4019 | """) + _HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 4020 | isExposedToPythonCallers=True,
|
|---|
| 4021 | isExposedByCOM=True,
|
|---|
| 4022 | isExposedAsArcGISTool=True,
|
|---|
| 4023 | arcGISDisplayName=_(u'Create Climatological Rasters for HYCOM GLBa0.08 Equatorial 3D Variable'),
|
|---|
| 4024 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\3D Variables'),
|
|---|
| 4025 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4026 |
|
|---|
| 4027 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'cls')
|
|---|
| 4028 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'variableName', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'variableName')
|
|---|
| 4029 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'statistic', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'statistic')
|
|---|
| 4030 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'binType', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'binType')
|
|---|
| 4031 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'outputWorkspace', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'outputWorkspace')
|
|---|
| 4032 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'mode', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'mode')
|
|---|
| 4033 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'rasterNameExpressions', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'rasterNameExpressions')
|
|---|
| 4034 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'binDuration', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'binDuration')
|
|---|
| 4035 | CopyArgumentMetadata(HYCOMGOMl0043D.CreateClimatologicalArcGISRasters, u'startDayOfYear', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'startDayOfYear')
|
|---|
| 4036 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'rotationOffset', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'rotationOffset')
|
|---|
| 4037 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'extendYExtent')
|
|---|
| 4038 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'spatialExtent', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'spatialExtent')
|
|---|
| 4039 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'linearUnit')
|
|---|
| 4040 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'startDate', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'startDate')
|
|---|
| 4041 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'endDate', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'endDate')
|
|---|
| 4042 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'timeout')
|
|---|
| 4043 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'maxRetryTime')
|
|---|
| 4044 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'cacheDirectory')
|
|---|
| 4045 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'calculateStatistics', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'calculateStatistics')
|
|---|
| 4046 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'buildPyramids', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'buildPyramids')
|
|---|
| 4047 |
|
|---|
| 4048 | CopyResultMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial3D.CreateClimatologicalArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 4049 |
|
|---|
| 4050 | # Public method: HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints
|
|---|
| 4051 |
|
|---|
| 4052 | AddMethodMetadata(HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints,
|
|---|
| 4053 | shortDescription=_(u'Interpolates 3D variables of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset at points.'),
|
|---|
| 4054 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 4055 | isExposedToPythonCallers=True,
|
|---|
| 4056 | isExposedByCOM=True,
|
|---|
| 4057 | isExposedAsArcGISTool=True,
|
|---|
| 4058 | arcGISDisplayName=_(u'Interpolate HYCOM GLBa0.08 Equatorial 3D Variables at Points'),
|
|---|
| 4059 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\3D Variables'),
|
|---|
| 4060 | dependencies=[ArcGISDependency(9, 1, requiresCOMInstantiation=True), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4061 |
|
|---|
| 4062 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'cls')
|
|---|
| 4063 |
|
|---|
| 4064 | AddArgumentMetadata(HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'variableNames',
|
|---|
| 4065 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(allowedValues=[u'emp', u'mixed_layer_density', u'mixed_layer_salinity', u'mixed_layer_temperature', u'mixed_layer_thickness', u'mixed_layer_u_velocity', u'mixed_layer_v_velocity', u'qtot', u'ssh', u'surface_boundary_layer_thickness', u'surface_salinity_trend', u'surface_temperature_trend'], makeLowercase=True), minLength=1),
|
|---|
| 4066 | description=_(
|
|---|
| 4067 | u"""HYCOM 3D variables to interpolate:
|
|---|
| 4068 |
|
|---|
| 4069 | * emp - Water flux into the ocean, in kg/m2/s.
|
|---|
| 4070 |
|
|---|
| 4071 | * mixed_layer_density - Density of the mixed layer, in sigma units.
|
|---|
| 4072 |
|
|---|
| 4073 | * mixed_layer_salinity - Salinity of the mixed layer, in psu.
|
|---|
| 4074 |
|
|---|
| 4075 | * mixed_layer_temperature - Temperature of the mixed layer, in degrees
|
|---|
| 4076 | C.
|
|---|
| 4077 |
|
|---|
| 4078 | * mixed_layer_thickness - Thickness of the mixed layer, in m.
|
|---|
| 4079 |
|
|---|
| 4080 | * mixed_layer_u_velocity - Eastward sea water velocity of the mixed
|
|---|
| 4081 | layer, in m/s.
|
|---|
| 4082 |
|
|---|
| 4083 | * mixed_layer_v_velocity - Northward sea water velocity of the mixed
|
|---|
| 4084 | layer, in m/s.
|
|---|
| 4085 |
|
|---|
| 4086 | * qtot - Surface downward heat flux, in w/m2.
|
|---|
| 4087 |
|
|---|
| 4088 | * ssh - Sea surface height, in m, above the HYCOM reference spheroid.
|
|---|
| 4089 |
|
|---|
| 4090 | * surface_boundary_layer_thickness - Thickness of the surface boundary
|
|---|
| 4091 | layer, in m.
|
|---|
| 4092 |
|
|---|
| 4093 | * surface_salinity_trend - Surface salinity trend, in psu/day.
|
|---|
| 4094 |
|
|---|
| 4095 | * surface_temperature_trend - Surface temperature trend, in degrees
|
|---|
| 4096 | C/day.
|
|---|
| 4097 |
|
|---|
| 4098 | Please see the HYCOM documentation for more information about these
|
|---|
| 4099 | variables.
|
|---|
| 4100 |
|
|---|
| 4101 | For each variable that you select, you must also specify a field of
|
|---|
| 4102 | the points to receive the interpolated value."""),
|
|---|
| 4103 | arcGISDisplayName=_(u'HYCOM variables to interpolate'))
|
|---|
| 4104 |
|
|---|
| 4105 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'points', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'points')
|
|---|
| 4106 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'valueFields', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'valueFields')
|
|---|
| 4107 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'tField', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'tField')
|
|---|
| 4108 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'method', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'method')
|
|---|
| 4109 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'extendYExtent')
|
|---|
| 4110 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'where', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'where')
|
|---|
| 4111 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'noDataValue', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'noDataValue')
|
|---|
| 4112 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'timeout', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'timeout')
|
|---|
| 4113 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'maxRetryTime', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'maxRetryTime')
|
|---|
| 4114 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'cacheDirectory', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'cacheDirectory')
|
|---|
| 4115 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'orderByFields', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'orderByFields')
|
|---|
| 4116 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory')
|
|---|
| 4117 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'xBlockSize', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'xBlockSize')
|
|---|
| 4118 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'yBlockSize', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'yBlockSize')
|
|---|
| 4119 | CopyArgumentMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'tBlockSize', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'tBlockSize')
|
|---|
| 4120 |
|
|---|
| 4121 | CopyResultMetadata(HYCOMGOMl0043D.InterpolateAtArcGISPoints, u'updatedPoints', HYCOMGLBa008Equatorial3D.InterpolateAtArcGISPoints, u'updatedPoints')
|
|---|
| 4122 |
|
|---|
| 4123 | ###############################################################################
|
|---|
| 4124 | # Metadata: _HYCOMGridGLBa0084D class
|
|---|
| 4125 | ###############################################################################
|
|---|
| 4126 |
|
|---|
| 4127 | AddClassMetadata(_HYCOMGridGLBa0084D,
|
|---|
| 4128 | shortDescription=_(u'An OPeNDAPGrid for a 4D variable of a HYCOM GOMl0.04 OPeNDAP URL.'),
|
|---|
| 4129 | longDescription=_(
|
|---|
| 4130 | u"""This class is intended for private use within GeoEco and is not
|
|---|
| 4131 | intended for external callers."""))
|
|---|
| 4132 |
|
|---|
| 4133 | ###############################################################################
|
|---|
| 4134 | # Metadata: HYCOMGLBa008Equatorial4D class
|
|---|
| 4135 | ###############################################################################
|
|---|
| 4136 |
|
|---|
| 4137 | AddClassMetadata(HYCOMGLBa008Equatorial4D,
|
|---|
| 4138 | shortDescription=_(u'Represents a 4D variable of the equatorial (Mercator) region of HYCOM GLBa0.08 as a Grid Dataset.'),
|
|---|
| 4139 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'class'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References)
|
|---|
| 4140 |
|
|---|
| 4141 | # Constructor
|
|---|
| 4142 |
|
|---|
| 4143 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.__init__,
|
|---|
| 4144 | shortDescription=_(u'Constructs a new HYCOMGLBa008Equatorial4D instance.'),
|
|---|
| 4145 | isExposedToPythonCallers=True,
|
|---|
| 4146 | dependencies=[PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4147 |
|
|---|
| 4148 | AddArgumentMetadata(HYCOMGLBa008Equatorial4D.__init__, u'self',
|
|---|
| 4149 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGLBa008Equatorial4D),
|
|---|
| 4150 | description=_(u'HYCOMGLBa008Equatorial4D instance.'))
|
|---|
| 4151 |
|
|---|
| 4152 | AddArgumentMetadata(HYCOMGLBa008Equatorial4D.__init__, u'variableName',
|
|---|
| 4153 | typeMetadata=UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature', u'u', u'v'], makeLowercase=True),
|
|---|
| 4154 | description=_(
|
|---|
| 4155 | u"""HYCOM 4D variable (dimensions x, y, depth, and time), one of:
|
|---|
| 4156 |
|
|---|
| 4157 | * salinity - Sea water salinity, in psu.
|
|---|
| 4158 |
|
|---|
| 4159 | * temperature - Sea water potential temperature, in degrees C.
|
|---|
| 4160 |
|
|---|
| 4161 | * u - Eastward sea water velocity, in m/s.
|
|---|
| 4162 |
|
|---|
| 4163 | * v - Northward sea water velocity, in m/s.
|
|---|
| 4164 |
|
|---|
| 4165 | Please see the HYCOM documentation for more information about these
|
|---|
| 4166 | variables."""),
|
|---|
| 4167 | arcGISDisplayName=_(u'HYCOM variable'))
|
|---|
| 4168 |
|
|---|
| 4169 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.__init__, u'extendYExtent', HYCOMGLBa008Equatorial4D.__init__, u'extendYExtent')
|
|---|
| 4170 |
|
|---|
| 4171 | CopyArgumentMetadata(HYCOMGOMl0044D.__init__, u'timeout', HYCOMGLBa008Equatorial4D.__init__, u'timeout')
|
|---|
| 4172 | CopyArgumentMetadata(HYCOMGOMl0044D.__init__, u'maxRetryTime', HYCOMGLBa008Equatorial4D.__init__, u'maxRetryTime')
|
|---|
| 4173 | CopyArgumentMetadata(HYCOMGOMl0044D.__init__, u'cacheDirectory', HYCOMGLBa008Equatorial4D.__init__, u'cacheDirectory')
|
|---|
| 4174 |
|
|---|
| 4175 | AddResultMetadata(HYCOMGLBa008Equatorial4D.__init__, u'grid',
|
|---|
| 4176 | typeMetadata=ClassInstanceTypeMetadata(cls=HYCOMGLBa008Equatorial4D),
|
|---|
| 4177 | description=_(u'HYCOMGLBa008Equatorial4D instance.'))
|
|---|
| 4178 |
|
|---|
| 4179 | # Public method: HYCOMGLBa008Equatorial4D.CreateArcGISRasters
|
|---|
| 4180 |
|
|---|
| 4181 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters,
|
|---|
| 4182 | shortDescription=_(u'Creates rasters for a 4D variable of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset.'),
|
|---|
| 4183 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 4184 | isExposedToPythonCallers=True,
|
|---|
| 4185 | isExposedByCOM=True,
|
|---|
| 4186 | isExposedAsArcGISTool=True,
|
|---|
| 4187 | arcGISDisplayName=_(u'Create Rasters for HYCOM GLBa0.08 Equatorial 4D Variable'),
|
|---|
| 4188 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\4D Variables'),
|
|---|
| 4189 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4190 |
|
|---|
| 4191 | AddArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cls',
|
|---|
| 4192 | typeMetadata=ClassOrClassInstanceTypeMetadata(cls=HYCOMGLBa008Equatorial4D),
|
|---|
| 4193 | description=_(u'HYCOMGLBa008Equatorial4D class or instance.'))
|
|---|
| 4194 |
|
|---|
| 4195 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.__init__, u'variableName', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'variableName')
|
|---|
| 4196 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'outputWorkspace', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'outputWorkspace')
|
|---|
| 4197 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'mode', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'mode')
|
|---|
| 4198 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'rasterNameExpressions', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rasterNameExpressions')
|
|---|
| 4199 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'rasterCatalog', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rasterCatalog')
|
|---|
| 4200 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'rotationOffset', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rotationOffset')
|
|---|
| 4201 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent')
|
|---|
| 4202 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'spatialExtent', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'spatialExtent')
|
|---|
| 4203 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'linearUnit')
|
|---|
| 4204 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'minDepth', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'minDepth')
|
|---|
| 4205 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxDepth', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxDepth')
|
|---|
| 4206 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'startDate', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'startDate')
|
|---|
| 4207 | CopyArgumentMetadata(HYCOMGLBa008Equatorial3D.CreateArcGISRasters, u'endDate', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'endDate')
|
|---|
| 4208 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'timeout')
|
|---|
| 4209 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxRetryTime')
|
|---|
| 4210 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cacheDirectory')
|
|---|
| 4211 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'calculateStatistics', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'calculateStatistics')
|
|---|
| 4212 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'buildPyramids', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'buildPyramids')
|
|---|
| 4213 |
|
|---|
| 4214 | CopyResultMetadata(HYCOMGOMl0044D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 4215 |
|
|---|
| 4216 | # Public method: HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters
|
|---|
| 4217 |
|
|---|
| 4218 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters,
|
|---|
| 4219 | shortDescription=_(u'Creates climatological rasters for a 4D variable of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset'),
|
|---|
| 4220 | longDescription=_(
|
|---|
| 4221 | u"""This tool produces rasters showing the climatological average
|
|---|
| 4222 | value (or other statistic) of a HYCOM GLBa0.08 4D variable. Given a
|
|---|
| 4223 | desired variable, a statistic, and a climatological bin definition,
|
|---|
| 4224 | this tool downloads daily images for each depth layer of the variable,
|
|---|
| 4225 | classifies them into bins, and produces a single raster for each bin.
|
|---|
| 4226 | Each cell of the raster is produced by calculating the statistic on
|
|---|
| 4227 | the values of that cell extracted from all of the rasters in the
|
|---|
| 4228 | bin.
|
|---|
| 4229 |
|
|---|
| 4230 | """) + _HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 4231 | isExposedToPythonCallers=True,
|
|---|
| 4232 | isExposedByCOM=True,
|
|---|
| 4233 | isExposedAsArcGISTool=True,
|
|---|
| 4234 | arcGISDisplayName=_(u'Create Climatological Rasters for HYCOM GLBa0.08 Equatorial 4D Variable'),
|
|---|
| 4235 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\4D Variables'),
|
|---|
| 4236 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4237 |
|
|---|
| 4238 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'cls')
|
|---|
| 4239 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'variableName', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'variableName')
|
|---|
| 4240 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'statistic', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'statistic')
|
|---|
| 4241 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'binType', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'binType')
|
|---|
| 4242 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'outputWorkspace', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'outputWorkspace')
|
|---|
| 4243 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'mode', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'mode')
|
|---|
| 4244 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'rasterNameExpressions', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'rasterNameExpressions')
|
|---|
| 4245 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'binDuration', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'binDuration')
|
|---|
| 4246 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateClimatologicalArcGISRasters, u'startDayOfYear', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'startDayOfYear')
|
|---|
| 4247 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rotationOffset', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'rotationOffset')
|
|---|
| 4248 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'extendYExtent')
|
|---|
| 4249 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'spatialExtent', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'spatialExtent')
|
|---|
| 4250 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'linearUnit')
|
|---|
| 4251 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'minDepth', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'minDepth')
|
|---|
| 4252 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxDepth', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'maxDepth')
|
|---|
| 4253 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'startDate', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'startDate')
|
|---|
| 4254 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'endDate', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'endDate')
|
|---|
| 4255 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'timeout')
|
|---|
| 4256 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'maxRetryTime')
|
|---|
| 4257 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'cacheDirectory')
|
|---|
| 4258 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'calculateStatistics', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'calculateStatistics')
|
|---|
| 4259 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'buildPyramids', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'buildPyramids')
|
|---|
| 4260 |
|
|---|
| 4261 | CopyResultMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial4D.CreateClimatologicalArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 4262 |
|
|---|
| 4263 | # Public method: HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses
|
|---|
| 4264 |
|
|---|
| 4265 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses,
|
|---|
| 4266 | shortDescription=_(u'Creates line feature classes representing the current vectors for the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset.'),
|
|---|
| 4267 | longDescription=_(
|
|---|
| 4268 | u"""The lines output by this tool are similar to those in a "quiver
|
|---|
| 4269 | plot". When displayed on a map, they can help visualize the direction
|
|---|
| 4270 | and speed of ocean currents. In ArcMap, select the "Arrow at End"
|
|---|
| 4271 | symbology. You may also want to reduce the line decoration (the arrow)
|
|---|
| 4272 | to a small size, such as 2.0.
|
|---|
| 4273 |
|
|---|
| 4274 | """) + _HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 4275 | isExposedToPythonCallers=True,
|
|---|
| 4276 | isExposedByCOM=True,
|
|---|
| 4277 | isExposedAsArcGISTool=True,
|
|---|
| 4278 | arcGISDisplayName=_(u'Create Current Vectors for HYCOM GLBa0.08 Equatorial Region'),
|
|---|
| 4279 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\4D Variables'),
|
|---|
| 4280 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4281 |
|
|---|
| 4282 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cls')
|
|---|
| 4283 |
|
|---|
| 4284 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'outputWorkspace', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'outputWorkspace')
|
|---|
| 4285 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'mode', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'mode')
|
|---|
| 4286 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'featureClassNameExpressions', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'featureClassNameExpressions')
|
|---|
| 4287 |
|
|---|
| 4288 | AddArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'scaleFactor',
|
|---|
| 4289 | typeMetadata=FloatTypeMetadata(mustBeGreaterThan=0.0),
|
|---|
| 4290 | description=_(
|
|---|
| 4291 | u"""Factor for scaling lines lengths.
|
|---|
| 4292 |
|
|---|
| 4293 | The length of each line is calculated by multiplying the magnitude of
|
|---|
| 4294 | the vector by this parameter. Use this parameter to scale the lines
|
|---|
| 4295 | output by this tool to lengths that are visually appealing. If the
|
|---|
| 4296 | lines are too short, they will resemble a grid of dots and you will
|
|---|
| 4297 | not be able to discern the flow of the vector field. If the lines are
|
|---|
| 4298 | too long, they will overlap each other and resemble a plate of
|
|---|
| 4299 | spaghetti.
|
|---|
| 4300 |
|
|---|
| 4301 | If the vectors all have about the same magnitude, then a good approach
|
|---|
| 4302 | is to scale the lines so that the longest one is about as long as the
|
|---|
| 4303 | raster cell size. But if there are a few very long vectors, then you
|
|---|
| 4304 | may prefer to scale the lines so that the average-length vector is as
|
|---|
| 4305 | long as the raster cell size.
|
|---|
| 4306 |
|
|---|
| 4307 | For HYCOM GLBa0.08 currents, the grid cell size is about 8900 m and
|
|---|
| 4308 | currents are given in m/s. So, if the maximum (or mean) velocity in
|
|---|
| 4309 | your region of interest is about 0.75 m/s:
|
|---|
| 4310 |
|
|---|
| 4311 | scale factor = 8900 / 0.75 = 11866.666666
|
|---|
| 4312 | """),
|
|---|
| 4313 | arcGISDisplayName=_(u'Scale factor'),
|
|---|
| 4314 | arcGISCategory=_(u'Vector options'))
|
|---|
| 4315 |
|
|---|
| 4316 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCurrentVectorsAsArcGISFeatureClasses, u'uniformLength', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'uniformLength')
|
|---|
| 4317 |
|
|---|
| 4318 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rotationOffset', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'rotationOffset')
|
|---|
| 4319 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'extendYExtent')
|
|---|
| 4320 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'spatialExtent', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'spatialExtent')
|
|---|
| 4321 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'linearUnit')
|
|---|
| 4322 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'minDepth', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'minDepth')
|
|---|
| 4323 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxDepth', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxDepth')
|
|---|
| 4324 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'startDate', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'startDate')
|
|---|
| 4325 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'endDate', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'endDate')
|
|---|
| 4326 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'timeout')
|
|---|
| 4327 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'maxRetryTime')
|
|---|
| 4328 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'cacheDirectory')
|
|---|
| 4329 |
|
|---|
| 4330 | CopyResultMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial4D.CreateCurrentVectorsAsArcGISFeatureClasses, u'updatedOutputWorkspace')
|
|---|
| 4331 |
|
|---|
| 4332 | # Public method: HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints
|
|---|
| 4333 |
|
|---|
| 4334 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints,
|
|---|
| 4335 | shortDescription=_(u'Interpolates 4D variables of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset at points.'),
|
|---|
| 4336 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _('\n\n**References**\n\n') + _HYCOMGLBa008Equatorial_References,
|
|---|
| 4337 | isExposedToPythonCallers=True,
|
|---|
| 4338 | isExposedByCOM=True,
|
|---|
| 4339 | isExposedAsArcGISTool=True,
|
|---|
| 4340 | arcGISDisplayName=_(u'Interpolate HYCOM GLBa0.08 Equatorial 4D Variables at Points'),
|
|---|
| 4341 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\4D Variables'),
|
|---|
| 4342 | dependencies=[ArcGISDependency(9, 1, requiresCOMInstantiation=True), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4343 |
|
|---|
| 4344 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'cls')
|
|---|
| 4345 |
|
|---|
| 4346 | AddArgumentMetadata(HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'variableNames',
|
|---|
| 4347 | typeMetadata=ListTypeMetadata(elementType=UnicodeStringTypeMetadata(allowedValues=[u'salinity', u'temperature', u'u', u'v'], makeLowercase=True), minLength=1),
|
|---|
| 4348 | description=_(
|
|---|
| 4349 | u"""HYCOM 4D variables to interpolate:
|
|---|
| 4350 |
|
|---|
| 4351 | * salinity - Sea water salinity, in psu.
|
|---|
| 4352 |
|
|---|
| 4353 | * temperature - Sea water potential temperature, in degrees C.
|
|---|
| 4354 |
|
|---|
| 4355 | * u - Eastward sea water velocity, in m/s.
|
|---|
| 4356 |
|
|---|
| 4357 | * v - Northward sea water velocity, in m/s.
|
|---|
| 4358 |
|
|---|
| 4359 | Please see the HYCOM documentation for more information about these
|
|---|
| 4360 | variables.
|
|---|
| 4361 |
|
|---|
| 4362 | For each variable that you select, you must also specify a field of
|
|---|
| 4363 | the points to receive the interpolated value."""),
|
|---|
| 4364 | arcGISDisplayName=_(u'HYCOM variables to interpolate'))
|
|---|
| 4365 |
|
|---|
| 4366 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'points', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'points')
|
|---|
| 4367 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'valueFields', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'valueFields')
|
|---|
| 4368 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'tField', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'tField')
|
|---|
| 4369 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'zField', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'zField')
|
|---|
| 4370 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'zValue', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'zValue')
|
|---|
| 4371 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'method', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'method')
|
|---|
| 4372 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'extendYExtent')
|
|---|
| 4373 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'where', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'where')
|
|---|
| 4374 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'noDataValue', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'noDataValue')
|
|---|
| 4375 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'timeout', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'timeout')
|
|---|
| 4376 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'maxRetryTime', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'maxRetryTime')
|
|---|
| 4377 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'cacheDirectory', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'cacheDirectory')
|
|---|
| 4378 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'orderByFields', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'orderByFields')
|
|---|
| 4379 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'numBlocksToCacheInMemory')
|
|---|
| 4380 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'xBlockSize', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'xBlockSize')
|
|---|
| 4381 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'yBlockSize', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'yBlockSize')
|
|---|
| 4382 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'zBlockSize', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'zBlockSize')
|
|---|
| 4383 | CopyArgumentMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'tBlockSize', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'tBlockSize')
|
|---|
| 4384 |
|
|---|
| 4385 | CopyResultMetadata(HYCOMGOMl0044D.InterpolateAtArcGISPoints, u'updatedPoints', HYCOMGLBa008Equatorial4D.InterpolateAtArcGISPoints, u'updatedPoints')
|
|---|
| 4386 |
|
|---|
| 4387 | # Public method: HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters
|
|---|
| 4388 |
|
|---|
| 4389 | AddMethodMetadata(HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters,
|
|---|
| 4390 | shortDescription=_(u'Creates rasters indicating the positions of fronts in the 2D slices of a 4D variable of the equatorial (Mercator) region of the HYCOM GLBa0.08 dataset using the Cayula and Cornillon (1992) single image edge detection (SIED) algorithm.'),
|
|---|
| 4391 | longDescription=_CayulaCornillonFrontsOverview + _(
|
|---|
| 4392 | u"""
|
|---|
| 4393 |
|
|---|
| 4394 | **The HYCOM GLBa0.08 Dataset**
|
|---|
| 4395 |
|
|---|
| 4396 | """) + _HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'} + _(
|
|---|
| 4397 | u"""
|
|---|
| 4398 |
|
|---|
| 4399 | **The SIED Algorithm**
|
|---|
| 4400 |
|
|---|
| 4401 | """) + _SIEDDescription + _(
|
|---|
| 4402 | u"""
|
|---|
| 4403 | **References**
|
|---|
| 4404 |
|
|---|
| 4405 | """) + _HYCOMGLBa008Equatorial_References + '\n\n' + _SIEDReferences,
|
|---|
| 4406 | isExposedToPythonCallers=True,
|
|---|
| 4407 | isExposedByCOM=True,
|
|---|
| 4408 | isExposedAsArcGISTool=True,
|
|---|
| 4409 | arcGISDisplayName=_(u'Find Cayula-Cornillon Fronts in HYCOM GLBa0.08 Equatorial 4D Variable'),
|
|---|
| 4410 | arcGISToolCategory=_(u'Data Products\\HYCOM Consortium\\HYCOM + NCODA Global 1/12 Degree Analysis (GLBa0.08)\\Equatorial Region (47 N to 66 S)\\4D Variables'),
|
|---|
| 4411 | dependencies=[ArcGISDependency(9, 1), PythonAggregatedModuleDependency('numpy')])
|
|---|
| 4412 |
|
|---|
| 4413 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cls', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'cls')
|
|---|
| 4414 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'variableName', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'variableName')
|
|---|
| 4415 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPopMeanDifference', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPopMeanDifference')
|
|---|
| 4416 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWorkspace', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWorkspace')
|
|---|
| 4417 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'mode', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'mode')
|
|---|
| 4418 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'rasterNameExpressions', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'rasterNameExpressions')
|
|---|
| 4419 |
|
|---|
| 4420 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'medianFilterWindowSize', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'medianFilterWindowSize')
|
|---|
| 4421 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowSize', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'histogramWindowSize')
|
|---|
| 4422 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'histogramWindowStride', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'histogramWindowStride')
|
|---|
| 4423 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPropNonMaskedCells', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPropNonMaskedCells')
|
|---|
| 4424 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minPopProp', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minPopProp')
|
|---|
| 4425 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minTheta', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minTheta')
|
|---|
| 4426 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minSinglePopCohesion', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minSinglePopCohesion')
|
|---|
| 4427 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minGlobalPopCohesion', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minGlobalPopCohesion')
|
|---|
| 4428 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'threads', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'threads')
|
|---|
| 4429 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'fillHoles', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'fillHoles')
|
|---|
| 4430 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'thin', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'thin')
|
|---|
| 4431 | CopyArgumentMetadata(CayulaCornillonEdgeDetection.DetectEdgesInSingleImage, u'minSize', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minSize')
|
|---|
| 4432 |
|
|---|
| 4433 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'rotationOffset', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'rotationOffset')
|
|---|
| 4434 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'extendYExtent')
|
|---|
| 4435 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'spatialExtent', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'spatialExtent')
|
|---|
| 4436 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'linearUnit', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'linearUnit')
|
|---|
| 4437 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minDepth', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'minDepth')
|
|---|
| 4438 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'maxDepth', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'maxDepth')
|
|---|
| 4439 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'startDate', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'startDate')
|
|---|
| 4440 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'endDate', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'endDate')
|
|---|
| 4441 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'timeout', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'timeout')
|
|---|
| 4442 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxRetryTime', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'maxRetryTime')
|
|---|
| 4443 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cacheDirectory', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'cacheDirectory')
|
|---|
| 4444 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'calculateStatistics', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'calculateStatistics')
|
|---|
| 4445 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'buildRAT', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'buildRAT')
|
|---|
| 4446 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'buildPyramids', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'buildPyramids')
|
|---|
| 4447 |
|
|---|
| 4448 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputCandidateCounts', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputCandidateCounts')
|
|---|
| 4449 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputFrontCounts', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputFrontCounts')
|
|---|
| 4450 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWindowStatusCodes', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWindowStatusCodes')
|
|---|
| 4451 | CopyArgumentMetadata(HYCOMGOMl0044D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWindowStatusValues', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'outputWindowStatusValues')
|
|---|
| 4452 |
|
|---|
| 4453 | CopyResultMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'updatedOutputWorkspace', HYCOMGLBa008Equatorial4D.CreateCayulaCornillonFrontsAsArcGISRasters, u'updatedOutputWorkspace')
|
|---|
| 4454 |
|
|---|
| 4455 | ###############################################################################
|
|---|
| 4456 | # Names exported by this module
|
|---|
| 4457 | ###############################################################################
|
|---|
| 4458 |
|
|---|
| 4459 | __all__ = ['HYCOMGOMl0043D', 'HYCOMGOMl0044D', 'HYCOMGLBa008Equatorial3D', 'HYCOMGLBa008Equatorial4D']
|
|---|