ariesteam / aries

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

sediment issues #12

Closed kbagstad closed 13 years ago

kbagstad commented 13 years ago

On to the sediment model... 2 issues.

1) I replaced:

(defmodel farmers-deposition-use-puget DepositionProneFarmers
(binary-coding DepositionProneFarmers :context ((ranking nlcd:NLCDNumeric :as farmlandpresent) (categorization geofeatures:Floodplain :as floodplains)) :state #(if (and (= (:floodplains %) 1.0) (= (:farmland-present %) 82.0)) 1 0)))

With this: (defmodel farmers-deposition-use-puget DepositionProneFarmers (binary-coding DepositionProneFarmers :context (floodplains farmland) :state #(if (and (= (tl/conc 'soilRetentionEcology:InFloodplain) (:in-floodplain)) (= (tl/conc 'soilRetentionEcology:FarmlandPresent) (:farmland-present))) 1 0)))

And used model -d core.models.sediment-puget/farmers-deposition-use-puget, which was throwing an unintelligible error message earlier, and now is giving the following, ideas appreciated:

Unupported filter: Filter.INCLUDE
Jun 24, 2011 9:32:56 PM org.geotools.xml.impl.AttributeEncodeExecutor visit
WARNING: results[ class java.lang.String ] is not of type class net.opengis.wfs.ResultTypeType
Jun 24, 2011 9:32:56 PM org.geotools.xml.impl.AttributeEncodeExecutor visit
WARNING: Binding: {http://www.opengis.net/ows}ServiceType does not declare a target type
Jun 24, 2011 9:32:56 PM org.geotools.xml.impl.AttributeEncodeExecutor visit
WARNING: Binding: {http://www.opengis.net/wfs}Base_TypeNameListType does not declare a target type
Jun 24, 2011 9:32:56 PM org.geotools.xml.impl.AttributeEncodeExecutor visit
WARNING: Binding: {http://www.opengis.net/wfs}TypeNameListType does not declare a target type
2011-06-24 21:33:50,466 [main] INFO  org.integratedmodelling.geospace.Geospace rasterized 2 features
WCS URL: http://ecoinformatics.uvm.edu/geoserver/wcs?service=WCS&version=1.0.0&request=GetCoverage&coverage=usa:nlcd_1&bbox=-122.47,47.08,-121.27,47.63&crs=EPSG:4326&responseCRS=EPSG:4326&width=1024&height=470&format=geotiff
Application start failed.
org.integratedmodelling.thinklab.exception.ThinklabRuntimeException: java.lang.IllegalArgumentException: Wrong number of args passed to: sediment-puget$eval--16739$fn
        at org.integratedmodelling.modelling.data.adapters.ClojureAccessor.getValue(ClojureAccessor.java:273)
        at org.integratedmodelling.corescience.compiler.VMContextualizer.run(VMContextualizer.java:276)
        at org.integratedmodelling.corescience.compiler.Contextualizer$RunContext.run(Contextualizer.java:39)
        at javax.realtime.MemoryArea.executeInArea(Unknown Source)
        at javolution.context.ConcurrentThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Wrong number of args passed to: sediment-puget$eval--16739$fn
        at clojure.lang.AFn.throwArity(AFn.java:450)
        at clojure.lang.AFn.invoke(AFn.java:53)
        at org.integratedmodelling.modelling.data.adapters.ClojureAccessor.getValue(ClojureAccessor.java:270)
        ... 4 more

2) for some strange reason, model -d core.models.sediment-puget/source-puget core.contexts.beta/wria9_1024 produces valid-looking star diagrams, yet when I model -o source-puget, only the slope-stability and percent-vegetation-cover input layers have any data in them. Can you run and see if it's possible to replicate that?

fvilla commented 13 years ago

it's a syntax error (IllegalArgument makes quite a bit of sense). Lines like (:in-floodplain) are illegal - the keyword (:xxx) extracts the given element from the following map, so they should read (:in-floodplain %) - the % is a map containing all the values for the current context. Note also that those won't work in the second model, because you didn't put in the :as in the context to define those names. r.

fvilla commented 13 years ago

moving the other issue into its own place - these are individual issues, not emails. People see them.