Status of LUE#

File format#

TODO

Modelling operations#

Currently, PCRaster contains implementations of more modelling operations than LUE. Over time more operations will be added to LUE. Here we compare the list of PCRaster operations with the current set of operations implemented in LUE. When planning to port a PCRaster model to LUE, it is a good idea to compare the information in the next table with the operations used by the model.

Here we only mention LUE operations that implement an operation that is also in PCRaster. LUE also contains other operations, not listed here.

If an operation used in a PCRaster model is not available in LUE yet, it is a good idea to report it to the project team. Various factors determine the order in which operations are added to the LUE framework. The number of model developers requesting one is one of them.

Note

A LUE operation that implements an operation that is also in PCRaster may be different from the PCRaster operation. It may be named different, it may accept different arguments, or accept them in a different order. We provide a special module that can be used to quickly port PCRaster model by hiding these differences as much as possible.

Table 1 Legend#

βœ…

LUE supports this PCRaster operation, or an operation like it. It may be that the LUE operation is named differently, that it supports different parameters, or that it accepts parameters in a different order.

❌

This PCRaster operations is not considered yet. It may be in the future.

πŸ—‘

This PCRaster operation is considered, but skipped. See notes for reason.

1, 2, 3

Guesstimate of the amount of effort required to add it:
1 little, 2 somewhat, 3 serious.
This is only relevant for operations that have not been added yet.

Table 2 Status of LUE operations vs PCRaster operations#

PCRaster

LUE

Notes

+

βœ…

-

βœ…

subtract and negate

/ or div

βœ…

div is only part of lue.pcraster

*

βœ…

**

βœ…

abs

βœ…

abs with non-spatial expression is not available

accucapacityflux
accucapacitystate

❌

1

accuflux

βœ…

not yet in Python package
accuflux with non-spatial material is not available

accufractionflux accufractionstate

βœ…

accu_fraction
accu_fraction with non-spatial material and non-spatial transport fraction is not available

accuthresholdflux
accuthresholdstate

βœ…

accu_threshold3
accu_threshold with non-spatial material and non-spatial threshold is not available

accutriggerflux
accutriggerstate

❌

1

accutraveltimestate
accutraveltimeflux
accutraveltimeremoved

❌

2

accutraveltimefractionstate
accutraveltimefractionflux
accutraveltimefractionremoved

❌

2

acos

βœ…

and, &, pcrand

βœ…

argorder
argorderwithid

❌

?

argorderaddarealimited
argorderwithidaddarealimited

❌

?

argorderarealimited
argorderwithidarealimited

❌

?

areaarea

βœ…

zonal_area
Returns the number of cells per class

areaaverage

βœ…

zonal_mean

areadiversity

βœ…

zonal_diversity

areamajority

βœ…

zonal_majority

areamaximum

βœ…

zonal_maximum

areaminimum

βœ…

zonal_minimum

areanormal

βœ…

zonal_normal

areaorder

❌

1

areatotal

βœ…

zonal_sum

areauniform

βœ…

zonal_uniform
Returned values are in range [0, 1)

asin

βœ…

aspect

βœ…

atan

βœ…

boolean

βœ…

boolean with non-spatial argument is not available

catchment

❌

2

catchmenttotal

❌

1

cellarea

❌

1

celllength

❌

1

clump

βœ…

LUE has support for diagonal and nondiagonal connectivity. Use diagonal connectivity to get the same behaviour as PCRaster’s clump.

cos

βœ…

cover

❌

1

defined

βœ…

directional

πŸ—‘

LUE currently does not support value scales.

downstream

βœ…

downstreamdist

βœ…

dynwavestate
dynwaveflux
lookuppotential
lookupstate \

❌

3

dynamicwave

❌

3

eq or ==

βœ…

exp

βœ…

extentofview

❌

2

fac

❌

1

ge or >=

βœ…

gt or >

βœ…

horizontan

❌

1

idiv, //

❌

1

if then

βœ…

if then else

βœ…

influencesimplegauss

❌

?

inversedistance

❌

2

kinematic

βœ…

kinematic_wave
The nrTimeSlices argument is removed.
Negative values for the the discharge, lateral inflow and channel length arguments result in no-data values in the result (Github issue 524)

kinwavestate
kinwaveflux

❌

?

ldd

πŸ—‘

LUE currently does not support value scales.

lddcreate

βœ…

The operation assumes the DEM passed in is sound: depressions are filled and flats are handled.

lddcreatedem

❌

3

ldddist

❌

2

lddmask

❌

2

lddrepair

❌

2

le or <=

βœ…

ln

βœ…

log

log10

βœ…

lookup

❌

?

lookuplinear

❌

?

lookupmapstack

❌

?

lt or <

βœ…

maparea

❌

1

mapmaximum

βœ…

maximum

mapminimum

βœ…

minimum

mapnormal

βœ…

normal(array, dtype, 0, 1), normal(array_shape, partition_shape, dtype, 0, 1)

maptotal

βœ…

sum

mapuniform

βœ…

uniform(array, dtype, 0, 1), uniform(array_shape, partition_shape, dtype, 0, 1)

markwhilesumle
markwhilesumge

❌

2

max

❌

1

min

❌

1

mod, %

❌

1

ne or !=

βœ…

nodirection

❌

1

nominal

βœ…

normal

βœ…

not
~
pcrnot

βœ…

or
|
pcror

βœ…

order

❌

? Idea is easy, parallel implementation seems not.

ordinal

βœ…

path

❌

2

pit

❌

1

plancurv

❌

2

pred

πŸ—‘

Not sure why this is useful…

profcurv

❌

2

rounddown

βœ…

floor

roundoff

βœ…

round

roundup

βœ…

ceil

scalar

βœ…

shift
shift0

πŸ—‘

Not sure why this is useful…

sin

βœ…

slope

βœ…

slopelength

❌

3

spatial

βœ…

spread

❌

3

spreadldd

❌

3

spreadlddzone

❌

3

spreadmax

❌

3

spreadmaxzone

❌

3

spreadzone

❌

3

sqr

βœ…

Not as an operation. Just use value * value.

sqrt

βœ…

streamorder

❌

2

subcatchment

❌

3

succ

πŸ—‘

Not sure why this is useful…

tan

βœ…

time

πŸ—‘

Things work differently in a LUE C++/Python model.

timeinput…

❌

?

timeinput

❌

?

timeinputmodulo

❌

?

timeinputsparse

❌

?

timeoutput

❌

?

timeslice

❌

?

transient

❌

2

uniform

βœ…

uniqueid

βœ…

unique_id

upstream

βœ…

view

❌

3

window4total

πŸ—‘

Not needed, LUE’s focal_mean accepts a custom kernel

windowaverage

βœ…

focal_mean

windowdiversity

βœ…

focal_diversity

windowhighpass

βœ…

focal_high_pass

windowmajority

βœ…

focal_majority
Note that, unlike in PCRaster, the kernel window is not enlarged when no unique most frequent value is encountered within the focal window. In that case, no-data is output.

windowmaximum

βœ…

focal_maximum

windowminimum

βœ…

focal_minimum

windowtotal

βœ…

focal_sum

xcoordinate

πŸ—‘

Not sure why this is useful…

xor
^
pcrxor

βœ…

ycoordinate

πŸ—‘

Not sure why this is useful…

Modelling framework#

Like PCRaster, LUE contains helper classes for implementing forward numerical simulation models as well. The lue.pcraster.framework sub package contains classes that behave like the PCRaster Python Framework classes, but are implemented in terms of the LUE classes. Not all PCRaster classes have been ported to LUE yet. The next table lists the current status.

Table 3 Legend#

βœ…

LUE supports this class. It may be that the LUE class and its member functions are named differently, that the member functions support different parameters, or that they accept parameters in a different order.

❌

This PCRaster class is not considered yet. It may be in the future.

πŸ—‘

This PCRaster class is considered, but skipped. See notes for reason.

1, 2, 3

Guesstimate of the amount of effort required to add it:
1 little, 2 somewhat, 3 serious.
This is only relevant for classes that have not been added yet.

Table 4 Status of LUE model development support classes vs PCRaster Python Framework classes#

PCRaster

LUE

Notes

StaticModel

❌

Work in progress

StaticFramework

❌

Work in progress

DynamicModel

❌

Work in progress

DynamicFramework

❌

Work in progress

MonteCarloModel

❌

MonteCarloFramework

❌

ParticleFilterModel

❌

ParticleFilterFramework

❌

ResidualResamplingFramework

❌

SequentialImportanceResamplingFramework

❌

EnKfModel

❌

EnsKalmanFilterFramework

❌