#3052: Watts to MegaJoules/Day conversion issue
---------------------+-------------------------
Reporter: cholmes | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Default | Version: unspecified
Keywords: | CPU: Unspecified
Platform: All |
---------------------+-------------------------
I think I may have found an error in a few files from the grass-ci repo.
A few files:
https://github.com/GRASS-GIS/grass-
ci/blob/f1a15d967611006e920b8dc2f191391e44392019/imagery/i.evapo.mh/mh_eto.c#L15
https://github.com/GRASS-GIS/grass-
ci/blob/f1a15d967611006e920b8dc2f191391e44392019/imagery/i.evapo.mh/mh_original.c#L14
https://github.com/GRASS-GIS/grass-
ci/blob/f1a15d967611006e920b8dc2f191391e44392019/imagery/i.evapo.mh/mh_samani.c#L14
contain a line like:
{{{
ra = ra * (84600.0 * 1000.0); /*convert W -> MJ/d */
}}}
I'm guessing the magic constant 84600 is intended to be the number of
seconds in a day, which is actually 86400. Also, Watts * Seconds gives
Joules. If you intend to get MegaJoules, you must divide by 1000, not
multiply (but maybe the comment is just wrong, and you wanted
milliJoules?).
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/3052>
GRASS GIS <https://grass.osgeo.org>