NCEPLIBS-ip 5.2.0
|
Interpolate spectral. More...
Data Types | |
interface | interpolate_spectral |
interface | polates4 |
interface | polatev4 |
Functions/Subroutines | |
subroutine | interpolate_spectral_scalar (ipopt, grid_in, grid_out, mi, mo, km, ibi, gi, no, rlat, rlon, ibo, lo, go, iret) |
Interpolate spectral scalar. | |
subroutine | interpolate_spectral_vector (ipopt, grid_in, grid_out, mi, mo, km, ibi, ui, vi, no, rlat, rlon, crot, srot, ibo, lo, uo, vo, iret) |
Interpolate spectral vector. | |
subroutine | polates4_grib1 (ipopt, kgdsi, kgdso, mi, mo, km, ibi, gi, no, rlat, rlon, ibo, lo, go, iret) |
Interpolate scalar fields (spectral). | |
subroutine | polates4_grib2 (ipopt, igdtnumi, igdtmpli, igdtleni, igdtnumo, igdtmplo, igdtleno, mi, mo, km, ibi, gi, no, rlat, rlon, ibo, lo, go, iret) |
Interpolate scalar fields (spectral). | |
subroutine | polatev4_grib1 (ipopt, kgdsi, kgdso, mi, mo, km, ibi, ui, vi, no, rlat, rlon, crot, srot, ibo, lo, uo, vo, iret) |
Interpolate vector fields (spectral). | |
subroutine | polatev4_grib2 (ipopt, igdtnumi, igdtmpli, igdtleni, igdtnumo, igdtmplo, igdtleno, mi, mo, km, ibi, ui, vi, no, rlat, rlon, crot, srot, ibo, lo, uo, vo, iret) |
Interpolate vector fields (spectral). | |
Interpolate spectral.
|
private |
Interpolate spectral scalar.
[in] | ipopt | interpolation options; ipopt(1)=0 for triangular; ipopt(1)=1 for rhomboidal; ipopt(2) is truncation number (defaults to a sensible truncation if ipopt(2)=-1). |
[in] | grid_in | input grid descriptor. |
[in] | grid_out | output grid descriptor. |
[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 | input bitmap flags (Must be all 0. Routine does not do bitmapped interpolation.) |
[in] | GI | input fields to interpolate. |
[out] | NO | number of output points. |
[in,out] | RLAT | output latitudes in degrees. |
[in,out] | RLON | output longitudes in degrees. |
[out] | IBO | output bitmap flags. |
[out] | LO | output bitmaps. |
[out] | GO | output fields interpolated. |
[out] | IRET | return code. 0/non-0 - successful/not successful. |
Definition at line 61 of file spectral_interp_mod.F90.
|
private |
Interpolate spectral vector.
ipopt | interpolation options; ipopt(1)=0 for triangular; ipopt(1)=1 for rhomboidal; ipopt(2) is truncation number (defaults to a sensible truncation if ipopt(2)=-1). |
grid_in | input grid descriptor. |
grid_out | output grid descriptor. |
MI | skip number between input grid fields if km>1 or dimension of input grid fields if km=1. |
MO | skip number between output grid fields if km>1 or dimension of output grid fields if km=1. |
KM | number of fields to interpolate. |
IBI | input bitmap flags (Must be all 0. Routine does not do bitmapped interpolation.) |
UI | input u-component fields to interpolate. |
VI | input v-component fields to interpolate. |
NO | number of output points. |
RLAT | output latitudes in degrees. |
RLON | output longitudes in degrees. |
CROT | vector rotation cosines. |
SROT | vector rotation sines. |
IBO | output bitmap flags. |
LO | output bitmaps. |
UO | output u-component fields interpolated. |
VO | output v-component fields interpolated. |
IRET | return code. 0/non-0 - successful/not successful. |
Definition at line 122 of file spectral_interp_mod.F90.
|
private |
Interpolate scalar fields (spectral).
This subprogram performs spectral interpolation from any grid to any grid for scalar fields. It requires that the input fields be uniformly global.
Options allow choices between triangular shape (ipopt(1)=0) and rhomboidal shape (ipopt(1)=1) which has no default; a second option is the truncation (ipopt(2)) which defaults to a sensible truncation for the input grid (if opt(2)=-1).
Only horizontal interpolation is performed. The grids are defined by their grid description sections (passed in integer form as decoded by subprogram w3fi63()).
The current code recognizes the following projections:
Where kgds could be either input kgdsi or output kgdso. 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 kgdso(1)<0, in which case the number of points and their latitudes and longitudes must be input. Output bitmaps will not be created.
Date | Programmer | Comments |
---|---|---|
96-04-10 | Iredell | Initial |
2001-06-18 | Iredell | improve detection of special fast transform |
2015-01-27 | Gayno | replace calls to gdswiz() with new merged version of gdswzd(). |
[in] | ipopt | (20) interpolation options ipopt(1)=0 for triangular, ipopt(1)=1 for rhomboidal; ipopt(2) is truncation number (defaults to sensible if ipopt(2)=-1). |
[in] | kgdsi | (200) input gds parameters as decoded by w3fi63 |
[in] | kgdso | (200) output gds parameters (kgdso(1)<0 implies random station points) |
[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 (must be all 0) |
[in] | gi | (mi,km) input fields to interpolate |
[out] | no | number of output points (only if kgdso(1)<0) |
[out] | rlat | (no) output latitudes in degrees (if kgdso(1)<0) |
[out] | rlon | (no) output longitudes in degrees (if kgdso(1)<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 560 of file spectral_interp_mod.F90.
|
private |
Interpolate scalar fields (spectral).
This subprogram performs spectral interpolation from any grid to any grid for scalar fields. It requires that the input fields be uniformly global. Options allow choices between triangular shape (ipopt(1)=0) and rhomboidal shape (ipopt(1)=1) which has no default; a second option is the truncation (ipopt(2)) which defaults to a sensible truncation for the input grid (if opt(2)=-1).
Only horizontal interpolation is performed.
The code recognizes the following projections, where "igdtnumi/o" is the GRIB2 grid defintion template number for the input and onutput 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. Output bitmaps will not be created.
Date | Programmer | Comments |
---|---|---|
96-04-10 | Iredell | initial |
2001-06-18 | Iredell | improve detection of special fast transform |
2015-01-27 | Gayno | replace calls to gdswiz with new merged version of gdswzd. |
2015-07-13 | Gayno | convert to grib 2. replace grib 1 kgds arrays with grib 2 grid definition template arrays. |
[in] | ipopt | (20) interpolation options; ipopt(1)=0 for triangular, ipopt(1)=1 for rhomboidal; ipopt(2) is truncation number (defaults to sensible if ipopt(2)=-1). |
[in] | igdtnumi | grid definition template number - input grid. Corresponds to the gfldigdtnum component of the NCEPLIBS-g2 library gridmod data structure.
|
[in] | igdtmpli | (igdtleni) grid definition template array - input grid. corresponds to the gfldigdtmpl component of the ncep g2 library gridmod data structure: (section 3 info). See comments in routine ipolates() for complete definition. |
[in] | igdtleni | number of elements of the grid definition template array - input grid. corresponds to the gfldigdtlen component of the ncep g2 library gridmod data structure. |
[in] | igdtnumo | grid definition template number - output grid. Corresponds to the gfldigdtnum component of the NCEPLIBS-g2 library gridmod data structure. igdtnumo<0 means interpolate to random station points. Otherwise, same definition as igdtnumi. |
[in] | igdtmplo | (igdtleno) grid definition template array - output grid. Corresponds to the gfldigdtmpl component of the ncep g2 library gridmod data structure (section 3 info). See comments in routine ipolates() for complete definition. |
[in] | igdtleno | number of elements of the grid definition template array - output grid. Corresponds to the gfldigdtlen component of the [NCEPLIBS-g2](https://github.com/NOAA-EMC/NCEPLIBS-g2) library gridmod data structure. |
[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 |
[out] | km | number of fields to interpolate |
[out] | ibi | (km) input bitmap flags (must be all 0) |
[out] | gi | (mi,km) input fields to interpolate |
[out] | no | number of output points (only if igdtnumo>=0) |
[out] | rlat | (mo) output latitudes in degrees (if igdtnumo<0) |
[out] | rlon | (mo) 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 255 of file spectral_interp_mod.F90.
|
private |
Interpolate vector fields (spectral).
This subprogram performs spectral interpolation from any grid to any grid for vector fields. It requires that the input fields be uniformly global. Options allow choices between triangular shape (ipopt(1)=0) and rhomboidal shape (ipopt(1)=1) which has no default; a second option is the truncation (ipopt(2)) which defaults to a sensible truncation for the input grid (if opt(2)=-1).
Only horizontal interpolation is performed. The grids are defined by their grid description sections (passed in integer form as decoded by subprogram w3fi63).
The current code recognizes the following projections:
Where kgds could be either input kgdsi or output kgdso.
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 description 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 kgdso(1)<0, in which case the number of points and their latitudes and longitudes must be input along with their vector rotation parameters.
Output bitmaps will only 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.
Date | Programmer | Comments |
---|---|---|
96-04-10 | iredell | initial. |
2001-06-18 | iredell | improve detection of special fast transform |
2015-01-27 | gayno | replace calls to gdswiz() with new merged routine gdswzd(). |
[in] | ipopt | (20) interpolation options ipopt(1)=0 for triangular, ipopt(1)=1 for rhomboidal; ipopt(2) is truncation number (defaults to sensible if ipopt(2)=-1). |
[in] | kgdsi | (200) input gds parameters as decoded by w3fi63. |
[in] | kgdso | (200) output gds parameters (kgdso(1)<0 implies random station points). |
[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 (must be all 0) |
[in] | ui | (mi,km) input u-component fields to interpolate |
[in] | vi | (mi,km) input v-component fields to interpolate |
[out] | no | number of output points (only if kgdso(1)<0) |
[out] | rlat | (no) output latitudes in degrees (if kgdso(1)<0) |
[out] | rlon | (no) output longitudes in degrees (if kgdso(1)<0) |
[out] | crot | (no) vector rotation cosines (if kgdso(1)<0) |
[out] | srot | (no) vector rotation sines (if kgdso(1)<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 1222 of file spectral_interp_mod.F90.
Referenced by spectral_interp_mod::interpolate_spectral::interpolate_spectral_vector().
|
private |
Interpolate vector fields (spectral).
This subprogram performs spectral interpolation from any grid to any grid for vector fields. It requires that the input fields be uniformly global. Options allow choices between triangular shape (ipopt(1)=0) and rhomboidal shape (ipopt(1)=1) which has no default; a second option is the truncation (ipopt(2)) which defaults to a sensible truncation for the input grid (if opt(2)=-1).
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 description 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.
Output bitmaps will only 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.
Date | Programmer | Comments |
---|---|---|
96-04-10 | iredell | initial |
2001-06-18 | iredell | improve detection of special fast transform |
2015-01-27 | gayno | replace calls to gdswiz() with new merged routine gdswzd(). |
2015-07-13 | gayno | convert to grib 2. replace grib 1 kgds arrays with grib 2 grid definition template arrays. |
[in] | ipopt | (20) interpolation options ipopt(1)=0 for triangular, ipopt(1)=1 for rhomboidal; ipopt(2) is truncation number (defaults to sensible if ipopt(2)=-1). |
[in] | igdtnumi | grid definition template number - input grid. Corresponds to the gfldigdtnum component of the ncep g2 library gridmod data structure:
|
[in] | igdtmpli | (igdtleni) grid definition template array - input grid. corresponds to the gfldigdtmpl component of the ncep g2 library gridmod data structure (section 3 info). see comments in routine ipolatev for complete definition. |
[in] | igdtleni | number of elements of the grid definition template array - input grid. corresponds to the gfldigdtlen component of the ncep g2 library gridmod data structure. |
[in] | igdtnumo | grid definition template number - output grid. Corresponds to the gfldigdtnum component of the ncep g2 library gridmod data structure. igdtnumo<0 means interpolate to random station points. Otherwise, same definition as "igdtnumi". |
[in] | igdtmplo | (igdtleno) grid definition template array - output grid. corresponds to the gfldigdtmpl component of the ncep g2 library gridmod data structure (section 3 info). see comments in routine ipolatev() for complete definition. |
[in] | igdtleno | number of elements of the grid definition template array - output grid. Corresponds to the gfldigdtlen component of the ncep g2 library gridmod data structure. |
[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 (must be all 0) |
[in] | ui | (mi,km) input u-component fields to interpolate |
[in] | vi | (mi,km) input v-component fields to interpolate |
[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 888 of file spectral_interp_mod.F90.