Skip to content

Overview

This (long awaited) release brings many bug fixes (specially for coomplex water transport configurations and for operational applications) as well as the integration of two large new developments, water vapor transport and ice reservoirs parametrization (allowing water that moved through the snow as preferential flow to refreeze and form ice layers).

Details

New Major features

New features

  • Parametrizations and models
    • Improved critical cut length (Richter et al., Validating modeled critical crack length for crack propagation in the snow cover model SNOWPACK, The Cryosphere, 2019)
    • Adding virtual lysimeters for Richards Equation
    • Improvements for the DGESVD solver
    • Better treatment of Dirichlet boundary conditions
    • Using computed ISWR in the ILWR parametrization. For IMIS stations, there is no measured ISWR but RSWR. Thus the ISWR that is computed in Snowpack (based on the parametrized albedo) is use to call once more potential ILWR data generators in MeteoIO in order to parametrize the cloudiness and the ILWR. This is mostly transparent to the user but one has to keep in mind that an ILWR data generator must be declared that relies on ISWR even if no ISWR is measured...
    • Adding the possibility to drive SNOWPACK with net longwave radiation. When the meteo parameter NET_LW is present in the meteorological driving data provided to SNOWPACK, SNOWPACK will use this parameter as net longwave radiation, and derive incoming longwave radiation from it.
    • Adding SORENSEN2014 as SALTATION_MODEL
    • Adding Kozeny-Carman relationship for hydraulic conductivity
    • Adding the van Kampenhout new snow density scheme
    • Adding logmean as option for hydraulic conductivity at the interfaces
  • New configuration Options
    • Allowing to specify T_CRAZY_MIN and T_CRAZY_MAX for ANTARCTICA and POLAR variants
    • Added two new keys to control the inflate/deflate feature: SNOWPACK::INFLATE_ALLOW and SNOWPACK::INFLATE_INFO
    • Set MO_HOLTSLAG as default atmospheric stability
    • Renaming useNewPhaseChange to coupledphasechanges (indicating the coupling with the heat equation) and making it a config option
    • Adding externally forced sea level option (for use with Alpine3D)
    • Added parameter to know if we are in A3D in SnowStation and Canopy data, in order to hide some warnings. It does not use the cfg A3D key in snowpackadvanced, it is hardcoded in snowpack and A3D (cleaner and less prone to errors, and also beacue SnowStation doesn't see the cfg)
  • Optimizations, code restructuring
    • Adding functionality to reduce time steps for the heat equation when crazy notes appear
    • Avoid reconstructing a Meteo Object at every timestep
    • Adding some missing variables in the assignment constructor
    • Code cleanup (constification, removing unused variables, improving comments, fixing indentation issues)
    • Adding simulation time step to errors and warnings, for making debugging easier
    • Make sure that Richards equation can print the simulation date in messages, and improving messages and code logic for salinity transport inside Richards equation
    • Consolidating all calculations of melting temperature as a function of brine salinity to calls to the corresponding function in the SeaIce class
    • Even though COUPLEDPHASECHANGES seems to work now and should provide more accurate energy balance results, it seems to increase the runtime of the res1exp example from 38s to 55s. Therefore making COUPLEDPHASECHANGES = FALSE the default.
    • In Main, the for loop was operating on copies, instead of the objects themselves, leading to the function call being ineffective
    • Min and max albedo were defined both in Constants and Snowpack classes. This is unified now by using only limits in Constants.
  • Tools
    • Introducing a sea ice initialization function to set volume content, temperature and salinity, and pressure head consistently.
    • Updating timeshift scripts with newer versions
    • Now also adding support for .smet files to the script for energy balance checking (based on file extensions), .met files are still supported

Bug fixes:

  • Fix wind erosion when no measured snow depth is provided
  • Safeguarding inflate/deflate to do calculations using nodata when no measured snow height is present (but it should not be called anyway).
  • Initialize measured snow height with nodata, such that it propagates through SNOWPACK as nodata when no measured HS is provided in the forcing data (important for example when SNOW_EROSION is then set to TRUE, the snow drift routine will otherwise make a wrongful comparison of measured vs computed snow heights)
  • Compounding rounding errors when reading in *sno files that contain snow layers with liquid water made the test for sum vol. contents == 1 fail. Increasing the testing tolerance.
  • In some simulations, a very small negative theta[AIR] appeared (in the order of 1e-17). It is now replaced by a true zero (such an element would be cleaned up later)
  • Fixing long outstanding bug that SNOWPACK was not calculating surface SUBLIMATION anymore
  • In Main, the Mdata object was passed to SNOWPACK by-value instead of by-reference, meaning that when Main.cc was writing output, it didn't capture the modifications by SNOWPACK, for example iswr calculated from rswr.
  • Testing explicitly for density option "FIXED" and throwing an error otherwise in Laws_sn
  • Corrected wrong test for ice metarmophisme, the 'or' on the left was always returning true, and mk for layer mk = 7 was wrongly updated to 8 (which has a huge impact on albedo). Now the 'or' is 'and' and the behaviour is as expected.
  • When USEREFERENCELAYER = TRUE, make sure that the reported modeled snow depth is referenced to the reference layer.
  • Some MeteoIO syntax for keys that are forced was not up to date anymore
  • Bug fix for instabilities of the temperature solver with phase changes. The element temperature was erroneously recalculated after the surface node was adjusted to prevent output with a surface temperature above melting temperature when ice is present in the surface element.
  • Sea Ice
    • Sea water density was wrongly calculated, due to missing parentheses.
    • An inconsistency has slipped in (in SeaIce). The bottom ice formation is goverened by a mass change resulting from phase changes. Thus, it only describes changes in theta[ICE]
    • Density was erroneously calculated using bulk salinity instead of brine salinity
    • Bulk and brine salinity (0540, 0541) were written before 0535, in contrast with what was declared in the file header in .pro
  • Water Transport
    • Safeguarding against doing calculations with nodata in WaterTransport.cc
    • Resetting nodal water fluxes was erroneously restricted to soil layers only (in DataClasses)
    • Mass balance correction in WaterTransport
  • Soil handling
    • Resetting sw_abs over all elements. Since ADVECTIVE_HEAT uses sw_abs in soil to apply heat advection, it accumulates when not reset to zero
    • Some improvements to solve soil freezing when using Richards equation (some cases where not properly solved). The solver convergence should be improved and a warning should now always be shown when the soil freezing does not converge
    • Soil freezing improvements: having only the bottom nodal temperature absorb the full energy change of the element. This is not fully correct, but because a good solution is difficult to find, this will at least provide for numerically stable simulations.
    • Several improvements to treat soil freezing when using Richards equation. An initialization function for soil can be switched on using the key REQ_INITIALIZE_SOIL, while a parameterization for the effect of soil freezing on the hydraulic conductivity can be specified using the new key HYDRAULIC_CONDUCTIVITY_FROZEN_SOIL
    • Solving heat equation coupled to phase changes doesn't work only for the case where Richards equation is used for soil AND thus when soil layers are being used. Adding check for the latter condition
    • COUPLEDPHASECHANGES cannot be used when using Richards equation for soil, since both treat soil freezing in an inconsistent way
    • Bug fix for an array index out of bounds problem when running with soil, and having surface hoar
  • Glaciers
    • Bug fix in glacier detection for cases without soil
    • Correcting the albedo routine for when glacier ice is exposed at the surface
  • Snow stability
    • Updated SK38 from Fabiano Monti
    • For consistency, initialize stability with the common nodata value of -999, instead of 999
    • Proper treatment of nodata initialization for the stability parameter
  • Atmospheric stability correction
    • Corrected atmospheric stability following the original euqations of Stearns & Weidner (1993)
    • ustar should be recalculated with psi_m from the latest iteration
  • Others (pure computing aspects)
    • Fixing valgrind reported "still reachable" in SnowpackIO
    • Fixing deserialization issue with the van Genuchten object
    • Fixing segmentation fault when running with soil layers
    • Fixing a rare condition that leads to a segfault (empty data vector returned by MeteoIO)
    • Fixed some issues found with Visual C++ 19: setting ints from doubles or using "and" or "not" instead of "&&" and "!" operators

Outputs

  • Changing the snow files backup labels to human readable timestamps instead of Julian days. This makes it easier to find backups, and allows for sub-daily backup intervals
  • Added output variable MS_WATER_SOIL for total water content in the soil
  • Renamed MS_SURFACE_RUNOFF into MS_SURFACE_MASS_FLUX, MS_SURFACE_RUNOFF correction, Correction for soil water content, New output variable MS_ICE_SOIL
  • Renaming soil_lysimeter to water_flux for a more general storage of water fluxes across the nodes (in both the snow and soil part). Doing calculations now directly on the NodeData class variables, instead of using intermediate variables. Adding units to the water_flux variable.
  • Adding lateral flow to output (per layer in .pro files and total column lateral flow in .smet files)
  • Some minor improvements and corrections in the output field naming and metadata
  • Added missing variable
  • Better version numbering in the outputs
  • Fixed outputs when the cumulative fluxes were erroneously added instead of the instantaneous fluxes.
  • SMET and MET files
    • Add skier penetration depth to SMET file output
    • Adding more Hazard outputs to SMET files in order to fully replace the outputs that used to be in ImisIO
    • Correcting some output fields
    • The header IDs for .met files should not contain commas, as those are already used as field separators
    • Restored some energy output in SMET
    • Adding output precision and width per field for timeseries .smet output (currently everything is set to the same default values, but can now be adapted depending on use cases) *
  • PRO files
    • Providing proper header information regarding whether or not hand hardness is in Newton, or indexed
    • Adding option PROF_ID_OR_MK to specify if ID or MK should be written in .pro files as element 0504, and option PROF_AGE_OR_DATE to specify if layer AGE or deposition DATE should be written in the .pro files as element 0505
    • Offsetting in the .pro files for sea ice simulations is not necessary anymore, since snow elements below 0 are now correctly plotted in niViz
    • Adding layer age in fractional days as output field 0505
  • CAAML
    • Porting the Caaml plugin from old-trunk (it got overwritten by a borken version)
    • Slope angle of snow profile location considered for reading and writing CAAML profiles (layer heights and thicknesses are affected)
    • Fixed a bug in the reading of canopy properties in CaaML.

Documentation

  • More figures are now in SVG in order to offer better quality
  • Added some documentation for the technical snow module
  • Fixed many doxygen warnings
  • Add link to pySMET
  • Better structure in the MainPage documentation.
  • The SnopViz screenshots have been replaced by niViz screenshots.
  • The documentation of the stability members of SnowStation is now consistent with the headers in SMET
  • Adding information about setting soil hydraulic properties via the grain size. This information was previously documented on models.slf.ch, but had gone missing.
  • Removing old links to models.slf.ch
  • The example of chaining two Snowpack simulation was still based on an old ini sytax...
  • Added some documentation to the new ILWR data generator behavior
  • Improved error messages:
    • Finally, stripping the path from the filenames when printing the origin of error messages!
    • Correcting error message (output field mismatch in print formatting) in PhaseChange
    • Improving warning message in salinity transport
  • Examples
    • Making the Antarctica example work with the new syntax
    • Reverted ATMOSPHERIC_STABILITY to NEUTRAL for the operational example
    • Fixing renamed key in examples and tests
    • Fixing sea ice example
    • The OSWR fields in the example smet files have been renamed as RSWR
  • Code documentation
    • Improving documentation in mass balance check script
    • Improved the documentation of SalinityTransport, added some missing documentation for SeaIce, vanGenuchten and ReSolver1d

Build system

  • Added missing license information
  • Updated the SetCompilerOptions (copied from MeteoIO)
  • making CMakeLists more similar to MeteoIO's
  • Added one more path to find Lapack
  • Update pugixml to version 1.12
  • Updated the embedded version of getopt (This should be warning free!)
  • Ported the support for Mac fat binaries from MeteoIO
  • Fixing compilation on intel for ReSolver1d
  • Migration to Gitlab
    • Now retrieving version numbers from git (for all platforms)
    • Properly populate gitignore
    • Added Gitlab pipelines (and keeping them quite similar to MeteoIO's)
  • Packaging
    • Packing MeteoIO's headers in Snowpack for BUNDLE_ALL
    • Properly linking the Snowpack binary when requesting static linking
    • Packaging gcc's dlls with Snowpack when compiling with shared libs on Windows
    • Removed the obsolete packaging of Inishell in Snowpack