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 2867 point2grid qc unittest #2913

Merged
merged 31 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4c843ac
#2867 Added compute_adp_qc_flag and adjusted ADP QC flags
Apr 24, 2024
438c2ee
#2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC fl…
Apr 30, 2024
d9d287c
#2867 Added get_nc_att_values_
Apr 30, 2024
96fde58
#2867 Added get_nc_att_values. Added the argument allow_conversion to…
Apr 30, 2024
e7e25a8
#2867 Read the ADP QC flag values and meanings attributes from DQF va…
Apr 30, 2024
2ede9d7
#2867 Cleanup
May 8, 2024
338cee9
#2867 Corrected indent
May 8, 2024
ddd0080
#2867 Changed log message
May 8, 2024
6672e83
#2867 Removed unused argument
May 9, 2024
fd2c0b4
#2867 Removed unused argument
May 9, 2024
f8e8a83
Cleanup
May 9, 2024
b327881
#2867 Fix SonarQube findings
May 9, 2024
6fd7721
#2867 Deleted protected section with no members
May 10, 2024
d2084b6
#2867 Cleanup
May 10, 2024
68b6f70
#2867 FIxed SonarQube findings; unused local variables, decalare as c…
May 10, 2024
7200b8b
#2867 MOved include directives to top
May 10, 2024
2f982d8
#2867 Changed some argumenmt with references to avoid copying objects
May 10, 2024
11d7533
#2867 Do not filter by QC flag if -qc is not given
May 10, 2024
dc39560
#2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW
May 10, 2024
5aaa383
#2867 Added log message back which were deleted accidently
May 15, 2024
2b86dbf
#2867 Chaned statci const to constexpr
May 16, 2024
ec22c1a
#2867 Initial release. Separated from nc_utils.h
May 16, 2024
579fa52
@2867 Added nc_utils_core.h
May 16, 2024
4f0ca12
#2867 Moved some blocks to nc_utils_core.h
May 16, 2024
9271d63
#2867 Include nc_utils_core.h
May 16, 2024
547b26b
#2867 Added const references
May 16, 2024
a1b08ca
#2867 Some 'static const' were chnaged to constexpr
Jun 10, 2024
47fa422
#2867 Changed -qc options (1,2,3 to 0,1 - high & medium) for AOD
Jun 10, 2024
a3b6cb3
#2867 Merged develop branch
Jun 11, 2024
17c72d5
#2867 Merged develop branch
Jun 11, 2024
6e592d4
#2867 Corrected the unit test name
Jun 11, 2024
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
8 changes: 4 additions & 4 deletions internal/test_unit/xml/unit_point2grid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
G212 \
&OUTPUT_DIR;/point2grid/point2grid_GOES_16_AOD_TO_G212_compute.nc \
-field 'name="AOD"; level="(*,*)";' \
-qc 1,2,3 -method MAX \
-qc 0,1 -method MAX \
-v 1
</param>
<output>
Expand Down Expand Up @@ -167,7 +167,7 @@
&OUTPUT_DIR;/point2grid/point2grid_GOES_16_ADP.nc \
-field 'name="AOD_Smoke"; level="(*,*)";' \
-adp &DATA_DIR_MODEL;/goes_16/OR_ABI-L2-ADPC-M6_G16_s20192662141196_e20192662143569_c20192662144526.nc \
-qc 1,2 -method MAX \
-qc 0,1 -method MAX \
-v 1
</param>
<output>
Expand Down Expand Up @@ -213,7 +213,7 @@
</output>
</test>

<test name="point2grid_GOES_16_ADP_Enterprise_high">
<test name="point2grid_GOES_16_ADP_Enterprise_high_medium">
<exec>&MET_BIN;/point2grid</exec>
<env>
<pair><name>MET_TMP_DIR</name> <value>&OUTPUT_DIR;/point2grid</value></pair>
Expand Down Expand Up @@ -259,7 +259,7 @@
G212 \
&OUTPUT_DIR;/point2grid/point2grid_GOES_16_AOD_TO_G212_unsigned.nc \
-field 'name="AOD"; level="(*,*)";' \
-qc 1,2,3 -method MAX \
-qc 0,1,2 -method MAX \
-v 1
</param>
<output>
Expand Down
104 changes: 52 additions & 52 deletions src/libcode/vx_nc_util/nc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,49 +52,49 @@ typedef unsigned char uchar;

#define OBS_BUFFER_SIZE (128 * 1024)

static const char nc_dim_nhdr[] = "nhdr";
static const char nc_dim_nhdr_typ[] = "nhdr_typ";
static const char nc_dim_nhdr_sid[] = "nhdr_sid";
static const char nc_dim_nhdr_vld[] = "nhdr_vld";
static const char nc_dim_npbhdr[] = "npbhdr";
static const char nc_dim_nobs[] = "nobs";
static const char nc_dim_nqty[] = "nobs_qty";
static const char nc_dim_hdr_arr[] = "hdr_arr_len";
static const char nc_dim_obs_arr[] = "obs_arr_len";
static const char nc_dim_mxstr[] = "mxstr";
static const char nc_dim_mxstr2[] = "mxstr2";
static const char nc_dim_mxstr3[] = "mxstr3";
static const char nc_dim_nvar[] = "obs_var_num";
static const char nc_dim_unit[] = "unit_len";
static const char nc_dim_desc[] = "desc_len";
static const char nc_var_desc[] = "obs_desc";
static const char nc_var_hdr_arr[] = "hdr_arr";
static const char nc_var_hdr_lat[] = "hdr_lat";
static const char nc_var_hdr_lon[] = "hdr_lon";
static const char nc_var_hdr_elv[] = "hdr_elv";
static const char nc_var_hdr_typ[] = "hdr_typ";
static const char nc_var_hdr_sid[] = "hdr_sid";
static const char nc_var_hdr_vld[] = "hdr_vld";
static const char nc_var_hdr_prpt_typ[] = "hdr_prpt_typ";
static const char nc_var_hdr_irpt_typ[] = "hdr_irpt_typ";
static const char nc_var_hdr_inst_typ[] = "hdr_inst_typ";
static const char nc_var_hdr_typ_tbl[] = "hdr_typ_table";
static const char nc_var_hdr_sid_tbl[] = "hdr_sid_table";
static const char nc_var_hdr_vld_tbl[] = "hdr_vld_table";
static const char nc_var_obs_arr[] = "obs_arr";
static const char nc_var_obs_hid[] = "obs_hid";
static const char nc_var_obs_gc[] = "obs_gc";
static const char nc_var_obs_vid[] = "obs_vid";
static const char nc_var_obs_lvl[] = "obs_lvl";
static const char nc_var_obs_hgt[] = "obs_hgt";
static const char nc_var_obs_val[] = "obs_val";
static const char nc_var_obs_qty[] = "obs_qty";
static const char nc_var_obs_qty_tbl[] = "obs_qty_table";
static const char nc_var_obs_var[] = "obs_var";
static const char nc_var_unit[] = "obs_unit";
static const std::string nc_att_use_var_id = "use_var_id";
static const char nc_att_obs_version[] = "MET_Obs_version";
static const char nc_att_met_point_nccf[] = "MET_point_NCCF";
constexpr char nc_dim_nhdr[] = "nhdr";
constexpr char nc_dim_nhdr_typ[] = "nhdr_typ";
constexpr char nc_dim_nhdr_sid[] = "nhdr_sid";
constexpr char nc_dim_nhdr_vld[] = "nhdr_vld";
constexpr char nc_dim_npbhdr[] = "npbhdr";
constexpr char nc_dim_nobs[] = "nobs";
constexpr char nc_dim_nqty[] = "nobs_qty";
constexpr char nc_dim_hdr_arr[] = "hdr_arr_len";
constexpr char nc_dim_obs_arr[] = "obs_arr_len";
constexpr char nc_dim_mxstr[] = "mxstr";
constexpr char nc_dim_mxstr2[] = "mxstr2";
constexpr char nc_dim_mxstr3[] = "mxstr3";
constexpr char nc_dim_nvar[] = "obs_var_num";
constexpr char nc_dim_unit[] = "unit_len";
constexpr char nc_dim_desc[] = "desc_len";
constexpr char nc_var_desc[] = "obs_desc";
constexpr char nc_var_hdr_arr[] = "hdr_arr";
constexpr char nc_var_hdr_lat[] = "hdr_lat";
constexpr char nc_var_hdr_lon[] = "hdr_lon";
constexpr char nc_var_hdr_elv[] = "hdr_elv";
constexpr char nc_var_hdr_typ[] = "hdr_typ";
constexpr char nc_var_hdr_sid[] = "hdr_sid";
constexpr char nc_var_hdr_vld[] = "hdr_vld";
constexpr char nc_var_hdr_prpt_typ[] = "hdr_prpt_typ";
constexpr char nc_var_hdr_irpt_typ[] = "hdr_irpt_typ";
constexpr char nc_var_hdr_inst_typ[] = "hdr_inst_typ";
constexpr char nc_var_hdr_typ_tbl[] = "hdr_typ_table";
constexpr char nc_var_hdr_sid_tbl[] = "hdr_sid_table";
constexpr char nc_var_hdr_vld_tbl[] = "hdr_vld_table";
constexpr char nc_var_obs_arr[] = "obs_arr";
constexpr char nc_var_obs_hid[] = "obs_hid";
constexpr char nc_var_obs_gc[] = "obs_gc";
constexpr char nc_var_obs_vid[] = "obs_vid";
constexpr char nc_var_obs_lvl[] = "obs_lvl";
constexpr char nc_var_obs_hgt[] = "obs_hgt";
constexpr char nc_var_obs_val[] = "obs_val";
constexpr char nc_var_obs_qty[] = "obs_qty";
constexpr char nc_var_obs_qty_tbl[] = "obs_qty_table";
constexpr char nc_var_obs_var[] = "obs_var";
constexpr char nc_var_unit[] = "obs_unit";
constexpr char nc_att_use_var_id[] = "use_var_id";
constexpr char nc_att_obs_version[] = "MET_Obs_version";
constexpr char nc_att_met_point_nccf[] = "MET_point_NCCF";

static const std::string add_offset_att_name = "add_offset";
static const std::string axis_att_name = "axis";
Expand All @@ -111,17 +111,17 @@ static const std::string scale_factor_att_name = "scale_factor";
static const std::string standard_name_att_name = "standard_name";
static const std::string units_att_name = "units";

static const char nc_time_unit_exp[] = "^[a-z|A-Z]* *since *[0-9]\\{1,4\\}-[0-9]\\{1,2\\}-[0-9]\\{1,2\\}";
static const char nc_time_unit_ymd_exp[] = "[0-9]\\{1,4\\}-[0-9]\\{1,2\\}-[0-9]\\{1,2\\}";
constexpr char nc_time_unit_exp[] = "^[a-z|A-Z]* *since *[0-9]\\{1,4\\}-[0-9]\\{1,2\\}-[0-9]\\{1,2\\}";
constexpr char nc_time_unit_ymd_exp[] = "[0-9]\\{1,4\\}-[0-9]\\{1,2\\}-[0-9]\\{1,2\\}";

static const char MET_NC_Obs_ver_1_2[] = "1.02";
static const char MET_NC_Obs_version[] = "1.02";
constexpr char MET_NC_Obs_ver_1_2[] = "1.02";
constexpr char MET_NC_Obs_version[] = "1.02";

static const int exit_code_no_error = 0;
static const int exit_code_no_dim = 1;
static const int exit_code_no_hdr_vars = 2;
static const int exit_code_no_loc_vars = 3;
static const int exit_code_no_obs_vars = 4;
constexpr int exit_code_no_error = 0;
constexpr int exit_code_no_dim = 1;
constexpr int exit_code_no_hdr_vars = 2;
constexpr int exit_code_no_loc_vars = 3;
constexpr int exit_code_no_obs_vars = 4;

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

Expand Down
Loading