mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Temperature: Interface for temperature's initial conditions
This commit is contained in:
1 parent
333a8a0970
commit
95dd648b90
15 files changed
+1619
-82
No files matched your search
+31
-1
@@ -106,6 +106,10 @@ from View.Pollutants.Window import PollutantsWindow
|
||||
from View.D90AdisTS.Window import D90AdisTSWindow
|
||||
from View.DIFAdisTS.Window import DIFAdisTSWindow
|
||||
|
||||
from View.InitialConditionsTemperature.Window import (
|
||||
InitialConditionsTemperatureWindow
|
||||
)
|
||||
|
||||
from Solver.Solvers import GenericSolver
|
||||
|
||||
from Model.Results.Results import Results
|
||||
@@ -157,7 +161,10 @@ define_model_action = [
|
||||
"action_menu_boundary_conditions_sediment",
|
||||
"action_menu_rep_additional_lines", "action_menu_output_rk",
|
||||
"action_menu_run_adists", "action_menu_pollutants",
|
||||
"action_menu_d90", "action_menu_dif", "action_menu_edit_geotiff"
|
||||
"action_menu_d90", "action_menu_dif", "action_menu_edit_geotiff",
|
||||
"action_menu_boundary_conditions_temperature",
|
||||
"action_menu_initial_conditions_temperature",
|
||||
"action_menu_weather_parameters",
|
||||
]
|
||||
|
||||
action = (
|
||||
@@ -267,6 +274,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
"""
|
||||
actions = {
|
||||
# Menu action
|
||||
"action_menu_initial_conditions_temperature":
|
||||
self.open_initial_conditions_temperature,
|
||||
"action_menu_dif": self.open_dif,
|
||||
"action_menu_d90": self.open_d90,
|
||||
"action_menu_pollutants": self.open_pollutants,
|
||||
@@ -1022,6 +1031,27 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
# SUB WINDOWS #
|
||||
###############
|
||||
|
||||
def open_initial_conditions_temperature(self):
|
||||
|
||||
iclist = self._study.river.ic_temperature.lst
|
||||
if len(iclist) != 0:
|
||||
ic_default = iclist[0]
|
||||
else:
|
||||
ic_default = self._study.river.ic_temperature.new(0)
|
||||
|
||||
if self.sub_window_exists(
|
||||
InitialConditionsTemperatureWindow,
|
||||
data=[self._study, None, ic_default]
|
||||
):
|
||||
return
|
||||
|
||||
InitialConditions = InitialConditionsTemperatureWindow(
|
||||
study=self._study,
|
||||
parent=self,
|
||||
data=ic_default
|
||||
)
|
||||
InitialConditions.show()
|
||||
|
||||
def open_d90(self):
|
||||
if len(self._study.river.d90_adists.lst) != 0:
|
||||
d90_default = self._study.river.d90_adists.lst[0]
|
||||
|
||||
Reference in new issue
Block a user