| | 187 | AvisoGriddedGeostrophicCurrents.CreateArcGISRasters(username, password, product, u'u', avisoCurrentsDirectory, rasterNameExpressions=['u', '%%Y', 'u%%Y%%j0000.img'], startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 188 | AvisoGriddedGeostrophicCurrents.CreateArcGISRasters(username, password, product, u'v', avisoCurrentsDirectory, rasterNameExpressions=['v', '%%Y', 'v%%Y%%j0000.img'], startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 189 | |
| | 190 | # Record in the Simulation.ini file that we downloaded some |
| | 191 | # currents and then project, snap, and clip them to the |
| | 192 | # projection, extent, and cell size of the reef IDs raster. |
| | 193 | |
| | 194 | cls._FinishLoadingCurrents(simulationDirectory, u'Aviso ' + product, u'Center', 86400, avisoCurrentsDirectory, u'setnull( inputRaster > 1000000 || inputRaster < -1000000, inputRaster / 100)') # Use Map Algebra to Convert from cm/s to to m/s and mask bogus values introduced by ArcGIS |
| | 195 | |
| | 196 | # Return successfully. |
| | 197 | |
| | 198 | return simulationDirectory |
| | 199 | |
| | 200 | @classmethod |
| | 201 | def LoadOSCARCurrentsIntoSimulation(cls, simulationDirectory, startDate, endDate, timeout=60, maxRetryTime=120, cacheDirectory=None): |
| | 202 | cls.__doc__.Obj.ValidateMethodInvocation() |
| | 203 | |
| | 204 | # Parse and validate the Simulation.ini file. |
| | 205 | |
| | 206 | scp, crosses180, currentsLoaded, currentsProduct = cls._ReadCurrentsInfoFromSimulationINI(simulationDirectory) |
| | 207 | |
| | 208 | # If the simulation already has currents loaded in it from a |
| | 209 | # different product, report an error. |
| | 210 | |
| | 211 | if currentsLoaded and currentsProduct != u'OSCAR': |
| | 212 | Logger.RaiseException(ValueError(_(u'Cannot load OSCAR currents data into the simulation in directory %(dir)s because that simulation already has %(prod2)s currents data loaded into it. You can load additional %(prod2)s data, if you like, but to use OSCAR data, you must create a new simulation.') % {u'dir': simulationDirectory, u'prod2': currentsProduct})) |
| | 213 | |
| | 214 | # First, download and create OSCAR current rasters in an |
| | 215 | # OSCAR-specific directory. These will have the OSCAR |
| | 216 | # projection, extent, and cell size. We still need to project |
| | 217 | # them to the simulation's projection, extent, and cell size. |
| | 218 | # |
| | 219 | # TODO: Need to handle rotation? |
| | 220 | |
| | 221 | oscarCurrentsDirectory = os.path.join(simulationDirectory, 'OriginalOSCARCurrents') |
| | 222 | OSCAR5DayThirdDegreeCurrents.CreateArcGISRasters(u'u', oscarCurrentsDirectory, rasterNameExpressions=['u', '%%Y', 'u%%Y%%j0000.img'], startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 223 | OSCAR5DayThirdDegreeCurrents.CreateArcGISRasters(u'v', oscarCurrentsDirectory, rasterNameExpressions=['v', '%%Y', 'v%%Y%%j0000.img'], startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 224 | |
| | 225 | # Record in the Simulation.ini file that we downloaded some |
| | 226 | # currents and then project, snap, and clip them to the |
| | 227 | # projection, extent, and cell size of the reef IDs raster. |
| | 228 | |
| | 229 | cls._FinishLoadingCurrents(simulationDirectory, u'OSCAR', u'Center', 6*86400, oscarCurrentsDirectory) |
| | 230 | |
| | 231 | # Return successfully. |
| | 232 | |
| | 233 | return simulationDirectory |
| | 234 | |
| | 235 | @classmethod |
| | 236 | def LoadHYCOMGOMl0044DCurrentsIntoSimulation(cls, simulationDirectory, startDate, endDate, depth=0., timeout=600, maxRetryTime=None, cacheDirectory=None): |
| | 237 | cls.__doc__.Obj.ValidateMethodInvocation() |
| | 238 | |
| | 239 | # Parse and validate the Simulation.ini file. |
| | 240 | |
| | 241 | scp, crosses180, currentsLoaded, currentsProduct = cls._ReadCurrentsInfoFromSimulationINI(simulationDirectory) |
| | 242 | |
| | 243 | # If the simulation already has currents loaded in it from a |
| | 244 | # different product or depth, report an error. |
| | 245 | |
| | 246 | if currentsLoaded and currentsProduct != u'HYCOM GOMl0.04 ' + unicode(int(depth)) + u' m': |
| | 247 | Logger.RaiseException(ValueError(_(u'Cannot load %(prod1)s currents data into the simulation in directory %(dir)s because that simulation already has %(prod2)s currents data loaded into it. You can load additional %(prod2)s data, if you like, but to use %(prod1)s data, you must create a new simulation.') % {u'dir': simulationDirectory, u'prod1': u'HYCOM GOMl0.04 ' + unicode(int(depth)) + u' m', u'prod2': currentsProduct})) |
| | 248 | |
| | 249 | # First, download and create HYCOM current rasters in a |
| | 250 | # HYCOM-specific directory. These will have the HYCOM |
| | 251 | # projection, extent, and cell size. We still need to project |
| | 252 | # them to the simulation's projection, extent, and cell size. |
| | 253 | |
| | 254 | hycomCurrentsDirectory = os.path.join(simulationDirectory, 'OriginalHYCOMCurrents') |
| | 255 | HYCOMGOMl0044D.CreateArcGISRasters(u'u', hycomCurrentsDirectory, rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s%%Y%%j0000.img'], minDepth=depth, maxDepth=depth, startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 256 | HYCOMGOMl0044D.CreateArcGISRasters(u'v', hycomCurrentsDirectory, rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s%%Y%%j0000.img'], minDepth=depth, maxDepth=depth, startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 257 | |
| | 258 | # Record in the Simulation.ini file that we downloaded some |
| | 259 | # currents and then project, snap, and clip them to the |
| | 260 | # projection, extent, and cell size of the reef IDs raster. |
| | 261 | |
| | 262 | cls._FinishLoadingCurrents(simulationDirectory, u'HYCOM GOMl0.04 ' + unicode(int(depth)) + u' m', u'Center', 86400, hycomCurrentsDirectory) |
| | 263 | |
| | 264 | # Return successfully. |
| | 265 | |
| | 266 | return simulationDirectory |
| | 267 | |
| | 268 | @classmethod |
| | 269 | def LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation(cls, simulationDirectory, startDate, endDate, depth=0., extendYExtent=False, timeout=60, maxRetryTime=120, cacheDirectory=None): |
| | 270 | cls.__doc__.Obj.ValidateMethodInvocation() |
| | 271 | |
| | 272 | # Parse and validate the Simulation.ini file. |
| | 273 | |
| | 274 | scp, crosses180, currentsLoaded, currentsProduct = cls._ReadCurrentsInfoFromSimulationINI(simulationDirectory) |
| | 275 | |
| | 276 | # If the simulation already has currents loaded in it from a |
| | 277 | # different product or depth, report an error. |
| | 278 | |
| | 279 | if currentsLoaded and currentsProduct != u'HYCOM GLBa0.08 Equatorial ' + unicode(int(depth)) + u' m': |
| | 280 | Logger.RaiseException(ValueError(_(u'Cannot load %(prod1)s currents data into the simulation in directory %(dir)s because that simulation already has %(prod2)s currents data loaded into it. You can load additional %(prod2)s data, if you like, but to use %(prod1)s data, you must create a new simulation.') % {u'dir': simulationDirectory, u'prod1': u'HYCOM GLBa0.08 Equatorial ' + unicode(int(depth)) + u' m', u'prod2': currentsProduct})) |
| | 281 | |
| | 282 | # First, download and create HYCOM current rasters in a |
| | 283 | # HYCOM-specific directory. These will have the HYCOM |
| | 284 | # projection, extent, and cell size. We still need to project |
| | 285 | # them to the simulation's projection, extent, and cell size. |
| | 286 | |
| | 287 | hycomCurrentsDirectory = os.path.join(simulationDirectory, 'OriginalHYCOMCurrents') |
| | 288 | HYCOMGLBa008Equatorial4D.CreateArcGISRasters(u'u', hycomCurrentsDirectory, rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s%%Y%%j0000.img'], extendYExtent=extendYExtent, minDepth=depth, maxDepth=depth, startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 289 | HYCOMGLBa008Equatorial4D.CreateArcGISRasters(u'v', hycomCurrentsDirectory, rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s%%Y%%j0000.img'], extendYExtent=extendYExtent, minDepth=depth, maxDepth=depth, startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| | 290 | |
| | 291 | # Record in the Simulation.ini file that we downloaded some |
| | 292 | # currents and then project, snap, and clip them to the |
| | 293 | # projection, extent, and cell size of the reef IDs raster. |
| | 294 | |
| | 295 | cls._FinishLoadingCurrents(simulationDirectory, u'HYCOM GLBa0.08 Equatorial ' + unicode(int(depth)) + u' m', u'Center', 86400, hycomCurrentsDirectory) |
| | 296 | |
| | 297 | # Return successfully. |
| | 298 | |
| | 299 | return simulationDirectory |
| | 300 | |
| | 301 | @classmethod |
| | 302 | def _FinishLoadingCurrents(cls, simulationDirectory, currentsProduct, currentsDateType, maxSecondsBetweenCurrentsImages, originalCurrentsDirectory, mapAlgebraExpression=None): |
| | 303 | |
| | 304 | # Write the Simulation.ini file, so that any new rasters |
| | 305 | # loaded into the simulation must be from the same product and |
| | 306 | # depth. |
| | 307 | |
| | 308 | scp.set(u'Simulation', u'CurrentsLoaded', unicode(True)) |
| | 309 | scp.set(u'Simulation', u'CurrentsProduct', currentsProduct) |
| | 310 | scp.set(u'Simulation', u'CurrentsDateType', currentsDateType) |
| | 311 | scp.set(u'Simulation', u'MaxSecondsBetweenCurrentsImages', unicode(maxSecondsBetweenCurrentsImages)) |
| | 312 | f = file(os.path.join(simulationDirectory, u'Simulation.ini'), 'w') |
| 252 | | |
| 253 | | # Return successfully. |
| 254 | | |
| 255 | | return simulationDirectory |
| 256 | | |
| 257 | | @classmethod |
| 258 | | def LoadHYCOMGOMl0044DCurrentsIntoSimulation(cls, simulationDirectory, startDate, endDate, depth=0., timeout=600, maxRetryTime=None, cacheDirectory=None): |
| 259 | | cls.__doc__.Obj.ValidateMethodInvocation() |
| 260 | | |
| 261 | | # Parse and validate the Simulation.ini file. |
| 262 | | |
| 263 | | scp, crosses180, currentsLoaded, currentsProduct = cls._ReadCurrentsInfoFromSimulationINI(simulationDirectory) |
| 264 | | |
| 265 | | # If the simulation already has currents loaded in it from a |
| 266 | | # different product or depth, report an error. |
| 267 | | |
| 268 | | if currentsLoaded and currentsProduct != u'HYCOM GOMl0.04 ' + unicode(int(depth)) + u' m': |
| 269 | | Logger.RaiseException(ValueError(_(u'Cannot load %(prod1)s currents data into the simulation in directory %(dir)s because that simulation already has %(prod2)s currents data loaded into it. You can load additional %(prod2)s data, if you like, but to use %(prod1)s data, you must create a new simulation.') % {u'dir': simulationDirectory, u'prod1': u'HYCOM GOMl0.04 ' + unicode(int(depth)) + u' m', u'prod2': currentsProduct})) |
| 270 | | |
| 271 | | # First, download and create HYCOM current rasters in a |
| 272 | | # HYCOM-specific directory. These will have the HYCOM |
| 273 | | # projection, extent, and cell size. We still need to project |
| 274 | | # them to the simulation's projection, extent, and cell size. |
| 275 | | |
| 276 | | hycomCurrentsDirectory = os.path.join(simulationDirectory, 'OriginalHYCOMCurrents') |
| 277 | | try: |
| 278 | | HYCOMGOMl0044D.CreateArcGISRasters(u'u', hycomCurrentsDirectory, rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s%%Y%%j0000.img'], minDepth=depth, maxDepth=depth, startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| 279 | | HYCOMGOMl0044D.CreateArcGISRasters(u'v', hycomCurrentsDirectory, rasterNameExpressions=['%(VariableName)s', '%%Y', '%(VariableName)s%%Y%%j0000.img'], minDepth=depth, maxDepth=depth, startDate=startDate, endDate=endDate, timeout=timeout, maxRetryTime=maxRetryTime, cacheDirectory=cacheDirectory) |
| 280 | | |
| 281 | | # If we created any rasters, record in the Simulation.ini file |
| 282 | | # that we got some, so that any new rasters loaded into the |
| 283 | | # simulation must be from the same product and depth. |
| 284 | | |
| 285 | | finally: |
| 286 | | import glob |
| 287 | | if len(glob.glob(os.path.join(os.path.join(hycomCurrentsDirectory, u'u', u'*', u'u[0-9][0-9][0-9][0-9][0-9][0-9][0-9]0000.img')))) > 0: |
| 288 | | scp.set(u'Simulation', u'CurrentsLoaded', unicode(True)) |
| 289 | | scp.set(u'Simulation', u'CurrentsProduct', u'HYCOM GOMl0.04 ' + unicode(int(depth)) + u' m') |
| 290 | | scp.set(u'Simulation', u'CurrentsDateType', u'Center') |
| 291 | | scp.set(u'Simulation', u'MaxSecondsBetweenCurrentsImages', unicode(86400)) |
| 292 | | f = file(os.path.join(simulationDirectory, u'Simulation.ini'), 'w') |
| 293 | | try: |
| 294 | | scp.write(f) |
| 295 | | finally: |
| 296 | | try: |
| 297 | | f.close() |
| 298 | | except: |
| 299 | | pass |
| 300 | | |
| 301 | | # Obtain the projection, extent, and cell size of the reef IDs |
| 302 | | # raster, so we can project, snap, and clip the currents |
| 303 | | # rasters to match it. |
| 304 | | |
| 305 | | from GeoEco.ArcGIS import GeoprocessorManager |
| 306 | | gp = GeoprocessorManager.GetWrappedGeoprocessor() |
| 307 | | |
| 308 | | describeReefIDsRaster = gp.Describe(os.path.join(simulationDirectory, u'ReefData', u'reef_ids')) |
| 309 | | reefIDsRasterCS = gp.CreateSpatialReference(describeReefIDsRaster.SpatialReference).split(';')[0] |
| 310 | | reefIDsRasterLeft, reefIDsRasterBottom, reefIDsRasterRight, reefIDsRasterTop = EnvelopeTypeMetadata.ParseFromArcGISString(describeReefIDsRaster.Extent) |
| 311 | | reefIDsCellSize = describeReefIDsRaster.MeanCellWidth |
| 312 | | |
| 313 | | # Use a GeoEco function that calls Project_management to |
| 314 | | # project, snap, and clip the rasters all in one step. |
| 315 | | |
| 316 | | from GeoEco.DataManagement.ArcGISRasters import ArcGISRaster |
| 317 | | |
| 318 | | oldGPExtent = gp.Extent |
| 319 | | gp.Extent = describeReefIDsRaster.Extent |
| 320 | | try: |
| 321 | | ArcGISRaster.FindAndProjectClipAndOrExecuteMapAlgebra(hycomCurrentsDirectory, |
| 322 | | os.path.join(simulationDirectory, u'Currents'), |
| 323 | | projectedCoordinateSystem=reefIDsRasterCS, |
| 324 | | resamplingTechnique=u'BILINEAR', |
| 325 | | projectedCellSize=reefIDsCellSize, |
| 326 | | registrationPoint=u'%g %g' % (reefIDsRasterLeft, reefIDsRasterBottom), |
| 327 | | wildcard=u'*.img', |
| 328 | | searchTree=True, |
| 329 | | outputRasterPythonExpression=u'os.path.join(outputWorkspace, os.path.splitext(inputRaster[len(workspaceToSearch)+1:])[0])', |
| 330 | | modulesToImport=[u'os'], |
| 331 | | skipExisting=True) |
| 332 | | |
| 333 | | # Reset the geoprocessing extent environment setting to |
| 334 | | # whatever the caller had before. |
| 335 | | |
| 336 | | finally: |
| 337 | | if oldGPExtent is not None: |
| 338 | | gp.Extent = oldGPExtent |
| 339 | | |
| 340 | | # Return successfully. |
| 341 | | |
| 342 | | return simulationDirectory |
| | 1095 | # Public method: CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation |
| | 1096 | |
| | 1097 | AddMethodMetadata(CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, |
| | 1098 | shortDescription=_(u'Downloads NOAA OSCAR 5-day unfiltered 1/3 degree ocean surface currents into a coral reef connectivity simulation.'), |
| | 1099 | longDescription=_OSCAR_LongDescription % {u'name': 'tool'}, |
| | 1100 | isExposedToPythonCallers=True, |
| | 1101 | isExposedByCOM=True, |
| | 1102 | isExposedAsArcGISTool=True, |
| | 1103 | arcGISDisplayName=_(u'Load OSCAR Currents Into Coral Reef Connectivity Simulation'), |
| | 1104 | arcGISToolCategory=_(u'Connectivity Analysis\\Coral Reef Larval Connectivity'), |
| | 1105 | dependencies=[ArcGISDependency(9, 2), ArcGISExtensionDependency(u'spatial'), PythonAggregatedModuleDependency('numpy')]) |
| | 1106 | |
| | 1107 | CopyArgumentMetadata(CoralReefConnectivity.CreateSimulationFromArcGISRasters, u'cls', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'cls') |
| | 1108 | |
| | 1109 | AddArgumentMetadata(CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'simulationDirectory', |
| | 1110 | typeMetadata=DirectoryTypeMetadata(mustExist=True), |
| | 1111 | description=_( |
| | 1112 | u"""Existing coral reef connectivity simulation directory that should |
| | 1113 | recieve the OSCAR currents data. |
| | 1114 | |
| | 1115 | The directory must have been created using the Create Coral Reef |
| | 1116 | Connectivity Simulation tool. |
| | 1117 | |
| | 1118 | If you have already loaded OSCAR currents data into the simulation, |
| | 1119 | you can use this tool to add data for an additional range of dates. If |
| | 1120 | you try to load data for a range of dates that have been already |
| | 1121 | loaded into the simulation, the downloads for those dates will be |
| | 1122 | skipped."""), |
| | 1123 | arcGISDisplayName=_(u'Simulation directory to recieve OSCAR currents data')) |
| | 1124 | |
| | 1125 | CopyArgumentMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'startDate', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'startDate') |
| | 1126 | CopyArgumentMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'endDate', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'endDate') |
| | 1127 | CopyArgumentMetadata(OSCAR5DayThirdDegreeCurrents.CreateArcGISRasters, u'timeout', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'timeout') |
| | 1128 | CopyArgumentMetadata(OSCAR5DayThirdDegreeCurrents.CreateArcGISRasters, u'maxRetryTime', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'maxRetryTime') |
| | 1129 | CopyArgumentMetadata(OSCAR5DayThirdDegreeCurrents.CreateArcGISRasters, u'cacheDirectory', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'cacheDirectory') |
| | 1130 | |
| | 1131 | CopyResultMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'updatedSimulationDirectory', CoralReefConnectivity.LoadOSCARCurrentsIntoSimulation, u'updatedSimulationDirectory') |
| | 1132 | |
| | 1204 | |
| | 1205 | # Public method: CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation |
| | 1206 | |
| | 1207 | AddMethodMetadata(CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, |
| | 1208 | shortDescription=_(u'Downloads HYCOM GLBa0.08 ocean currents into a coral reef connectivity simulation.'), |
| | 1209 | longDescription=_HYCOMGLBa008Equatorial_LongDescription % {u'name': 'tool'}, |
| | 1210 | isExposedToPythonCallers=True, |
| | 1211 | isExposedByCOM=True, |
| | 1212 | isExposedAsArcGISTool=True, |
| | 1213 | arcGISDisplayName=_(u'Load HYCOM GLBa0.08 Currents Into Coral Reef Connectivity Simulation'), |
| | 1214 | arcGISToolCategory=_(u'Connectivity Analysis\\Coral Reef Larval Connectivity'), |
| | 1215 | dependencies=[ArcGISDependency(9, 2), ArcGISExtensionDependency(u'spatial'), PythonAggregatedModuleDependency('numpy')]) |
| | 1216 | |
| | 1217 | CopyArgumentMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'cls', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'cls') |
| | 1218 | |
| | 1219 | AddArgumentMetadata(CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'simulationDirectory', |
| | 1220 | typeMetadata=DirectoryTypeMetadata(mustExist=True), |
| | 1221 | description=_( |
| | 1222 | u"""Existing coral reef connectivity simulation directory that should |
| | 1223 | recieve the currents. |
| | 1224 | |
| | 1225 | The directory must have been created using the Create Coral Reef |
| | 1226 | Connectivity Simulation tool. |
| | 1227 | |
| | 1228 | If you have already loaded HYCOM GLBa0.08 currents into the |
| | 1229 | simulation, you can use this tool to add currents for an additional |
| | 1230 | range of dates so long as they are for the same depth as the original |
| | 1231 | currents. If you try to add a different currents product to the |
| | 1232 | simulation (e.g. geostrophic currents from Aviso), or for a different |
| | 1233 | depth, this tool will report an error. |
| | 1234 | |
| | 1235 | If you try to load data for a range of dates that have been already |
| | 1236 | loaded into the simulation, the downloads for those dates will be |
| | 1237 | skipped. There is no way to delete or overwrite the data that has |
| | 1238 | already been loaded into the simulation. If you want to overwrite your |
| | 1239 | existing data (e.g. you want to switch to using a different depth), |
| | 1240 | you must create a new simulation."""), |
| | 1241 | arcGISDisplayName=_(u'Simulation directory to recieve HYCOM currents')) |
| | 1242 | |
| | 1243 | CopyArgumentMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'startDate', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'startDate') |
| | 1244 | CopyArgumentMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'endDate', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'endDate') |
| | 1245 | |
| | 1246 | AddArgumentMetadata(CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'depth', |
| | 1247 | typeMetadata=FloatTypeMetadata(allowedValues=[0., 10., 20., 30., 50., 75., 100., 125., 150., 200., 250., 300., 400., 500., 600., 700., 800., 900., 1000., 1100., 1200., 1300., 1400., 1500., 1750., 2000., 2500., 3000., 3500., 4000., 4500., 5000., 5500.]), |
| | 1248 | description=_( |
| | 1249 | u"""HYCOM depth layer to download currents from. |
| | 1250 | |
| | 1251 | This tool was designed primarily to study larvae that float at or near |
| | 1252 | the surface. The default depth is 0. If you are studying larvae that |
| | 1253 | stay submerged, you can choose a deeper depth, but be aware of two |
| | 1254 | important points: |
| | 1255 | |
| | 1256 | * This tool assumes the larvae remain at that depth for the entire |
| | 1257 | simulation. It does not implement vertical migration or other |
| | 1258 | behaviors that might be appropriate for your species. A newer |
| | 1259 | version of this tool, to be released in 2012, will support vertical |
| | 1260 | migration. |
| | 1261 | |
| | 1262 | * Be aware that the spatial extent of available currents data will |
| | 1263 | shrink as depth increases. For example, if you choose a deep depth |
| | 1264 | such as 250 m, there will be no data available for regions close to |
| | 1265 | shore because the ocean is typically shallower than 250 m in those |
| | 1266 | regions. |
| | 1267 | """), |
| | 1268 | arcGISDisplayName=_(u'Minimum depth')) |
| | 1269 | |
| | 1270 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'extendYExtent', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'extendYExtent') |
| | 1271 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'timeout', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'timeout') |
| | 1272 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'maxRetryTime', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'maxRetryTime') |
| | 1273 | CopyArgumentMetadata(HYCOMGLBa008Equatorial4D.CreateArcGISRasters, u'cacheDirectory', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'cacheDirectory') |
| | 1274 | |
| | 1275 | CopyResultMetadata(CoralReefConnectivity.LoadAvisoGeostrophicCurrentsIntoSimulation, u'updatedSimulationDirectory', CoralReefConnectivity.LoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation, u'updatedSimulationDirectory') |