예제 #1
0
 def setUp(self) -> None:
     """choose basins with small DOR """
     config_dir = definitions.CONFIG_DIR
     self.config_file_1 = os.path.join(config_dir, "dam/config1_exp6.ini")
     self.config_file_2 = os.path.join(config_dir, "dam/config2_exp6.ini")
     self.subdir = r"dam/exp6"
     self.config_data_1 = GagesConfig.set_subdir(self.config_file_1,
                                                 self.subdir)
     self.config_data_2 = GagesConfig.set_subdir(self.config_file_2,
                                                 self.subdir)
     add_model_param(self.config_data_1, "model", seqLength=1)
     # choose some small basins, unit: SQKM
     # self.basin_area_screen = 100
     test_epoch_lst = [
         100, 200, 220, 250, 280, 290, 295, 300, 305, 310, 320, 400, 500
     ]
     # self.test_epoch = test_epoch_lst[0]
     # self.test_epoch = test_epoch_lst[1]
     # self.test_epoch = test_epoch_lst[2]
     # self.test_epoch = test_epoch_lst[3]
     # self.test_epoch = test_epoch_lst[4]
     # self.test_epoch = test_epoch_lst[5]
     # self.test_epoch = test_epoch_lst[6]
     # self.test_epoch = test_epoch_lst[7]
     # self.test_epoch = test_epoch_lst[8]
     # self.test_epoch = test_epoch_lst[9]
     self.test_epoch = test_epoch_lst[10]
예제 #2
0
 def setUp(self) -> None:
     """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
     to be moved to right dir manually """
     config_dir = definitions.CONFIG_DIR
     self.config_file_natflow = os.path.join(config_dir,
                                             "storage/config1_exp1.ini")
     self.config_file_lstm = os.path.join(config_dir,
                                          "storage/config2_exp1.ini")
     self.subdir = r"storage/exp1"
     self.config_data_natflow = GagesConfig.set_subdir(
         self.config_file_natflow, self.subdir)
     self.config_data_lstm = GagesConfig.set_subdir(self.config_file_lstm,
                                                    self.subdir)
     add_model_param(self.config_data_lstm, "model", seqLength=1)
     test_epoch_lst = [
         100, 200, 220, 250, 270, 280, 290, 300, 310, 320, 400
     ]
     # self.test_epoch = test_epoch_lst[0]
     # self.test_epoch = test_epoch_lst[1]
     # self.test_epoch = test_epoch_lst[2]
     # self.test_epoch = test_epoch_lst[3]
     # self.test_epoch = test_epoch_lst[4]
     # self.test_epoch = test_epoch_lst[5]
     # self.test_epoch = test_epoch_lst[6]
     # self.test_epoch = test_epoch_lst[7]
     # self.test_epoch = test_epoch_lst[8]
     # self.test_epoch = test_epoch_lst[9]
     self.test_epoch = test_epoch_lst[10]
예제 #3
0
 def setUp(self) -> None:
     """choose basins with small DOR """
     config_dir = definitions.CONFIG_DIR
     # self.sim_config_file = os.path.join(config_dir, "dam/config1_exp2.ini")
     # self.config_file = os.path.join(config_dir, "dam/config2_exp2.ini")
     # self.subdir = "dam/exp2"
     self.sim_config_file = os.path.join(config_dir,
                                         "simulate/config1_exp3.ini")
     self.config_file = os.path.join(config_dir,
                                     "simulate/config2_exp3.ini")
     self.subdir = "simulate/exp3"
     self.config_data_natflow = GagesConfig.set_subdir(
         self.sim_config_file, self.subdir)
     self.config_data_lstm = GagesConfig.set_subdir(self.config_file,
                                                    self.subdir)
     add_model_param(self.config_data_lstm, "model", seqLength=1)
     # choose some small basins, unit: SQKM
     # self.basin_area_screen = 100
     test_epoch_lst = [
         100, 200, 220, 250, 280, 290, 295, 300, 305, 310, 320
     ]
     # self.test_epoch = test_epoch_lst[0]
     # self.test_epoch = test_epoch_lst[1]
     # self.test_epoch = test_epoch_lst[2]
     # self.test_epoch = test_epoch_lst[3]
     # self.test_epoch = test_epoch_lst[4]
     # self.test_epoch = test_epoch_lst[5]
     # self.test_epoch = test_epoch_lst[6]
     self.test_epoch = test_epoch_lst[7]
예제 #4
0
    def setUp(self) -> None:
        """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
        to be moved to right dir manually """
        config_dir = definitions.CONFIG_DIR
        # self.config_file_1 = os.path.join(config_dir, "inv/config_inv_1_ex3.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config_inv_2_ex3.ini")
        # self.subdir = r"inv/exp3"
        # self.config_file_1 = os.path.join(config_dir, "inv/config_inv_1_ex4.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config_inv_2_ex4.ini")
        # self.subdir = r"inv/exp4"
        # self.config_file_1 = os.path.join(config_dir, "inv/config_inv_1_ex5.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config_inv_2_ex5.ini")
        # self.subdir = r"inv/exp5"
        # self.config_file_1 = os.path.join(config_dir, "inv/config_inv_1_ex6.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config_inv_2_ex6.ini")
        # self.subdir = r"inv/exp6"
        # self.config_file_1 = os.path.join(config_dir, "inv/config_inv_1_ex7.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config_inv_2_ex7.ini")
        # self.subdir = r"inv/exp7"
        # self.config_file_1 = os.path.join(config_dir, "inv/config_inv_1_ex8.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config_inv_2_ex8.ini")
        # self.subdir = r"inv/exp8"
        # self.config_file_1 = os.path.join(config_dir, "inv/config1_exp10.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config2_exp10.ini")
        # self.subdir = r"inv/exp10"

        # self.config_file_1 = os.path.join(config_dir, "inv/config1_exp1.ini")
        # self.config_file_2 = os.path.join(config_dir, "inv/config2_exp1.ini")
        # self.subdir = r"inv/exp1"
        # self.config_data_1 = GagesConfig.set_subdir(self.config_file_1, self.subdir)
        # self.config_data_2 = GagesConfig.set_subdir(self.config_file_2, self.subdir)
        # add_model_param(self.config_data_1, "model", seqLength=7)
        self.config_file_1 = os.path.join(config_dir, "inv/config1_exp2.ini")
        self.config_file_2 = os.path.join(config_dir, "inv/config2_exp2.ini")
        self.subdir = r"inv/exp2"
        self.config_data_1 = GagesConfig.set_subdir(self.config_file_1,
                                                    self.subdir)
        self.config_data_2 = GagesConfig.set_subdir(self.config_file_2,
                                                    self.subdir)
        add_model_param(self.config_data_1, "model", seqLength=1)
        # choose some small basins, unit: SQKM
        # self.basin_area_screen = 100
        test_epoch_lst = [
            100, 200, 220, 250, 280, 290, 295, 300, 305, 310, 320, 400, 500
        ]
        # self.test_epoch = test_epoch_lst[0]
        # self.test_epoch = test_epoch_lst[1]
        # self.test_epoch = test_epoch_lst[2]
        # self.test_epoch = test_epoch_lst[3]
        # self.test_epoch = test_epoch_lst[4]
        # self.test_epoch = test_epoch_lst[5]
        # self.test_epoch = test_epoch_lst[6]
        self.test_epoch = test_epoch_lst[7]
예제 #5
0
    def setUp(self) -> None:
        """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
        to be moved to right dir manually """
        config_dir = definitions.CONFIG_DIR
        # self.config_file_1 = os.path.join(config_dir, "siminv/config_siminv_1_exp2.ini")
        # self.config_file_2 = os.path.join(config_dir, "siminv/config_siminv_2_exp2.ini")
        # self.config_file_3 = os.path.join(config_dir, "siminv/config_siminv_3_exp2.ini")
        # self.subdir = r"siminv/exp2"
        # self.config_file_1 = os.path.join(config_dir, "siminv/config_siminv_1_exp3.ini")
        # self.config_file_2 = os.path.join(config_dir, "siminv/config_siminv_2_exp3.ini")
        # self.config_file_3 = os.path.join(config_dir, "siminv/config_siminv_3_exp3.ini")
        # self.subdir = r"siminv/exp3"
        # self.config_file_1 = os.path.join(config_dir, "siminv/config_siminv_1_exp4.ini")
        # self.config_file_2 = os.path.join(config_dir, "siminv/config_siminv_2_exp4.ini")
        # self.config_file_3 = os.path.join(config_dir, "siminv/config_siminv_3_exp4.ini")
        # self.subdir = r"siminv/exp4"

        # self.config_file_1 = os.path.join(config_dir, "siminv/config1_exp10.ini")
        # self.config_file_2 = os.path.join(config_dir, "siminv/config2_exp10.ini")
        # self.config_file_3 = os.path.join(config_dir, "siminv/config3_exp10.ini")
        # self.subdir = r"siminv/exp10"
        self.config_file_1 = os.path.join(config_dir,
                                          "siminv/config1_exp1.ini")
        self.config_file_2 = os.path.join(config_dir,
                                          "siminv/config2_exp1.ini")
        self.config_file_3 = os.path.join(config_dir,
                                          "siminv/config3_exp1.ini")
        self.subdir = r"siminv/exp1"
        self.config_data_sim = GagesConfig.set_subdir(self.config_file_1,
                                                      self.subdir)
        self.config_data_inv = GagesConfig.set_subdir(self.config_file_2,
                                                      self.subdir)
        self.config_data = GagesConfig.set_subdir(self.config_file_3,
                                                  self.subdir)
        add_model_param(self.config_data_inv, "model", seqLength=1)
        test_epoch_lst = [
            100, 200, 220, 250, 280, 290, 295, 300, 305, 310, 320, 400, 500
        ]
        # self.test_epoch = test_epoch_lst[0]
        # self.test_epoch = test_epoch_lst[1]
        # self.test_epoch = test_epoch_lst[2]
        # self.test_epoch = test_epoch_lst[3]
        # self.test_epoch = test_epoch_lst[4]
        # self.test_epoch = test_epoch_lst[5]
        # self.test_epoch = test_epoch_lst[6]
        # self.test_epoch = test_epoch_lst[7]
        # self.test_epoch = test_epoch_lst[8]
        # self.test_epoch = test_epoch_lst[9]
        # self.test_epoch = test_epoch_lst[10]
        # self.test_epoch = test_epoch_lst[11]
        self.test_epoch = test_epoch_lst[12]
예제 #6
0
 def setUp(self) -> None:
     """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
     to be moved to right dir manually """
     config_dir = definitions.CONFIG_DIR
     self.sim_config_file = os.path.join(config_dir, "dam/config1_exp14.ini")
     self.config_file = os.path.join(config_dir, "dam/config2_exp14.ini")
     self.subdir = "dam/exp14"
     self.config_data = GagesConfig.set_subdir(self.config_file, self.subdir)
     self.sim_config_data = GagesConfig.set_subdir(self.sim_config_file, self.subdir)
     add_model_param(self.config_data, "model", seqLength=1)
     # self.nid_file = 'PA_U.xlsx'
     # self.nid_file = 'OH_U.xlsx'
     self.nid_file = 'NID2018_U.xlsx'
     self.test_epoch = 300
예제 #7
0
 def setUp(self) -> None:
     """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
     to be moved to right dir manually """
     config_dir = definitions.CONFIG_DIR
     # self.config_file = os.path.join(config_dir, "da/config_da_exp1.ini")
     # self.subdir = r"da/exp1"
     # self.config_file = os.path.join(config_dir, "da/config_da_exp2.ini")
     # self.subdir = r"da/exp2"
     self.config_file = os.path.join(config_dir, "da/config_exp10.ini")
     self.subdir = r"da/exp10"
     self.config_data = GagesConfig.set_subdir(self.config_file,
                                               self.subdir)
     add_model_param(self.config_data, "model", seqLength=7)
     # choose some small basins, unit: SQKM
     self.basin_area_screen = 100
예제 #8
0
    def setUp(self) -> None:
        """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
        to be moved to right dir manually """
        config_dir = definitions.CONFIG_DIR

        # self.sim_config_file = os.path.join(config_dir, "forecast/config_forecast_1_exp1.ini")
        # self.config_file = os.path.join(config_dir, "forecast/config_forecast_2_exp1.ini")
        # self.subdir = r"forecast/exp1"

        self.sim_config_file = os.path.join(
            config_dir, "forecast/config_forecast_1_exp2.ini")
        self.config_file = os.path.join(config_dir,
                                        "forecast/config_forecast_2_exp2.ini")
        self.subdir = r"forecast/exp2"

        self.sim_config_data = GagesConfig.set_subdir(self.sim_config_file,
                                                      self.subdir)
        self.config_data = GagesConfig.set_subdir(self.config_file,
                                                  self.subdir)
        add_model_param(self.config_data, "model", seqLength=7, fcstLength=2)
예제 #9
0
 def setUp(self) -> None:
     """before all of these, natural flow model need to be generated by config.ini of gages dataset, and it need
     to be moved to right dir manually """
     config_dir = definitions.CONFIG_DIR
     # self.config_file_natflow = os.path.join(config_dir, "storage/config1_exp2.ini")
     # self.config_file_storage = os.path.join(config_dir, "storage/config2_exp2.ini")
     # self.subdir = r"storage/exp2"
     self.config_file_natflow = os.path.join(config_dir, "storage/config1_exp3.ini")
     self.config_file_storage = os.path.join(config_dir, "storage/config2_exp3.ini")
     self.subdir = r"storage/exp3"
     self.config_data_natflow = GagesConfig.set_subdir(self.config_file_natflow, self.subdir)
     self.config_data_storage = GagesConfig.set_subdir(self.config_file_storage, self.subdir)
     # To simulate storage, get info from previous T time-seq natflow (set several months)
     add_model_param(self.config_data_storage, "model", storageLength=100, seqLength=1)
     test_epoch_lst = [100, 200, 220, 250, 280, 290, 295, 300, 305, 310, 320, 400, 500]
     # self.test_epoch = test_epoch_lst[0]
     # self.test_epoch = test_epoch_lst[1]
     # self.test_epoch = test_epoch_lst[2]
     # self.test_epoch = test_epoch_lst[3]
     # self.test_epoch = test_epoch_lst[4]
     # self.test_epoch = test_epoch_lst[5]
     # self.test_epoch = test_epoch_lst[6]
     self.test_epoch = test_epoch_lst[7]