NCEPLIBS-ip
4.2.0
|
Private Member Functions | |
subroutine | polates4_grib1 (IPOPT, KGDSI, KGDSO, MI, MO, KM, IBI, GI, NO, RLAT, RLON, IBO, LO, GO, IRET) |
Interpolate scalar fields (spectral). More... | |
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). More... | |
Definition at line 24 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 559 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 254 of file spectral_interp_mod.F90.
References earth_radius_mod::earth_radius().