Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix #2115 develop Rotated LatLon #2117

Merged
merged 2 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions met/src/libcode/vx_data2d_nccf/nccf_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 14 additions & 0 deletions test/xml/unit_plot_data_plane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,20 @@
</output>
</test>

<test name="plot_data_plane_NCCF_rotlatlon">
<exec>&MET_BIN;/plot_data_plane</exec>
<param> \
&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
</param>
<output>
<ps>&OUTPUT_DIR;/plot_data_plane/plot_data_plane_NCCF_rotlatlon.ps</ps>
</output>
</test>

<test name="plot_data_plane_GRIB2_PROB">
<exec>&MET_BIN;/plot_data_plane</exec>
<param> \
Expand Down