Exemple #1
0
import sys

sys.path.append('../../PyTOPKAPI')

import pytopkapi
from pytopkapi.results_analysis import plot_Qsim_Qobs_Rain, plot_soil_moisture_maps
from pytopkapi.parameter_utils.create_file import generate_param_file
from pytopkapi.parameter_utils import modify_file
import os

fn_ini = 'create_the_parameter_files/create_file.ini'
#
# # Generate Parameter Files
# generate_param_file(fn_ini, isolated_cells=False)
# print "Cell Parameter file created"
#
# # slope corrections
# modify_file.zero_slope_management('create_the_parameter_files/zero_slope_management.ini')
# print "Zero Slope corrections made"

# # run the model
pytopkapi.run('./run_the_model/TOPKAPI.ini')

# Plot the hydrograph
plot_Qsim_Qobs_Rain.run('./run_the_model/plot-flow-precip.ini')

# # # Plot soil moisture
# plot_soil_moisture_maps.run('./run_the_model/plot-soil-moisture-maps.ini')
Exemple #2
0
import sys
sys.path.append('../../PyTOPKAPI')

import pytopkapi
from pytopkapi.results_analysis import plot_Qsim_Qobs_Rain, plot_soil_moisture_maps
import os
import h5py
# from PIL import Image

os.chdir("./run_the_model")

pytopkapi.run('TOPKAPI.ini')

plot_Qsim_Qobs_Rain.run('plot-flow-precip.ini')

# plot_soil_moisture_maps.run('plot-soil-moisture-maps.ini')
#
# # results
# result_sim5 = h5py.File("../../simulations/TEST SIMULAITON5/run_the_model/results/results.h5")
# channel_flows = result_sim5['Channel/Qc_out'][...]
# flow = channel_flows[:,0]
#
# soil_stores = result_sim5['Soil/V_s'][...]
# soil = soil_stores[:, :10]
#
# # channel_flow = result_sim5['Channel']['Qc_out'][:]
# # w, h = channel_flow.shape
# # img = Image.fromarray(channel_flow, 'RGB')
import sys
sys.path.append('../../PyTOPKAPI')

import pytopkapi
from pytopkapi.results_analysis import plot_Qsim_Qobs_Rain, plot_soil_moisture_maps
from pytopkapi.parameter_utils.create_file import generate_param_file
from pytopkapi.parameter_utils import modify_file
import os


fn_ini = 'create_the_parameter_files/create_file.ini'

# # Generate Parameter Files
# generate_param_file(fn_ini, isolated_cells=False)
# print "Cell Parameter file created"
#
# # slope corrections
# modify_file.zero_slope_management('create_the_parameter_files/zero_slope_management.ini')
# print "Zero Slope corrections made"

# run the model
pytopkapi.run('./run_the_model/TOPKAPI.ini')

# Plot the hydrograph
plot_Qsim_Qobs_Rain.run('./run_the_model/plot-flow-precip.ini')

# # # Plot soil moisture
# plot_soil_moisture_maps.run('./run_the_model/plot-soil-moisture-maps.ini')