[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regridding Ocean Velocity Data



Hi Rebecca,

It sounds as if the model data you're using has separate coordinate variables - the lon and lat that you're using in the curv_to_rect regridding function. We have not had other reports of changes in the magnitude of the data when data is regridded.  Note that the radius is in degrees, so 10 is probably a bit large; but the data used in computing the regridding is weighted by the distance from the result location, so this should not cause an inaccuracy. 

There are some other capabilities and functions you can use in Ferret -  See "curvilinear coordinates " in the Users' Guide, and also to get a list of functions,

yes? show function *curv*

CURV_RANGE(LONGITUDES,LATITUDES,xrange_lo,xrange_hi,yrange_lo,yrange_hi,modulo flag for X coordinates)
    find i,j bounds for subset of a variable in curvilinear coordinates
    LONGITUDES: 2-D longitudes of curvilinear grid
    LATITUDES: 2-D latitudes of curvilinear grid
    xrange_lo: Minimum of longitude range
    xrange_hi: Maximum of longitude range
    yrange_lo: Minimum of latitude range
    yrange_hi: Maximum of latitude range
    modulo flag for X coordinates: 1= X modulo; 0= X not modulo
CURV_TO_RECT(V,mapping)
    Apply mapping to regrid from curvilinear to rectangular grid
...

The CURV_RANGE function returns the I,J bounds in the original grid that corresponds to a defined longitude/latitude rectangle.  This function is newer and is not documented in the Ferret Users Guide.  You might also find SAMPLEXY_CURV to be useful.

Some model results may include other variables describing the grid, such as the area of grid cells, grid cell centers and edges, and so forth. If you look at those and perhaps in documentation about the model output, you may get ideas for using this information in calculations on the native grid that you want to do.

Ansley


On 8/30/2016 11:23 AM, Rebecca Lynn Beadling wrote:
Hello Ferreters,

I am analyzing output from CMIP5 models at 26 N and some of the models provide their data in x,y coordinates rather than lat,lon. I can plot the data using latitude,longitude however to integrate the velocity to find the volume transport I have to use the x,y values.

For example how I would calculate the gulf stream transport with a model with output given in lat,lon:

let voltans = vo[x=81W:74W@DIN,y=26N@ITP,k=0:37@DIN]

For a model in which the data is not already in latitude longitude but x and y .... say x goes from 1:182 and y from 1:149, I am not sure how to determine which y value corresponds to 26N besides plotting identical images one using the lat,lon and the other without and using the where command to identify the closest point to what looks like 26N on the lat,lon plot.

To get around this I thought I could just go ahead and regrid all of the data to a rectilinear coordinate system using the following script:

let lonin = lon[d=1]
let latin = lat[d=1]

define axis/x=0.5:359.5:1/modulo/unit=degrees xax
define axis/y=-79.5:89.5:1/unit=degrees yax

let lonlatout = y[gy=yax] + x[gx=xax]

let map = curv_to_rect_map(lonin,latin,lonlatout,10)

save/clobber/file=noresm_map.nc map
can var/all

use noresm_map

show data

let vo_regrid = curv_to_rect(vo[d=1],map[d=2])

save/clobber/file=vo_regrid.nc vo_regrid

However I am getting errors when I do this however they vary by model. For example when I compare the regridded data with the data on the native grid for ESM2M I get an increase of ~1.4 Sv when looking at the Gulf Stream Transport. When comparing for ESM2G I get an increase of ~10 Sv which seems unrealistic.

Taking a look at the two files I noticed that when I regrid I am losing some of the topography / bathemetry and am getting values for velocity in regions where there used to be none. 

I have tried varying the radius I use when regridding however this does not seem to be solving the problem.

Has anyone had similar issues when regridding ocean velocity data or know a way to determine which y value on a models native grid corresponds to a certain latitude?

Any help would be great!

Thank you,

Rebecca Beadling





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

Privacy Policy | Disclaimer | Accessibility Statement