Open Dave-Allured opened 3 years ago
There is more specific information in issue #151.
The cause is tentatively identified as the GDAL library update from version 2.4.x to 3.0.0 on 2019 May 5. A patch is needed for NCL source code. Please see #151 for more details.
There are several reports of swapped X and Y coordinates (longitudes and latitudes) when reading shapefiles. The main symptom is usually missing shapes on a map plot, such as state and country outlines. Sometimes the symptom is shapes plotted on a different part of the earth's surface, and rotated or flipped (the pattern is predictable). There also may be console messages about invalid coordinates.
Affected versions seem to be the latest release, NCL 6.6.2, and recent Conda builds from late 2020 onward. Besides Conda, other recent packager builds may also be affected. This problem is likely to affect all platforms and OS versions.
The cause is speculated to be a change in recent versions of underlying geography support libraries, GDAL in particular. Package managers such as Conda and Macports try to keep updated with the latest library releases. This can cause a behavioral change like this in a downloaded package, even when the NCL version number stays the same.
There is a possible temporary workaround by modifying the support file shapefile_utils.ncl to swap the X and Y coordinates. Please try this modified version: shapefile_utils.ncl.txt. Load this version in your main program, instead of the standard version from the NCL website.
This workaround was first suggested by Kathleen Holman on 2021 January 25 .
I created this Github issue as a place to share further research on this problem. Please feel free to add more problem reports and related information, such as platform, relevant library versions, dylib/so identifiers, and possible solutions.