Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vendored cfe submodule #664

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/example_bmi_multi_realization_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -68,7 +68,7 @@
"land_surface_radiation~incoming~shortwave__energy_flux": "DSWRF_surface",
"land_surface_air__pressure": "PRES_surface",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
4 changes: 2 additions & 2 deletions data/example_bmi_multi_realization_config_w_netcdf.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -68,7 +68,7 @@
"land_surface_radiation~incoming~shortwave__energy_flux": "DSWRF_surface",
"land_surface_air__pressure": "PRES_surface",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
2 changes: 1 addition & 1 deletion data/example_bmi_multi_realization_config_w_nfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"ice_fraction_schaake(1,double,m,node)": 0.0,
"ice_fraction_xinan(1,double,1,node)": 0.0,
"ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"soil_moisture_profile(1,double,1,node)": 0.0,
"land_surface_air__temperature(1,double,K,node)": 285.8000183105469,
"atmosphere_water__liquid_equivalent_precipitation_rate(1,double,mm/s,node)": 0.1,
Expand Down
4 changes: 2 additions & 2 deletions data/example_bmi_multi_realization_config_w_noah_pet_cfe.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@
"land_surface_radiation~incoming~shortwave__energy_flux": "DSWRF_surface",
"land_surface_air__pressure": "PRES_surface",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
2 changes: 1 addition & 1 deletion data/example_bmi_multi_realization_config_w_routing.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"ice_fraction_schaake(1,double,m,node)": 0.0,
"ice_fraction_xinan(1,double,none,node)": 0.0,
"ice_fraction_xinanjiang(1,double,none,node)": 0.0,
"soil_moisture_profile(1,double,none,node)": 0.0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -80,7 +80,7 @@
"atmosphere_water__liquid_equivalent_precipitation_rate": "QINSUR",
"water_potential_evaporation_flux": "water_potential_evaporation_flux",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
4 changes: 2 additions & 2 deletions data/test_bmi_multi_realization_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -68,7 +68,7 @@
"land_surface_radiation~incoming~shortwave__energy_flux": "DSWRF_surface",
"land_surface_air__pressure": "PRES_surface",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
4 changes: 2 additions & 2 deletions data/test_bmi_multi_realization_config_w_netcdf.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -68,7 +68,7 @@
"land_surface_radiation~incoming~shortwave__energy_flux": "DSWRF_surface",
"land_surface_air__pressure": "PRES_surface",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
4 changes: 2 additions & 2 deletions data/test_bmi_multi_realization_config_w_noah_pet_cfe.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"uses_forcing_file": false,
"model_params": {
"sloth_ice_fraction_schaake(1,double,m,node)": 0.0,
"sloth_ice_fraction_xinan(1,double,1,node)": 0.0,
"sloth_ice_fraction_xinanjiang(1,double,1,node)": 0.0,
"sloth_smp(1,double,1,node)": 0.0
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@
"land_surface_radiation~incoming~shortwave__energy_flux": "DSWRF_surface",
"land_surface_air__pressure": "PRES_surface",
"ice_fraction_schaake" : "sloth_ice_fraction_schaake",
"ice_fraction_xinan" : "sloth_ice_fraction_xinan",
"ice_fraction_xinanjiang" : "sloth_ice_fraction_xinanjiang",
"soil_moisture_profile" : "sloth_smp"
},
"uses_forcing_file": false
Expand Down
6 changes: 3 additions & 3 deletions extern/cfe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ set(CFE_LIB_DESC_CMAKE "OWP CFE BMI Module Shared Library")
add_compile_definitions(BMI_ACTIVE)

if(WIN32)
add_library(cfebmi cfe/src/bmi_cfe.c cfe/src/cfe.c cfe/src/giuh.c)
add_library(cfebmi cfe/src/bmi_cfe.c cfe/src/cfe.c cfe/src/giuh.c cfe/src/conceptual_reservoir.c)
else()
add_library(cfebmi SHARED cfe/src/bmi_cfe.c cfe/src/cfe.c cfe/src/giuh.c)
add_library(cfebmi SHARED cfe/src/bmi_cfe.c cfe/src/cfe.c cfe/src/giuh.c cfe/src/conceptual_reservoir.c)
endif()

target_include_directories(cfebmi PRIVATE cfe/include)

set_target_properties(cfebmi PROPERTIES VERSION ${PROJECT_VERSION})

set_target_properties(cfebmi PROPERTIES PUBLIC_HEADER cfe/bmi_cfe.h)
set_target_properties(cfebmi PROPERTIES PUBLIC_HEADER cfe/include/bmi_cfe.h)

# Code requires minimum of C99 standard to compile
set_target_properties(cfebmi PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED ON)
Expand Down
2 changes: 1 addition & 1 deletion extern/cfe/cfe
Submodule cfe updated 45 files
+69 −0 .github/workflows/Build_and_Run_Standalone_Test.yml
+88 −0 .github/workflows/ngen_integration.yaml
+6 −0 .gitmodules
+81 −23 CMakeLists.txt
+136 −2 INSTALL.md
+16 −0 MODEL.md
+23 −147 README.md
+12 −0 cfebmi.pc.in
+68 −0 configs/README.md
+1 −1 configs/cat_89_bmi_config_cfe_unit_test.txt
+1 −0 extern/aorc_bmi
+1 −0 extern/evapotranspiration
+0 −54 forcing_code/include/PEtAerodynamicMethod.h
+0 −70 forcing_code/include/PEtCombinationMethod.h
+0 −48 forcing_code/include/PEtEnergyBalanceMethod.h
+0 −113 forcing_code/include/PEtPenmanMonteithMethod.h
+0 −57 forcing_code/include/PEtPriestleyTaylorMethod.h
+0 −207 forcing_code/include/aorc.h
+0 −475 forcing_code/include/aorc_tools.h
+0 −25 forcing_code/include/bmi_aorc.h
+0 −25 forcing_code/include/bmi_pet.h
+0 −296 forcing_code/include/pet.h
+0 −477 forcing_code/include/pet_tools.h
+0 −449 forcing_code/src/aorc.c
+0 −1,185 forcing_code/src/bmi_aorc.c
+0 −1,264 forcing_code/src/bmi_pet.c
+0 −619 forcing_code/src/pet.c
+2 −39 include/cfe.h
+47 −0 include/conceptual_reservoir.h
+0 −2 include/giuh.h
+83 −0 realizations/realization_cfe_pet.json
+83 −0 realizations/realization_cfe_pet_ngenCI.json
+136 −125 src/bmi_cfe.c
+7 −81 src/cfe.c
+86 −0 src/conceptual_reservoir.c
+1 −2 src/giuh.c
+3 −3 src/main.c
+8 −7 src/main_cfe_aorc_pet.c
+9 −9 src/main_cfe_aorc_pet_rz_aet.cxx
+5 −5 src/main_pass_forcings.c
+8 −1 test/README.md
+464 −0 test/main_unit_test.c
+0 −450 test/main_unit_test_bmi.c
+0 −4 test/make_and_run_bmi_unit_test.sh
+2 −0 test/run_unittest.sh