Skip to content

Commit

Permalink
Update main_v9.1-ref after #1640 (#1645)
Browse files Browse the repository at this point in the history
* Add debug level 4 message to list out the number of GRIB2 records inventoried. This helps debugging issues with MET potentially not reading all input GRIB2 records on WCOSS.

* Bugfix 1554 main_v9.1 ncdump (#1555)

* Bugfix 1562 main_v9.1 grid_diag (#1563)

* Per #1562, check for bad data values before adding data to the PDF's for grid_diag.

* Per #1562, removing the poly = CONUS.poly mask from GridDiagConfig_TMP. That settting masked a problem in the handling of missing data. Exercising the mask.poly option is tested in another unit test. This will change the output and break the nightly build, but that's good since we'll do more thorough testing.

* Per #1508, change the verbosity in unit_tc_gen.xml from -v 2 to -v 5 to print out some additional log messages that may help in debugging the intermittent file list failure.

* Feature 1572 v9.1.1 (#1573)

* Per #1572, delete the docs/version file as it is not needed here.

* Per #1572, update the version number to 9.1.1.

* Per #1572, list the met-9.1.1 release date as 20201119 for the docs.

* Per #1572, add release notes for the met-9.1.1 verison.

* Per #1572, add release notes for met-9.1.1 version.

* Per #1572, let's try to release met-9.1.1 today 11/18.

* Correct GitHub link.

* Fix small typo in release notes.

* Bugfix 1618 main v91 pb2nc (#1622)

Co-authored-by: Howard Soh <hsoh@kiowa.rap.ucar.edu>

* Update pull_request_template.md

* Per #1638, apply the same 3 fixes to the main_v9.1 branch to be included in the next bugfix release for met-9.1. (#1640)

Co-authored-by: hsoh-u <hsoh@ucar.edu>
Co-authored-by: Howard Soh <hsoh@kiowa.rap.ucar.edu>
  • Loading branch information
3 people authored Jan 28, 2021
1 parent 2826feb commit 97edc2d
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

- [ ] Describe testing already performed for these changes:</br>

- [ ] Recommend testing for the reviewer to perform, including the location of input datasets:</br>
- [ ] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:</br>

- [ ] Do these changes include sufficient documentation and testing updates? **[Yes or No]**

- [ ] Will this PR result in changes to the test suite? **[Yes or No]**</br>
If **yes**, describe the new output and/or changes to the existing output:</br>

- [ ] After merging, should the reviewer **DELETE** the feature branch from GitHub? **[Yes or No]**</br>

## Pull Request Checklist ##
See the [METplus Workflow](https://dtcenter.github.io/METplus/Contributors_Guide/github_workflow.html) for details.
- [ ] Complete the PR definition above.
- [ ] Ensure the PR title matches the feature or bugfix branch name.
- [ ] Define the PR metadata, as permissions allow.
Select: **Reviewer(s)**, **Project(s)**, and **Milestone**
- [ ] After submitting the PR, select **Linked Issues** with the original issue number.
- [ ] After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
- [ ] Close the linked issue and delete your feature or bugfix branch from GitHub.
2 changes: 1 addition & 1 deletion met/src/basic/vx_util/data_plane_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ DataPlane subtract(const DataPlane &dp1, const DataPlane &dp2) {

DataPlane normal_cdf(const DataPlane &dp, const DataPlane &mn,
const DataPlane &sd) {
DataPlane cdf = dp;
DataPlane cdf = mn;
double v;

// Check grid dimensions
Expand Down
35 changes: 33 additions & 2 deletions met/src/libcode/vx_statistics/pair_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1026,9 +1026,40 @@ NumArray derive_climo_prob(const NumArray &mn_na, const NumArray &sd_na,
n_mn = mn_na.n_valid();
n_sd = sd_na.n_valid();

// For CDP threshold types, the climo_prob is constant.
// For CDP threshold types, the climo probability is constant
if(othresh.get_ptype() == perc_thresh_climo_dist) {
climo_prob.add_const(othresh.get_pvalue()/100.0, n_mn);

// Climo probability varies based on the threshold type
switch(othresh.get_type()) {

case thresh_lt:
case thresh_le:
prob = othresh.get_pvalue()/100.0;
break;

case thresh_eq:
prob = 0.0;
break;

case thresh_ne:
prob = 1.0;
break;

case thresh_gt:
case thresh_ge:
prob = 1.0 - othresh.get_pvalue()/100.0;
break;

default:
mlog << Error << "\n\nderive_climo_prob() -> "
<< "climatological threshold \"" << othresh.get_str()
<< "\" cannot be converted to a probability!\n\n";
exit(1);
break;
}

// Add constant climo probability value
climo_prob.add_const(prob, n_mn);
}
// If both mean and standard deviation were provided, use them to
// derive normal climatological probabilities for the current event
Expand Down
2 changes: 1 addition & 1 deletion met/src/tools/core/grid_stat/grid_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ void process_scores() {
conf_info.vx_opt[i].interp_info.field);
}
if(conf_info.vx_opt[i].nc_info.do_climo && !cmn_dp.is_empty() && !csd_dp.is_empty()) {
write_nc((string)"CLIMO_CDF", normal_cdf(cmn_dp, csd_dp, obs_dp),
write_nc((string)"CLIMO_CDF", normal_cdf(obs_dp, cmn_dp, csd_dp),
i, mthd, pnts, conf_info.vx_opt[i].interp_info.field);
}

Expand Down
24 changes: 23 additions & 1 deletion met/src/tools/other/pb2nc/numpbmsg.f
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,29 @@ SUBROUTINE NUMPBMSG ( FID, NMSG )
C*
END



SUBROUTINE NUMPBMSG_NEW ( PBFILE, FID, NMSG )
C*
INCLUDE 'readpb.prm'
C*
CHARACTER PBFILE*(FILEMXSTRL)
INTEGER FID, FID2
INTEGER NMSG
REAL*8 R8ARR(1, 1)
C*
C-----------------------------------------------------------------------
C*
C* Call UFBTAB to figure out how many messages the PrepBufr file
C* attached to FID contains
C*
OPEN ( UNIT = FID, FILE = PBFILE, FORM = 'UNFORMATTED' )
FID2 = -FID
CALL UFBTAB ( FID2, R8ARR, 1, 1, NMSG, ' ' )
CLOSE ( UNIT = FID )
C*
END


SUBROUTINE GET_TMIN ( FID, TMIN )
C*
INTEGER FID, TMIN
Expand Down
9 changes: 5 additions & 4 deletions met/src/tools/other/pb2nc/pb2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ static NcFile *f_out = (NcFile *) 0;

extern "C" {
void numpbmsg_(int *, int *);
void numpbmsg_new_(const char *, int *, int *);
void openpb_(const char *, int *);
void closepb_(int *);
void readpb_(int *, int *, int *, double[mxr8pm],
Expand Down Expand Up @@ -2059,14 +2060,14 @@ void process_pbfile_metadata(int i_pb) {
<< "Invalid file ID [" << unit << "] between 1 and 99.\n\n";
}

// Open the blocked temp PrepBufr file for reading
openpb_(blk_file.c_str(), &unit);

// Compute the number of PrepBufr records in the current file.
numpbmsg_(&unit, &npbmsg);
numpbmsg_new_(blk_file.c_str(), &unit, &npbmsg);
mlog << Debug(1) << method_name << " -> "
<< "the number of records: " << npbmsg << "\n";

// Open the blocked temp PrepBufr file for reading
openpb_(blk_file.c_str(), &unit);

// Use the number of records requested by the user if there
// are enough present.
if(nmsg >= 0 && nmsg <= npbmsg) {
Expand Down

0 comments on commit 97edc2d

Please sign in to comment.