<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi All,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Not sure if this is solve-able, but I'm transitioning NCL scripts from one computer to another. Each runs the same version of NCL. I can run the same script with the same data, and they both make an image without any critical/different errors or warnings.
However, on the new machine it doesn't do the masking it's supposed to do (I clip to NY). I'm attaching examples of the same plot from both machines. I've tried all sorts of different settings for DataBaseVersion/DataSetName/projections/masks/etc and I can't
find a solution. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
To make it more confusing, I thought I'd get around it by doing my own masking, with a shapefile. If I run a snippet of code like:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
load "./shapefile_utils.ncl"</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
sname = "Counties_Shoreline.shp"</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres = True</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@return_mask = True</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@minlat=latmin</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@minlon=lonmin</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@maxlat=latmax</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@maxlon=lonmax</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@shape_var = "NAME"</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
maskres@shape_names :=(/"Albany","Queens","Kings","Richmond","New York","Bronx"/); ;; just an example</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
data_mask := shapefile_mask_data(newdata,sname,maskres)</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
newdata=newdata*data_mask</div>
<div class="elementToProof" id="Signature">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
printMinMax(data_mask,1)</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
on the new machine I'll get "min = 0, max = 0" as an output, which is incorrect. On the old one, it will correctly be 0,1. If I use the shapefile utility to plot what it thinks the shapefile is (again, same code), I get the other attached two images, which
seems to make the problem obvious. For reasons unknown to me, the shape is being incorrectly rotated and sent around the world. Presumably this is something similar to what's happening in NCL's native masking. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Any suggestions? I'm somewhat resigned to this being an issue with NCL being incompatible with new machines, but figured I'd ask anyway. Here is new OS, FWIW:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
PRETTY_NAME="Ubuntu 22.04.5 LTS"<br>
NAME="Ubuntu"<br>
VERSION_ID="22.04"<br>
VERSION="22.04.5 LTS (Jammy Jellyfish)"<br>
VERSION_CODENAME=jammy<br>
ID=ubuntu<br>
ID_LIKE=debian<br>
HOME_URL="<span style="color: rgb(18, 100, 163);"><a style="color: rgb(18, 100, 163);" rel="noopener noreferrer" class="OWAAutoLink" id="OWAe8be6c67-5b14-df11-5607-a7a23935be10" target="_blank" href="https://www.ubuntu.com/">https://www.ubuntu.com/</a></span>"<br>
SUPPORT_URL="<span style="color: rgb(18, 100, 163);"><a style="color: rgb(18, 100, 163);" rel="noopener noreferrer" class="OWAAutoLink" id="OWA355baf8e-eeb7-5f60-3e88-22ac0fdad625" target="_blank" href="https://help.ubuntu.com/">https://help.ubuntu.com/</a></span>"<br>
BUG_REPORT_URL="<span style="color: rgb(18, 100, 163);"><a style="color: rgb(18, 100, 163);" rel="noopener noreferrer" class="OWAAutoLink" id="OWA8a423d0e-79bf-a950-2a78-d7dfb5424fe3" target="_blank" href="https://bugs.launchpad.net/ubuntu/">https://bugs.launchpad.net/ubuntu/</a></span>"<br>
PRIVACY_POLICY_URL="<span style="color: rgb(18, 100, 163);"><a style="color: rgb(18, 100, 163);" rel="noopener noreferrer" class="OWAAutoLink" id="OWA58f79a9c-c260-f08d-f10c-a44faca61b63" target="_blank" href="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy">https://www.ubuntu.com/legal/terms-and-policies/privacy-policy</a></span>"<br>
UBUNTU_CODENAME=jammy</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="background-color: rgb(255, 255, 255);" class="elementToProof">
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Nick Bassill, PhD</span></p>
<div style="direction: ltr; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Director of the NY State Weather Risk Communication Center</div>
<div style="direction: ltr; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Director of Research & Development, Center Of Excellence</div>
<div style="direction: ltr; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Affiliated with NYS Mesonet</div>
<div style="direction: ltr; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Room 488B, Harriman Campus; ETEC Building, 1220 Washington Ave, Albany, NY 12226</div>
<div style="direction: ltr; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Contact: (518) 442-6375 | @NickPBassill | <a class="OWAAutoLink" id="OWA61afb385-7f5c-14d9-7936-1d3037d2c490" href="https://nyswrcc.org/">
https://nyswrcc.org/</a></div>
</div>
</div>
</body>
</html>