WSL/SLF GitLab Repository

Verified Commit eb1aa791 authored by Julien Esseiva's avatar Julien Esseiva
Browse files

A3D 3.2.1

parents
This diff is collapsed.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Welcome to the installation of Alpine3D!
This installer will guide you through installing Alpine3D and its html documentation. You can always check Alpine3D's home page at https://models.slf.ch/p/alpine3d to follow what is going on with Alpine3D!
In order to run the examples, please follow the "Getting Started" section in the html documentation.
You can find this file after installation in the "doc" directory of Alpine3D.
Alpine3D is a spatially distributed (surface), three dimensional (atmospheric) model for analyzing and predicting dynamics of snow-dominated surface processes in mountainous topography. It includes models for snow cover (SNOWPACK), vegetation and soil, snow transport, radiation transfer and runoff which can be enabled or disabled on demand.
The model supports a variety of input options including interpolation of meteorological weather stations, input from a meteorological model or from remote sensing data (MeteoIO) and has been parallelized in order to run on a multi-core computer (with open-mp or a cluster (with MPI).
Alpine3D has a broad variety of potential applications. Most dominant is the assessment of snow water resource dynamics in mountain catchments (Michlmayr et al., 2008). This includes predictions of future snow on the basis of climate change scenarios (Bavay et al., 2009, 2012). One exotic application of the model system Alpine3D is the forecasting of surface temperatures on ski-pistes, e.g. for the Vancouver winter olympics. For this forecast local shadings (might) change surface temperature up to 5 °C.
\ No newline at end of file
Begin4
Title: Alpine3D
Version: 3.2.0
Entered-date: 2020-10-03
Description: Spatially distributed, three dimensional model of snow-dominated surface processes in mountainous topography.
Keywords: alpine meteorology, catchment, energy balance, snow
Author: bavay@slf.ch (Mathias Bavay)
Maintained-by: bavay@slf.ch (Mathias Bavay)
Primary-site: http://models.slf.ch p/alpine3d/downloads/362/get/
10.41 M Alpine3D-3.2.0-src.tar.gz
Home-page: http://models.slf.ch/p/meteoio
Platforms: Linux and other Unices, Windows, OsX
Copying-policy: GNU Lesser Public License version 3
End
/***********************************************************************************/
/* Copyright 2009-2015 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of Alpine3D.
Alpine3D is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Alpine3D is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Alpine3D. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ALPINE3D_H
#define ALPINE3D_H
#include <alpine3d/DataAssimilation.h>
//#include <alpine3d/Alpine3D.h>
#include <alpine3d/AlpineControl.h>
#include <alpine3d/MPIControl.h>
#include <alpine3d/OMPControl.h>
//#include <alpine3d/MainPage.h>
#include <alpine3d/MeteoObj.h>
//#include <alpine3d/runoff/prevah_runoff/fortran_and_c.h>
//#include <alpine3d/runoff/prevah_runoff/Runoff.h>
//#include <alpine3d/runoff/prevah_runoff/f77-uscore.h>
//#include <alpine3d/runoff/prevah_runoff/wasim.h>
//#include <alpine3d/runoff/prevah_runoff/ascii.h>
#include <alpine3d/runoff/Runoff.h>
//#include <alpine3d/snowdrift/SnowDriftParallel.h>
#include <alpine3d/snowdrift/checksum.h>
#include <alpine3d/snowdrift/SnowDrift.h>
#include <alpine3d/snowdrift/Cell.h>
#include <alpine3d/ebalance/EBStruct.h>
#include <alpine3d/ebalance/TerrainRadiationHelbig.h>
#include <alpine3d/ebalance/EnergyBalance.h>
#include <alpine3d/ebalance/RadiationField.h>
#include <alpine3d/ebalance/VFSymetricMatrix.h>
#include <alpine3d/ebalance/TerrainRadiationSimple.h>
#include <alpine3d/ebalance/ViewFactorsHelbig.h>
#include <alpine3d/ebalance/ViewFactors.h>
#include <alpine3d/ebalance/ViewFactorsCluster.h>
#include <alpine3d/ebalance/TerrainRadiation.h>
#include <alpine3d/ebalance/ViewFactorsSectors.h>
#include <alpine3d/ebalance/ViewFactorsAlgorithm.h>
#include <alpine3d/ebalance/TerrainRadiationAlgorithm.h>
//#include <alpine3d/ebalance/TerrainRadiationPETSc.h>
//#include <alpine3d/snowdrift_par/clock.h>
//#include <alpine3d/snowdrift_par/SnowDriftParallel.h>
//#include <alpine3d/snowdrift_par/DriftData.h>
//#include <alpine3d/snowdrift_par/checksum.h>
//#include <alpine3d/snowdrift_par/SnowDrift.h>
//#include <alpine3d/snowdrift_par/AziSlope.h>
#include <alpine3d/Glaciers.h>
#include <alpine3d/TechSnowA3D.h>
#include <alpine3d/SnowpackInterface.h>
#include <alpine3d/SnowpackInterfaceWorker.h>
#include <alpine3d/AlpineMain.h>
#endif
/***********************************************************************************/
/* Copyright 2009-2015 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of Alpine3D.
Alpine3D is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Alpine3D is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Alpine3D. If not, see <http://www.gnu.org/licenses/>.
*/
#include <alpine3d/AlpineControl.h>
#include <alpine3d/AlpineMain.h>
#include <meteoio/MeteoIO.h>
using namespace mio;
using namespace std;
/**
* @brief Constructs and initialise the time steps loop.
* This module calls all the necessary other modules (ie thoese that have been enabled) and runs through the time steps.
* @param mysnowpack pointer to the initialized SNOWPACK Manager
* @param mysnowdrift pointer to the initialized Snowdrift Manager
* @param myeb pointer to the initialized radiation manager
* @param myda pointer to the initialized data assimilation Manager
* @param myrunoff pointer to the initialized runoff Manager
* @param cfg User configuration keys
* @param dem DEM defining the simulation
*/
AlpineControl::AlpineControl(SnowpackInterface *mysnowpack, SnowDriftA3D *mysnowdrift, EnergyBalance *myeb, DataAssimilation *myda, Runoff *myrunoff, const Config& cfg, const DEMObject& dem)
: meteo(cfg, dem), snowpack(mysnowpack), snowdrift(mysnowdrift), eb(myeb), da(myda), runoff(myrunoff),
snow_days_between(0.), nocompute(false), out_snow(true)
{
cfg.getValue("SNOW_WRITE", "Output", out_snow);
if (out_snow) {
cfg.getValue("SNOW_DAYS_BETWEEN", "Output", snow_days_between);
}
}
void AlpineControl::Run(Date i_startdate, const unsigned int max_steps)
{// This function organizes the whole simulation:
// initializations, time loop, getting input data, computing each time step and finally writing outputs
Date calcDate(i_startdate); //Date object initialized to julian 0.0 in local time zone with no DST
const double timeStep = dt_main/86400.;
Timer elapsed;
std::vector<MeteoData> vecMeteo; // to transfer meteo information
mio::Grid2DObject p, psum, psum_ph, vw, dw, rh, ta, ilwr;
const bool isMaster = MPIControl::instance().master();
if (isMaster) {
cout << "\n**** Done initializing\n";
cout << "**** Starting Calculation on date: " << calcDate.toString(Date::ISO) << " using Alpine3D version " << A3D_VERSION << "\n";
if (nocompute)
cout << "**** Performing dry run (--no-compute option)\n";
cout << "\n";
if (nocompute) {
const Grid2DObject maskGlacier( snowpack->getGrid(SnGrids::GLACIER) );
meteo.setGlacierMask(maskGlacier);
}
}
//if the meteo data would need to be resampled, we try to fill the buffer with a date a little bit before
if (snowdrift) meteo.setSkipWind(true); //do not fill grids if met3D
meteo.prepare(i_startdate);
elapsed.start();
for (unsigned int t_ind=0; t_ind<max_steps; t_ind++) { //main computational loop
const double elapsed_start = elapsed.getElapsed();
const double est_completion = elapsed_start * ((double)max_steps/(double)(t_ind+1) - 1.);
if (isMaster) {
cout << "\nSimulation step " << t_ind+1 << "/" << max_steps << " at time step " << calcDate.toString(mio::Date::ISO_TZ) << "\n";
cout << std::fixed << "Elapsed time: " << setprecision(1) << elapsed_start << " seconds\nEstimated completion in " << est_completion/3600. << " hours\n";
}
//for --no-compute, simply check the data and move on
if (nocompute) {
meteo.prepare(calcDate); //prepare the current timestep (because it could not be prepared before)
meteo.checkMeteoForcing(calcDate);
calcDate += timeStep; //move to next time step
continue;
}
//get 1D and 2D meteo for the current time step
try {
meteo.get(calcDate, vecMeteo);
meteo.get(calcDate, ta, rh, psum, psum_ph, vw, dw, p, ilwr);
} catch (IOException&) {
//saving state files before bailing out
if (isMaster) {
if (out_snow && t_ind>0 && snowpack)
snowpack->writeOutputSNO(calcDate-1./24.); //output for last hour
throw;
}
}
if (t_ind < (max_steps-1)) {
meteo.prepare(calcDate+timeStep); //prepare next timestep
}
if (eb) {
eb->setStations(vecMeteo);
}
if (!snowdrift) { //otherwise snowdrift calls snowpack.setMeteo()
if (snowpack) snowpack->setMeteo(psum, psum_ph, vw, dw, rh, ta, calcDate);
}
try { //Snowdrift
if (snowdrift) {
//meteo1d(MeteoData::TA) : big TODO, see with Christine if we could get rid of it
snowdrift->setMeteo(t_ind, psum, psum_ph, p, vw, rh, ta, ilwr, calcDate, vecMeteo);
snowdrift->Compute(calcDate);
}
} catch (std::exception& e) {
cout << "[E] Exception: Snowdrift compute\n";
cout << e.what() << endl;
throw;
}
try {
if (eb && !snowdrift) { //otherwise snowdrift calls eb.setMeteo()
eb->setMeteo(ilwr, ta, rh, p, calcDate);
}
} catch (std::bad_alloc&) {
cout << "[E] AlpineControl : Virtual memory exceeded\n";
} catch (std::exception& e) {
cout << "[E] Exception: Ebalance compute\n";
cout << e.what() << endl;
throw;
}
try { //Data Assimilation
if (da) da->Compute(calcDate);
} catch (std::exception& e) {
cout << "[E] Exception: Data Assimilation compute\n";
cout << e.what() << endl;
throw;
}
try { //do some outputs
if ( snowpack && out_snow && (t_ind > 0)) {
const unsigned int output_step = static_cast<unsigned int>( Optim::round(snow_days_between*24.) );
if (snow_days_between>0 && (t_ind%output_step)==0)
snowpack->writeOutputSNO(calcDate);
}
} catch (std::exception& e) {
printf("[e] Exception: time dependent outputs\n");
cout << e.what() << endl;
throw;
}
if (isMaster) {
cout << "[i] timing (seconds spent): " << std::setprecision(3) << std::fixed<< "\n";
cout << "\tmeteo=" << meteo.getTiming() << " ";
if (eb) cout << "ebalance=" << eb->getTiming() << " ";
if (snowdrift) cout << "snowdrift=" << snowdrift->getTiming() << " ";
if (snowpack) cout << "snowpack=" << snowpack->getTiming() << " ";
if (runoff) cout << "runoff=" << runoff->getTiming() << " ";
cout << "\n\ttotal=" << elapsed.getElapsed()-elapsed_start << endl;
}
calcDate += timeStep; //move to next time step
} /* For all times max_steps */
//Finish the program: Write SNO Files and put final output on the screen
if (snowpack && out_snow && !nocompute){
if (isMaster) cout << "[i] Simulation finished, writing output files...\n";
snowpack->writeOutputSNO(calcDate);
}
}
/***********************************************************************************/
/* Copyright 2009-2015 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of Alpine3D.
Alpine3D is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Alpine3D is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Alpine3D. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ALPINECONTROL_H
#define ALPINECONTROL_H
#include <stdio.h>
#include <meteoio/MeteoIO.h>
#include <snowpack/libsnowpack.h>
#include <alpine3d/SnowpackInterface.h>
#include <alpine3d/snowdrift/SnowDrift.h>
#include <alpine3d/ebalance/EnergyBalance.h>
#include <alpine3d/DataAssimilation.h>
#include <alpine3d/MeteoObj.h>
#include <alpine3d/MPIControl.h>
/**
* @page restarts Restarts
* It is possible to regularly dump the exact status of each simulated pixel and then restart from a previously saved such backup.
* In order to do so, it is necessary to enable writting out these status files, to copy them at the required timestep and then tell the model
* to reread them when starting. These files are just regular SMET ".sno" files such as produced and used by Snowpack but for each simulated pixel.
*
* The following keys control this process, in the [Output] section:
* + SNOW_WRITE: is set to TRUE, enable writing these files;
* + SNOW_DAYS_BETWEEN: how many days between two updates to these files;
*
* On the command line, the switch "--restart" tells Alpine3D to read one file for each pixel instead of one file per land use class. Of course, all
* the usual configuration keys for the "sno" files apply (see \ref reading_snow_files "reading snow files").
*
* @note You MUST set the key "EXPERIMENT_NAME" in the [Output] section since this is used to name the files necessary for restarts
*/
class AlpineControl
{
public:
AlpineControl(SnowpackInterface *mysnowpack,
SnowDriftA3D *mysnowdrift,
EnergyBalance *myeb,
DataAssimilation *myda,
Runoff *myrunoff,
const mio::Config& cfg,
const mio::DEMObject& dem);
void Run(mio::Date i_startdate, const unsigned int max_steps);
void setNoCompute(bool i_nocompute) {nocompute = i_nocompute;}
private:
MeteoObj meteo;
SnowpackInterface *snowpack;
SnowDriftA3D *snowdrift;
EnergyBalance *eb;
DataAssimilation* da;
Runoff* runoff;
double snow_days_between;
bool nocompute, out_snow; // no computation, only parse inputs (check mode)
};
#endif
/***********************************************************************************/
/* Copyright 2009-2015 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of Alpine3D.
Alpine3D is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Alpine3D is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Alpine3D. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef DEBUG_ARITHM
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <fenv.h>
#endif
#include <exception>
#include <iostream>
#include <csignal>
#include <unistd.h>
#include <getopt.h>
#include <ctime>
#include <meteoio/MeteoIO.h>
#include <snowpack/libsnowpack.h>
#include <alpine3d/AlpineMain.h>
#include <alpine3d/AlpineControl.h>
#include <alpine3d/MPIControl.h>
#include <alpine3d/ebalance/EnergyBalance.h>
#include <alpine3d/snowdrift/SnowDrift.h>
#include <alpine3d/SnowpackInterface.h>
#include <alpine3d/DataAssimilation.h>
using namespace std;
using namespace mio;
//Global variables for AlpineMain
static int steps = 0; //how many hours to simulate
static Date startdate;
static bool enable_eb=false, enable_drift=false, enable_runoff=false, enable_da=false, nocompute=false, restart=false;
static int npsnowpack=1, npebalance=1;
inline void Usage(char *prog)
{
cout << "Usage: " << prog << "\n";
cout << "\t-a, --startdate=YYYY-MM-DDTHH:MM (e.g.:2008-08-11T09:00)\n";
cout << "\t-z, --enddate=YYYY-MM-DDTHH:MM (e.g.:2008-08-11T09:00) OR ";
cout << "-n, --steps=<number of timesteps>\n";
cout << "\t[--enable-eb] (default:off)\n";
cout << "\t[--enable-runoff] (default:off)\n";
cout << "\t[--enable-drift] (default:off)\n";
cout << "\t[--enable-da] (default:off)\n";
cout << "\t[--no-compute] Don't compute the simulation, only parse and validate the inputs (default:off)\n";
cout << "\t[--restart] Restart simulation from previous .sno files (default:off)\n";
cout << "\t[-p, --np-snowpack=<number of processors for SnowPack>]\n";
cout << "\t[-b, --np-ebalance=<number of processors for Ebalance>]\n";
cout << "\t[-i, --iofile=<MeteoIO ini file> (default:./io.ini)]\n";
cout << "\t[-h, --help] Print help message and version information\n";
exit(1);
}
inline void parseCmdLine(int argc, char **argv, Config &cfg)
{
std::string iofile( "io.ini" );
int eeb=0, edr=0, ero=0, eda=0, nco=0, rst=0;
int longindex=0, opt = -1;
bool setStart=false, setEnd=false, setSteps=false;
std::string start_date_input, end_date_input;
const struct option long_options[] =
{
/* These options set a flag. */
{"enable-eb", no_argument,&eeb, 1},
{"enable-drift", no_argument,&edr, 1},
{"enable-runoff", no_argument,&ero, 1},
{"enable-da", no_argument,&eda, 1},
{"no-compute", no_argument,&nco, 1},
{"restart", no_argument,&rst, 1},
/* These options don't set a flag.
We distinguish them by their indices. */
{"np-snowpack", required_argument, 0, 'p'},
{"np-ebalance", required_argument, 0, 'b'},
{"iofile", required_argument, 0, 'i'},
{"startdate", required_argument, 0, 'a'},
{"enddate", required_argument, 0, 'z'},
{"steps", required_argument, 0, 'n'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};