Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct DtPlotDischarge #110

Open
wants to merge 6 commits into
base: v2.2.1-old-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/geotop/inputKeywords.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ void geotop::input::ConfigStore::init()
initValue("SpecificStorativityBedrock",
std::vector<double>(5, geotop::input::gDoubleNoValue));

initValue("DtPlotDischarge", std::vector<double> {0});
initValue("DtPlotDischarge", double(0));

initValue("VMualem", std::vector<double> {0.5});

Expand Down
23 changes: 7 additions & 16 deletions src/geotop/parameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1410,27 +1410,18 @@ static void assign_numeric_parameters(Par *par,

par->ST = getDoubleValueWithDefault(lConfigStore, "StandardTimeSimulation",
0., false);
// this below is a scalar:
//

// par->Dtplot_discharge.resize(par->init_date.size() + 1, 0);
par->Dtplot_discharge = 0;

std::vector<double> lDtPlotDischarge = getDoubleVectorValueWithDefault(
lConfigStore, "DtPlotDischarge", 0., true, 1, false);
par->Dtplot_discharge = lDtPlotDischarge[0];

par->plot_discharge_with_Dt_integration.resize(2, 0);
par->Dtplot_discharge = getDoubleValueWithDefault(lConfigStore, "DtPlotDischarge",
0., false);

par->state_discharge = 0;
par->Dtplot_discharge *= 3600.;
if (par->Dtplot_discharge > 1.E-5 && par->Dtplot_discharge <= minDt)
{
par->plot_discharge_with_Dt_integration[1] = 1;
}
else
if (par->Dtplot_discharge > 1.E-5 && par->Dtplot_discharge < par->Dt)
{
par->plot_discharge_with_Dt_integration[1] = 0;
lg->logsf(geotop::logger::WARNING,
"Dtplot_discharge %.0f seconds will be increased to Dt %.0f",
par->Dtplot_discharge,par->Dt);
par->Dtplot_discharge = par->Dt;
}
if (par->Dtplot_discharge > 1.E-5) par->state_discharge = 1;

Expand Down
1 change: 0 additions & 1 deletion src/geotop/struct.geotop.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ class Par
double Ks_channel;
double depr_channel;

GeoVector<short> plot_discharge_with_Dt_integration;
GeoVector<short> plot_point_with_Dt_integration;
GeoVector<short> plot_basin_with_Dt_integration;

Expand Down
8 changes: 8 additions & 0 deletions tests/1D/PureDrainageDischarge/DESCRIPTION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Model: GEOtop
Compiler:
Processor:
Author: S.Endrizzi&S.Cozzini modified by SSenoner
Date: 2019-01-04
Name: PureDrainageDischarge
Description: Pure Drainage test case modified by addind discharge output
Output: ...
136 changes: 136 additions & 0 deletions tests/1D/PureDrainageDischarge/geotop.inpts
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
!*******************************
!******* CONFIGURATION *********
!*******************************
TimeStepEnergyAndWater = 3600
InitDateDDMMYYYYhhmm = 18/06/2014 19:00
EndDateDDMMYYYYhhmm = 07/07/2014 01:00
EnergyBalance =1
WaterBalance = 1
PointSim = 1

!*******************************
!********* GEOGRAPHY ***********
!*******************************
Latitude = 40.25
Longitude = 16.31
StandardTimeSimulation=1.0

!*******************************
!****** METEO STATIONS *********
!*******************************
NumberOfMeteoStations=1
MeteoStationCoordinateX=609904.1
MeteoStationCoordinateY=4345653.1
MeteoStationLatitude=40.25
MeteoStationLongitude=16.31
MeteoStationElevation=300
MeteoStationStandardTime=1.0

HeaderDateDDMMYYYYhhmmMeteo = "POSIX"
HeaderJulianDayfrom0Meteo = "JD"
HeaderIPrec = "Iprec"
HeaderWindVelocity = "WindSp"
HeaderWindDirection = "WindDir"
HeaderRH = "RH"
HeaderAirTemp = "AirT"
HeaderSWglobal = "Swglob"
HeaderCloudSWTransmissivity = "CloudTrans"


!********************************************
!****** INIT AND BOUNDARY CONDITIONS ********
!********************************************

InitWaterTableDepth= 5000.0
FreeDrainageAtLateralBorder=0
FreeDrainageAtBottom=0

!************************************
!******* POINTS OF INTEREST *********
!************************************
PointFile = "listpoints"
HeaderPointID = "ID"
HeaderCoordinatePointX = "xcoord"
HeaderCoordinatePointY = "ycoord"
HeaderPointElevation="zcoord"
HeaderPointLandCoverType="landcover"
HeaderPointSoilType="soiltype"
HeaderPointSlope="slope"
HeaderPointAspect="aspect"
HeaderPointSkyViewFactor="sky"
HeaderPointBedrockDepth="bedrock"

!*******************************
!******* INPUT ************
!*******************************
MeteoFile = "meteo/meteo"

!*******************************
!******** LAND COVER **********
!*******************************
NumLandCoverTypes = 1
SoilRoughness = 100.0
SoilAlbVisDry = 0.2
SoilAlbNIRDry = 0.2
SoilAlbVisWet = 0.2
SoilAlbNIRWet = 0.2
SoilEmissiv = 0.96
SurFlowResLand = 0.5
VegHeight =1800.0
LSAI = 0.6
CanopyFraction = 0.0
RootDepth =1000.0
VegReflectVis = 0.1
VegReflNIR = 0.58
VegTransVis = 0.05
VegTransNIR = 0.25

!*******************************
!******* SOIL TYPE ************
!*******************************
SoilParFile = "soil/soil"
SoilLayerTypes = 1
InitSoilTemp = 14.0
InitSoilTempBedrock = 14.0
ThermalConductivitySoilSolids = 2.5
ThermalCapacitySoilSolids = 2300000.0

HeaderSoilDz = "Dz"
HeaderLateralHydrConductivity = "Kh"
HeaderNormalHydrConductivity = "Kv"
HeaderThetaRes = "res"
HeaderFieldCapacity = "fc"
HeaderThetaSat = "sat"
HeaderAlpha = "a"
HeaderN = "n"
HeaderSpecificStorativity = "SS"

!*******************************
!******* NUMERICS **********
!*******************************
HeatEqTol = 1.0E-6
RichardMaxIter = 1500
RichardInitForc = 0.01

!*************************************
!******* OUTPUT TIME SERIES **********
!*************************************
DtPlotDischarge = 0.5
!=============================================================================
! DISCHARGE OUTPUT
!=============================================================================
DischargeFile = "output-tabs/discharge"
DtPlotPoint = 1
SoilTempProfileFile="output-tabs/soiltemp"
SoilLiqContentProfileFile="output-tabs/thetaliq"
SoilLiqWaterPressProfileFile="output-tabs/soilpsi"
PointOutputFile="output-tabs/point"
PointAll=1
SoilAll=1

!*******************************
!********* RECOVERY ************
!*******************************
!SubfolderRecoveryFiles="rec"
!ContinuousRecovery=0.0208333333333333

Loading