Strange issue running version 8.0.3 in Ubuntu 22.04 and Ubuntu server 22.04

16 views
Skip to first unread message

Adrian Ghilardi

unread,
Feb 23, 2025, 9:35:04 AMFeb 23
to Dinamica EGO
Dear Hermann or anyone else.

We are running Dinamica's linux version 8.0.3. in a PC (Ubuntu 22.04) and a server (Ubuntu server 22.04). 

The models in both cases are pulled from a GitHub repo so we need the working version of the scripts to run on both computers. This is indeed the case for all 9 scripts except for one tiny detail that breaks everything apart. 

One of my scripts uses the Determine Weights of Evidence Ranges functor, and the explicative variables are elevation, rivers, roads and slope. However, in the skeleton of the functor in the Ubuntu PC, it shows "layer" for elevation and "layer_0" for slope. When I try to run exactly the same script in Ubuntu server, it fails and asks me to manually change "elevation(layer)" to "elevation(layer_0)", and all scripts run ok from cradle to grave. All good with slope(layer_0) in both computers (!?). Does it have to do with the metadata of the input rasters?

The only workabout i found is to automatically detect ubuntu vs ubuntu server and run separate scripts in each case but it is inelegant and i need to use two scripts instead of one which will complicate future changes.

Can I adjust the layer/layer_0 naming? 

Thanks in advance for any tip
Adrian Ghilardi
UNAM Mexico

Hermann Oliveira Rodrigues

unread,
Feb 23, 2025, 9:53:24 PMFeb 23
to Dinamica EGO
Hi, Adrian,

Could the input maps be generated through different processes at times? Or is it possible that the model is using input maps from different sources depending on where it is running? If so, that could explain the variation in layer names.

Regarding layer naming, Dinamica assigns default names to input map layers in the format layer_0, layer_1, etc. Only specific functors, such as CalcDistanceMap and CalcWOfEProbabilityMap, explicitly rename their output layers. When loading a map without predefined layer names, Dinamica always falls back to its default naming convention.

Notably, if a layer is named simply layer (without an underscore and a number), it must have been explicitly set at some point in the process.

If needed, you can use a submodel like Set Layer Names or an external tool to define layer names explicitly. This ensures consistency across different environments.

Best,

Hermann

--
You received this message because you are subscribed to the Google Groups "Dinamica EGO" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dinamica-ego...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dinamica-ego/CAAjYHc3wnEOPEf%3DenkzqM6qPzEkmvUE53OhaeYSX3n45_Q_WdA%40mail.gmail.com.

Adrian Ghilardi

unread,
Feb 25, 2025, 10:19:59 AMFeb 25
to Dinamica EGO, Roberto Rangel Heras, Rob Bailis
Dear Hermann, it worked!!!

I followed this lead: "Notably, if a layer is named simply layer (without an underscore and a number), it must have been explicitly set at some point in the process."

The input .tif files that are ingested by Dinamica EGO 8.0.3 (Linux) are generated upstream in R using the raster package. For some reason, this package assigns different raster names on the PC and the server. To resolve this inconsistency, I upgraded all the R code to use Terra and explicitly set the conflicting .tif names to "layer_0" using: 
names(DEM_r_m) <- "layer_0". 
This wasn't possible with raster as Dinamica kept reading them as "layer".

So grateful for your fast and clear response. 
Abraços
Adrian







 


Reply all
Reply to author
Forward
0 new messages