Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

RECT_TO_CURV

RECT_TO_CURV (V, lon_bounds_out, lat_bounds_out, missing_allowed) Uses Bilinear Interpolation to regrid data on a recilinear grid to a curvilinear grid.

Arguments:

V

Variable on the source rectilinear grid

 

lon_bounds_out

Destination grid longitudes, in degrees (2-D field of longitudes describing the curvilinear grid)

 

lat_bounds_out

Destination grid latitudes, in degrees (2-D field of latitudes describing the curvilinear grid)

 

missing_allowed

Number of missing values allowed among the 4 surrounding source cells: 0 to 3

Result Axes:

X

Inherited from lon_bounds_out

 

Y

Inherited from lat_bounds_out

 

Z

Inherited from V

 

T

Inherited from V

Example: put a rectilinear data set on a curvilinear grid for comparison.

yes? use my_curvilinear_data.nc
yes? use levitus_climatology
 
yes? show data
currently SET data sets:
1> /.my_curvilinear_data.nc 
name title I J K L
GEOLON geographic longitude of grid 1:180 1:173 .. ..
GEOLAT geographic latitude of grid 1:180 1:173 .. ..
SALT salinity 1:180 1:173 1:30 1:12 
AIRT air temperature 1:180 1:173 1:30 1:12
 
 
2> /home/ja9/tmap/fer_dsets/data/levitus_climatology.cdf (default)
name title I J K L
TEMP TEMPERATURE 1:360 1:180 1:20 ..
SALT SALINITY 1:360 1:180 1:20 ..
 
yes? ! For convenience, define variables for arguments to RECT_TO_CURV
 
yes? let lonout = geolon[d=1]
yes? let latout = geolat[d=1]
 
yes? let a = rect_to_curv(temp[d=2,k=1], lonout, latout, 2)
yes? shade a, lonout, latout
 
yes? ! Compare to a variable on the curvilinear grid
 
yes? shade a-airt[d=1], lonout, latout
 
yes? ! save the new variable for all depths, with the curvilinear
 
yes? ! latitude and longitude variables
 
yes? let temp_curv = rect_to_curv(temp[d=2], lonout, latout, 2)
yes? save/file=tcurv.nc temp_curv, lonout, latout
LISTing to file tcurv.nc