SNOWPACK 20241222.26c8720
AsciiIO Class Reference

#include <AsciiIO.h>

Public Member Functions

 AsciiIO (const SnowpackConfig &i_cfg, const RunInfo &run_info)
 
AsciiIOoperator= (const AsciiIO &)
 Assignement operator, required because of const "info" member. More...
 
virtual bool snowCoverExists (const std::string &i_snowfile, const std::string &stationID) const
 This routine checks if the specified snow cover data exists. More...
 
virtual void readSnowCover (const std::string &i_snowfile, const std::string &stationID, SN_SNOWSOIL_DATA &SSdata, ZwischenData &Zdata, const bool &read_salinity)
 This routine reads the status of the snow cover at program start. More...
 
virtual void writeSnowCover (const mio::Date &date, const SnowStation &Xdata, const ZwischenData &Zdata, const bool &forbackup=false)
 This routine writes the status of the snow cover at program termination and at specified backup times. More...
 
virtual void writeTimeSeries (const SnowStation &Xdata, const SurfaceFluxes &Sdata, const CurrentMeteo &Mdata, const ProcessDat &Hdata, const double wind_trans24)
 Write all Time Series results (*.met) All depths and water equivalents (mass) are taken VERTICALLY.
If AVGSUM_TIME_SERIES is set, mean fluxes and cumulated masses since last dump are written,
else current energy fluxes, cumulated masses over last computation_step_length (recommended setting in operational mode). If CUMSUM_MASS is set, current value of cumulated masses since begin of run are dumped.
NOTE: More...
 
virtual void writeProfile (const mio::Date &date, const SnowStation &Xdata)
 Write the Snow Profile Results, snow depth being taken VERTICALLY Prepare Output File for JAVA visualization (SNOWPACK format, *.pro) More...
 
virtual bool writeHazardData (const std::string &stationID, const std::vector< ProcessDat > &Hdata, const std::vector< ProcessInd > &Hdata_ind, const size_t &num)
 
- Public Member Functions inherited from SnowpackIOInterface
virtual ~SnowpackIOInterface ()
 
virtual bool snowCoverExists (const std::string &i_snowfile, const std::string &stationID) const =0
 
virtual void readSnowCover (const std::string &i_snowfile, const std::string &stationID, SN_SNOWSOIL_DATA &SSdata, ZwischenData &Zdata, const bool &read_salinity)=0
 
virtual void writeSnowCover (const mio::Date &date, const SnowStation &Xdata, const ZwischenData &Zdata, const bool &forbackup=false)=0
 
virtual void writeTimeSeries (const SnowStation &Xdata, const SurfaceFluxes &Sdata, const CurrentMeteo &Mdata, const ProcessDat &Hdata, const double wind_trans24)=0
 
virtual void writeProfile (const mio::Date &date, const SnowStation &Xdata)=0
 
virtual bool writeHazardData (const std::string &stationID, const std::vector< ProcessDat > &Hdata, const std::vector< ProcessInd > &Hdata_ind, const size_t &num)=0
 

Constructor & Destructor Documentation

◆ AsciiIO()

AsciiIO::AsciiIO ( const SnowpackConfig i_cfg,
const RunInfo run_info 
)

Member Function Documentation

◆ operator=()

AsciiIO & AsciiIO::operator= ( const AsciiIO source)

Assignement operator, required because of const "info" member.

◆ readSnowCover()

void AsciiIO::readSnowCover ( const std::string &  i_snowfile,
const std::string &  stationID,
SN_SNOWSOIL_DATA SSdata,
ZwischenData Zdata,
const bool &  read_salinity 
)
virtual

This routine reads the status of the snow cover at program start.

Version
10.02
Note
reads the old-styled sno-file format
Parameters
i_snowfilefile containing the initial state of the snowpack
stationID
SSdata
Zdata
read_salinity

Implements SnowpackIOInterface.

◆ snowCoverExists()

bool AsciiIO::snowCoverExists ( const std::string &  i_snowfile,
const std::string &  stationID 
) const
virtual

This routine checks if the specified snow cover data exists.

Parameters
i_snowfilefile containing the initial state of the snowpack
stationID
Returns
true if the file exists

Implements SnowpackIOInterface.

◆ writeHazardData()

bool AsciiIO::writeHazardData ( const std::string &  stationID,
const std::vector< ProcessDat > &  Hdata,
const std::vector< ProcessInd > &  Hdata_ind,
const size_t &  num 
)
virtual

Implements SnowpackIOInterface.

◆ writeProfile()

void AsciiIO::writeProfile ( const mio::Date &  i_date,
const SnowStation Xdata 
)
virtual

Write the Snow Profile Results, snow depth being taken VERTICALLY Prepare Output File for JAVA visualization (SNOWPACK format, *.pro)

Note
Parameters marked by an asterisk are available in RESEARCH visualisation only!
Version
12.04
Parameters
i_datethe current date
Xdata

Implements SnowpackIOInterface.

◆ writeSnowCover()

void AsciiIO::writeSnowCover ( const mio::Date &  date,
const SnowStation Xdata,
const ZwischenData Zdata,
const bool &  forbackup = false 
)
virtual

This routine writes the status of the snow cover at program termination and at specified backup times.

Note
original SNOWPACK format (*.snoold)
Version
11.02
Parameters
datecurrent
Xdata
Zdata
forbackupdump Xdata on the go

Implements SnowpackIOInterface.

◆ writeTimeSeries()

void AsciiIO::writeTimeSeries ( const SnowStation Xdata,
const SurfaceFluxes Sdata,
const CurrentMeteo Mdata,
const ProcessDat Hdata,
const double  wind_trans24 
)
virtual

Write all Time Series results (*.met) All depths and water equivalents (mass) are taken VERTICALLY.
If AVGSUM_TIME_SERIES is set, mean fluxes and cumulated masses since last dump are written,
else current energy fluxes, cumulated masses over last computation_step_length (recommended setting in operational mode). If CUMSUM_MASS is set, current value of cumulated masses since begin of run are dumped.
NOTE:

  1. neither AVGSUM_TIME_SERIES nor CUMSUM_MASS can be set if NUMBER_SLOPES > 1. Precipitations are dumped as rates (kg m-2 h-1) if PRECIP_RATES is set, otherwise as sum over the output time step.
    NOTE:
    1. The units of the corresponding SN_GUI plot will always appear as rate! When running SNOW_REDISTRIBUTION on virtual slopes, eroded mass will be dumped to the windward *.met file and added to the solid precipitations of the lee *.met file!
      • DO NOT change the order of parameters below! Additional parameters may be dumped at pos. 93[94] to 100 in writeTimeSeriesAddXXX()
        Parameters
        Xdata
        Sdata
        Mdata
        Hdata
        wind_trans24eroded snow from either flat field (present time step) or windward virtual slope (previous time step)

Implements SnowpackIOInterface.


The documentation for this class was generated from the following files: