NCEPLIBS-ip 5.2.0
Loading...
Searching...
No Matches
neighbor_interp_mod::interpolate_neighbor Interface Reference

Public Member Functions

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).
 

Detailed Description

Definition at line 29 of file neighbor_interp_mod.F90.

Member Function/Subroutine Documentation

◆ interpolate_neighbor_scalar()

subroutine neighbor_interp_mod::interpolate_neighbor::interpolate_neighbor_scalar ( integer, dimension(20), intent(in)  ipopt,
class(ip_grid), intent(in)  grid_in,
class(ip_grid), intent(in)  grid_out,
integer, intent(in)  mi,
integer, intent(in)  mo,
integer, intent(in)  km,
integer, dimension(km), intent(in)  ibi,
logical*1, dimension(mi,km), intent(in)  li,
real, dimension(mi,km), intent(in)  gi,
integer, intent(inout)  no,
real, dimension(mo), intent(inout)  rlat,
real, dimension(mo), intent(inout)  rlon,
integer, dimension(km), intent(out)  ibo,
logical*1, dimension(mo,km), intent(out)  lo,
real, dimension(mo,km), intent(out)  go,
integer, intent(out)  iret 
)

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:

  • (igdtnumi/o=00) equidistant cylindrical
  • (igdtnumi/o=01) rotated equidistant cylindrical. "e" and non-"e" staggered
  • (igdtnumi/o=10) mercator cylindrical
  • (igdtnumi/o=20) polar stereographic azimuthal
  • (igdtnumi/o=30) lambert conformal conical
  • (igdtnumi/o=40) gaussian cylindrical

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.

Parameters
[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_inThe input grid.
[in]grid_outThe output grid.
[in]miskip number between input grid fields if km>1 or dimension of input grid fields if km=1.
[in]moskip number between output grid fields if km>1 or dimension of output grid fields if km=1
[in]kmnumber 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]nonumber 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]iretreturn code
  • 0 successful interpolation
  • 2 unrecognized input grid or no grid overlap
  • 3 unrecognized output grid
Author
Mark Iredell
Date
96-04-10
Author
Eric Engle
Date
23-05-04

Definition at line 100 of file neighbor_interp_mod.F90.

References polfix_mod::polfixs().

◆ interpolate_neighbor_vector()

subroutine neighbor_interp_mod::interpolate_neighbor::interpolate_neighbor_vector ( integer, dimension(20), intent(in)  ipopt,
class(ip_grid), intent(in)  grid_in,
class(ip_grid), intent(in)  grid_out,
integer, intent(in)  mi,
integer, intent(in)  mo,
integer, intent(in)  km,
integer, dimension(km), intent(in)  ibi,
logical*1, dimension(mi,km), intent(in)  li,
real, dimension(mi,km), intent(in)  ui,
real, dimension(mi,km), intent(in)  vi,
integer, intent(inout)  no,
real, dimension(mo), intent(inout)  rlat,
real, dimension(mo), intent(inout)  rlon,
real, dimension(mo), intent(inout)  crot,
real, dimension(mo), intent(inout)  srot,
integer, dimension(km), intent(out)  ibo,
logical*1, dimension(mo,km), intent(out)  lo,
real, dimension(mo,km), intent(out)  uo,
real, dimension(mo,km), intent(out)  vo,
integer, intent(out)  iret 
)

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:

  • (igdtnumi/o=00) equidistant cylindrical
  • (igdtnumi/o=01) rotated equidistant cylindrical. "e" and non-"e" staggered
  • (igdtnumi/o=10) mercator cylindrical
  • (igdtnumi/o=20) polar stereographic azimuthal
  • (igdtnumi/o=30) lambert conformal conical
  • (igdtnumi/o=40) gaussian cylindrical

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.

Parameters
[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_inThe input grid.
[in]grid_outThe output grid.
[in]miskip number between input grid fields if km>1 or dimension of input grid fields if km=1
[in]moskip number between output grid fields if km>1 or dimension of output grid fields if km=1
[in]kmnumber 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]nonumber 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]iretreturn code
  • 0 successful interpolation
  • 2 unrecognized input grid or no grid overlap
  • 3 unrecognized output grid
Author
Mark Iredell
Date
96-04-10
Author
Eric Engle
Date
23-05-04

Definition at line 352 of file neighbor_interp_mod.F90.

References movect(), and polfix_mod::polfixv().


The documentation for this interface was generated from the following file: