[Thread Prev][Thread Next][Index]

[ferret_users] inconsistent treatment of modulo axis, depending on range



Hi ferreters,

as you can see in the attached figure, I have a problem with a gap in the ferret modulo axis at 180 degree E/W, depending on the range plotted.


I use the gridding function SCAT2GRID_BIN_XY with the following input:

let LON  = {165, 175, 185, 195, 205}
let LAT  = { 50,  50,  50,  50,  50}
let VARI = {  1,   2,   3,   4,   5}
def ax/X=-170:180:10/unit=longitude/modulo xgrid
def ax/Y=-35:85:10/unit=latitude ygrid
!! grid variable 'vari' to xgrid and ygrid using coordinate variables
let VARIG = SCAT2GRID_BIN_XY(LON,LAT,VARI,X[GX=XGRID],Y[GY=YGRID])


Just as in the attached plot, when I list the result crossing the 180 degree E/W meridian, it seems that scat2grid respects the modulo x axis:

yes? list/y=45/x=150:220 varig
 150E   / 33:   ....
 160E   / 34:  1.000
 170E   / 35:  2.000
 180E   / 36:  3.000
 170W   / 37:  4.000
 160W   / 38:  5.000
 150W   / 39:   ....
 140W   / 40:   ....


But when I do the standard listing, there's an undefined value at 180 degrees E, and the average of 185 and 195 degrees E ( = 175 and 165 degrees W) is all put at 170 degrees W:

yes? list/y=45 varig
 170W    /  1:  3.500
 160W    /  2:  5.000
 150W    /  3:   ....
[more undefined values]
 150E    / 33:   ....
 160E    / 34:  1.000
 170E    / 35:  2.000
 180E    / 36:   ....


The same "modulo gap" happens with this shifted combination:
let LON  = {160, 170, 180, 190, 200}
def ax/X=-180:180:10/edges/unit=longitude/modulo xgrid


I understand that this is probably an interpolation issue as the lon values are all exactly between the defined grid points (on the edges) so that ferret has to make a decision, on which side to put the result. Still it seems that the treatment of this situation should be consistent, and not dependent on the range defined for listing or plotting.


Thanks for any input on this.


Best wishes,
Hella


Attachment: ferret_modulo_gap.pdf
Description: Adobe PDF document


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement