NCEPLIBS-ip 5.2.0
|
Interpolate scalar fields (neighbor). More...
Data Types | |
interface | interpolate_neighbor |
Functions/Subroutines | |
subroutine | interpolate_neighbor_scalar (ipopt, grid_in, grid_out, mi, mo, km, ibi, li, gi, no, rlat, rlon, ibo, lo, go, iret) |
Interpolate scalar fields (neighbor). | |
subroutine | interpolate_neighbor_vector (ipopt, grid_in, grid_out, mi, mo, km, ibi, li, ui, vi, no, rlat, rlon, crot, srot, ibo, lo, uo, vo, iret) |
Interpolate vector fields (neighbor). | |
Interpolate scalar fields (neighbor).
Date | Programmer | Comments |
---|---|---|
96-04-10 | Iredell | initial |
1999-04-08 | Iredell | split ijkgds into two pieces |
2001-06-18 | Iredell | include spiral search option |
2006-01-04 | Gayno | minor bug fix |
2007-10-30 | Iredell | save weights and thread for performance |
2012-06-26 | Gayno | fix out-of-bounds error. see nceplibs ticket #9. |
2015-01-27 | Gayno | replace calls to gdswiz() with new merged version of gdswzd(). |
2015-07-13 | Gayno | replace grib 1 kgds arrays with grib 2 grid definition template arrays. |
|
private |
Interpolate scalar fields (neighbor).
This subprogram performs neighbor interpolation from any grid to any grid for scalar fields.
Options allow choosing the width of the grid square (ipopt(1)) to search for valid data, which defaults to 1 (if ipopt(1)=-1). Odd width squares are centered on the nearest input grid point; even width squares are centered on the nearest four input grid points. Squares are searched for valid data in a spiral pattern starting from the center. No searching is done where the output grid is outside the input grid. Only horizontal interpolation is performed.
The code recognizes the following projections, where "igdtnumi/o" is the grib 2 grid defintion template number for the input and output grids, respectively:
As an added bonus the number of output grid points and their latitudes and longitudes are also returned. On the other hand, the output can be a set of station points if igdtnumo<0, in which case the number of points and their latitudes and longitudes must be input.
Input bitmaps will be interpolated to output bitmaps.
Output bitmaps will also be created when the output grid extends outside of the domain of the input grid. The output field is set to 0 where the output bitmap is off.
[in] | ipopt | (20) interpolation options ipopt(1) is width of square to examine in spiral search (defaults to 1 if ipopt(1)=-1) |
[in] | grid_in | The input grid. |
[in] | grid_out | The output grid. |
[in] | mi | skip number between input grid fields if km>1 or dimension of input grid fields if km=1. |
[in] | mo | skip number between output grid fields if km>1 or dimension of output grid fields if km=1 |
[in] | km | number of fields to interpolate |
[in] | ibi | (km) input bitmap flags |
[in] | li | (mi,km) input bitmaps (if some ibi(k)=1) |
[in] | gi | (mi,km) input fields to interpolate |
[in,out] | no | number of output points (only if igdtnumo<0) |
[in,out] | rlat | (no) output latitudes in degrees (if igdtnumo<0) |
[in,out] | rlon | (no) output longitudes in degrees (if igdtnumo<0) |
[out] | ibo | (km) output bitmap flags |
[out] | lo | (mo,km) output bitmaps (always output) |
[out] | go | (mo,km) output fields interpolated |
[out] | iret | return code
|
Definition at line 100 of file neighbor_interp_mod.F90.
|
private |
Interpolate vector fields (neighbor).
This subprogram performs neighbor interpolation from any grid to any grid for vector fields.
Options allow choosing the width of the grid square (ipopt(1)) to search for valid data, which defaults to 1 (IF IPOPT(1)=-1). Odd width squares are centered on the nearest input grid point; even width squares are centered on the nearest four input grid points.
Squares are searched for valid data in a spiral pattern starting from the center. no searching is done where the output grid is outside the input grid. Only horizontal interpolation is performed.
The input and output grids are defined by their grib 2 grid definition template as decoded by the ncep g2 library.
The code recognizes the following projections, where "igdtnumi/o" is the grib 2 grid defintion template number for the input and output grids, respectively:
The input and output vectors are rotated so that they are either resolved relative to the defined grid in the direction of increasing x and y coordinates or resolved relative to easterly and northerly directions, as designated by their respective grid definition sections.
As an added bonus the number of output grid points and their latitudes and longitudes are also returned along with their vector rotation parameters. On the other hand, the output can be a set of station points if igdtnumo<0, in which case the number of points and their latitudes and longitudes must be input along with their vector rotation parameters.
Input bitmaps will be interpolated to output bitmaps. output bitmaps will also be created when the output grid extends outside of the domain of the input grid. The output field is set to 0 where the output bitmap is off.
[in] | ipopt | (20) interpolation options ipopt(1) is width of square to examine in spiral search (defaults to 1 if ipopt(1)=-1) |
[in] | grid_in | The input grid. |
[in] | grid_out | The output grid. |
[in] | mi | skip number between input grid fields if km>1 or dimension of input grid fields if km=1 |
[in] | mo | skip number between output grid fields if km>1 or dimension of output grid fields if km=1 |
[in] | km | number of fields to interpolate |
[in] | ibi | (km) input bitmap flags |
[in] | li | (mi,km) input bitmaps (if some ibi(k)=1) |
[in] | ui | (mi,km) input u-component fields to interpolate |
[in] | vi | (mi,km) input v-component fields to interpolate |
[in,out] | no | number of output points (only if igdtnumo>=0) |
[in,out] | rlat | (mo) output latitudes in degrees (if igdtnumo<0) |
[in,out] | rlon | (mo) output longitudes in degrees (if igdtnumo<0) |
[in,out] | crot | (mo) vector rotation cosines (if igdtnumo<0) |
[in,out] | srot | (mo) vector rotation sines (if igdtnumo<0) (ugrid=crot*uearth-srot*vearth; vgrid=srot*uearth+crot*vearth) |
[out] | ibo | (km) output bitmap flags |
[out] | lo | (mo,km) output bitmaps (always output) |
[out] | uo | (mo,km) output u-component fields interpolated |
[out] | vo | (mo,km) output v-component fields interpolated |
[out] | iret | return code
|
Definition at line 352 of file neighbor_interp_mod.F90.