Skip to content

Commit

Permalink
changed place of NewMeltFreezeHeat function call
Browse files Browse the repository at this point in the history
  • Loading branch information
VirveKarsisto committed Aug 18, 2023
1 parent cd1afbf commit 1873be1
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 7 deletions.
Binary file modified RoadSurfUserManual.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/example1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ OBJFILES = $(FOBJFILES) $(COBJFILES)
LIBS += -lgfortran \
-lpthread \
-ljsoncpp \
-lroadsurf
../../libroadsurf.so

all: roadrunner
debug: roadrunner
Expand Down
1 change: 1 addition & 0 deletions examples/example1/src/InputSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ InputSettings::InputSettings(const Json::Value &pJson, const Options &pOptions)
override(&use_relaxation, json, "use_relaxation");
override(&DTSecs, json, "DTSecs");
override(&tsurfOutputDepth, json, "tsurfOutputDepth");
override(&NLayers, json, "NLayers");
override(&couplingEffectReduction, json, "couplingEffectReduction");
}
const auto json2 = pJson.get("output", nulljson);
Expand Down
1 change: 1 addition & 0 deletions examples/example1/src/InputSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ struct InputSettings

double DTSecs = 30.0; //!< time step in seconds
double tsurfOutputDepth = -9999.9; //!< Depth to interpolate output surface temperature
int NLayers=15; //!> Number of ground layers
int coupling_minutes = 180; //!< Coupling lenght in minutes
double couplingEffectReduction=4.0*3600; //!< Parameter used to calculate radiation
//!< coefficient after coupling
Expand Down
4 changes: 2 additions & 2 deletions examples/example1/src/Simulation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ SUBROUTINE runsimulation(outPointers, inPointers,&
end if

!set current values to atm%Tair etc
call SetCurrentValues(i, ground%Tmp, modelInput, atm, settings, surf, coupling,&
call SetCurrentValues(i, modelInput, atm, settings, surf, coupling,&
ground)

!If relaxation is used
if (settings%use_relaxation) Then
!Smooth t2m, rh and wind values when moving from initialization phase
!to forecasting phase
call RelaxationOperations(i, atm, settings,ground%Tmp)
call RelaxationOperations(i, atm, settings,ground)

end if
!Calculate temperature profile and storage values one timestep forward
Expand Down
1 change: 1 addition & 0 deletions examples/example2/src/InputSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ InputSettings::InputSettings(const Json::Value &pJson, const Options &pOptions)
override(&use_relaxation, json, "use_relaxation");
override(&DTSecs, json, "DTSecs");
override(&tsurfOutputDepth, json, "tsurfOutputDepth");
override(&NLayers, json, "NLayers");
override(&couplingEffectReduction, json, "couplingEffectReduction");
override(&use_obs_qc, json, "use_obs_qc");
}
Expand Down
1 change: 1 addition & 0 deletions examples/example2/src/InputSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct InputSettings

double DTSecs = 30.0; //!< time step in seconds
double tsurfOutputDepth = -9999.9; //!< Depth to interpolate output surface temperature
int NLayers=15;
int coupling_minutes = 180; //!< Coupling lenght in minutes
double couplingEffectReduction=4.0*3600; //!< Parameter used to calculate radiation
//!< coefficient after coupling
Expand Down
5 changes: 2 additions & 3 deletions examples/example2/src/Simulation.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "Constants.h"

!>Runs road weather model simulation
SUBROUTINE runsimulation(outPointers, inPointers,&
Expand Down Expand Up @@ -70,14 +69,14 @@ SUBROUTINE runsimulation(outPointers, inPointers,&
end if

!set current values to atm%Tair etc
call SetCurrentValues(i, ground%Tmp, modelInput, atm, settings, surf, coupling,&
call SetCurrentValues(i, modelInput, atm, settings, surf, coupling,&
ground)

!If relaxation is used
if (settings%use_relaxation) Then
!Smooth t2m, rh and wind values when moving from initialization phase
!to forecasting phase
call RelaxationOperations(i, atm, settings,ground%Tmp)
call RelaxationOperations(i, atm, settings,ground)

end if
!Calculate temperature profile and storage values one timestep forward
Expand Down
2 changes: 1 addition & 1 deletion src/BalanceModel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module Subroutine BalanceModelOneStep(SWi, LWi, phy, ground, surf, atm, &
end if

!> Calculate the heat needed to melt/freeze the whole uppermost snow/ice layer.
call NewMeltFreezeHeat(settings%DTSecs, surf, condParam)
! call NewMeltFreezeHeat(settings%DTSecs, surf, condParam)
!Check if melting
call melting(coupling%inCouplingPhase, coupling%lastTsurfObs, &
ground, depth,surf, &
Expand Down
1 change: 1 addition & 0 deletions src/Cond.f90
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module Subroutine RoadCond(MaxPormms, surf, atm, settings, &
If (surf%SrfWatmms < CP%MinWatmms) surf%SrfWatmms = 0.0 ! Stop from going negative
If (surf%SrfWatmms > CP%MaxWatmms) surf%SrfWatmms = CP%MaxWatmms ! Overflow

call NewMeltFreezeHeat(settings%DTSecs, surf, CP)
End Subroutine

!--------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 1873be1

Please sign in to comment.