Skip to content

Commit

Permalink
Cleanup_after_CI_PR (#16)
Browse files Browse the repository at this point in the history
* cleanup after git actions PR, merging/removing realization files.

* adding option -p to create parent directories

* path correction, vG_default_params.dat

* path correction in the realization file

* added comments - minor changes suggested by the reviewer.
  • Loading branch information
ajkhattak authored Jan 9, 2024
1 parent 53c0d3e commit a9e497d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 322 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ngen_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -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
6 changes: 3 additions & 3 deletions realizations/realization_config_lasam.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand All @@ -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"
}
}
}
Expand Down
80 changes: 0 additions & 80 deletions realizations/realization_config_lasam_ngenCI.json

This file was deleted.

14 changes: 7 additions & 7 deletions realizations/realization_config_lasam_sft.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand All @@ -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" : {
Expand All @@ -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" : {
Expand All @@ -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"
}
}
}
Expand Down
115 changes: 0 additions & 115 deletions realizations/realization_config_lasam_sft_ngenCI.json

This file was deleted.

10 changes: 5 additions & 5 deletions realizations/realization_config_lasam_smp.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand All @@ -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" : {
Expand All @@ -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"
}
}
}
Expand Down
Loading

0 comments on commit a9e497d

Please sign in to comment.