GRDMATH: Unexpected behavior

Aloha.

I have a grid that is all positive values ranging from 0.001-27. I want to make them all negative so I tried this:

gmt6 grdmath WL_05.tif -1 MUL = x.tif

However, the result is x.tif that ranges from -1 to -2. Clearly, I’m not understanding something or there is a problem.

Help appreciated.

Mahalo.

Is it possible to share here your file (or a sample if its too big)?

Mahalo for the reply. The problem, somehow, went away after I deleted x.tif and re-typed the command. There was a related problem with using x.tif in Qgis in which it seemed as if x.tif was being cached but no obvious reason it should have been. If it comes back (‘the problem’), I’ll send the files involved.

in any case, you can try “grdmath WL_05.tif NEG = x.tif”

1 Like