jgrass-newage snow component

8
Bancheri and Formetta LINKERS JGrass-NewAge: Snow component Marialaura Bancheri *and Giuseppe Formetta * Correspondence: [email protected] 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 (C 1 ), the Cazorzi and Dalla Fontana approach (1)(C 2 ) and the one presented in (2)(C 3 ). 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/m 2 ); Energy index (W/m 2 ); 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

Upload: marialaura-bancheri

Post on 18-Jan-2017

113 views

Category:

Science


0 download

TRANSCRIPT

Bancheri and Formetta

LINKERS

JGrass-NewAge: Snow componentMarialaura Bancheri*†

and Giuseppe Formetta†

*Correspondence:

[email protected]

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 ofOMS is mandatory (see @Also useful). Three temperature-based snow models wereintegrated into the system: a traditional temperature index method (C1), the Cazorziand Dalla Fontana approach (1) (C2) and the one presented in (2) (C3). The packageis perfectly integrated in JGrass-NewAge, and use many of its components such asthose for radiation balance (SWRB, (3)), kriging (KRIGING, (4)), automatic calibrationalgorithms (particle swarm optimization) to build suitable modeling solutions. Thesimulation time step can be daily, hourly or sub-hourly, depending on user needs andavailability 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

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

[email protected]

Authors of documentation

Marialaura Bancheri ([email protected])

This documentation is released under Creative Commons 4.0 Attribution International

Bancheri and Formetta Page 3 of 8

Component DescriptionThe 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−1t−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−1t−1E−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−1E−1t−1) is the radiation factor and αm3 (mmC−1t−1) is the melt

factor.

A more detailed description of the component is in (5).

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.

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 descriptionThe 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.

Bancheri and Formetta Page 6 of 8

0 5000 10000 15000

0100

200

300

400

SWE: Classical model

Time[h]

SW

E [m

m]

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

05

1015

20

Melting discharge: Classical model

Time[h]

mel

ting

disc

harg

e [m

m]

Figure 3 Time series of melting discharge for a station in the Posina River Basin.

ExamplesThe 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 OMS3def home = oms_prj

// start and end date of the simulationdef 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" ) {

Bancheri and Formetta Page 7 of 8

components {

// components to be called: reader input data , snow and writeroutput data

"reader_data_rain" "org.jgrasstools.gears.io.timedependent.OmsTimeSeriesIteratorReader"

"reader_data_snow" "org.jgrasstools.gears.io.timedependent.OmsTimeSeriesIteratorReader"

"reader_data_SWRB" "org.jgrasstools.gears.io.timedependent.OmsTimeSeriesIteratorReader"

"reader_data_temp" "org.jgrasstools.gears.io.timedependent.OmsTimeSeriesIteratorReader"

"reader_dem" "org.jgrasstools.gears.io.rasterreader.OmsRasterReader"

"reader_sky" "org.jgrasstools.gears.io.rasterreader.OmsRasterReader"

"snow" "snowMeltingPointCase.SnowMeltingPointCase"

"vreader_station" "org.jgrasstools.gears.io.shapefile.OmsShapefileFeatureReader"

"writer_SWE" "org.jgrasstools.gears.io.timedependent.OmsTimeSeriesIteratorWriter"

"writer_melting" "org.jgrasstools.gears.io.timedependent.OmsTimeSeriesIteratorWriter"

}

parameter{

// parameter of the reader components"reader_data_rain.file" "${home}/data/rain.csv""reader_data_rain.idfield" "ID""reader_data_rain.tStart" "${startDate}""reader_data_rain.tEnd" "${endDate}""reader_data_rain.tTimestep" 60"reader_data_rain.fileNovalue" " -9999"

"reader_data_snow.file" "${home}/data/snow.csv""reader_data_snow.idfield" "ID""reader_data_snow.tStart" "${startDate}""reader_data_snow.tEnd" "${endDate}""reader_data_snow.tTimestep" 60"reader_data_snow.fileNovalue" " -9999"

"reader_data_SWRB.file" "${home}/data/DIRETTA.csv""reader_data_SWRB.idfield" "ID""reader_data_SWRB.tStart" "${startDate}""reader_data_SWRB.tEnd" "${endDate}""reader_data_SWRB.tTimestep" 60"reader_data_SWRB.fileNovalue" " -9999"

"reader_data_temp.file" "${home}/data/Temperature.csv""reader_data_temp.idfield" "ID""reader_data_temp.tStart" "${startDate}""reader_data_temp.tEnd" "${endDate}""reader_data_temp.tTimestep" 60"reader_data_temp.fileNovalue" " -9999"

"reader_dem.file" "${home}/data/dem.asc""reader_sky.file" "${home}/data/skyview.asc""vreader_station.file" "${home}/data/stations.shp"

// component parameter , see (" Detailed input description " forfurther info)

"snow.fStationsid" "netnum""snow.model" "Classical""snow.tStartDate" "${startDate}""snow.combinedMeltingFactor" 0.00856"snow.freezingFactor" 0.0367"snow.alfa_l" 0.949"snow.meltingTemperature" 1.94

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 ProjectThe 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

%

References1. 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., Chavez, 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)