diff --git a/.github/workflows/ngen_integration.yaml b/.github/workflows/ngen_integration.yaml index f4df0ee..38270a1 100644 --- a/.github/workflows/ngen_integration.yaml +++ b/.github/workflows/ngen_integration.yaml @@ -62,7 +62,7 @@ jobs: mkdir ${{runner.temp}}/smp mv ./* ${{runner.temp}}/smp - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # Checkout and build SoilFreezeThaw - name: checkout actions in another repo uses: actions/checkout@v4 with: @@ -79,7 +79,7 @@ jobs: mkdir ${{runner.temp}}/sft mv ./* ${{runner.temp}}/sft - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # Checkout ngen - name: checkout actions in another repo uses: actions/checkout@v4 with: @@ -105,12 +105,11 @@ jobs: - name: Move LGAR-C File Including cmake_build to Appropriate Directory run: | - if [ -d "./extern/LGAR-C/" ] - then + if [ -d "./extern/LGAR-C/" ]; then rm -rf extern/LGAR-C fi - mkdir extern/LGAR-C - mv ${{runner.temp}}/lgar/* extern/LGAR-C + mkdir -p extern/LGAR-C/LGAR-C + mv ${{runner.temp}}/lgar/* extern/LGAR-C/LGAR-C - name: Move SFT Files Including cmake_build to Appropriate Directory run: | @@ -122,20 +121,20 @@ jobs: rm -rf extern/SoilMoistureProfiles/SoilMoistureProfiles/* mv ${{runner.temp}}/smp/* extern/SoilMoistureProfiles/SoilMoistureProfiles + # Run ngen with sft, smp, and lasam - name: Run Ngen Test with LASAM run: | - # Run ngen with sft, smp, and lasam mv ${{ steps.ngen_id1.outputs.build-dir }} ./ngen-build/ - cp extern/LGAR-C/data/vG_default_params.dat data/ - inputfile='extern/LGAR-C/realizations/realization_config_lasam_ngenCI.json' + cp extern/LGAR-C/LGAR-C/data/vG_default_params.dat data/ + inputfile='extern/LGAR-C/LGAR-C/realizations/realization_config_lasam.json' ./ngen-build/ngen ./data/catchment_data.geojson "cat-27" ./data/nexus_data.geojson "nex-26" $inputfile - name: Run Ngen Test with SFT and SMP run: | - inputfile='extern/LGAR-C/realizations/realization_config_lasam_sft_ngenCI.json' + inputfile='extern/LGAR-C/LGAR-C/realizations/realization_config_lasam_sft.json' ./ngen-build/ngen ./data/catchment_data.geojson "cat-27" ./data/nexus_data.geojson "nex-26" $inputfile - name: Run Ngen Test with SMP run: | - inputfile='extern/LGAR-C/realizations/realization_config_lasam_smp_ngenCI.json' + inputfile='extern/LGAR-C/LGAR-C/realizations/realization_config_lasam_smp.json' ./ngen-build/ngen ./data/catchment_data.geojson "cat-27" ./data/nexus_data.geojson "nex-26" $inputfile diff --git a/realizations/realization_config_lasam.json b/realizations/realization_config_lasam.json index bffbd30..26cebb6 100644 --- a/realizations/realization_config_lasam.json +++ b/realizations/realization_config_lasam.json @@ -45,8 +45,8 @@ "name": "bmi_c++", "params": { "model_type_name": "bmi_lasam", - "library_file": "./extern/LGAR-C/cmake_build/liblasambmi", - "init_config": "./extern/LGAR-C/configs/config_lasam_Phillipsburg.txt", + "library_file": "./extern/LGAR-C/LGAR-C/cmake_build/liblasambmi", + "init_config": "./extern/LGAR-C/LGAR-C/configs/config_lasam_Phillipsburg.txt", "allow_exceed_end_time": true, "main_output_variable": "precipitation_rate", "variables_names_map" : { @@ -73,7 +73,7 @@ } ], "forcing": { - "path" : "./extern/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" + "path" : "./extern/LGAR-C/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" } } } diff --git a/realizations/realization_config_lasam_ngenCI.json b/realizations/realization_config_lasam_ngenCI.json deleted file mode 100644 index bffbd30..0000000 --- a/realizations/realization_config_lasam_ngenCI.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "time": { - "start_time": "2016-10-01 00:00:00", - "end_time": "2017-08-09 11:00:00", - "output_interval": 3600 - }, - "catchments": { - "cat-27": { - "formulations": [ - { - "name": "bmi_multi", - "params": { - "model_type_name": "bmi_multi_lasam", - "forcing_file": "", - "init_config": "", - "allow_exceed_end_time": true, - "main_output_variable": "total_discharge", - "output_variables" : [ - "precipitation", - "potential_evapotranspiration", - "actual_evapotranspiration", - "surface_runoff", - "giuh_runoff", - "soil_storage", - "total_discharge", - "infiltration", - "percolation" - ], - "modules": [ - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_c++_sloth", - "library_file": "./extern/sloth/cmake_build/libslothmodel", - "init_config": "/dev/null", - "allow_exceed_end_time": true, - "main_output_variable": "z", - "uses_forcing_file": false, - "model_params": { - "soil_temperature_profile(1,double,K,node)" : 275.15 - } - } - }, - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_lasam", - "library_file": "./extern/LGAR-C/cmake_build/liblasambmi", - "init_config": "./extern/LGAR-C/configs/config_lasam_Phillipsburg.txt", - "allow_exceed_end_time": true, - "main_output_variable": "precipitation_rate", - "variables_names_map" : { - "precipitation_rate" : "P", - "potential_evapotranspiration_rate" : "PET" - }, - "output_variables" : [ - "precipitation", - "potential_evapotranspiration", - "actual_evapotranspiration", - "surface_runoff", - "giuh_runoff", - "soil_storage", - "total_discharge", - "infiltration", - "percolation" - ], - "uses_forcing_file": false - } - } - ], - "uses_forcing_file": false - } - } - ], - "forcing": { - "path" : "./extern/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" - } - } - } -} diff --git a/realizations/realization_config_lasam_sft.json b/realizations/realization_config_lasam_sft.json index 843299f..7e3b159 100644 --- a/realizations/realization_config_lasam_sft.json +++ b/realizations/realization_config_lasam_sft.json @@ -50,8 +50,8 @@ "name": "bmi_c++", "params": { "model_type_name": "bmi_smp", - "library_file": "./extern/SoilMoistureProfiles/cmake_build/libsmpbmi", - "init_config": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/configs/config_layered.txt", + "library_file": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/cmake_build/libsmpbmi", + "init_config": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/config/config_layered.txt", "allow_exceed_end_time": true, "main_output_variable": "soil_water_table", "variables_names_map" : { @@ -66,8 +66,8 @@ "name": "bmi_c++", "params": { "model_type_name": "bmi_sft", - "library_file": "./extern/SoilFreezeThaw/cmake_build/libsftbmi", - "init_config": "./extern/SoilFreezeThaw/SoilFreezeThaw/configs/laramie_config_sft.txt", + "library_file": "./extern/SoilFreezeThaw/SoilFreezeThaw/cmake_build/libsftbmi", + "init_config": "./extern/SoilFreezeThaw/SoilFreezeThaw/configs/laramie_config.txt", "allow_exceed_end_time": true, "main_output_variable": "num_cells", "variables_names_map" : { @@ -80,8 +80,8 @@ "name": "bmi_c++", "params": { "model_type_name": "bmi_lasam", - "library_file": "./extern/LGAR-C/cmake_build/liblasambmi", - "init_config": "./extern/LGAR-C/configs/config_lasam_sft_ngen.txt", + "library_file": "./extern/LGAR-C/LGAR-C/cmake_build/liblasambmi", + "init_config": "./extern/LGAR-C/LGAR-C/configs/config_lasam_sft_ngen.txt", "allow_exceed_end_time": true, "main_output_variable": "precipitation_rate", "variables_names_map" : { @@ -108,7 +108,7 @@ } ], "forcing": { - "path" : "./extern/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" + "path" : "./extern/LGAR-C/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" } } } diff --git a/realizations/realization_config_lasam_sft_ngenCI.json b/realizations/realization_config_lasam_sft_ngenCI.json deleted file mode 100644 index 57aa591..0000000 --- a/realizations/realization_config_lasam_sft_ngenCI.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "time": { - "start_time": "2016-10-01 00:00:00", - "end_time": "2017-08-09 11:00:00", - "output_interval": 3600 - }, - "catchments": { - "cat-27": { - "formulations": [ - { - "name": "bmi_multi", - "params": { - "model_type_name": "bmi_multi_lasam_smp", - "forcing_file": "", - "init_config": "", - "allow_exceed_end_time": true, - "main_output_variable": "total_discharge", - "output_variables" : [ - "precipitation", - "potential_evapotranspiration", - "actual_evapotranspiration", - "surface_runoff", - "giuh_runoff", - "soil_storage", - "total_discharge", - "infiltration", - "percolation" - ], - "modules": [ - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_c++_sloth", - "library_file": "./extern/sloth/cmake_build/libslothmodel", - "init_config": "/dev/null", - "allow_exceed_end_time": true, - "main_output_variable": "z", - "uses_forcing_file": false, - "model_params": { - "sloth_soil_storage(1,double,m,node)" : 0.0, - "soil_storage_change(1,double,m,node)" : 0.0, - "ground_surface_temperature(1,double,K,node)" : 275.15, - "Qb_topmodel(1,double,1,node)": 0.0, - "Qv_topmodel(1,double,1,node)": 0.0, - "global_deficit(1,double,1,node)": 0.0 - } - } - }, - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_smp", - "library_file": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/cmake_build/libsmpbmi", - "init_config": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/config/config_layered.txt", - "allow_exceed_end_time": true, - "main_output_variable": "soil_water_table", - "variables_names_map" : { - "soil_moisture_wetting_fronts" : "soil_moisture_wetting_fronts", - "soil_depth_wetting_fronts" : "soil_depth_wetting_fronts", - "num_wetting_fronts" : "soil_num_wetting_fronts" - }, - "uses_forcing_file": false - } - }, - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_sft", - "library_file": "./extern/SoilFreezeThaw/SoilFreezeThaw/cmake_build/libsftbmi", - "init_config": "./extern/SoilFreezeThaw/SoilFreezeThaw/configs/laramie_config.txt", - "allow_exceed_end_time": true, - "main_output_variable": "num_cells", - "variables_names_map" : { - "ground_temperature" : "ground_surface_temperature" - }, - "uses_forcing_file": false - } - }, - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_lasam", - "library_file": "./extern/LGAR-C/cmake_build/liblasambmi", - "init_config": "./extern/LGAR-C/configs/config_lasam_sft_ngen.txt", - "allow_exceed_end_time": true, - "main_output_variable": "precipitation_rate", - "variables_names_map" : { - "precipitation_rate" : "P", - "potential_evapotranspiration_rate" : "PET" - }, - "output_variables" : [ - "precipitation", - "potential_evapotranspiration", - "actual_evapotranspiration", - "surface_runoff", - "giuh_runoff", - "soil_storage", - "total_discharge", - "infiltration", - "percolation" - ], - "uses_forcing_file": false - } - } - ], - "uses_forcing_file": false - } - } - ], - "forcing": { - "path" : "./extern/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" - } - } - } -} diff --git a/realizations/realization_config_lasam_smp.json b/realizations/realization_config_lasam_smp.json index d829a43..ed2c40d 100644 --- a/realizations/realization_config_lasam_smp.json +++ b/realizations/realization_config_lasam_smp.json @@ -50,8 +50,8 @@ "name": "bmi_c++", "params": { "model_type_name": "bmi_smp", - "library_file": "./extern/SoilMoistureProfiles/cmake_build/libsmpbmi", - "init_config": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/configs/config_layered.txt", + "library_file": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/cmake_build/libsmpbmi", + "init_config": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/config/config_layered.txt", "allow_exceed_end_time": true, "main_output_variable": "soil_water_table", "variables_names_map" : { @@ -66,8 +66,8 @@ "name": "bmi_c++", "params": { "model_type_name": "bmi_lasam", - "library_file": "./extern/LGAR-C/cmake_build/liblasambmi", - "init_config": "./extern/LGAR-C/configs/config_lasam_Phillipsburg.txt", + "library_file": "./extern/LGAR-C/LGAR-C/cmake_build/liblasambmi", + "init_config": "./extern/LGAR-C/LGAR-C/configs/config_lasam_Phillipsburg.txt", "allow_exceed_end_time": true, "main_output_variable": "precipitation_rate", "variables_names_map" : { @@ -94,7 +94,7 @@ } ], "forcing": { - "path" : "./extern/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" + "path" : "./extern/LGAR-C/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" } } } diff --git a/realizations/realization_config_lasam_smp_ngenCI.json b/realizations/realization_config_lasam_smp_ngenCI.json deleted file mode 100644 index ececf6a..0000000 --- a/realizations/realization_config_lasam_smp_ngenCI.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "time": { - "start_time": "2016-10-01 00:00:00", - "end_time": "2017-08-09 11:00:00", - "output_interval": 3600 - }, - "catchments": { - "cat-27": { - "formulations": [ - { - "name": "bmi_multi", - "params": { - "model_type_name": "bmi_multi_lasam_smp", - "forcing_file": "", - "init_config": "", - "allow_exceed_end_time": true, - "main_output_variable": "total_discharge", - "output_variables" : [ - "precipitation", - "potential_evapotranspiration", - "actual_evapotranspiration", - "surface_runoff", - "giuh_runoff", - "soil_storage", - "total_discharge", - "infiltration", - "percolation" - ], - "modules": [ - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_c++_sloth", - "library_file": "./extern/sloth/cmake_build/libslothmodel", - "init_config": "/dev/null", - "allow_exceed_end_time": true, - "main_output_variable": "z", - "uses_forcing_file": false, - "model_params": { - "sloth_soil_storage(1,double,m,node)" : 0.0, - "soil_storage_change(1,double,m,node)" : 0.0, - "soil_temperature_profile(1,double,K,node)" : 275.15, - "Qb_topmodel(1,double,1,node)": 0.0, - "Qv_topmodel(1,double,1,node)": 0.0, - "global_deficit(1,double,1,node)": 0.0 - } - } - }, - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_smp", - "library_file": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/cmake_build/libsmpbmi", - "init_config": "./extern/SoilMoistureProfiles/SoilMoistureProfiles/config/config_layered.txt", - "allow_exceed_end_time": true, - "main_output_variable": "soil_water_table", - "variables_names_map" : { - "soil_moisture_wetting_fronts" : "soil_moisture_wetting_fronts", - "soil_depth_wetting_fronts" : "soil_depth_wetting_fronts", - "num_wetting_fronts" : "soil_num_wetting_fronts" - }, - "uses_forcing_file": false - } - }, - { - "name": "bmi_c++", - "params": { - "model_type_name": "bmi_lasam", - "library_file": "./extern/LGAR-C/cmake_build/liblasambmi", - "init_config": "./extern/LGAR-C/configs/config_lasam_Phillipsburg.txt", - "allow_exceed_end_time": true, - "main_output_variable": "precipitation_rate", - "variables_names_map" : { - "precipitation_rate" : "P", - "potential_evapotranspiration_rate" : "PET" - }, - "output_variables" : [ - "precipitation", - "potential_evapotranspiration", - "actual_evapotranspiration", - "surface_runoff", - "giuh_runoff", - "soil_storage", - "total_discharge", - "infiltration", - "percolation" - ], - "uses_forcing_file": false - } - } - ], - "uses_forcing_file": false - } - } - ], - "forcing": { - "path" : "./extern/LGAR-C/forcing/forcing_data_resampled_uniform_Phillipsburg.csv" - } - } - } -}