From 3699d060f613a8f409eca05fe654de63d059e084 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 31 Mar 2022 12:42:00 -0600 Subject: [PATCH 1/2] Per #2115, fix the bug in the develop branch as well. --- met/src/libcode/vx_data2d_nccf/nccf_file.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/met/src/libcode/vx_data2d_nccf/nccf_file.cc b/met/src/libcode/vx_data2d_nccf/nccf_file.cc index 7ccdd710ae..dbe5e4e323 100644 --- a/met/src/libcode/vx_data2d_nccf/nccf_file.cc +++ b/met/src/libcode/vx_data2d_nccf/nccf_file.cc @@ -2430,10 +2430,12 @@ void NcCfFile::get_grid_mapping_rotated_latitude_longitude(const NcVar *grid_map data.name = rotated_latlon_proj_type; - // Derive south pole location from the north pole + // Derive south pole location from the north pole: + // - Reverse the sign of the latitude + // - Add 180 to the longitude and switch from degrees east to west data.true_lat_south_pole = -1.0 * get_att_value_double(grid_np_lat_att); double np_lon = rescale_lon(get_att_value_double(grid_np_lon_att)); - data.true_lon_south_pole = rescale_lon(-1.0 * (180.0 - fabs(np_lon))); + data.true_lon_south_pole = rescale_lon(-1.0 * (np_lon + 180.0)); // Copied from the LatLon data structure data.rot_lat_ll = ll_data.lat_ll; From 832c8e912d6edd1f242d7faa708085e2c4e6072c Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 31 Mar 2022 12:47:55 -0600 Subject: [PATCH 2/2] Per #2115, add a call to plot_data_plane for this rotated lat/lon grid. --- test/xml/unit_plot_data_plane.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/xml/unit_plot_data_plane.xml b/test/xml/unit_plot_data_plane.xml index c118078829..3db1b4bfa0 100644 --- a/test/xml/unit_plot_data_plane.xml +++ b/test/xml/unit_plot_data_plane.xml @@ -271,6 +271,20 @@ + + &MET_BIN;/plot_data_plane + \ + &DATA_DIR_MODEL;/nccf/prods_op_ukv_rotated_latlon_20220301_00_000.nc \ + &OUTPUT_DIR;/plot_data_plane/plot_data_plane_NCCF_rotlatlon.ps \ + 'name="surface_altitude"; level="(*,*)";' \ + -title "Rotated Lat/Lon Surface Altitude" \ + -v 1 + + + &OUTPUT_DIR;/plot_data_plane/plot_data_plane_NCCF_rotlatlon.ps + + + &MET_BIN;/plot_data_plane \