Skip to content

Commit 35c97e8

Browse files
authored
Merge pull request #3111 from bogensch/dpxx_latfix
Automatically merged using mergify PR title: DPxx latitude relative error checking fix PR author: bogensch PR labels: ['BFB', 'bugfix', 'DP-SCREAM', 'CI: automerge']
2 parents 69a3d39 + 0bc4a10 commit 35c97e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/eamxx/src/share/iop/intensive_observation_period.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ initialize_iop_file(const util::TimeStamp& run_t0,
270270
scorpio::read_var(iop_file,"lon",&iop_file_lon);
271271

272272
const Real rel_lat_err = std::fabs(iop_file_lat - m_params.get<Real>("target_latitude"))/
273-
std::max(m_params.get<Real>("target_latitude"),(Real)0.1);
273+
std::max(std::fabs(m_params.get<Real>("target_latitude")),(Real)0.1);
274274
const Real rel_lon_err = std::fabs(std::fmod(iop_file_lon + 360.0, 360.0)-m_params.get<Real>("target_longitude"))/
275275
std::max(m_params.get<Real>("target_longitude"),(Real)0.1);
276276
EKAT_REQUIRE_MSG(rel_lat_err < std::numeric_limits<float>::epsilon(),

0 commit comments

Comments
 (0)