r.mapcalc is unhappy because the map name isn't quoted internally
and it can't decide if the map name is a number or a name. I think
the same would happen if you had a "-" in the map name. If you
don't include the @mapset part it still runs, but the result
is no good as isnull(14) is always false if it thinks 14 is a
number.
quick work-around: rename the map to add a letter before the "14".
this bug is hopefully fixed in devbr6 with r48227, after testing
it should be backported to 6.4svn.
I am not sure if "$input" needs to be quoted or not in the
trunk python version:
If a map name can be interpreted as a number[1], or it contains any
non-alphanumeric characters which are syntactically significant to
r.mapcalc, then it must be quoted.
[1] This includes incomplete floating-point values such as "1.2e"; in
order to produce reasonable error messages, the token grammar includes
a rule which specifically matches such cases.
The substitutions in the mapcalc() function are direct textual
substitutions performed within Python before the resulting string is
passed to r.mapcalc, so the above needs quotes around $input in order
to correctly handle "unusual" map names.
This is probably the case for most such calls, except those where the
map name is dictated by the script.
I suppose that it would be possible to have the mapcalc() function
automatically add quotes to any arguments which are strings. However,
this would break scripts which pass option values directly to
mapcalc() without parsing them to an int/float first. It would also
preclude cases such as: