diff --git a/met/data/wrappers/read_tmp_dataplane.py b/met/data/wrappers/read_tmp_dataplane.py index e21c17ba3f..c6f8f57a9c 100644 --- a/met/data/wrappers/read_tmp_dataplane.py +++ b/met/data/wrappers/read_tmp_dataplane.py @@ -27,7 +27,6 @@ grid[grid_attr] = attr_val else: met_attrs[attr] = attr_val -grid['nx'], grid['ny'] = int(grid['nx']), int(grid['ny']) met_attrs['grid'] = grid met_attrs['name'] = met_attrs['name_str'] del met_attrs['name_str'] diff --git a/met/src/libcode/vx_python3_utils/python3_dict.cc b/met/src/libcode/vx_python3_utils/python3_dict.cc index 6d38599aa4..99a0d5fc93 100644 --- a/met/src/libcode/vx_python3_utils/python3_dict.cc +++ b/met/src/libcode/vx_python3_utils/python3_dict.cc @@ -164,6 +164,14 @@ if ( ! a ) { } +// If not a Long, try interpreting as LongLong for numpy.int64 values + +if ( ! PyLong_Check(a) ) { + + a = PyLong_FromLongLong(PyLong_AsLongLong(a)); + +} + if ( ! PyLong_Check(a) ) { mlog << Error << "\nPython3_Dict::lookup_int(const char *) -> " diff --git a/met/src/tools/tc_utils/tc_pairs/tc_pairs.cc b/met/src/tools/tc_utils/tc_pairs/tc_pairs.cc index a86b1a3d49..6fd095d299 100644 --- a/met/src/tools/tc_utils/tc_pairs/tc_pairs.cc +++ b/met/src/tools/tc_utils/tc_pairs/tc_pairs.cc @@ -1740,7 +1740,7 @@ void compute_track_err(const TrackInfo &adeck, const TrackInfo &bdeck, NumArray &altk_err, NumArray &crtk_err) { int i, i_adeck, i_bdeck, status; unixtime ut, ut_min, ut_max; - int ut_inc, n_ut; + int bd_inc, ut_inc, n_ut; float alat[mxp], alon[mxp], blat[mxp], blon[mxp]; float crtk[mxp], altk[mxp]; double x, y, tk, lon_min, lon_max; @@ -1760,8 +1760,10 @@ void compute_track_err(const TrackInfo &adeck, const TrackInfo &bdeck, // Determine the valid increment // For BEST tracks, use a constant time step // For non-BEST tracks, select the most common BDECK time step - if(bdeck.is_best_track()) ut_inc = best_track_time_step; - else ut_inc = bdeck.valid_inc(); + // Check for 0 and bad data + bd_inc = bdeck.valid_inc(); + ut_inc = (bdeck.is_best_track() || bd_inc == 0 || is_bad_data(bd_inc) ? + best_track_time_step : bd_inc); // Round the valid times to the nearest valid increment if(ut_min%ut_inc != 0) ut_min = (ut_min/ut_inc + 1)*ut_inc; diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 9a80592f6b..330e0bbadd 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -53,7 +53,7 @@ RUN yum -y update \ && yum -y install gv ncview wgrib wgrib2 ImageMagick ps2pdf \ && yum -y install python3 python3-devel python3-pip \ && pip3 install --upgrade pip \ - && python3 -m pip install numpy xarray + && python3 -m pip install numpy xarray netCDF4 # # Set the working directory. diff --git a/test/xml/unit_python.xml b/test/xml/unit_python.xml index 6ed8dfa9d8..1c89950159 100644 --- a/test/xml/unit_python.xml +++ b/test/xml/unit_python.xml @@ -7,7 +7,6 @@ - @@ -392,8 +391,7 @@ - export PATH='&ANACONDA_BIN;:${PATH}'; \ - &MET_BIN;/plot_data_plane + &MET_BIN;/plot_data_plane MET_PYTHON_EXE &MET_PYTHON_EXE;