The Multiscale Snow Assimilation System (MuSA), is a flexible data assimilation toolbox for experimental and operational snowpack reanalysis development. MuSA was designed to fuse gridded observations with an ensemble of simulations generated by the Flexible Snow Model (FSM2) by using different Bayesian based data assimilation algorithms.
In its current version, it also offers support for the Snow17 model and a simple temperature index model. Potentially other numerical models could be implemented (not necessarily limited to snow models).
Figure 1: Comparison between open loop and updated simulation after assimilating UAV snow depth retrievals at 5m resolution
The inputs of MuSA are composed by meteorological forcing and observations to be assimilated. Both the forcing and observations must share the same geometry, with the same resolution and number of cells in the latitudinal and longitudinal axes, and should be provided in the netCDF format. In this version, the meteorological forcing must be provided in an hourly timestep. Optionally it is possible to provide a mask with the same geometry of the mandatory input files to avoid to run MuSA over certain cells of your domain. The meteorological forcing needed for running MuSA is composed by:
In its current version MuSA provides support for assimilating different variables. Note that it is possible to provide more than one of the following variables at the same time, i.e. MuSA has support for joint assimilation experiments. In its current version, MuSA is able to assimilate:
The support of other variables like liquid water content, density, ice content etc. could be relatively easily implemented on demand.
There are different data assimilation and resampling algorithms implemented in MuSA. Some testing should be done when developing data assimilation experiments, as the performance may be different depending on the problem to solve, and regarding the literature there is not a clear winner. Also, the computational cost will be different, and may be a strong conditioner in some situations.
Resampling (for particle filters only):
The outputs of MuSA are composed by simple .csv files containing the following information:
lonid and latid are the longitude and latitude ids of each cell of the simulation.
Additionally it is possible to store the ensembles generated for each cell. This is an optional feature as it may be a bit memory consuming. However It may be useful in some circumstances specially for advanced users. The ensembles will be stored as pickle objects, and will be composed of python lists containing Ensemble objects.
MuSA works on GNU/Linux (and therefore Mac) based platforms. MuSA has been tested also in Windows using the Windows Subsystem for Linux (WSL). MuSA relies on python3 with the usual scientific libraries (numpy, pandas, scipy...) and netCDF4 installed. You will also need to have gfortran in the path. The easiest way to do this is to generate a dedicated conda environment. You can use the MuSAenv.yml file of the repository to create the conda environment:
conda env create --name MuSAenv --file=MuSAenv.yml
Then for running MuSA simply:
conda activate MuSAenv python main.py
This command should run the reproducible example included in the repository. This example contains all the information needed by MuSA. It is composed of a few cells containing meteorological forcing and drone SfM derived snowdepth information. To change the configuration of MuSA, you should modify the config.py file. Also it is possible to modify the way MuSA generates the ensemble by modifying the constants.py file. An example script is also provided to run MuSA in distributed supercomputing facilities using PBS (Portable Batch System, not Particle Batch Smoother 😉) or Slurm arrays.