Skip to content

Commit

Permalink
max evap depth moved to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Jun 17, 2024
1 parent ab9887d commit bc34a3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion agrolib/criteriaModel/water1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ double computeEvaporation(std::vector<soil::Crit1DLayer> &soilLayers, double max
double layerDepth = soilLayers[i].depth + soilLayers[i].thickness / 2.0;

double coeffDepth = MAXVALUE((layerDepth - minDepth) / (MAX_EVAPORATION_DEPTH - minDepth), 0);
// evaporation coefficient: 1 at depthMin, ~0.1 at MAX_EVAPORATION_DEPTH
// evaporation coefficient: 1 at depthMin, ~0.1 at maximum depth for evaporation
coeffEvap[i-1] = exp(-2 * coeffDepth);

sumCoeff += coeffEvap[i-1];
Expand Down
2 changes: 0 additions & 2 deletions agrolib/criteriaModel/water1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include "soil.h"
#endif

#define MAX_EVAPORATION_DEPTH 0.25

class Crit3DCrop;

void initializeWater(std::vector<soil::Crit1DLayer> &soilLayers);
Expand Down
3 changes: 3 additions & 0 deletions agrolib/mathFunctions/commonConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
#define MEAN_GEOMETRIC 0
#define MEAN_LOGARITHMIC 1

// maximum soil depth for evaporation computation [m]
#define MAX_EVAPORATION_DEPTH 0.25

//#define BOUNDARY_SURFACE 1
#define BOUNDARY_RUNOFF 2
#define BOUNDARY_FREEDRAINAGE 3
Expand Down

0 comments on commit bc34a3f

Please sign in to comment.