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

model_TFN_SW_GW #53

Open
wants to merge 72 commits into
base: SWGW
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
518a792
model_TFN_SW_GW simulates the interation between SW-GW.
Mar 31, 2021
b113e85
class to perform baseflow calculations
Mar 31, 2021
81b4b2f
input streamflow data for trial modelling
Mar 31, 2021
8a4077a
Mar 31, 2021
e94dd12
Mar 31, 2021
66633b6
Apr 20, 2021
4d54746
dev updates
Apr 21, 2021
bbc66da
dev new "objectiveFunction" and the "getStreamFlow" function
Apr 21, 2021
3d54590
now stuck in an interation between "ObjectiveFunction" and "solve"
Apr 23, 2021
3e0a150
clue for what the issue might be...
Apr 23, 2021
415834d
stuck at line 1230 of "model_TFN" cause it is calling getTransformedF…
Apr 28, 2021
161a710
now trying to have daily simulated gw head data to use for the basefl…
Apr 29, 2021
ea8fe6f
objective functions for flow and head are working
Apr 30, 2021
830ab7f
starting to include AMALGAM for joint calibration. Need to correct th…
May 1, 2021
407687d
including AMALGAM
May 1, 2021
e8ddad0
best way to include amalgam? and calibrate flow in hydrosight?
May 1, 2021
b59af88
now using daily cacthment average forcing (precip, PET Morton CRAE), …
May 3, 2021
ebd5564
starting to adapt AMALGAM for HydroSight SW_GW
May 7, 2021
1305497
AMALGAM.m working till line 167. It seems that it is managing to prod…
May 10, 2021
5e22ad9
Changed model_TFN_SW_GW to include "detectParameterChange(obj, param…
May 13, 2021
d36319f
model_TFN_SW_GW seems insensitive to new parameter sets for quick flo…
May 14, 2021
80bbb23
AMALGAM now able to run using parallel computing
May 31, 2021
9aad66a
Now I took back the .doingCalibration=true back to AMALGAM instead of…
May 31, 2021
3b6095a
Bug in AMALGAM fixed, which was stopping the genetic evolution of the…
Jun 2, 2021
a00f3e3
now preparing to plot the Simulate Vs. Observed flows and heads for d…
Jun 6, 2021
0b95ce7
AMALGAM tested till 900k iterations, which produced much better param…
Jun 14, 2021
d8cd2c3
Allowing Alpha in soilMoistureModels_2layer_v2.m to be calibrated (co…
Jun 21, 2021
09d3ad8
Now "model_TFN_SW_GW" and "AMALGAM" incorporate the ObjFun KGE as par…
Jun 28, 2021
6a2a11d
baseflow_v2 object created. Now testing its usage within model_TFN_SW_GW
Jun 29, 2021
40dacf7
Now testing "baseflow_v2" in "model_TFN_SW_GW"
Jun 29, 2021
9785105
New object "baseflow_v2" created, hard coded into model_TFN_SW_GW, an…
Jun 29, 2021
67332d9
Modification of the plausible range for the parameter in baseflow_v2.
Jul 1, 2021
66e0ceb
All new 9 baseflow objects (m1-m9) were created and tested, they are …
Jul 3, 2021
bf68fe2
Modification in AMALGAM successfully done to give the flow ObjFun val…
Jul 4, 2021
051548f
added option to choose which baseflow object using the model_Label pr…
Jul 4, 2021
0ae0e28
now working. For the getDerivedForcingData in model_TFN_SW_GW to call…
Jul 4, 2021
c73e4da
changed description of baseflow_v1.m
Jul 4, 2021
028971e
no particular changes, just saving.
Jul 5, 2021
3a0b398
All baseflow objects tested and working. The baseflow objects that as…
Jul 7, 2021
d9b7303
created "climateTransform_soilMoistureModels_2layer_v3.m", which shou…
Jul 9, 2021
c75db9d
hard wired the index of Layer2 parameters in "climateTransform_soilMo…
Jul 9, 2021
c6d6bc3
"climateTransform_soilMoistureModels_2layer_v3.m" seems to be working…
Jul 9, 2021
76562a7
testing in AMALGAM with normal for loop.
Jul 9, 2021
cba32b7
hard wired "climateTransform_soilMoistureModels_2layer_v3" when calli…
Jul 9, 2021
f3b6040
Trying to make AMALGAM to run using parallel computing with GPUs
Jul 12, 2021
4f27510
Now changing strategy and including "eps=S_min/SMSC" into "forcingTra…
Jul 25, 2021
596b11d
infiltration term from VIC model with a minimum soil moisture thresho…
Jul 29, 2021
ab9fade
added MIN(1.0, pow(((S_cap - soilMoisture[iDay-1])/(S_cap*(1-eps))),a…
Aug 13, 2021
76a6651
saved original MEX_files from original forcingTransform_soilMoisture.…
Aug 13, 2021
41d6fe2
saved the original MEX files before running Build_C_code.m to avoid l…
Aug 13, 2021
80772aa
new soil moisture model (forcingTransform_soilMoisture.c) has been co…
Aug 13, 2021
b82ea47
making a trial run
Aug 13, 2021
751ccdd
testing if the issue in model_TFN while running AMALGAM is caused by …
Aug 14, 2021
824fcf8
To avoid using different length of time-points for the calculation of…
Aug 26, 2021
addbc0b
starting to merge getStreamflow and objectiveFunction_joint in model_…
Aug 26, 2021
c95f389
COULD NOT not find bug in the current structure, which solves the soi…
Sep 4, 2021
30278f5
adding bi-directional baseflow flow head_to_flow functions. Missing t…
Feb 22, 2022
742fa22
new _bidirectional baseflow functions were implemented and tested. th…
Feb 24, 2022
595af70
Now working on how to include the convolution of the runoff output fi…
Mar 8, 2022
cdd3a2f
start to include interflow in the shallow 1-D soil model and created …
Mar 23, 2022
9db16c9
implemented hypothesis 1 and 2 of interflow formulation (interflow wi…
Mar 25, 2022
c758242
corrected some english typos in "climateTransform_soilMoistureModels_…
Mar 25, 2022
c2bc84e
"climateTransform_soilMoistureModels_interflow.m" is running and seem…
Mar 28, 2022
ffe6655
implemented the parameter "PET_scaler_interflow" and "eps_interflow" …
Apr 4, 2022
154a601
bugs fixed in the implementation of hypothesis 1-5 (parameters were i…
Apr 4, 2022
502b2af
Implemented the mass-balance validity condition to keep "total free-d…
Apr 5, 2022
dea0598
implemented the narrowed upper and lower bounds for head_threshold to…
Apr 6, 2022
6fc38f6
Decided that the best way to streamline the run of all scenarios and …
Apr 6, 2022
67be248
Clean version for GitHub
May 2, 2022
e0a4d48
Clean version for GitHub
May 2, 2022
a6b7691
Reorganize for GitHub merge
May 2, 2022
898ffe4
Corrected a bug in climateTransform_soilMoistureModels_interflow.m th…
May 2, 2022
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
90 changes: 48 additions & 42 deletions Build_C_code.m
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
function Build_C_code()

% This function biulds the required C MEX fucntions.
% NOTE, b default matlab uses -o2 optimisations.
% Chnaging this to -ofast reduces the doIRFconvolution.c
% runtime from 0.017534s to 0.010353s on a x64 Linux maxtine (in 2018) (41% faster).
%
% To change the Linux compile settings open the file ~/.matlab/R2016a/mex_C_glnxa64.xml
% and change:
% - 'COPTIMFLAGS="-O -DNDEBUG"' to 'COPTIMFLAGS="-Ofast -DNDEBUG"'
% - 'LDOPTIMFLAGS="-O"' to 'LDOPTIMFLAGS="-Ofast"'
%
% To chnage Windows Visual studio compier, open the file
% mex_C_win64.xml and chnage:
% - 'OPTIMFLAGS="/Ofast /Oy- /DNDEBUG"' to 'OPTIMFLAGS="/O2 /Oy- /DNDEBUG"'

arch=computer('arch');
mexopts = {'-O' '-v' ['-' arch]};
% 64-bit platform
if ~isempty(strfind(computer(),'64'))
mexopts(end+1) = {'-largeArrayDims'};
end

% invoke MEX compilation tool
if ispc
mex(mexopts{:},'algorithms\models\TransferNoise\ForcingTransformation\forcingTransform_soilMoisture.c');
mex(mexopts{:},'algorithms\models\TransferNoise\doIRFconvolution.c');

movefile('doIRFconvolution.mexw64', 'algorithms\models\TransferNoise\doIRFconvolution.mexw64')
movefile('forcingTransform_soilMoisture.mexw64', 'algorithms\models\TransferNoise\ForcingTransformation\forcingTransform_soilMoisture.mexw64')

else
mex(mexopts{:},'algorithms/models/TransferNoise/ForcingTransformation/forcingTransform_soilMoisture.c');
mex(mexopts{:},'algorithms/models/TransferNoise/doIRFconvolution.c');

movefile('doIRFconvolution.mexa64', 'algorithms/models/TransferNoise')
movefile('forcingTransform_soilMoisture.mexa64', 'algorithms/models/TransferNoise/ForcingTransformation')
end


end

function Build_C_code()


addpath(genpath([pwd, filesep, 'algorithms']));
addpath(genpath([pwd, filesep, 'dataPreparationAnalysis']));
addpath(genpath([pwd, filesep, 'Examples']));
addpath(genpath([pwd, filesep, 'GUI']));

% This function biulds the required C MEX fucntions.
% NOTE, b default matlab uses -o2 optimisations.
% Chnaging this to -ofast reduces the doIRFconvolution.c
% runtime from 0.017534s to 0.010353s on a x64 Linux maxtine (in 2018) (41% faster).
%
% To change the Linux compile settings open the file ~/.matlab/R2016a/mex_C_glnxa64.xml
% and change:
% - 'COPTIMFLAGS="-O -DNDEBUG"' to 'COPTIMFLAGS="-Ofast -DNDEBUG"'
% - 'LDOPTIMFLAGS="-O"' to 'LDOPTIMFLAGS="-Ofast"'
%
% To chnage Windows Visual studio compier, open the file
% mex_C_win64.xml and chnage:
% - 'OPTIMFLAGS="/Ofast /Oy- /DNDEBUG"' to 'OPTIMFLAGS="/O2 /Oy- /DNDEBUG"'

arch=computer('arch');
mexopts = {'-O' '-v' ['-' arch]};
% 64-bit platform
if ~isempty(strfind(computer(),'64'))
mexopts(end+1) = {'-largeArrayDims'};
end

% invoke MEX compilation tool
if ispc
mex(mexopts{:},'algorithms\models\TransferNoise\ForcingTransformation\c');
mex(mexopts{:},'algorithms\models\TransferNoise\doIRFconvolution.c');

movefile('doIRFconvolution.mexw64', 'algorithms\models\TransferNoise\doIRFconvolution.mexw64')
movefile('forcingTransform_soilMoisture.mexw64', 'algorithms\models\TransferNoise\ForcingTransformation\forcingTransform_soilMoisture.mexw64')

else
mex(mexopts{:},'algorithms/models/TransferNoise/ForcingTransformation/forcingTransform_soilMoisture.c');
mex(mexopts{:},'algorithms/models/TransferNoise/doIRFconvolution.c');

movefile('doIRFconvolution.mexa64', 'algorithms/models/TransferNoise')
movefile('forcingTransform_soilMoisture.mexa64', 'algorithms/models/TransferNoise/ForcingTransformation')
end


end

356 changes: 178 additions & 178 deletions ChangeLog.txt

Large diffs are not rendered by default.

18,382 changes: 9,191 additions & 9,191 deletions GUI/HydroSight_GUI.m

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions GUI/export_fig/LICENSE
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
Copyright (c) 2014, Oliver J. Woodford, Yair M. Altman
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the {organization} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2014, Oliver J. Woodford, Yair M. Altman
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the {organization} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading