Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e1abb7b
Feature dtcenter/metplus-internal#64 develop (#3251)
JohnHalleyGotway Oct 1, 2025
48c6791
Feature #3253 SQ Reliability (#3256) (#3259)
JohnHalleyGotway Oct 14, 2025
ace8b95
Feature #3258 main_v12.2 lapse_rate (#3260)
JohnHalleyGotway Oct 14, 2025
76ca4d8
Bugfix #3255 main_v12.2 shift_right (#3261)
JohnHalleyGotway Oct 16, 2025
408b811
Bugfix #3266 main_v12.2 empty_ascii2nc_input (#3267)
JohnHalleyGotway Oct 17, 2025
8ee0e27
Feature #3270 main_v12.2 missing_topo (#3274)
JohnHalleyGotway Oct 21, 2025
76cf76f
Feature #3278 main_v12.2 exit_codes (#3279)
JohnHalleyGotway Oct 23, 2025
8899d4b
Feature #3270 main_v12.2 message_type_group_map (#3280)
JohnHalleyGotway Oct 28, 2025
0c9544e
Feature #3275 v12.2.0-rc2 (#3283)
JohnHalleyGotway Oct 28, 2025
563d3e5
Feature #3270 main_v12.2 duplicate_corrections (#3284)
JohnHalleyGotway Nov 6, 2025
be00f58
Feature #3287 v12.2.0 (#3289)
JohnHalleyGotway Nov 13, 2025
20635cd
Updating files to refer to 12.2 instead of 12.1
jprestop Dec 3, 2025
7b90f2f
Updating files to refer to 12.2 instead of 12.1
jprestop Dec 3, 2025
a3915d3
Update Python environment variables for METplus v6.2
jprestop Dec 4, 2025
a405a77
Update Python environment paths for MET 12.2.0
jprestop Dec 4, 2025
189692c
Update typo in Python conda env
jprestop Dec 6, 2025
17d5991
Updates to hera and ursa files
jprestop Dec 6, 2025
75dadc6
Update to Python 3.12 in seneca file
jprestop Dec 8, 2025
4d2c5e5
Update to Python 3.12 in gaea file
jprestop Dec 8, 2025
7923518
Remove install_met_env.derecho
jprestop Dec 8, 2025
e16b4fe
Update to Python 3.12 in frontera file
jprestop Dec 8, 2025
a1c63dc
Update commented out lines in files
jprestop Dec 8, 2025
244e3e3
Updated files to comment out MET_PYTHON_EXE
jprestop Dec 8, 2025
13e8143
Add installation configuration for MET environment on smac-c5
jprestop Dec 16, 2025
acb206d
Add modulefile for smac-c5
jprestop Dec 16, 2025
50a6ef7
Per dtcenter/METplus#3175 discussion, update the description of Pytho…
JohnHalleyGotway Dec 16, 2025
053dd4d
Tweak wording
JohnHalleyGotway Dec 16, 2025
77cfaa8
Hotfix to the develop branch to call metplus-action-free-disk-space a…
JohnHalleyGotway Jan 5, 2026
7f176a6
Do not fail security scan if critical CVEs are found. Upload build lo…
georgemccabe Jan 6, 2026
b755260
Update schedule as metplus-bot so that user receives weekly emails
metplus-bot Jan 12, 2026
065b73a
Modify library export paths in install_met_env.smac-c5
jprestop Jan 16, 2026
82c074b
remove support for v12.0 rebuilds
georgemccabe Jan 20, 2026
aa41106
Per #3317, resolve bugs as describe in the issue (#3318)
jprestop Jan 22, 2026
9ad83d3
Update MET_PYTHON_CC to use python sysconfig
jprestop Jan 24, 2026
ba2c7af
Per #3293, update logic grid_stat, wavelet_stat, and regrid_data_plan…
JohnHalleyGotway Jan 29, 2026
3227dd9
Bugfix #3342 main_v12.2 ndbc bad data (#3344)
JohnHalleyGotway Feb 24, 2026
aed2118
Feature #3348 v12.2.1 (#3352)
JohnHalleyGotway Feb 27, 2026
5ad7c57
Bugfix #3353 main_v12.2 sum file type (#3354)
JohnHalleyGotway Feb 27, 2026
e22a342
Patch the Series-Analysis docs to match the default mask setting.
JohnHalleyGotway Mar 6, 2026
2ea7a2f
Bugfix #3359 main_v12.2 gnu_8.5.0 (#3360)
JohnHalleyGotway Mar 9, 2026
a8005dc
Bugfix #3362 main_v12.2 seeps_pairs_nc (#3363)
JohnHalleyGotway Mar 24, 2026
ea53f07
Bugfix #3374 main_v12.2 false_easting_northing (#3376)
JohnHalleyGotway Apr 29, 2026
372e992
Bugfix #3370 main_v12.2 tc_rmw BEST tracks (#3371)
JohnHalleyGotway May 7, 2026
803e30b
Bugfix #3381 Added radian_to_degree (#3414)
hsoh-u Jul 15, 2026
8afca76
Bugfix 3406 negative value with at main v12.2 (#3419)
hsoh-u Jul 22, 2026
c74657e
Merge remote-tracking branch 'origin/main_v12.2-ref' into update_main…
metplus-bot Aug 17, 2026
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
12 changes: 8 additions & 4 deletions internal/test_unit/python/comp_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
raise e
sys.path.append(metplus_util_path)

from diff_util import compare_dir
import diff_util as du


def comp_dir(truth_dir, output_dir, debug=True, save_diff=True):
Expand Down Expand Up @@ -43,11 +43,15 @@ def comp_dir(truth_dir, output_dir, debug=True, save_diff=True):
"""

start_time = dt.datetime.now()

# Custom rounding overrides for MET unit test output
du.ROUNDING_OVERRIDES['ALAL2010_stat.out'] = 4

print('******************************')
print("Comparing output to truth data")
diff_files = compare_dir(truth_dir, output_dir,
debug=debug,
save_diff=save_diff)
diff_files = du.compare_dir(truth_dir, output_dir,
debug=debug,
save_diff=save_diff)

end_time = dt.datetime.now()
runtime = end_time - start_time
Expand Down
21 changes: 18 additions & 3 deletions src/libcode/vx_data2d_nc_cf/nc_cf_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,20 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin
return;
}

// false_easting, optional

double false_east = get_nc_var_att_double(
grid_mapping_var, "false_easting", false);

if(is_bad_data(false_east)) false_east = 0.0;

// false_northing, optional

double false_north = get_nc_var_att_double(
grid_mapping_var, "false_northing", false);

if(is_bad_data(false_north)) false_north = 0.0;

// Look for the x/y dimensions and x/y coordinate variables
find_xy_vars(method_name);

Expand Down Expand Up @@ -1987,10 +2001,11 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin

get_nc_data(_yCoordVar, y_values.data());

// Unit conversion
// MET #3374 Support false easting and northing offsets
// Unit conversion and false northing and easting offsets

for (int i = 0; i<x_counts; ++i) x_values[i] *= x_coord_to_m_cf;
for (int i = 0; i<y_counts; ++i) y_values[i] *= y_coord_to_m_cf;
for (int i = 0; i<x_counts; ++i) x_values[i] = x_values[i] * x_coord_to_m_cf - false_east;
for (int i = 0; i<y_counts; ++i) y_values[i] = y_values[i] * y_coord_to_m_cf - false_north;

// Calculate dx and dy assuming they are constant. MET requires that dx be
// equal to dy
Expand Down
17 changes: 16 additions & 1 deletion src/libcode/vx_data2d_nc_cf/var_info_nc_cf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,23 @@ void VarInfoNcCF::set_magic(const ConcatString &nstr, const ConcatString &lstr)
as_offset = (*ptr2 != '@');
if (!as_offset) ptr2++;

ptr3 = strchr(ptr2, '-');
//skip negative sign of the negative value to check the range
if (ptr3 != nullptr && ptr3 == ptr2) ptr3 = strchr((ptr2+1), '-');

// Check for a range of levels
if ((ptr3 = strchr(ptr2, '-')) != nullptr) {
if (ptr3 != nullptr && ptr3 != ptr2) {
*ptr3 = 0;
ptr3++;
if (*ptr3 == '@') {
if (as_offset) {
mlog << Error << "\n" << method_name
<< "Can not mix an offset and a value for NetCDF variable \""
<< MagicStr << "\".\n\n";
exit(1);
}
ptr3++; // to support @vlevel_lower-@vlevel_upper
}

// Check if a range has already been supplied
if (Dimension.has(range_flag)) {
Expand Down
76 changes: 59 additions & 17 deletions src/libcode/vx_data2d_nc_wrf/data2d_nc_wrf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,33 +121,75 @@ void MetNcWrfDataFile::dump(ostream & out, int depth) const {

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

bool MetNcWrfDataFile::get_real_dimension(const VarInfoNcWrf *vinfo_nc,
const NcVarInfo *info, LongArray &dimension) const {
static const string method_name
= "MetNcWrfDataFile::get_real_dimension() ->";
int dim_count = dimension.n_elements();
for (int k=0; k<dim_count; k++) {
if (dimension[k] == range_flag && vinfo_nc->level().is_offset()) {
dimension[k] = nint(vinfo_nc->level().lower());
continue;
}

if (dimension[k] != vx_data2d_dim_by_value && dimension[k] != range_flag) continue;

string dim_name = GET_NC_NAME(get_nc_dim(info->var, k));
NcVarInfo *var_info = find_var_info_by_dim_name(WrfNc->Var, dim_name,
WrfNc->Nvars);
if (var_info == nullptr) continue;

if (dimension[k] == vx_data2d_dim_by_value) {
long new_offset = get_index_at_nc_data(var_info->var,
vinfo_nc->dim_value(k),
dim_name, (k == info->t_slot));
if (new_offset != bad_data_int) dimension[k] = new_offset;
else {
mlog << Warning << "\n" << method_name
<< "for \"" << vinfo_nc->req_name()
<< "\" variable, the dimension value "
<< vinfo_nc->dim_value(k) << " for " << dim_name
<< " does not exist\n\n";
return false;
}
}
else if (dimension[k] == range_flag) {
double lower = vinfo_nc->level().lower();
double upper = vinfo_nc->level().upper();
long new_offset = get_index_at_nc_data(var_info->var, lower, upper,
dim_name, (k == info->t_slot));
if (new_offset != bad_data_int) dimension[k] = new_offset;
else {
mlog << Warning << "\n" << method_name
<< "for \"" << vinfo_nc->req_name()
<< "\" variable, the dimension value between "
<< lower << " and " << upper << " for " << dim_name
<< " does not exist\n\n";
return false;
}
}
}
return true;
}

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

bool MetNcWrfDataFile::data_plane(VarInfo &vinfo, DataPlane &plane) {
bool status = false;
double pressure;
ConcatString level_str;
VarInfoNcWrf * vinfo_nc = (VarInfoNcWrf *) &vinfo;
NcVarInfo *info = (NcVarInfo *) nullptr;
auto vinfo_nc = (VarInfoNcWrf *) &vinfo;
auto info = (NcVarInfo *) nullptr;

// Initialize the data plane
plane.clear();

// Read the data
WrfNc->get_nc_var_info(vinfo_nc->req_name().c_str(), info);

LongArray dimension = vinfo_nc->dimension();
int dim_count = dimension.n_elements();
for (int k=0; k<dim_count; k++) {
if (dimension[k] == vx_data2d_dim_by_value) {
string dim_name = GET_NC_NAME(get_nc_dim(info->var, k));
NcVarInfo *var_info = find_var_info_by_dim_name(WrfNc->Var, dim_name,
WrfNc->Nvars);
if (var_info) {
long new_offset = get_index_at_nc_data(var_info->var,
vinfo_nc->dim_value(k),
dim_name, (k == info->t_slot));
if (new_offset != bad_data_int) dimension[k] = new_offset;
}
}
}
if (! get_real_dimension(vinfo_nc, info, dimension))
return false;

status = WrfNc->data(vinfo_nc->req_name().c_str(),
dimension, plane, pressure, info);
Expand Down Expand Up @@ -198,7 +240,7 @@ bool MetNcWrfDataFile::data_plane(VarInfo &vinfo, DataPlane &plane) {
////////////////////////////////////////////////////////////////////////

int MetNcWrfDataFile::data_plane_array(VarInfo &vinfo,
DataPlaneArray &plane_array) {
DataPlaneArray &plane_array) {
int i, i_dim, n_level, status, lower, upper;
ConcatString level_str;
double pressure, min_level, max_level;
Expand Down
2 changes: 2 additions & 0 deletions src/libcode/vx_data2d_nc_wrf/data2d_nc_wrf.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class MetNcWrfDataFile : public Met2dDataFile {
private:

void nc_wrf_init_from_scratch();
bool get_real_dimension(const VarInfoNcWrf *vinfo_nc, const NcVarInfo *info,
LongArray &dimension) const;

MetNcWrfDataFile(const MetNcWrfDataFile &);
MetNcWrfDataFile & operator=(const MetNcWrfDataFile &);
Expand Down
20 changes: 18 additions & 2 deletions src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,23 @@ void VarInfoNcWrf::set_magic(const ConcatString &nstr, const ConcatString &lstr)
as_offset = (*ptr2 != '@');
if (!as_offset) ptr2++;

ptr3 = strchr(ptr2, '-');
//skip negative sign of the negative value to check the range
if (ptr3 != nullptr && ptr3 == ptr2) ptr3 = strchr((ptr2+1), '-');

// Check for a range of levels
if((ptr3 = strchr(ptr2, '-')) != nullptr) {
if (ptr3 != nullptr && ptr3 != ptr2) {
*ptr3 = 0;
ptr3++;
if (*ptr3 == '@') {
if (as_offset) {
mlog << Error << "\n" << method_name
<< "Can not mix an offset and a value for NetCDF variable \""
<< MagicStr << "\".\n\n";
exit(1);
}
ptr3++; // to support @vlevel_lower-@vlevel_upper
}

// Check if a range has already been supplied
if(Dimension.has(range_flag)) {
Expand All @@ -223,10 +238,11 @@ void VarInfoNcWrf::set_magic(const ConcatString &nstr, const ConcatString &lstr)
else {
add_dimension(range_flag);
Level.set_lower(atoi(ptr2));
Level.set_upper(atoi(++ptr3));
Level.set_upper(atoi(ptr3));

// Assume pressure level type for a range of levels
Level.set_type(LevelType_Pres);
Level.set_is_offset(as_offset);
}
}
// Single level
Expand Down
41 changes: 38 additions & 3 deletions src/libcode/vx_data2d_ugrid/ugrid_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ using namespace netCDF;
static const char *def_user_config = "UGridConfig_user";
static const char *def_config_prefix = "UGridConfig_";
static const char *def_config_prefix2 = "MET_BASE/config/UGridConfig_";
constexpr double lat_epsilon = 0.00001;

array<string, UG_DIM_COUNT> DIM_KEYS = {
"dim_face", "dim_node", "dim_edge", "dim_time", "dim_vert"
Expand Down Expand Up @@ -890,6 +891,40 @@ void UGridFile::read_config(ConcatString config_filename) {

}

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

void UGridFile::radian_to_degree(vector<double> &lat_values, const int lat_count) const {
const char *method_name = "UGridFile::radian_to_degree() -> ";
int lat_adjusted = 0;
int lat_adjusted_total = 0;
for (int idx=0; idx<lat_count; idx++) {
lat_values[idx] /= rad_per_deg;
if (lat_values[idx] > 90.0) {
if (!is_eq(lat_values[idx], 90.0, lat_epsilon)) {
mlog << Warning << "\n" << method_name << "adjusted " << lat_values[idx]
<< " (delta: " << (lat_values[idx] - 90.0) << ") to 90.0\n\n";
lat_adjusted++;
}
lat_values[idx] = 90.0;
lat_adjusted_total++;
}
else if (lat_values[idx] < -90.0) {
if (!is_eq(lat_values[idx], -90.0, lat_epsilon)) {
mlog << Warning << "\n" << method_name << "adjusted " << lat_values[idx]
<< " (delta: " << (lat_values[idx] + 90.0) << ") to -90.0\n\n";
lat_adjusted++;
}
lat_values[idx] = -90.0;
lat_adjusted_total++;
}
}
if (lat_adjusted_total > 0) {
mlog << Debug(4) << method_name << "adjusted " << lat_adjusted << " ("
<< lat_adjusted_total << ") latitudes\n";
}
}


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


Expand Down Expand Up @@ -927,13 +962,13 @@ void UGridFile::read_netcdf_grid()

if (get_var_units(_latVar, units_value)) {
if (units_value == "rad" || units_value == "radian") {
mlog << Debug(6) << method_name << "convert " << units_value << " to degree for lat\n";
for (int idx=0; idx<face_count; idx++) _lat[idx] /= rad_per_deg;
mlog << Debug(6) << method_name << "convert " << units_value << " to degree for lat\n";
radian_to_degree(_lat, face_count);
}
}
if (get_var_units(_lonVar, units_value)) {
if (units_value == "rad" || units_value == "radian") {
mlog << Debug(6) << method_name << " convert " << units_value << " to degree for lon\n";
mlog << Debug(6) << method_name << "convert " << units_value << " to degree for lon\n";
for (int idx=0; idx<face_count; idx++) _lon[idx] /= rad_per_deg;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/libcode/vx_data2d_ugrid/ugrid_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class UGridFile {

std::string find_metadata_name(std::string &key, StringArray &available_names);
StringArray get_metadata_names(std::string &key);
void radian_to_degree(std::vector<double> &lat_values, const int lat_count) const;
void read_config(ConcatString config_filename);
void read_netcdf_grid();

Expand Down
Loading