This is the changelog for Snowpack release 3.2.0
First, a few new configuration keys have been created:
- OUT_SOILEB in [Output] in order to output all the soil energy balance components. This key can MUST be used with OUT_HAZ=false
- THRESH_RAIN_RANGE in [SnowpackAdvanced] enabling to define a linear snow/rain transition
- the COPY syntax has been changed into something like TA2::COPY = TA
A few keys have been modified on the MeteoIO side:
- the ADD and MULT filters have gained some options
- the unventillated_T filter has more options and a new syntax
- the incoming long wave parametrizations have been restructured into a ClearSky_lw and an All_Sky_lw data generators
Now, here is the detailed changelog:
Code cleanup, documentation
- Small code cleanup (const, static, error message) and extra option "--version" in Snowpack Main
- Added some missing information in the documentation. Made the "*check" scripts executables.
- Correcting some units specified in comments accompanying variable declarations.
- The air emissivity is now computed the same way regardless of where it happens (since it was computed at two different locations in Main.cc)
- Small bug fix in the documentation
- Changed the handling of the command line arguments to prevent printing the help text twice and changed the return code for the "h" and "v" option to be equivalent to EXIT_SUCCESS
- Using proper pre-processor defines; removing unnecessary #ifdef
- Add comments about open issues for future development.
- Bringing comments in agreement with variable names.
- fixed some warnings linked to types conversions (size_t, double, int)
- Removing a strange if-condition to determine failure of convergence. Not sure how this appeared in the code and what its functionality is, but it is has been causing some problems. Therefore, I remove it.
Energy balance improvements
- Element property Qmf (phase change energy) also needs to be calculated with soil freezing/thawing when using Richards solver for soil.
- To improve energy balance, it's recommended to suppress merging of two elements at the surface when the surface layer is dry and the layer below is wet (due to penetrating shortwave radiation). After removal of the top layer, the node below suddenly becomes the top node and increases the surface temperature to 0 degC. This sudden increase in surface temperature causes a problem for satisfying energy balance.
- additional prerequisite to suppress merging of wet top layers, to prevent extremely light elements.
- add another prerequisite about miminum ice criterion and minimum element length when suppressing the merging of top layers that slightly improves melt curves.
- variables and functions to keep track of the energy balance of the soil part, very similar to the already present variables for the energy balance of the snowpack. The variables are always calculated, but by default not written in the .met files. To output them in .met-files, set OUT_SOILEB = TRUE and OUT_HAZ = FALSE in the ini-file.
- Script to check the energy balance of the soil (energybalancesoilcheck.sh)
- To provide more information about the energy balance, the output section is improved. It now provides comparable values, like the averaged error of the energy balance over the whole period, expressed as a true W/m^2, as well as the error expressed as a percentage of the total incoming energy.
- Small improvement in the adjustment of nodal temperatures, based on the presence of both liquid water and ice during melt (especially to improve the case when an element completely melts).
- The Liquid Water Index was not working properly (N and S were swapped and it was only computed when there was drift on the slope).
- When only one slope is defined, the lwi_N and lwi_S both get the same value (so it is still possible to get lwi for a single station simulation)
- The function defined for residual water content could reach a point where theta_i + (theta_r * (Constants::density_water/Constants::density_ice)) >= 1.0. This limiting case is when theta[ICE]=0.970886735. Now the residual water content is properly defined over the full range.
- Introducing the water retention curve based on the Yamaguchi (2012) results.
- Introducing another switch in the Richards solver for limiting the infiltration flux from snow into soil, in case the snowpack is solved with the Bucket or NIED scheme.
- Optimization: return early from the solver in case no layers are present.
- Bringing soil type names up to date with common terminology
- Making sure that the ALPINE3D soil type can initialise with all specified soil types based on grain size in the *.sno file
- the "soil type" is now renamed as SNOFILE (since this old name was confusing).
- The default upper boundary condition has been changed to prevent non-convergence of the solver (because of too much infiltration). This may cause a violation of the mass-balance as some infiltrating melt water is rejected, but a crashing solver is a bigger problem...
- The element of the upper soil layer was cooling too much when the last snow element was being removed, as a result of a wrongly calculated energy needed for melt.
- If the key WATERTRANSPORTMODEL_SOIL = RICHARDSEQUATION was specified, the RE-solver was called for the soil part even in simulations without soil.
- Small fix for the "Antarctica" variant.
- We had a weird structure for the "doc" target that was triggering a bug with cmake-3.0
- Simulations with Richards equation for snow were actually never forming surface hoar... this has been fixed
- Some combinations of processors/LAPACK version/compilers may cause C[i] to become NAN when the pressure head is really small (probably causing floating point underflow in calculating C[i]). Trying to catch these cases and repeat with a smaller time step
- Linear temperature range for snow/rain partitioning (centered around THRESH_RAIN)
- Use 273.15K as reference temperature instead of the freezing point depression
Commits merged from dev
In this version, the following commits were taken from the dev branch and merged: 538-543, 545-548, 550-554, 564-570, 574-576, 581-590, 592, 598-599, 603-604