Skip to content

Commit

Permalink
UGWP v0 v1 combined (NOAA-EMC#396)
Browse files Browse the repository at this point in the history
- combines the changes in PRs NOAA-EMC#360 and NOAA-EMC#382
- adds three regression tests `fv3_ccpp_gfsv16_ugwpv1 `, `fv3_ccpp_gfsv16_ugwpv1_warmstart` and `fv3_ccpp_gfsv16_ugwpv1_debug`
- contains updates and bugfixes for `nc_compare.py` and the CI tests from @MinsukJi-NOAA 
- update Python3 environment on jet.intel, gaea.intel, cheyenne.{intel,gnu}
- turn off (again) test `fv3_ccpp_decomp` on jet.intel, this test didn't work in the past, but recently it "passed", because the error checking with `nc_compare.py` failed silently and we didn't notice it

Co-authored-by: valery.yudin <valery.yudin@noaa.gov>
Co-authored-by: Michael Toy <michael.toy@noaa.gov>
Co-authored-by: MinsukJi-NOAA <minsuk.ji@noaa.gov>
  • Loading branch information
4 people committed Feb 16, 2021
1 parent d6a0b8c commit 8dabdb4
Show file tree
Hide file tree
Showing 23 changed files with 10,168 additions and 7,754 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ list(APPEND _fms_defs_public use_libMPI
if(QUAD_PRECISION)
list(APPEND _fms_defs_public ENABLE_QUAD_PRECISION)
endif()

# check gettid
include(CheckFunctionExists)
check_function_exists(gettid HAVE_GETTID)
if(HAVE_GETTID)
list(APPEND _fms_defs_public HAVE_GETTID)
endif()

target_compile_definitions(fms PUBLIC "${_fms_defs_public}")

if(32BIT)
Expand Down
2 changes: 1 addition & 1 deletion FV3
712 changes: 449 additions & 263 deletions tests/RegressionTests_cheyenne.gnu.log

Large diffs are not rendered by default.

2,216 changes: 1,201 additions & 1,015 deletions tests/RegressionTests_cheyenne.intel.log

Large diffs are not rendered by default.

2,236 changes: 1,211 additions & 1,025 deletions tests/RegressionTests_gaea.intel.log

Large diffs are not rendered by default.

712 changes: 449 additions & 263 deletions tests/RegressionTests_hera.gnu.log

Large diffs are not rendered by default.

2,332 changes: 1,259 additions & 1,073 deletions tests/RegressionTests_hera.intel.log

Large diffs are not rendered by default.

2,298 changes: 1,280 additions & 1,018 deletions tests/RegressionTests_jet.intel.log

Large diffs are not rendered by default.

2,332 changes: 1,259 additions & 1,073 deletions tests/RegressionTests_orion.intel.log

Large diffs are not rendered by default.

1,996 changes: 1,091 additions & 905 deletions tests/RegressionTests_wcoss_cray.log

Large diffs are not rendered by default.

2,314 changes: 1,250 additions & 1,064 deletions tests/RegressionTests_wcoss_dell_p3.log

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions tests/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ fi

if [ $BUILD = "true" ]; then

sed -i -e '/affinity.c/d' ../../CMakeLists.txt

sudo docker build --build-arg test_name=$TEST_NAME \
--build-arg build_case=$BUILD_CASE \
--no-cache \
Expand Down
18 changes: 13 additions & 5 deletions tests/compare_ncfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@
from netCDF4 import Dataset

with Dataset(sys.argv[1]) as nc1, Dataset(sys.argv[2]) as nc2:
# Check if the list of variables are the same
if nc1.variables.keys()!=nc2.variables.keys():
print("Variables are different")
sys.exit(1)
sys.exit(2)

for varname in nc1.variables.keys():
diff = nc2[varname][:]-nc1[varname][:]
if (np.abs(diff)).max() != 0:
print(varname,"is different")
sys.exit(1)
# First check if each variable has the same dimension
if np.shape(nc1[varname][:])!=np.shape(nc2[varname][:]):
print(varname,"dimension is different")
sys.exit(2)
# If dimension is the same, compare data
else:
diff = nc2[varname][:]-nc1[varname][:]

if (np.abs(diff)).max() != 0:
print(varname,"is different")
sys.exit(2)
22 changes: 22 additions & 0 deletions tests/fv3_conf/ccpp_gfsv16_ugwpv1_run.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
rm -rf INPUT RESTART
mkdir INPUT RESTART
if [ $WARM_START = .F. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/INPUT/* ./INPUT
else
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/INPUT/* ./INPUT
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/RESTART/* ./INPUT
fi
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/aerosol.dat .
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/co2historicaldata_201*.txt .
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/sfc_emissivity_idx.txt .
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/solarconstant_noaa_an.txt .
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/global_o3prdlos.f77 ./global_o3prdlos.f77
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/global_h2oprdlos.f77 ./global_h2oprdlos.f77
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/*grb .
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/*_table ./
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/nems.configure ./
cp @[INPUTDATA_ROOT]/FV3_input_data_ugwpv1/ugwp_c384_tau.nc ./ugwp_limb_tau.nc

if [ $DO_RRTMGP = .T. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_RRTMGP/* .
fi
Loading

0 comments on commit 8dabdb4

Please sign in to comment.