1

I have following formula that works in ArcGIS within the Raster calculator:

Con (("%P%"-"%ETP%)<0, "%RUx%"*Exp (("%P%"-"%ETP%")/"%RUx"), Con (("%RUx%"+"%P%"-"%ETP%")<"%RUx%","%RUx%"+%P%"-"%ETP%","%RUx%"))

I want to use it in QGIS 3.16 or QGIS 3.4. I made some modifications to make it work in the Raster calculator of QGIS, but I still get an Error parsing formula:

if(("P@1" - "ETP@1" )< 0,"RUx@1" *(("P@1" - "ETP@1") / "RUx@1" )^2.71828, if (( "RUx@1"+"P@1"-"ETP@1") < "RUx@1" ,"RUx@1"+"P@1" - "ETP@1","RUx@1"))

Which modifications are needed to make it work?

2

1 Answer 1

1

The following works:

(("P@1" - "ETP@1" < 0)*"RUx@1" *("P@1" - "ETP@1") / "RUx@1" ^2.71828)+( "RUx@1"+"P@1"-"ETP@1" < "RUx@1" *"RUx@1"+"P@1" - "ETP@1"*"RUx@1")+"RUx@1"

* symbol should be used instead of ,

+ symbol should be used between two conditions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.