-
Notifications
You must be signed in to change notification settings - Fork 247
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
UGWP v0 v1 combined #396
UGWP v0 v1 combined #396
Changes from all commits
1b8b311
f249ca5
10dfee1
511e775
c581195
bafb063
05298be
5948a24
9caf739
a10796d
2c02679
8cd5dc6
609d93a
10761a3
7d677c5
8e5c863
d7b8d0f
52506c6
c0be172
7cf540c
b0ebc20
f89dac9
62424c0
3127675
e4d7ef3
e932f6d
c3c0502
6a6721c
09ab000
437457a
b55ea44
d099d10
33b0876
8518825
52356e7
bb1d782
c2e94e4
e032ad7
a85ee60
64a7cbb
675289c
0ce7958
f99e0a2
44a495b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
+2 −0 | ccpp/config/ccpp_prebuild_config.py | |
+348 −313 | ccpp/data/GFS_typedefs.F90 | |
+333 −262 | ccpp/data/GFS_typedefs.meta | |
+1 −1 | ccpp/physics | |
+94 −0 | ccpp/suites/suite_FV3_GFS_v16b_ugwpv1.xml |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. raise |
||
# 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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. raise |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use raise instead of sys.exit()