[Thread Prev][Thread Next][Index]

[ferret_users] Problems to find nearest neighbours in coordinate fields



Hi ferreters,

I am trying to extract station data from model output fields. The output of the same model run has been written to two separate files, one covering the total model region with time averages over long periods, one for a subregion, but with higher output frequency. As a test, the time average of quantities in the high frequency regional output file should be exactly the same as in the output file of the full model domain.

Testing this for "stations" with given coordinates, this is really the case, if coordinates are specified "exactly" at the model grid. To be more specific:

Load the two output files, for example

use  ocean_day3d.nc
use rregionocean_stolpe.nc

show data

gives for example

TEMP     Conservative temperature         1:666     1:723     1:77      1:2
TEMP Conservative temperature 1:61 1:49 1:77 1:240

Indeed,

list/x=17.5/y=55.175/k=1/prec=6 temp[d=1,l=1],temp[d=2,l=1:120@ave]

gives the same results, y=55.175 specifies a grid point. But

list/x=17.5/y=55.2/k=1/prec=6 temp[d=1,l=1],temp[d=2,l=1:120@ave]

does not give the same result. Inspecting both files with ncdump, 55.19167 and 55.20833 are found as the nearest neigbours for the y-coordinate. Surprisingly ferret gives also different results for coordinates in both the files:

list/x=17.5/y=55.2/k=1/prec=6 y[gy=temp[d=1]],y[gy=temp[d=2]]
Column  1: Y[Y=55.2N] is Y (axis YT_OCEAN)
Column  2: Y[Y=55.2N] is Y (axis YT_OCEAN_SUB1)
               Y      Y
I / *:     55.1917  55.2083

Hence, for both files a different neighbour is found as the nearest one. Subtracting 55.2 reveals, that the distance to both the neighbours is
almost the same.
I / *:    -0.00833511  0.00833130

So there come up the question:
- why does ferret not read the coordinates from both files in the same manner? There is no attribute that defines eventually an equidistant grid spacing. float yt_ocean_sub1(yt_ocean_sub1) ;
               yt_ocean_sub1:long_name = "tcell latitude" ;
               yt_ocean_sub1:units = "degrees_N" ;
               yt_ocean_sub1:cartesian_axis = "Y" ;

Greetings,
Martin Schmidt


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement