Replacing only negative Z values in GeoTIFF file, grdmath?

Both solutions worked nicely! thanks Esteban82 and mkononets for the nice support.