NOAA-PMEL / Ferret

The Ferret program from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
55 stars 20 forks source link

Bug in SAMPLEXY_CURV functions #1437

Open karlmsmith opened 6 years ago

karlmsmith commented 6 years ago

Reported by @AnsleyManke on 4 Apr 2014 00:07 UTC Patrick Brockmann reported this. His full example is here:

http://dods.ipsl.jussieu.fr/brocksce/ferret_bugs/err685_sample/

The longitude coordinates have a branch cut, starting at the left wtih positive longitudes, then the cut taking the longitudes to -180 and increasing from there to the right. The sample points have longitudes between -43 and -9. The result has wild swings in the data.

A shortened dataset is attached. Here is a script that shows the behavior, using this smaller dataset that contains only surface data.

! surface_example.jnl
! This data saved from Patrick's test.nc with data only at the 
! surface and with the X and Y axes strided.
! It still shows the bug.  The full example is in
! /home/users/ansley/ans_ferret/users/brockmann/bug_samplexy_curv/

use test_data_surface.nc
use transec.nc
let v1=SAMPLEXY_CURV(DATA_DIC[d=1],nav_lon[d=1],nav_lat[d=1],t1[d=2],t2[d=2])
plot v1

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/2165

karlmsmith commented 6 years ago

Comment by steven.c.hankin on 7 Apr 2014 15:21 UTC I wonder if we can replace the internal encoding of SAMPLE_CURV with a call to an ESMF routine. It would be nice to have someone else be responsible to get the full details of curvilinear coordinate systems (especially branch cuts) right.

karlmsmith commented 6 years ago

Attachment from @AnsleyManke on 4 Apr 2014 00:09 UTC surface-only curvilienar dataset test_data_surface.nc.zip

karlmsmith commented 6 years ago

Attachment from @AnsleyManke on 4 Apr 2014 00:10 UTC The XY location of scattered points used in the script transec.nc.zip

karlmsmith commented 6 years ago

Attachment from @AnsleyManke on 4 Apr 2014 00:11 UTC The resulting image bug2165