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

Update main_v9.1-ref after #1640 #1645

Merged
merged 11 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 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.
15 changes: 15 additions & 0 deletions met/docs/Users_Guide/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ https://github.com/dtcenter/MET/issues
Version |version| release notes (|release_date|)
------------------------------------------------

- See complete list of `GitHub Issues <https://github.com/NCAR/MET/milestone/68?closed=1>`_.
- Fix Grid-Diag to correctly ignore missing data values (`#1562 <http://github.com/dtcenter/MET/issues/1562>`_).
- Fix ncdump in the MET Docker image (`#1554 <http://github.com/dtcenter/MET/issues/1554>`_).
- Fix bug in the MODE CTS output when running multiple convolution radii and thresholds (`#1547 <http://github.com/dtcenter/MET/issues/1547>`_).
- Fix Stat-Analysis python embedding when the python script has zero arguments (`#1537 <http://github.com/dtcenter/MET/issues/1537>`_).
- Fix ascii file list parsing logic (`#1484 <http://github.com/dtcenter/MET/issues/1484>`_).
- Add support for Gaussian grids in the vx_data2d_python library (`#1477 <http://github.com/dtcenter/MET/issues/1477>`_).
- Fix Ensemble-Stat logic when multiple ensemble members contain no valid data (`#1475 <http://github.com/dtcenter/MET/issues/1475>`_).
- Add error message to state that python embedding pickling logic is not yet supported (`#1472 <http://github.com/dtcenter/MET/issues/1472>`_).
- Fix TC-Gen to correctly handle the lead_window configuration file filtering option (`#1465 <http://github.com/dtcenter/MET/issues/1465>`_).
- Fix the madis2nc log message for ACARS input, not ACARS profiler input (`#1409 <http://github.com/dtcenter/MET/issues/1409>`_).

Version 9.1 release notes (20200810)
------------------------------------

- Bugfixes:
- All changes included in the `met-9.0.1 <https://github.com/dtcenter/MET/milestone/64?closed=1>`_, `met-9.0.2 <https://github.com/dtcenter/MET/milestone/65?closed=1>`_, and `met-9.0.3 <https://github.com/dtcenter/MET/milestone/66?closed=1>`_ bugfix releases.

Expand Down
6 changes: 3 additions & 3 deletions met/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand All @@ -20,11 +20,11 @@
project = 'MET'
author = 'UCAR/NCAR, NOAA, CSU/CIRA, and CU/CIRES'
author_list = 'Brown, B., Bullock, R., Fowler, T., Halley Gotway, J., Newman, K., Jensen, T.'
version = '9.1'
version = '9.1.1'
verinfo = version
release = f'{version}'
release_year = '2020'
release_date = f'{release_year}0810'
release_date = f'{release_year}1118'
copyright = f'{release_year}, {author}'

# -- General configuration ---------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion met/docs/version

This file was deleted.

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
3 changes: 2 additions & 1 deletion met/src/basic/vx_util/util_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
////////////////////////////////////////////////////////////////////////

// Released versions of MET
static const char met_version_9_1_1[] = "V9.1.1";
static const char met_version_9_1[] = "V9.1";
static const char met_version_9_0[] = "V9.0";
static const char met_version_8_1[] = "V8.1";
Expand All @@ -38,7 +39,7 @@ static const char met_version_1_1[] = "V1.1";

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

static const char * const met_version = met_version_9_1;
static const char * const met_version = met_version_9_1_1;
static const char default_met_data_dir[] = "MET_BASE";
static const char txt_file_ext[] = ".txt";
static const char stat_file_ext[] = ".stat";
Expand Down
4 changes: 4 additions & 0 deletions met/src/libcode/vx_data2d_grib2/data2d_grib2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,10 @@ void MetGrib2DataFile::read_grib2_record_list() {

} // END: while( read_grib2_record() )

mlog << Debug(4) << "MetGrib2DataFile::read_grib2_record_list() - "
<< "processed " << rec_num - 1 << " records from GRIB2 file: "
<< Filename << "\n";

return;
}

Expand Down
9 changes: 6 additions & 3 deletions met/src/libcode/vx_series_data/series_pdf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ void update_pdf(

for(int i = 0; i < dp.nx(); i++) {
for(int j = 0; j < dp.ny(); j++) {
if(!mp.s_is_on(i, j)) continue;
double value = dp.get(i, j);
if(!mp.s_is_on(i, j) ||
is_bad_data(value)) continue;
int k = floor((value - min) / delta);
if(k < 0) k = 0;
if(k >= pdf.size()) k = pdf.size() - 1;
Expand All @@ -92,12 +93,14 @@ void update_joint_pdf(

for(int i = 0; i < dp_A.nx(); i++) {
for(int j = 0; j < dp_A.ny(); j++) {
if(!mp.s_is_on(i, j)) continue;
double value_A = dp_A.get(i, j);
double value_B = dp_B.get(i, j);
if(!mp.s_is_on(i, j) ||
is_bad_data(value_A) ||
is_bad_data(value_B)) continue;
int k_A = floor((value_A - min_A) / delta_A);
if(k_A < 0) k_A = 0;
if(k_A >= n_A) k_A = n_A - 1;
double value_B = dp_B.get(i, j);
int k_B = floor((value_B - min_B) / delta_B);
if(k_B < 0) k_B = 0;
if(k_B >= n_B) k_B = n_B - 1;
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
8 changes: 5 additions & 3 deletions scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ RUN echo "Downloading HDF4.2r3 from ${HDF4_URL}" \
&& cd /met/external_libs/HDF4.2r3 \
&& LOG_FILE=/met/logs/HDF4.2r3_configure.log \
&& echo "Configuring HDF4.2r3 and writing log file ${LOG_FILE}" \
&& ./configure --prefix=/usr/local --disable-netcdf > ${LOG_FILE} \
&& ./configure --prefix=/usr/local/hdf --disable-netcdf > ${LOG_FILE} \
&& cat mfhdf/hdiff/Makefile | sed 's/LIBS = -ljpeg -lz/LIBS = -ljpeg -lz -lm/g' > Makefile_NEW \
&& mv -f Makefile_NEW mfhdf/hdiff/Makefile \
&& LOG_FILE=/met/logs/HDF4.2r3_make_install.log \
Expand All @@ -142,11 +142,12 @@ RUN echo "Downloading HDF4.2r3 from ${HDF4_URL}" \
&& cd /met/external_libs/hdfeos \
&& LOG_FILE=/met/logs/hdfeos_configure.log \
&& echo "Configuring hdfeos and writing log file ${LOG_FILE}" \
&& ./configure --prefix=/usr/local --with-hdf4=/usr/local CC=/usr/local/bin/h4cc > ${LOG_FILE} \
&& ./configure --prefix=/usr/local/hdfeos --with-hdf4=/usr/local/hdf CC=/usr/local/hdf/bin/h4cc > ${LOG_FILE} \
&& LOG_FILE=/met/logs/hdfeos_make_install.log \
&& echo "Compiling hdfeos and writing log file ${LOG_FILE}" \
&& make install > ${LOG_FILE} \
&& cp include/*.h /usr/local/include/. \
&& mkdir /usr/local/hdfeos/include \
&& cp include/*.h /usr/local/hdfeos/include/. \
&& cd /met/external_libs \
&& rm -rf HDF4.2r3 hdfeos

Expand All @@ -163,6 +164,7 @@ RUN echo "Checking out MET ${MET_GIT_NAME} from ${MET_GIT_URL}" \
&& ./bootstrap \
&& echo "Configuring MET ${MET_GIT_NAME} and writing log file ${LOG_FILE}" \
&& ./configure --enable-grib2 --enable-mode_graphics --enable-modis --enable-lidar2nc --enable-python \
MET_HDF=/usr/local/hdf MET_HDFEOS=/usr/local/hdfeos \
MET_FREETYPEINC=/usr/include/freetype2 MET_FREETYPELIB=/usr/lib \
MET_CAIROINC=/usr/include/cairo MET_CAIROLIB=/usr/lib \
MET_PYTHON_CC='-I/usr/include/python3.6m' MET_PYTHON_LD='-lpython3.6m' > ${LOG_FILE} \
Expand Down
2 changes: 1 addition & 1 deletion test/config/GridDiagConfig_TMP
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ data = {

mask = {
grid = "";
poly = "MET_BASE/poly/CONUS.poly";
poly = "";
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion test/xml/unit_tc_gen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
-config &CONFIG_DIR;/TCGenConfig_2016 \
-out &OUTPUT_DIR;/tc_gen/tc_gen_2016 \
-log &OUTPUT_DIR;/tc_gen/tc_gen_2016.log \
-v 2
-v 5
</param>
<output>
<stat>&OUTPUT_DIR;/tc_gen/tc_gen_2016.stat</stat>
Expand Down