NCEPLIBS-ip 5.3.0
All Data Structures Namespaces Files Functions Variables Pages
ip_station_points_grid_mod.F90
Go to the documentation of this file.
1!> @file
2!> @brief Interpolate gridded data to a series of station points.
3!>
4!> @author Kyle Gerheiser @date 7/21/21
5
6!> @brief Interpolate gridded data to a series of station points.
7!>
8!> @author Kyle Gerheiser @date 7/21/21
11 use ip_grid_mod
12 implicit none
13
14 ! Not really a grid
15 private
17
19 contains
20 !> Initializes a gaussian grid given a grib1_descriptor object.
21 !> @return N/A @copydoc ip_station_points_grid_mod::init_grib1
22 procedure :: init_grib1
23 !> Initializes a gaussian grid given a grib2_descriptor object.
24 !> @return N/A @copydoc ip_station_points_grid_mod::init_grib2
25 procedure :: init_grib2
26 !> Calculates Earth coordinates (iopt = 1) or grid coorindates (iopt = -1)
27 !> for IP Station Point grids.
28 !> @return N/A @copydoc ip_station_points_grid_mod::gdswzd_station_points
31
32contains
33
34 !> Initializes an IP Station grid given a grib1_descriptor object.
35 !>
36 !> @param[inout] self The grid to initialize
37 !> @param[in] g1_desc A grib1_descriptor
38 !>
39 !> @author Iredell @date 96-04-10
40 subroutine init_grib1(self, g1_desc)
41 class(ip_station_points_grid), intent(inout) :: self
42 type(grib1_descriptor), intent(in) :: g1_desc
43 end subroutine init_grib1
44
45 !> Initializes an IP Station grid given a grib2_descriptor object.
46 !>
47 !> @param[inout] self The grid to initialize
48 !> @param[in] g2_desc A grib2_descriptor
49 !>
50 !> @author Iredell @date 96-04-10
51 subroutine init_grib2(self, g2_desc)
52 class(ip_station_points_grid), intent(inout) :: self
53 type(grib2_descriptor), intent(in) :: g2_desc
54 end subroutine init_grib2
55
56 !> Interpolate gridded data to a series of station points.
57 !>
58 !> @param[in] self The grid.
59 !> @param[in] IOPT must be minus 1 (return grid coordinates for selected earth coordinates).
60 !> @param[in] NPTS Maximum number of points.
61 !> @param[in] FILL Fill value to set invalid output data.
62 !> Must be impossible value; suggested value: -9999.
63 !> @param[inout] XPTS X point coordinates. Always output.
64 !> @param[inout] YPTS Y point coordinates. Always output.
65 !> @param[inout] RLON Point longitudes. Always input.
66 !> @param[inout] RLAT Point latitudes. Always input.
67 !> @param[out] NRET Number of valid points computed.
68 !> @param[out] CROT Not used.
69 !> @param[out] SROT Not used.
70 !> @param[out] XLON Not used.
71 !> @param[out] XLAT Not used.
72 !> @param[out] YLON Not used.
73 !> @param[out] YLAT Not used.
74 !> @param[out] AREA Not used.
75 !>
76 !> @author Kyle Gerheiser @date 7/21/21
77 !> @author Eric Engle @date 5/4/23
78 SUBROUTINE gdswzd_station_points(self,IOPT,NPTS, &
79 FILL,XPTS,YPTS,RLON,RLAT,NRET, &
80 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
81 class(ip_station_points_grid), intent(in) :: self
82 INTEGER, INTENT(IN ) :: IOPT, NPTS
83 INTEGER, INTENT( OUT) :: NRET
84 !
85 REAL, INTENT(IN ) :: FILL
86 REAL, INTENT(INOUT) :: RLON(NPTS),RLAT(NPTS)
87 REAL, INTENT(INOUT) :: XPTS(NPTS),YPTS(NPTS)
88 REAL, OPTIONAL, INTENT( OUT) :: CROT(NPTS),SROT(NPTS)
89 REAL, OPTIONAL, INTENT( OUT) :: XLON(NPTS),XLAT(NPTS)
90 REAL, OPTIONAL, INTENT( OUT) :: YLON(NPTS),YLAT(NPTS),AREA(NPTS)
91
92 ! This is all that needs to be done for GDSWZD for station points.
93 nret = npts
94
95 end subroutine gdswzd_station_points
96
void gdswzd(int igdtnum, int *igdtmpl, int igdtlen, int iopt, int npts, float fill, float *xpts, float *ypts, float *rlon, float *rlat, int *nret, float *crot, float *srot, float *xlon, float *xlat, float *ylon, float *ylat, float *area)
gdswzd() interface for C for _4 build of library.
Users derived type grid descriptor objects to abstract away the raw GRIB1 and GRIB2 grid definitions.
Abstract ip_grid type.
Interpolate gridded data to a series of station points.
subroutine init_grib1(self, g1_desc)
Initializes an IP Station grid given a grib1_descriptor object.
subroutine gdswzd_station_points(self, iopt, npts, fill, xpts, ypts, rlon, rlat, nret, crot, srot, xlon, xlat, ylon, ylat, area)
Interpolate gridded data to a series of station points.
subroutine init_grib2(self, g2_desc)
Initializes an IP Station grid given a grib2_descriptor object.
Descriptor representing a grib1 grib descriptor section (GDS) with an integer array.
Grib-2 descriptor containing a grib2 GDT represented by an integer array.
Abstract grid that holds fields and methods common to all grids.