1. Bancheri and Formetta
LINKERS
JGrass-NewAge: Snow component
Marialaura Bancheri*†
and Giuseppe Formetta†
*
Correspondence:
marialaura.bancheri@unitn.it
Dipartimento di Ingegneria Civile
Ambientale e Meccanica, Trento,
Mesiano di Povo, Trento, IT
Full list of author information is
available at the end of the article
†
Code Author
Abstract
These pages teach how to run the Snow melting and Snow water equivalent (SWE)
component inside the OMS 3 console. Some preliminary knowledge and installation of
OMS is mandatory (see @Also useful). Three temperature-based snow models were
integrated into the system: a traditional temperature index method (C1), the Cazorzi
and Dalla Fontana approach (1) (C2) and the one presented in (2) (C3). The package
is perfectly integrated in JGrass-NewAge, and use many of its components such as
those for radiation balance (SWRB, (3)), kriging (KRIGING, (4)), automatic calibration
algorithms (particle swarm optimization) to build suitable modeling solutions. The
simulation time step can be daily, hourly or sub-hourly, depending on user needs and
availability of input data.
@Version:
0.1
@License:
GPL v. 3
@Inputs:
• Air temperature (◦
C);
• Rainfall (mm);
• Snowfall (mm);
• Shortwave radiation (W/m2
);
• Energy index (W/m2
);
• Digital Elevation Model raster map (DEM);
• Skyview factor (−);
• Melting model (String);
• Melting temperature (◦
C);
• Combined melting factor (αm)(−);
• Radiation factor (αe) (−);
• Freezing factor (αf ) (−);
• αl (−);
• Start date (String);
• Vector file containing the coordinates of the station.
@Outputs:
• SWE (mm);
• melting dicharge (mm).
@Doc Author: Marialaura Bancheri
@References:
• See References section below
Keywords: OMS; JGrass-NewAGE Component Description; SWE, melting discharge
2. Bancheri and Formetta Page 2 of 8
Code Information
Executables
This link points to the jar file that, once downloaded can be used in the OMS console:
https://github.com/GEOframeOMSProjects/OMS_Project_SNOW/tree/master/lib
Developer Info
This link points to useful information for the developers, i.e. information about the code
internals, algorithms and the source code
https://github.com/geoframecomponents
Also useful
To run JGrass-NewAGE it is necessary to know how to use th9e OMS console. Information
at: ”How to install and run the OMS console”,
https://alm.engr.colostate.edu/cb/project/oms).
JGrasstools are required for preparing some input data (information at:
http://abouthydrology.blogspot.it/2012/11/udig-jgrasstools-resources-in-italian.
html
To visualize results you need a GIS. Use your preferred GIS, following its installation
instructions. To make statistics on the results, you can probably get benefits from R:
http://www.r-project.org/and follow its installation instruction.
To whom address questions
marialaura.bancheri@unitn.it
Authors of documentation
Marialaura Bancheri (marialaura.bancheri@unitn.it)
This documentation is released under Creative Commons 4.0 Attribution International
3. Bancheri and Formetta Page 3 of 8
Component Description
The snow water equivalent modeling components are built varying the contents of the
snowpack mass balance equation. In particular it is computed as follows:
dMi
dt
= Ps + F − M (1)
dMw
dt
= Ps − F + M (2)
Equation (1) represents the time-varying solid water content in the snowpack as the sum
of the snowfall, Ps, and the freezing water,F, minus the melt, M (all expressed as snow
water equivalent). Equation (2) represents the time-varying liquid water in the snowpack
as the sum of the rainfall, Pr, and the melt water minus the freezing water. If liquid water
Mw exceeds liquid water-retention capacity of the snowpack (Mmax [mm]), the surplus
becomes snowmelt discharge qm (mm·t−1
), where t stands for unit of time (hour or day).
The liquid water retention capacity of a snowpack is related to the ice content by a linear
relationship depending on the coefficient αl [–], as in Eq. (3):
Mmax = αl · Mi (3)
The model includes three snowmelt formulae. The user is able to select any of these
depending on the site characteristics and data availability. In C1, eq. 4, the snowmelt
rates depends only on air temperature:
M =
αm1 · (T − Tm) T > Tm
0 T < Tm
(4)
where M (mmt−1
) is the melt rate, αm1 (mm · C−1
t−1
) is the melt factor, Tm [ ◦
C] is
the snow-melting temperature, and T (◦
C] is the air temperature.
In C2, eq. 5, the melt rate is a function of both shortwave radiation and air temperature.
M =
αm2 · EI · (T − Tm) · VS T > Tm
0 T < Tm
(5)
where αm2 (mmC−1
t−1
E−1
) is the combined melt factor,and E stands for Wm−2
; EI
[E] is the mean energy from shortwave radiation over a given period at a certain point,
and VS [–] is the sky view factor.
C3 model, eq. 6, the melting formula is:
M =
(αm3 + αe · Rs(t)) · (T − Tm) · VS T > Tm
0 T < Tm
(6)
where αe (mmC−1
E−1
t−1
) is the radiation factor and αm3 (mmC−1
t−1
) is the melt
factor.
A more detailed description of the component is in (5).
4. Bancheri and Formetta Page 4 of 8
Detailed Inputs description
General description
The input file is a .csv file containing a header and one or more time series of input data,
depending on the number of stations involved. Each column of the file is associated to a
different station.
The file must have the following header:
• The first 3 rows with general information such as the date of the creation of the file
and the author;
• the fourth and fifth rows contain the IDs of the stations (e.g. station number 8:
value 8, ID, ,8);
• the sixth row contains the information about the type of the input data (in this
case, one column with the date and one column with double values);
• the seventh row specifies the date format (YYYY-MM-dd HH:mm).
All this information shown in the figure 1.
Figure 1 Heading of the .csv input file
Air temperature
The air temperature is given in time series or raster maps of (◦
C).The conversion in (◦
K) is directly done by the component.
Rainfall
The rainfall is given in time series or raster maps of (mm) and can be computed using the
RAIN-SNOW separation component (see https://github.com/geoframecomponents/
RainSnowSep).
Snowfall
The snowfall is given in time series or raster maps of (mm) values and can be
computed using the RAIN-SNOW separation component (see https://github.com/
geoframecomponents/RainSnowSep).
Shortwave radiation
The shortwave radiation is given in time series or raster maps of (W · m−2
) values and
can be computed using (3).
Energy Index
The EI is given in time series or raster maps of (W · m−2
) values, refer to (1) for more
information.
5. Bancheri and Formetta Page 5 of 8
Digital Elevation Model (DEM)
The DEM is given in a raster map with is relative prj file.
Skyview factor
The sky view factor is a raster map of double adimensional value in the interval [0,1] at
the given point. It is the fraction of visible sky in the upper hemisphere and it is obtained
from the digital elevation model using the JGrasstools.
Melting Model
The model is a String containing the name of the model chosen: ”Classical”; ”Cazorzi”;
”Hoock”.
Melting temperature
The Melting temperature is a double value at the given point in (◦
C).The conversion in
(◦
K) is directly done by the component.
Combined melting factor
Adimensional factor required in the eq. 4, 5 and 6.
Radiation factor
Adimensional factor required in the eq. 6.
freezing factor
Adimensional factor required in the eq. ??.
αl
Adimensional factor required in the eq. 3.
Start date
Start date is a string containing the first date of the simulation.
Vector file containing the coordinates of the station
This shapefile should contain all the information about the stations involved in the sim-
ulation. It is required to obtain the station IDs and to determine their coordinates. The
name of the field containing the IDs of the stations must be specified as a string in the
sim file at the field ”fStationid”
Detailed Outputs description
The output file will have exactly the same heading of the input file (see fig. 1).
SWE
The SWE is given as time series at a given point or as raster maps. The components in
the two cases are different (respectively SnowMeltingPointCase and SnowMeltingRaster-
Case). The units are (mm). Figure 2 shows the SWE results obtained using the C1 model
and data from a station in the Posina River, Italy.
6. Bancheri and Formetta Page 6 of 8
0 5000 10000 15000
0100200300400
SWE: Classical model
Time[h]
SWE[mm]
Figure 2 Time series of SWE for a station in the Posina River Basin.
Melting discharge
The melting discharge is given as time series at a given point or as raster maps. Figure 3
shows the melting discharge results obtained using the C1 model and data from a station
in the Posina River, Italy.
0 5000 10000 15000
05101520
Melting discharge: Classical model
Time[h]
meltingdischarge[mm]
Figure 3 Time series of melting discharge for a station in the Posina River Basin.
Examples
The following .sim file is customized for the use of the SNOW component. The .sim file
can be downloaded from here:
https://github.com/GEOframeOMSProjects/OMS_Project_SNOW/tree/master/simulation
import static oms3.SimBuilder.instance as OMS3
def home = oms_prj
// start and end date of the simulation
def startDate= "1994 -01 -01 00:00"
def endDate="1996 -01 -01 00:00"
OMS3.sim {
resource "$oms_prj/lib"
model(while: " reader_data_rain .doProcess" ) {
8. Bancheri and Formetta Page 8 of 8
// parameter of the writing component
"writer_SWE.file" "${home }/ output/SWE.csv"
"writer_SWE.tStart" "${startDate}"
"writer_SWE.tTimestep" 60
" writer_melting .file" "${home }/ output/melting.
csv"
" writer_melting .tStart" "${startDate}"
" writer_melting .tTimestep" 60
}
connect {
" reader_data_rain .outData" "snow. inRainfallValues "
" reader_data_snow .outData" "snow. inSnowfallValues "
" reader_data_temp .outData" "snow.
inTemperatureValues "
" reader_data_SWRB .outData" "snow.
inShortwaveRadiationValues "
"reader_dem.outRaster" "snow.inDem"
"reader_sky.outRaster" "snow.inSkyview"
" vreader_station .geodata" "snow.inStations"
"snow.outSWEHM" "writer_SWE.inData"
"snow. outMeltingDischargeHM " " writer_melting .
inData"
}
}
}
Data and Project
The following link is for the download of the input data necessaries to execute the com-
ponent (as shown in the .sim file in the previous section ) :
https://github.com/GEOframeOMSProjects/OMS_Project_SNOW/tree/master/data
The following link is for the download of the OMS project for component:
https://github.com/GEOframeOMSProjects/OMS_Project_SNOW
%
References
1. Cazorzi, F., Dalla Fontana, G.: Snowmelt modelling by combining air temperature and a distributed radiation index.
Journal of Hydrology 181(1), 169–187 (1996)
2. Hock, R.: A distributed temperature-index ice-and snowmelt model including potential direct solar radiation. Journal of
Glaciology 45(149), 101–111 (1999)
3. Formetta, G., Rigon, R., Ch´avez, J., David, O.: Modeling shortwave solar radiation using the jgrass-newage system.
Geoscientific Model Development 6(4), 915–928 (2013)
4. Formetta, G., Antonello, A., Franceschi, S., David, O., Rigon, R.: Hydrological modelling with components: A gis-based
open-source framework. Environmental Modelling & Software 55, 190–200 (2014)
5. Formetta, G., Kampf, S.K., David, O., Rigon, R.: Snow water equivalent modeling components in newage-jgrass.
Geoscientific Model Development 7(3), 725–736 (2014)