MATLAB FILES TO IMPORT GEOTOP KMACKENZIE INPUT-OUTPUT FILES
In this session some useful Matlab scripts for GEOtop are added.
You need to have installed Matlab.
* 1. Import in Matlab the output of GEOtop saved in the folder /output/tabs
* 2. Plot with Matlab the output of GEOtop saved in the folder /output/tabs
Then download the two zipped files Mfiles_KMackenzie and Mfiles_utilities.
'''How to use the scripts'''
You should open Matlab and go in to the directory Mfiles_kmackenzie where the scripts are.
Eventually load the script directory in the path.
You should load also the directory Mfiles_utilities in the path, where some other needed scripts are present.
To load the data run: load_kmac.m
You should edit the variable mysim inside the script to specify the path where is the simulation.
To plot the outputs averaged for the whole basin: plot_kmac_basin.m
To plot the outputs averaged for the control point #1: plot_kmac_point.m
To plot the soil temperature, suction potential and water content soil layer profiles for the control point #1: plot_kmac_profiles.m
'''Description of the GEOtop scripts'''
* - load_kmac.m
It loads GEOTOP KMackenzie temporal inputs/outputs.
You should edit the variable 'mysim' in the m-file to specify the simulation path.
It loads:
the file ´01_flows.txt´ in the variable ´flows´,
loads ´02_basin.txt´ in ´basin´
loads ´ocontrol_parameters.txt´ in ´parameters´
For the point scale simulation:
loads the variables in ´options_point.txt´
loads the variables in ´parameters.txt´
It loads multiple point data:
´04_point0001.txtv´ in ´point´ ´
´06_psiz_MEAN0001.txt´ in ´psiz ´ ´
´08_THETAICEz_MEAN0001.txt´ in ´thetaicezv´ ´
- import_kmac_data
Function called by load_kmac.m
function simpath=import_kmac_data(myfile)
- adapted x geotop kmackenzie simulations import a kmackenzie time series file
Inputs:
- 'myfile': string name of the file to import
Outputs:
- mydata: array with numeric data mytimes: array with the time in days (Matlab standard date time) mydates: string array with the dates mylabels: string array with column labels
- load_kmackenziepath
- function simpath=load_kmackenziepath(mysim)
- adapted x geotop kmackenzie simulations load the path of the simulation mysim Inputs: 'mysim': string name of the simulation Outputs: simpath: simulation path
- unload_kmackenziepath
- function unload_kmackenziepath(mysim)
- adapted for GEOTOP kmackenzie outputs unload the path of the mysimulation mysim Inputs: 'mysim': string name of the simulation Outputs: clear variable simpath
- plot_kmac_basin.m
plots GEOTOP KMackenzie temporal outputs averaged for the whole basin written in the files 01_flows.txt and 02_basin.txt load before load_kmac.m
- plot_kmac_point.m
plots most of GEOTOP KMackenzie temporal outputs for the control point # 1 written in the file 04_point0001.txt load before load_kmac.m
- plot_kmac_profiles.m
plots soil temperature, suction potential and water content soil layer profiles for the control point for the control point # 1 written in the files:
´05_Tz_MEAN0001.txt´ for ´Tz ´
´06_psiz_MEAN0001.txt´ in ´psiz ´
´07_THETAz_MEAN0001.txt´ in ´thetaz´
load before load_kmac.m
