<p><span style="font-family:Arial;font-size:12.0pt;">Dear NCL experts,</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">Hope you're all well. As per the subject, I want to read a .mat file containing daily SST data from 1940 to 2005 and run some analysis I've already written in NCL. If I try to directly read the file with NCL I get Segmentation fault, so that's not the right way to go. I converted the file into NetCDF using Matlab (https://uk.mathworks.com/help/matlab/import_export/exporting-to-network-common-data-form-netcdf-files.html?s_tid=answers_rc2-3_p6_MLT#bsxb70y-1), but there is a problem with the data. </span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">At some point in the time series (around 1962), the data get shifted in the longitude sense by about 40 degrees. I checked this in NCL and in Ferret, as shown in the attached screenshot: the left-hand side is SST on a random day before 1962, while the right-hand side is after 1962. It's like there is an offset in the data longitudes. The plots are drawn using only four lines in Ferret, so the error can't be due to the the software. There must be something wrong going on when the file is created. It would be great to know what happens to the data in the first place, but maybe it's a discussion that doesn't belong here.</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">This is the printVarSummary of the full data. The longitudes array does not change over time, but the data are shifted.</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">Variable: temp</span><br><span style="font-family:Arial;font-size:12.0pt;">Type: float</span><br><span style="font-family:Arial;font-size:12.0pt;">Total Size: 710269560 bytes</span><br><span style="font-family:Arial;font-size:12.0pt;">           177567390 values</span><br><span style="font-family:Arial;font-size:12.0pt;">Number of Dimensions: 3</span><br><span style="font-family:Arial;font-size:12.0pt;">Dimensions and sizes:   [time | 24090] x [lats | 120] x [lons | 180]</span><br><span style="font-family:Arial;font-size:12.0pt;">Coordinates: </span><br><span style="font-family:Arial;font-size:12.0pt;">           time: [350616..929160]</span><br><span style="font-family:Arial;font-size:12.0pt;">           lats: [ -90..88.5]</span><br><span style="font-family:Arial;font-size:12.0pt;">           lons: [   0.. 358]</span><br><span style="font-family:Arial;font-size:12.0pt;">Number Of Attributes: 1</span><br><span style="font-family:Arial;font-size:12.0pt;"> _FillValue :  -9e+33</span><br> </p><p><span style="font-family:Arial;font-size:12.0pt;">I'd like to know how I can correct the second part of the time series to make it like the first part. I tried with LonFlip and LonPivot but I couldn't make it work. I'm thinking about a way to shift the data back by that longitude offset, but I can't wrap my head around it.</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">Please let me know.</span></p><p> </p><p><span style="font-family:Arial;font-size:12.0pt;">Cheers,</span></p><p><span style="font-family:Arial;font-size:12.0pt;">Giorgio</span></p>