Skip to content

Overview

This version contains some new atmospheric stability corrections, new snow stability indices as well as a temperature index model (useful for benchmarking) as well as many bug fixes for the Richards solver (for liquid water transport).

Details

Improvements, new features

  • in order to try to reduce the memory footprint, a few optimizations have been implemented: the Hdata_ind type is now based on bools instead of short ints. This reduces by a few Mb the memory and makes the code more logical. And a few things have been simplified in Solver since this is what costs us the most memory (roughly 2/3 of the total usage).
  • committing the adaptive time step to trunk
  • Added calculation of theta[AIR] for not too dry soil layers as difference of other volume fractions and 1.
  • A new option has been added in order to overwrite the start date from a snow profile (ie force to start at a given date independently of the date specified in the sno file)
  • The Multivariates stability corrections (Schloegl, 2016) have been implemented alongside many other variants, renaming most of the existing ones
  • Stability
    • The multi-layer skier index SK38_ml has been implemented
    • The Relative Threshold Approach has been implemented as well as the SK38_ml (multi layer). These are (for now) enabled by using two new and temporary keys: MULTI_LAYER_SK38 and SSI_IS_RTA
    • Introducing the critical cut length parametrisation from Johan Gaume in SNOWPACK. It is written out as element 0606 in the *.pro files. It should work reasonnably even in the slopes (this will still require careful scientific evaluation).
    • Changing/correcting the notation for strain: the E, Edot, Ev, Ee, etc have been renamed as Eps, Eps_dot, Eps_e, Eps_v, etc since these should be written as "epsilon_{}". This also frees "E" to be used as Young's modulus of elasticity (computed in Stability)
  • Water transport
    • As for some applications it may become important which method is used to average hydraulic conductivity at layer interfaces when using Richards equation, it now can be specified via the key AVG_METHOD_HYDRAULIC_CONDUCTIVITY. Currently, it is recommended to only use either ARITHMETICMEAN or GEOMETRICMEAN, as the others are not tested or provide currently unrealistic results.
    • An arbitrary/trail-and-error adjustment to wet snow settling when using Richards equation, as was introduced in the simulations for the Cryosphere paper, but so far was never committed.
  • Special simulations
    • When doing soil/snow/soil simulations, lots of warnings were being generated in the top soil layers because of high temperatures
    • The temperature index model extension as proposed by (Pellicciotti et al., 2005) has been implemented. Leaving the SWR_factor at zero sticks with a "standard" temperature index model while any other value uses the short wave radiation.
    • Added a key "ALBEDO_AGING" that is normally set to TRUE (ie the age of the snow is used in the snow albedo parametrization) but can be set to false for some special cases (like antarctica).
    • Slightly improved handling of the ADV_HEAT (accept negative heat fluxes, check for the ADV_HEAT parameter in main, default to false in SnowpackConfig)
  • Outputs
    • The SmetIO plugin can now write met files as smet files (with append mode). This is now the default (since SnopViz can read these files)
    • Small improvements for the PRF outputs
    • A new key has been created, WRITE_PROCESSED_METEO, in order to be able to write out the pre-processed meteo just before running the actual simulation
    • renamed key "PROF_FORMAT"
    • The "Enforced snow height" has been renamed as "Measured snow height" in order to be less confusing. It was not always tested for Constants::undefined, this is now properly done so if it has not been set, nodata would be written out.
  • Input data handling
    • Added key ADJUST_HEIGHT_OF_METEO_VALUES and ADJUST_HEIGHT_OF_WIND_VALUE in SnowpackConfig.cc. If set to TRUE in the .ini-File (default), it takes into account, that snow height decreasing the sensor height above the surface. If set to false, assumes a constant measurement height.
    • When testing for the available meteo parameters, the wind was not checked. This is now the case (both on VW and DW). So if a station does not have any wind measurements, it will be necessary to declare a data generator for it.
    • Now TSG must be provided (with a data creator if no measurements are available) when not using a soil heat flux as lower boundary condition

Bug fixes

  • Richards equation, water transport, soil
    • Running richards equation with 1 soil layer only may result in a segmentation fault. Instead of repairing the code, I just provide an error message and request the user to use at least 2 soil layers. Shouldn't be a big problem...
    • Fixing a sort of bug, which could create spiking behaviour of the TSS when using Richards equation for snow, and accidentally could create crazy nodes. Basically, the definition of what is a dry or wet snow layer was not consistent.
    • Ensure that the field capacity does not exceed the available pore space. Altough this never caused problems directly, it's a logical thing to do and it may influence the latent heat flux calculation to be more realistic (see issue 531).
    • The "wet_layer_exception" when merging layers (ie preventing merging a thin wet layer with a dry one) lead to 1 station in snowpack operational experiencing a very high temperature gradient in one thin, wet layer. Therefore the minimum acceptable thickness (as well as ice content) has been brought closer to min_l_element. This was enough for the operational station to resume working properly without such as very high temperature gradient.
    • Behavioral fix for snow farming simulations: prevent snow layers from merging with "snow" layers containing SOIL (i.e., the isolation layer).
    • The soil thermal conductivity was written out with quite a low precision, this was not enough for some applications (snow farming).
  • fixed an invalid initialization of a boolean in Main (relevant for LWI_N/S in operational with stations having only one exposition).
  • fixed a bug in Canopy incrementing an uninitialized value (totalAlbedo)
  • The currentMeteo parameter is now passed by copy to runSnowpack so when it gets tweaked internally, it does not pollute the calling code (that might reuse it). This fixes an Alpine3D bug when using Canopy and doing multiple calls to Snowpack within a single Alpine3D timestep (the Canopy corrections where re-applied at every call, therefore leading to a massive over-correction).
  • Improved branching related to issue 524: Call branching for TGGrainRate. It by the way also solves a potential array out of bound error in the NIED variant.
  • Fixed an invalid constant in the computation of the latent and sensible heat fluxes
  • do no iterate z0 when computing the atmospheric stability (this would only be needed when drifting snow and most probably a very small effect). Therefore expect the turbulent heat fluxes to be slightly different!
  • Fixing issue 566: the methods "generateProfile" was not handling properly profiles containing soil layers and the PRF files now skip soil layers altogether.
  • Now CaaMLIO outputs correctly the density of (wet) snow and elements (layers)
  • Even when TS_WRITE or PROF_WRITE were turned off, their associated keys still had to be provided. This has been fixed.
  • Resolving the issue of unrealistic element growth due to elements merging, a bug which was triggered with simulations of sea ice flooding.
  • Slightly improved safety for the hand hardness values returned by Monti
  • The top element's hand hardness was not being computed anymore...
  • A bug was found in the handling of the virtual slopes: the fill constructor that was used to construct a vector of SnowStations was actually making multiple identical copies of a SnowStation object, thereby all copies had their pmat pointer pointing to the same location... This was making a proper (and clean) "free" impossible.

Documentation, error messages and examples

  • examples
    • brought back the units_offset and units_multiplier in MST96.smet as an example of what is possible.
    • Removing the unecessary "COORDPARAM" in example config files; adding COORDSYS = UPS for the Antarctic one
    • Wrong field name in the gems.smet example data set.
    • better values for the ILWR min_max filter in the example configuration files
    • Fixed an invalid key in io_soil
  • scripts
    • A new script has been written, to convert various versions of the sno files to the new SMET-based format.
    • Added the possibility to extract parameters out of bz2 compressed files
    • the SnExtract.sh tool prints a better help text.
    • The SnExtract script has been modified so it now also works on osX.
  • error messages
    • The sno files that are read are now checked to ensure that the layers are in chronological order
    • Small improvement of error message.
    • Correcting an erroneous error message.
    • Improved the debuging output for ImisDBIO
    • Making some error messages easier to process
    • Clarifying an error message: specify if it is a soil or snow layer, instead of always saying that it is a snow layer even if it is not.
  • tests
    • The tests now work properly.
    • CTest configured in a more consistent way compared to MeteoIO or Alpine3D
    • A new "basics" test has been designed that should be numerically more stable while checking the most important aspects of an energy balance simulation.
    • The mass balance test has been cleaned up and an energy balance test has been added. New variables are exported for CTest to get more outputs on cdash.
  • html documentation
    • small updates to the documentation so the "operational" mode is less misleading
    • Updated the sno files documentation to include the missing parameters descriptions
    • Some documentation improvements (following Michi's comments) as well as checks on the precipitation re-accumulation so the user gets warned if it is missing (or improperly set).

Build system and packaging

  • Small fix so when a local svn check out is used for the bundled MeteoIO, the doc path is set differently (so there is no need install MeteoIO on the system for it to be used)
  • deleted an old and unused directory
  • Now Xcode on osX should be happy!
  • Improving the linking process when compiling with thrid party libraries (such as libxml2 or occi)
  • When searching for lapack, the cmake script was forcing static libraries. This has been removed so it is possible to use both static and dynamic linking.
  • The packaging for SnopViz has been added. it requires (if enabled) to provide the path to SnopViz main source directory
  • Fixed a typo in the NSIS start menu, fixed an invalid declaration for static builds, improved the dynamic and static targets sections, improved the libsnowpack detection.
  • Extra, "legacy" compiler flag to support Oracle's OCCI with gcc>=5 (taken from meteoIO).
  • Ported the changes to SetCompilerOptions from MeteoIO
  • Cleaning up the build system to make it more similar to Alpine3D and MeteoIO

Code cleanup

  • Removing a few forgotten "POPC" lines
  • Making the latest Clang happy by renaming all include guards so they don't start with "__"
  • Fixed some warning with Clang and some code cleanup in CaamlIO
  • Turning off Clang trying to check doxygen syntax and failing miserably...
  • Getting rid of the multiplicity factor that is not used and just muddying the waters...
  • Code cleanup and one small change for consistency in Metamorphism ("<=" replaced by "<")
  • Getting rid of some "alpine3d" flags... But Alpine3D now has to properly setup some config keys.
  • The various helper methods of Stability have been moved into a new file, StabilityAlgorithms.cc. This simplifies the Stability class as well as its declaration.
  • The InstabilityData class has been removed has it was either made of obsolete members or data already available in another class
  • Removing the old, unused "Snowpack::compSnowForces"
  • Trying to fix our includes mess... Now much less things are included (hopefully, close to only what is needed). The units conversion macros have been moved to Utils.cc and the MAX and MIN replaced by std::max and std::min.
  • More code factorization, declaring the Karman constant in Constants.h
  • handling the plugins trhough a cmake template file (the file SnowpackIO.cc is now generated by cmake and should NOT be committed)
  • Two "throws" that were missing a proper class have been fixed (so the exception is properly caught and prints its text)
  • fixed several warnings identified by g++6 (quite a few "misleading identation" by the way)
  • Adding an '=' operator to AsciiIO and filling in missing part of this operator in SmetIO
  • Getting rid of the last pointers in Canopy
  • A long standing "HACK" has been removed, the Mdata are now const in the compTemperatureProfile() method.