Skip to Content.

mget-help - [mget-help] Trouble Running MGET on AWS cloud

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


[mget-help] Trouble Running MGET on AWS cloud


Chronological Thread 
  • From: Stephanie Gad <>
  • To: "" <>
  • Subject: [mget-help] Trouble Running MGET on AWS cloud
  • Date: Tue, 17 Jan 2017 23:09:39 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Dear MGET Help, 

Hello my name is Stephanie Gad -- I am working on a project using MGET for my Masters thesis at the Bren School of Environmental Science and Management, UC Santa Barbara. I have been working on this model with Dr. Ben Best and we consulted with Dr. Jason Roberts at the early stages of this project. We have been making great progress with our model but have hit a major roadblock. We have successfully installed MGET on our school computers (Windows 7, running on ArcGIS 10.3) and have been running the model multiple times for our larval fish data using a python script. Due to a short time schedule, we are trying to speed up our modeling by utilizing the Amazon Cloud server. For some reason, when trying to run the same script, with the same softwares installed as our school computers,  the AWS cloud (Windows 2012) gets hung up on reading habitat patch data on the  the LarvalDispersalRunSimulation2012 tool. 

We would greatly appreciate any thoughts you have on addressing these errors. We are really excited about this MGET model and want to make sure we can use it to the best of its capability for our project! Please let me know if any additional information is needed to understand our problem. I've also attached a copy of our script. Thanks for your time.

Best, 
Stephanie 


Stephanie Gad

Master’s Student | Class of 2017

Bren School of Environmental Science & Management

University of California, Santa Barbara (UCSB)

| 714-606-5204

Attachment: error_Mess.png
Description: error_Mess.png

# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# model_test_BSB.py
# Created on: 2016-12-01 13:52:12.00000
# (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcgisscripting, shutil, os, csv
gp = arcgisscripting.create()
gp.AddToolbox('C:\\Program Files\\GeoEco\\ArcGISToolbox\\Marine Geospatial
Ecology Tools.tbx', 'GeoEco')

watermask_tif =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\Rasters\\ecorgn_water_ga83e_steph_val.tif"
cache_dir =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\MGETdata\\MGET_Cache"
runs_csv =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\runs_todo_AWS.csv"

# read in csv with runs per row and variables per column
csv_file = open(runs_csv, 'r')
runs = csv.DictReader(csv_file)

# iterate over runs
for run in runs:
# assign variables
for var in run.keys():
globals()[var] = run[var]

# set species-specific paths
print sp
reefid_tif =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\Rasters\\nda_{species}\\{species}_reefid.tif".format(species=sp)
pctcover_tif =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\Rasters\\nda_{species}\\{species}_pct_m_n.tif".format(species=sp)
simulation_dir =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\{prefix}_{species}_{suffix}_simulation".format(prefix=pfx,
species=sp, suffix=sfx)
results_dir =
"G:\\Team_Folders\\Steph\\scripts\\AWS_Test\\{prefix}_{species}_{suffix}_results".format(prefix=pfx,
species=sp, suffix=sfx)

# Process: Create Larval Dispersal Simulation From ArcGIS Rasters
print ' LarvalDispersalCreateSimulationFromArcGISRasters_GeoEco ->',
simulation_dir
if os.path.isdir(simulation_dir):
shutil.rmtree(simulation_dir)
gp.LarvalDispersalCreateSimulationFromArcGISRasters_GeoEco(
simulation_dir, reefid_tif, pctcover_tif, watermask_tif, "false")

# Process: Load HYCOM GLBa0.08 Currents Into Larval Dispersal Simulation
print '
LarvalDispersalLoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation_GeoEco ->',
cache_dir
endDate = datetime.datetime.strptime(startDate, "%m/%d/%Y") +
datetime.timedelta(days=int(durationDays))

gp.LarvalDispersalLoadHYCOMGLBa0084DEquatorialCurrentsIntoSimulation_GeoEco(
simulation_dir, startDate, endDate, "0", "false", "CUBIC", "Del2a",
"120", "240", cache_dir)

# Process: Run Larval Dispersal Simulation (2012 Algorithm)
print ' LarvalDispersalRunSimulation2012_GeoEco ->', results_dir
if os.path.isdir(results_dir):
shutil.rmtree(results_dir)
os.mkdir(results_dir)
gp.LarvalDispersalRunSimulation2012_GeoEco(
simulation_dir, results_dir, startDate, durationDays, "0.5",
simulationTimeStep, "", "", "0.8", "false", "", "1680;1681;1615;1616", "",
"1")

# Process: Visualize Larval Dispersal Simulation Results (2012 Algorithm)
print ' LarvalDispersalVisualizeResults2012_GeoEco ->', results_dir
gp.LarvalDispersalVisualizeResults2012_GeoEco(
simulation_dir, results_dir, "output.gdb", "", "", "false",
"0.00001", "false", "true", "0.00001", "Quantity")

csv_file.close()


Archive powered by MHonArc 2.6.19.

Top of Page