-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature 2842 ugrid config #2852
Merged
Merged
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
48b52e7
#2842 Removed UGrid related setting
9feae3d
#2842 Corrected vertical level for data_plane_array
01ae422
#2842 Do not allow the time range
1b43102
#2842 The UGridConfig file can be passed as ugrid_dataset
334b2a8
#2842 Changed -config option to -ugrid_config
b9ca329
#2842 Deleted UGrid configurations
7f25cf8
2842 Fix a compile error when UGrid is disabled
8293c53
#2842 Cleanup
816c12c
#2842 Added an unittest point_stat_ugrid_mpas_config
613035c
#2842 Added a PointStatConfig without UGrid dataset.
42f65bd
#2842 Corrected ty[po at the variable name
301a14b
Merge remote-tracking branch 'origin/develop' into feature_2842_ugrid…
0974159
Switched from time_centered to time_instant. I think time_centered is…
DanielAdriaansen 7933a7e
#2842 Removed ugrid_max_distance_km and unused metadata names
faac20c
#2842 Restored time variable for LFric
a253d1e
#2842 Restored time variable time_instant for LFric
3c16852
#2842 Adjust lon between -180 and 180
2472b84
#2842 Adjust lon between -180 and 180
9dfc8bf
#2842 Adjust lon between -180 and 180
fd42640
#2842 Adjusted lon to between -180 to 180
50d6e4a
#2842 Changed variable names
f620206
Per #2842, switch from degrees east to west right when the longitudes…
JohnHalleyGotway f25dd19
#2842, switch from degrees east to west right when the longitudes are…
07e4209
#2842 Cleanup debug messages
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
167 changes: 167 additions & 0 deletions
167
internal/test_unit/config/PointStatConfig_ugrid_no_dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Point-Stat configuration file. | ||
// | ||
// For additional information, please see the MET User's Guide. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
model = "WRF"; | ||
|
||
// | ||
// Output description to be written | ||
// May be set separately in each "obs.field" entry | ||
// | ||
desc = "NA"; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
regrid = { | ||
to_grid = NONE; | ||
method = NEAREST; | ||
width = 1; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
obs_window = { | ||
beg = ${BEG_DS}; | ||
end = ${END_DS}; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
mpr_column = []; | ||
mpr_thresh = []; | ||
cnt_thresh = [ NA ]; | ||
cnt_logic = UNION; | ||
wind_thresh = [ NA ]; | ||
wind_logic = UNION; | ||
eclv_points = 0.05; | ||
|
||
|
||
fcst = { | ||
sid_inc = []; | ||
sid_exc = []; | ||
obs_quality_inc = []; | ||
obs_quality_exc = []; | ||
|
||
field = [ | ||
{ name = "theta"; level = "L2"; message_type = "ADPSFC"; } | ||
]; | ||
|
||
} | ||
|
||
obs = { | ||
sid_inc = []; | ||
sid_exc = []; | ||
obs_quality_inc = []; | ||
obs_quality_exc = []; | ||
|
||
field = [ | ||
{ name = "TMP"; level = "P1000-500"; message_type = "ADPSFC"; } | ||
]; | ||
|
||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
climo_mean = obs; | ||
climo_mean = { | ||
file_name = []; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
mask = { | ||
grid = []; | ||
poly = []; | ||
sid = []; | ||
llpnt = [{ name = "ALLLATLON"; lat_thresh = NA; lon_thresh = NA; }]; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
ci_alpha = [ 0.05 ]; | ||
|
||
boot = { | ||
interval = PCTILE; | ||
rep_prop = 1.0; | ||
n_rep = 200; | ||
rng = "mt19937"; | ||
seed = "1"; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
interp = { | ||
vld_thresh = 1.0; | ||
|
||
type = [ | ||
{ | ||
method = NEAREST; | ||
width = 1; | ||
} | ||
]; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
hira = { | ||
flag = FALSE; | ||
width = [ 2, 3, 4, 5 ]; | ||
vld_thresh = 1.0; | ||
cov_thresh = [ ==0.25 ]; | ||
shape = SQUARE; | ||
prob_cat_thresh = []; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
output_flag = { | ||
fho = BOTH; | ||
ctc = BOTH; | ||
cts = BOTH; | ||
mctc = NONE; | ||
mcts = NONE; | ||
cnt = BOTH; | ||
sl1l2 = NONE; | ||
sal1l2 = NONE; | ||
vl1l2 = NONE; | ||
val1l2 = NONE; | ||
vcnt = BOTH; | ||
pct = NONE; | ||
pstd = NONE; | ||
pjc = NONE; | ||
prc = NONE; | ||
ecnt = NONE; | ||
orank = NONE; | ||
rps = NONE; | ||
eclv = BOTH; | ||
mpr = BOTH; | ||
seeps = NONE; | ||
seeps_mpr = NONE; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Threshold for SEEPS p1 (Probability of being dry) | ||
|
||
seeps_p1_thresh = NA; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Unstructured Grid (optional ecept ugrid_dataset) | ||
|
||
//ugrid_dataset = "mpas"; | ||
ugrid_max_distance_km = 35; | ||
//ugrid_map_config = ""; | ||
ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced.nc"; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
duplicate_flag = NONE; | ||
rank_corr_flag = TRUE; | ||
tmp_dir = "/tmp"; | ||
output_prefix = "${OUTPUT_PREFIX}"; | ||
version = "V12.0.0"; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -958,33 +958,39 @@ void UGridFile::read_netcdf_grid() | |||||
|
||||||
void UGridFile::set_dataset(ConcatString _dataset_name) { | ||||||
|
||||||
const char *ugrid_config_name = nullptr; | ||||||
ConcatString ugrid_config_name; | ||||||
const string method_nmame = "UGridFile::set_dataset() "; | ||||||
|
||||||
if (0 == _dataset_name.length()) { | ||||||
mlog << Error << "\nUGridFile::set_dataset()" | ||||||
<< " The \"" << conf_key_ugrid_dataset | ||||||
mlog << Error << "\n" << method_nmame | ||||||
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.
Suggested change
|
||||||
<< "The \"" << conf_key_ugrid_dataset | ||||||
<< "\" is not defined at the configuration file.\n\n"; | ||||||
exit(1); | ||||||
} | ||||||
dataset_name = _dataset_name; | ||||||
ConcatString dataset_config(def_config_prefix); | ||||||
dataset_config.add(dataset_name); | ||||||
if (!file_exists(dataset_config.c_str())) { | ||||||
dataset_config = def_config_prefix2; | ||||||
if (file_exists(dataset_name.c_str())) { | ||||||
/* UGridConfig file was passed as the ugrid_dataset */ | ||||||
ugrid_config_name = dataset_name; | ||||||
} | ||||||
else { | ||||||
ConcatString dataset_config(def_config_prefix); | ||||||
dataset_config.add(dataset_name); | ||||||
dataset_config = replace_path(dataset_config.c_str()); | ||||||
if (!file_exists(dataset_config.c_str())) { | ||||||
dataset_config = def_config_prefix2; | ||||||
dataset_config.add(dataset_name); | ||||||
dataset_config = replace_path(dataset_config.c_str()); | ||||||
} | ||||||
ugrid_config_name = dataset_config; | ||||||
} | ||||||
ugrid_config_name = dataset_config.c_str(); | ||||||
if (file_exists(ugrid_config_name)) { | ||||||
read_config(ugrid_config_name); | ||||||
if (file_exists(ugrid_config_name.c_str())) { | ||||||
read_config(ugrid_config_name.c_str()); | ||||||
} | ||||||
else { | ||||||
mlog << Error << "\nUGridFile::set_dataset()" | ||||||
<< " The UGrid dataset \"" << dataset_name << "\" is not supported. Please add \"" | ||||||
<< ugrid_config_name << "\".\n\n"; | ||||||
exit(1); | ||||||
} | ||||||
|
||||||
} | ||||||
|
||||||
//////////////////////////////////////////////////////////////////////// | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.