Skip to Content.

mget-help - Re: [mget-help] Error in Run Larval Dispersal Simulation (MGET 2.7): Undefined function or variable "ULfull"

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


Re: [mget-help] Error in Run Larval Dispersal Simulation (MGET 2.7): Undefined function or variable "ULfull"


Chronological Thread 
  • From: Stephanie Gad <>
  • To: Jason Roberts <>
  • Cc: "" <>, "" <>, Ben Best <>
  • Subject: Re: [mget-help] Error in Run Larval Dispersal Simulation (MGET 2.7): Undefined function or variable "ULfull"
  • Date: Thu, 9 Jun 2016 21:37:23 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Hi Jason, 


Thank you so much for your help! We were able to run the third tool with your instructions!  We'll be starting the 4th tool soon, then hopefully jumping in with our data. If you don't mind, we'd love to stay in touch as we continue through the modeling of our project. 


Thank you again for all of your help!


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


From: Ben Best <>
Sent: Thursday, June 9, 2016 10:36:29 AM
To: Jason Roberts
Cc: Stephanie Gad; ;
Subject: Re: [mget-help] Error in Run Larval Dispersal Simulation (MGET 2.7): Undefined function or variable "ULfull"
 
Awesome, thanks so much Jason!

Will be game to help debug when I return from Galapagos early July.

Ben

On Thu, Jun 9, 2016 at 6:25 AM, Jason Roberts <> wrote:

Hi Stephanie,

 

Sorry for the delay. Thanks for your simulation directory. I am able to reproduce the problem and am investigating.

 

Currently I suspect this is a bug in the tool relating to a calculation performed from the start date of the simulation. You can work around the problem by specifying a start date of 9/20/2011 rather than 9/20/2011 1:57:50 PM. Basically, just delete the time component of the date. The starting time will be 00:00:00 (midnight) when the time component is not specified. When I left this out, the simulation completed. It took 2 minutes, 15 seconds on my computer. (This was only the 3 day simulation so increasing it to a longer value will take longer..)

 

Let me know if that will work for you. Meanwhile I will investigate why the start time causes the tool to fail.

 

Thanks,

Jason

 

 

Hi Jason, 

 

Thank you for getting back to us so quickly!

 

I've uploaded the entire G:\Steph\Modeling\Simulation  to box.com and included the link. Please let me know if you have any difficulty viewing it. 

https://ucsb.box.com/s/cfrbzwfrqmi9lore5tgb3aal5kry0sup

 

I first ran the tool with the Time Step: 1 and received the message: 

Warning: The stability condition is 0.776747, which is greater than 2 ^ -1/2 =

0.707106. The simulation MAY NOT be numerically stable and the output results

MAY NOT be correct. To fix this problem, reduce the simulation time step to

0.037931 days or less.

Which is why I chose the value 0.037931

I tried increasing the time step to 0.5 and then decreasing it to 0.25 while setting the Summarization Period to 96 (I've attached the python script) and reran the model.  I've included the error message below. 

 

Thank you so much for your time. 

 

Best, 

Stephanie

 

Executing (Run Larval Dispersal Simulation (2012 Algorithm)): LarvalDispersalRunSimulation2012 G:\Steph\Modeling\Simulation G:\Steph\Modeling\ResultsDirectory "9/20/2011 1:57:50 PM" 3 0.25 96 # # 0.8 false # # # 50

Start Time: Thu Jun 02 13:40:30 2016

Running script LarvalDispersalRunSimulation2012...

Reading habitat patch data...

Reading 8 ocean currents images...

Finished reading: 0:00:00 elapsed, 8 images read, 0:00:00.058500 per image.

The stability condition is 0.194187, which is less than or equal to 2 ^ -1/2 = 0.707106. The simulation will be numerically stable.

Simulating larval dispersal for 44 larval source patches...

python.exe: RuntimeError: ??? Undefined function or variable "ULfull".

python.exe:

python.exe: Error in ==> DisperseLarvae2012 at 449

The following consequences resulted from the original error:

Execution of C:\Python27\ArcGIS10.3\python.exe failed.

Failed script LarvalDispersalRunSimulation2012...

 

Traceback (most recent call last):

  File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts\LarvalDispersalRunSimulation2012.py", line 5, in <module>

    ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.Connectivity.LarvalDispersal', 'LarvalDispersal', 'RunSimulation2012')

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\ArcGISScripts.py", line 210, in ExecuteMethodFromCommandLineAsArcGISTool

    exec sourceCode in globals(), locals()

  File "<string>", line 1, in <module>

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\Connectivity\LarvalDispersal.py", line 1089, in RunSimulation2012

    maxRunTime=None)

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\DataManagement\Processes.py", line 575, in ExecuteProgram

    process.Execute()

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\DataManagement\Processes.py", line 498, in Execute

    Logger.RaiseException(RuntimeError(_(u'%(name)s returned exit code %(code)i, indicating failure.') % {u'name' : programName, u'code' : self.ExitCode}))

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\Logging.py", line 104, in RaiseException

    raise exception

RuntimeError: python.exe returned exit code 1, indicating failure.

 

Failed to execute (Run Larval Dispersal Simulation (2012 Algorithm)).

Failed at Thu Jun 02 13:40:33 2016 (Elapsed Time: 2.19 seconds)

 

 


Hey Ben and Stephanie,

 

Thanks for giving the new larval dispersal code a try. That error is most likely a bug in the tool. I looked at the code but can’t figure it out without more information. Could you please send me the entire G:\Steph\Modeling\Simulation directory as a zip file? It will probably be too big to send through email. Please use dropbox or a similar service.

 

Here are some hints:

 

The Time Step you are using, 0.037931 hours, is a strange value (where did it come from?) and very small relative to what you actually need to run the simulation. This is indicated by the stability condition 0.029463 being much smaller than 1/sqrt(2). By having it so small, the numerical calculations will be ultra-stable but the simulation will take an inordinately long time to execute. Try increasing it to 0.5. If the tool issues a warning saying the simulation might not be stable, decrease it to 0.25.

 

Next, set the Summarization Period to something other than 24. You should adjust it based on the Time Step; see the documentation and the blog post for details. You probably want summaries to be produced every 12 or 24 hours. To do that, if your Time Step is 0.25, you should set the Summarization Period to 48 or 96, respectively.

 

There’s a chance that when you adjust the Time Step to something larger, the bug will go away. Please send me the simulation directory anyway, if it’s not too much trouble. The error still probably indicates a bug in the tool. Even if it is caused by the very small time step, the tool should still not fail with this error.

 

Best,

Jason

 

From: [mailto:] On Behalf Of Ben Best
Sent: Thursday, June 2, 2016 1:07 PM
To:
Cc: Stephanie Gad <>;
Subject: [mget-help] Error in Run Larval Dispersal Simulation (MGET 2.7): Undefined function or variable "ULfull"

 

CC: Stephanie Gad, GRAYSREEF

 

Hi Jason,

 

A Bren School master's group project is evaluating the connectivity of Gray's Reef National Marine Sanctuary. Andre turned them onto the Schill et al (2015) paper and they're diving in now with your latest in progress tutorial New larval connectivity modeling tools. I helped them get setup with all the dependencies, including Matlab runtime component and now they're running into the following error using the tutorial data:

 

python.exe: RuntimeError: ??? Undefined function or variable "ULfull".

 

Any tips? I tried replacing the Matlab script:

 

C:\Python27\ArcGIS10.3\Lib\site-packages\GeoEco\Matlab\FunctionsMatlab_mcr\build\src\GeoEco\Matlab\Functions.matlab\DisperseLarvae2012.m

 

with the newer:

 

 

but the C:\ location seems to need a compiled version, since it complains of version information not bein embedded.

 

Any other tips?

 

Thanks very much, Ben

 

PS Model of tools exported as model.py attached for parameter reference.

 

PPS Rest of error message below....

 

Executing (Run Larval Dispersal Simulation (2012 Algorithm)): LarvalDispersalRunSimulation2012 G:\Steph\Modeling\Simulation G:\Steph\Modeling\ResultsDirectory "9/20/2011 1:57:50 PM" 3 0.037931 24 # # 0.8 false # # # 50

Start Time: Thu Jun 02 09:49:06 2016

Running script LarvalDispersalRunSimulation2012...

Reading habitat patch data...

Reading 8 ocean currents images...

Finished reading: 0:00:00 elapsed, 8 images read, 0:00:00.060375 per image.

The stability condition is 0.029463, which is less than or equal to 2 ^ -1/2 = 0.707106. The simulation will be numerically stable.

Simulating larval dispersal for 44 larval source patches...

python.exe: RuntimeError: ??? Undefined function or variable "ULfull".

python.exe:

python.exe: Error in ==> DisperseLarvae2012 at 449

The following consequences resulted from the original error:

Execution of C:\Python27\ArcGIS10.3\python.exe failed.

Failed script LarvalDispersalRunSimulation2012...

 

Traceback (most recent call last):

  File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts\LarvalDispersalRunSimulation2012.py", line 5, in <module>

    ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.Connectivity.LarvalDispersal', 'LarvalDispersal', 'RunSimulation2012')

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\ArcGISScripts.py", line 210, in ExecuteMethodFromCommandLineAsArcGISTool

    exec sourceCode in globals(), locals()

  File "<string>", line 1, in <module>

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\Connectivity\LarvalDispersal.py", line 1089, in RunSimulation2012

    maxRunTime=None)

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\DataManagement\Processes.py", line 575, in ExecuteProgram

    process.Execute()

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\DataManagement\Processes.py", line 498, in Execute

    Logger.RaiseException(RuntimeError(_(u'%(name)s returned exit code %(code)i, indicating failure.') % {u'name' : programName, u'code' : self.ExitCode}))

  File "C:\Python27\ArcGIS10.3\lib\site-packages\GeoEco\Logging.py", line 104, in RaiseException

    raise exception

RuntimeError: python.exe returned exit code 1, indicating failure.

 

Failed to execute (Run Larval Dispersal Simulation (2012 Algorithm)).

Failed at Thu Jun 02 09:49:09 2016 (Elapsed Time: 3.42 seconds)

 





Archive powered by MHonArc 2.6.19.

Top of Page