ariesteam / aries

http://www.ariesonline.org
GNU General Public License v3.0
6 stars 1 forks source link

flood flow model issue #11

Closed kbagstad closed 12 years ago

kbagstad commented 13 years ago

OK, maybe I just need to try your new model (when you get it in) but I tried running model -o foo.nc core.models.flood-puget/flood-regulation-residents-500 core.contexts.beta/wria9_2048 (with the DS factor up to 3, as I suggested in my email) and get:

Running FloodWaterMovement flow model.
Source points: 203927
Sink points:   27
Use points:    8021
Operating in 500 year floodplain.
Finding nearest stream points...done. [Shifted 0 ids]
Finding nearest stream points...done. [Shifted 8020 ids]
Computing flood activation factors...
Application start failed.
java.lang.ArithmeticException: Divide by zero
        at clojure.lang.Numbers.divide(Numbers.java:142)
        at clj_misc.utils$progress_bar__1020.invoke(utils.clj:369)
        at clj_span.models.flood_water$flood_activation_factors__3225.invoke(flood_water.clj:259)
        at clj_span.models.flood_water$fn__3271.invoke(flood_water.clj:309)
        at clojure.lang.MultiFn.invoke(MultiFn.java:227)
        at clj_span.core$run_simulation__2381.invoke(core.clj:146)
        at clj_span.core$generate_results_map__2393.invoke(core.clj:191)
        at clojure.lang.AFn.applyToHelper(AFn.java:261)
        at clojure.lang.AFn.applyTo(AFn.java:165)
        at clojure.core$apply__2869.doInvoke(core.clj:374)
        at clojure.lang.RestFn.invoke(RestFn.java:550)
        at clj_span.core$run_span__2465.invoke(core.clj:273)
        at clj_span.aries_span_bridge$span_driver__5386.invoke(aries_span_bridge.clj:275)
        at aries$get_span_proxy__3564$fn__3566.invoke(aries-core.clj:25)
        at clojure.proxy.java.lang.Object$SPANProxy.runSPAN(Unknown Source)
        at org.integratedmodelling.aries.core.implementations.observations.SPANTransformer.transform(SPANTransformer.java:161)
        at org.integratedmodelling.corescience.context.ObservationContext.processTransformations(ObservationContext.java:719)
        at org.integratedmodelling.corescience.context.ObservationContext.processTransformations(ObservationContext.java:637)
        at org.integratedmodelling.corescience.context.ObservationContext.run(ObservationContext.java:758)
        at org.integratedmodelling.corescience.ObservationFactory.contextualize(ObservationFactory.java:73)
        at org.integratedmodelling.modelling.model.ModelFactory$ContextualizingModelResult.getResult(ModelFactory.java:253)
        at org.integratedmodelling.modelling.commands.ModelCommand.execute(ModelCommand.java:188)
        at org.integratedmodelling.thinklab.command.CommandManager.submitCommand(CommandManager.java:144)
        at org.integratedmodelling.thinklab.commandline.Shell.startConsole(Shell.java:114)
        at org.integratedmodelling.thinklab.shell.ShellApplication.startApplication(ShellApplication.java:130)
        at org.java.plugin.boot.Boot.boot(Boot.java:346)
        at org.java.plugin.boot.Boot.main(Boot.java:243)
lambdatronic commented 12 years ago

Foo

lambdatronic commented 12 years ago

This issue had to do with a degenerate case bug in the clj-misc.utils/progress-bar function, which would throw this exception if it was asked to create a progress bar for the assessment of an empty list. This was patched this past summer, so I'm closing it now.