watem-sedem / rfactor

R-factor
https://watem-sedem.github.io/rfactor/
GNU Lesser General Public License v3.0
6 stars 2 forks source link

Information on units needed #81

Closed SethCallewaert closed 1 month ago

SethCallewaert commented 2 months ago

https://github.com/watem-sedem/rfactor/blob/ae783126cc3ad91465ba28e3f1e91683be246da6/src/rfactor/rfactor.py#L36

The units of the energy calculated by this function is different to the units of the formula given in the description. This should be addressed, or the formula should be changed. Do you know which units are used in the calculation? Or is there another reason why the first part of the equation is different between the formula (11.12) and the function (0.1112)?

claudiacagn commented 2 months ago

Hello, first I apologize for my late answer but I didn't realize there was a question for me :-( If the rainfall intensity is expressed in (mm hr-1), the following equations give a kinetic energy in (MJ ha-1): 0.29 [1 - 0.72+exp(-0.08i)] 0.29 [1 - 0.72+exp(-0.05i)]

However, rfactor expresses the kinetic energy in (J m-2), which can be obtained with a multiplication factor of 100, thus resulting in: 29 [1 - 0.72+exp(-0.08i)] 29 [1 - 0.72+exp(-0.05i)]

does it quite answer your doubt/question? Thank you! Bests, Claudia

SethCallewaert commented 2 months ago

Hi Claudia,

Thank you for your reply.

The question was not really for you in particular, it was mainly to check internally how the implementation of the rainfall energy was done in the model. There is no reference at the moment in the documentation. The written formula in our implementation says: e_r = 11.12i_r^{0.31}, so given in J mm-1 m-2, while the function implies: rain_energy = 0.1112 ((rain 6.0) * 0.31) rain, which is then in MJ mm-1 ha-1.

This package calculates the rainfall erosivity in MJ mm ha-1 h-1 yr-1, so therefor it seems that the energy is converted into MJ ha-1 mm-1. This should however be clearly stated in the documentation (both the docs page as in the function) to avoid this confusion. And the additional functions should also reflect the same units as the first implementation. As you said, this will only shift the results by a factor 100, which can easily be transformed after the calculations, based on the other formulas used for the RUSLE parameters.

Sachagobeyn commented 1 month ago

@SethCallewaert , @claudiacagn : see https://github.com/watem-sedem/rfactor/pull/93