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

Bugfix 3056 ugrid forecast reference time #3061

Merged
merged 13 commits into from
Jan 24, 2025
Merged
1 change: 1 addition & 0 deletions data/config/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ config_DATA = \
PlotModeFieldConfig_default \
Point2GridConfig_default \
UGridConfig_lfric \
UGridConfig_lfric_pressure_levels \
UGridConfig_mpas \
PlotPointObsConfig_default

Expand Down
1 change: 1 addition & 0 deletions data/config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ config_DATA = \
PlotModeFieldConfig_default \
Point2GridConfig_default \
UGridConfig_lfric \
UGridConfig_lfric_pressure_levels \
UGridConfig_mpas \
PlotPointObsConfig_default

Expand Down
5 changes: 3 additions & 2 deletions data/config/UGridConfig_lfric
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
//
// Unstructured grid configuration file.
//
// UGridConfig_lfric at the current working directory replaces the settings here.
// UGridConfig_lfric in the current working directory overrides the settings
// here for reading native model level data from the LFRic modeling system.
// For additional or updated information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Dimensions and variables mapping for LFric dataset
// Dimensions and variables mapping for LFRic dataset
//
ugrid_metadata_map = [
{ key = "dim_face"; val = "nMesh2d_face"; },
Expand Down
37 changes: 37 additions & 0 deletions data/config/UGridConfig_lfric_pressure_levels
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
////////////////////////////////////////////////////////////////////////////////
//
// Unstructured grid configuration file.
//
// UGridConfig_lfric_pressure_levels in the current working directory overrides
// the settings here for reading pressure level data from LFRic modeling system.
// For additional or updated information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Dimensions and variables mapping for LFRic dataset
//
ugrid_metadata_map = [
{ key = "dim_face"; val = "dim1"; },
{ key = "dim_node"; val = "nMesh2d_node"; },
{ key = "dim_edge"; val = "nMesh2d_edge"; },
{ key = "dim_time"; val = "time_counter"; },
{ key = "dim_vert"; val = "pressure"; },
{ key = "cell_id"; val = "indexToCellID"; },
{ key = "lat_face"; val = "Mesh2d_face_y"; },
{ key = "lon_face"; val = "Mesh2d_face_x"; },
{ key = "vert_face"; val = "pressure"; },
{ key = "lat_edge"; val = "Mesh2d_edge_y"; },
{ key = "lon_edge"; val = "Mesh2d_edge_x"; },
{ key = "lat_node"; val = "Mesh2d_node_y"; },
{ key = "lon_node"; val = "Mesh2d_node_x"; },
{ key = "time"; val = "time_instant"; }
];

ugrid_max_distance_km = 30;

////////////////////////////////////////////////////////////////////////////////

version = "V12.1.0";

////////////////////////////////////////////////////////////////////////////////
3 changes: 2 additions & 1 deletion data/config/UGridConfig_mpas
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//
// Unstructured grid configuration file.
//
// UGridConfig_mpas at the current working directory replaces the settings here.
// UGridConfig_mpas in the current working directory overrides the settings
// here for reading data from the MPAS modeling system.
// For additional or updated information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////
Expand Down
188 changes: 188 additions & 0 deletions internal/test_unit/config/PointStatConfig_ugrid_lfric_pressure_levels
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
////////////////////////////////////////////////////////////////////////////////
//
// Point-Stat configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Output model name to be written
//
model = "FCST";

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
desc = "NA";

////////////////////////////////////////////////////////////////////////////////

//
// Verification grid
// May be set separately in each "field" entry
//
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;

//
// Forecast and observation fields to be verified

fcst = {
sid_inc = [];
sid_exc = [];
obs_quality_inc = [];
obs_quality_exc = [];

file_type = NETCDF_UGRID;

field = [
{ name = "u_in_w3"; level = "(21,*)"; set_attr_level = "P500"; },
{ name = "u_in_w3"; level = "(24,*)"; set_attr_level = "P850"; }
];
}
obs = {
sid_inc = [];
sid_exc = [];
obs_quality_inc = [];
obs_quality_exc = [];

field = [
{ name = "UGRD"; level = "P500"; },
{ name = "UGRD"; level = "P850"; }
];
}

////////////////////////////////////////////////////////////////////////////////

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";
}

////////////////////////////////////////////////////////////////////////////////

//
// Interpolation methods
// May be set separately in each "obs.field" entry
//
interp = {
vld_thresh = 1.0;
shape = SQUARE;

type = [
{
method = NEAREST;
width = 1;
}
];
}

////////////////////////////////////////////////////////////////////////////////

//
// HiRA verification method
// May be set separately in each "obs.field" entry
//
hira = {
flag = FALSE;
width = [ 2, 3, 4, 5 ];
vld_thresh = 1.0;
cov_thresh = [ ==0.25 ];
shape = SQUARE;
prob_cat_thresh = [];
}

////////////////////////////////////////////////////////////////////////////////

//
// Threshold for SEEPS p1 (Probability of being dry)
//
seeps_p1_thresh = >=0.1&&<=0.85;

////////////////////////////////////////////////////////////////////////////////

//
// Statistical output types
// May be set separately in each "obs.field" entry
//
output_flag = {
fho = NONE;
ctc = NONE;
cts = NONE;
mctc = NONE;
mcts = NONE;
cnt = NONE;
sl1l2 = NONE;
sal1l2 = NONE;
vl1l2 = NONE;
val1l2 = NONE;
vcnt = NONE;
pct = NONE;
pstd = NONE;
pjc = NONE;
prc = NONE;
ecnt = NONE; // Only for HiRA.
orank = NONE; // Only for HiRA.
rps = NONE; // Only for HiRA.
eclv = NONE;
mpr = STAT;
seeps = NONE;
seeps_mpr = NONE;
}

////////////////////////////////////////////////////////////////////////////////

ugrid_dataset = "lfric_pressure_levels";
ugrid_max_distance_km = 30;
//ugrid_coordinates_file = "";

////////////////////////////////////////////////////////////////////////////////

tmp_dir = "/tmp";
output_prefix = "${OUTPUT_PREFIX}";
version = "V12.1.0";

////////////////////////////////////////////////////////////////////////////////
20 changes: 20 additions & 0 deletions internal/test_unit/xml/unit_ugrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,24 @@
</output>
</test>

<test name="point_stat_ugrid_lfric_pressure_levels">
<exec>&MET_BIN;/point_stat</exec>
<env>
<pair><name>BEG_DS</name> <value>-180000</value></pair>
<pair><name>END_DS</name> <value>180000</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>UGRID_LFRIC_PRESSURE_LEVELS</value></pair>
<pair><name>CONFIG_DIR</name> <value>&CONFIG_DIR;</value></pair>
</env>
<param> \
&DATA_DIR_UGRID;/lfric/lfric_2012-04-09_00.00.00.nc \
&OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \
&CONFIG_DIR;/PointStatConfig_ugrid_lfric_pressure_levels \
-ugrid_config ${MET_BASE}/config/UGridConfig_lfric_pressure_levels \
-outdir &OUTPUT_DIR;/point_stat_ugrid -v 4
</param>
<output>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_LFRIC_PRESSURE_LEVELS_180000L_20120409_180000V.stat</stat>
</output>
</test>

</met_test>
Loading
Loading