Skip to content

Commit

Permalink
metadata_probe report coordinate normalization transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
burlen committed May 6, 2021
1 parent 419b20f commit a1cc2f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
17 changes: 12 additions & 5 deletions alg/teca_normalize_coordinates.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ teca_metadata teca_normalize_coordinates::get_output_metadata(
if (out_y)
coords.set("y", out_y);


if (out_x || out_y)
{
double bounds[6] = {0.0};
Expand All @@ -557,6 +556,16 @@ teca_metadata teca_normalize_coordinates::get_output_metadata(
out_md.set("bounds", bounds);
}

if ((this->verbose > 1) &&
teca_mpi_util::mpi_rank_0(this->get_communicator()))
{
if (reordered_y)
TECA_STATUS("The y-axis will be transformed to be in ascending order.")

if (shifted_x)
TECA_STATUS("The x-axis will be transformed from [-180, 180] to [0, 360].")
}

return out_md;
}

Expand Down Expand Up @@ -822,8 +831,7 @@ const_p_teca_dataset teca_normalize_coordinates::execute(unsigned int port,
if (this->verbose &&
teca_mpi_util::mpi_rank_0(this->get_communicator()))
{
TECA_STATUS("Transforming to the x-axis from [-180, 180]"
" to [0, 360]")
TECA_STATUS("The x-axis will be transformed from [-180, 180] to [0, 360].")
}

std::string var;
Expand Down Expand Up @@ -875,8 +883,7 @@ const_p_teca_dataset teca_normalize_coordinates::execute(unsigned int port,
if (this->verbose &&
teca_mpi_util::mpi_rank_0(this->get_communicator()))
{
TECA_STATUS("Transforming to the y-axis from descending"
" order to ascending order")
TECA_STATUS("The y-axis will be transformed to be in ascending order.")
}

std::string var;
Expand Down
1 change: 1 addition & 0 deletions apps/teca_metadata_probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ int main(int argc, char **argv)
reader = cf_reader;
}
norm_coords->set_input_connection(reader->get_output_port());
norm_coords->set_verbose(2);

std::string time_i;
if (opt_vals.count("start_date"))
Expand Down

0 comments on commit a1cc2f3

Please sign in to comment.