Skip to content

Commit

Permalink
change ekat::impl::max instances to std::max and remove unneeded m_he…
Browse files Browse the repository at this point in the history
…lper_fields line
  • Loading branch information
Peter Bogenschutz committed Jul 16, 2024
1 parent 0f86fe3 commit a5aec91
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ initialize_iop_file(const util::TimeStamp& run_t0,
scorpio::read_var(iop_file,"lon",&iop_file_lon);

const Real rel_lat_err = std::fabs(iop_file_lat - m_params.get<Real>("target_latitude"))/
ekat::impl::max(m_params.get<Real>("target_latitude"),0.1);
std::max(m_params.get<Real>("target_latitude"),0.1);
const Real rel_lon_err = std::fabs(std::fmod(iop_file_lon + 360.0, 360.0)-m_params.get<Real>("target_longitude"))/
ekat::impl::max(m_params.get<Real>("target_longitude"),0.1);
std::max(m_params.get<Real>("target_longitude"),0.1);
EKAT_REQUIRE_MSG(rel_lat_err < std::numeric_limits<float>::epsilon(),
"Error! IOP file variable \"lat\" does not match target_latitude from IOP parameters.\n");
EKAT_REQUIRE_MSG(rel_lon_err < std::numeric_limits<float>::epsilon(),
Expand Down Expand Up @@ -548,7 +548,6 @@ read_iop_file_data (const util::TimeStamp& current_ts)
// Convert to pressure to millibar (file gives pressure in Pa)
for (int ilev=0; ilev<file_levs; ++ilev) data[ilev] /= 100;
iop_file_pressure.sync_to_dev();
m_helper_fields.insert({"iop_file_pressure", iop_file_pressure});

// Pre-process file pressures, store number of file levels
// where the last level is the first level equal to surface pressure.
Expand Down

0 comments on commit a5aec91

Please sign in to comment.