NCEPLIBS-ip  5.1.0
gdswzd_c.F90
Go to the documentation of this file.
1 
4 
8  use gdswzd_mod
9  implicit none
10 
11 contains
12 
173  SUBROUTINE gdswzd_c(IGDTNUM,IGDTMPL,IGDTLEN,IOPT,NPTS,FILL, &
174  XPTS,YPTS,RLON,RLAT,NRET,CROT,SROT, &
175  XLON,XLAT,YLON,YLAT,AREA) bind(C, NAME='gdswzd')
176  use, INTRINSIC :: iso_c_binding
177 
178  USE gdswzd_mod
179 
180  IMPLICIT NONE
181 
182 #if (LSIZE==8)
183  INTEGER(KIND=C_LONG), INTENT(IN) :: IGDTMPL(IGDTLEN)
184  INTEGER(KIND=C_LONG), VALUE, INTENT(IN) :: IGDTNUM, IGDTLEN
185  INTEGER(KIND=C_LONG), VALUE, INTENT(IN) :: IOPT, NPTS
186  INTEGER(KIND=C_LONG), INTENT(OUT) :: NRET
187 #else
188  INTEGER(KIND=C_INT), INTENT(IN) :: IGDTMPL(IGDTLEN)
189  INTEGER(KIND=C_INT), VALUE, INTENT(IN) :: IGDTNUM, IGDTLEN
190  INTEGER(KIND=C_INT), VALUE, INTENT(IN) :: IOPT, NPTS
191  INTEGER(KIND=C_INT), INTENT(OUT) :: NRET
192 #endif
193 
194 #if (LSIZE==4)
195  REAL(KIND=c_float), VALUE, INTENT(IN) :: fill
196  REAL(KIND=c_float), INTENT(INOUT) :: xpts(npts),ypts(npts),rlon(npts),rlat(npts)
197  REAL(KIND=c_float), INTENT(OUT) :: crot(npts),srot(npts),xlon(npts),xlat(npts)
198  REAL(KIND=c_float), INTENT(OUT) :: ylon(npts),ylat(npts),area(npts)
199 #else
200  REAL(KIND=c_double), VALUE, INTENT(IN) :: fill
201  REAL(KIND=c_double), INTENT(INOUT) :: xpts(npts),ypts(npts),rlon(npts),rlat(npts)
202  REAL(KIND=c_double), INTENT(OUT) :: crot(npts),srot(npts),xlon(npts),xlat(npts)
203  REAL(KIND=c_double), INTENT(OUT) :: ylon(npts),ylat(npts),area(npts)
204 #endif
205 
206  CALL gdswzd(igdtnum,igdtmpl,igdtlen,iopt,npts,fill, &
207  xpts,ypts,rlon,rlat,nret, &
208  crot,srot,xlon,xlat,ylon,ylat,area)
209 
210  END SUBROUTINE gdswzd_c
211 
259  SUBROUTINE gdswzd_c_grib1(KGDS,IOPT,NPTS,FILL,XPTS,YPTS,RLON,RLAT,NRET, &
260  CROT,SROT,XLON,XLAT,YLON,YLAT,AREA) bind(C, NAME='gdswzd_grib1')
261  use, INTRINSIC :: iso_c_binding
262 
263  USE gdswzd_mod
264 
265  IMPLICIT NONE
266 
267 #if (LSIZE==8)
268  INTEGER(KIND=C_LONG), INTENT(IN) :: KGDS(200)
269  INTEGER(KIND=C_LONG), VALUE, INTENT(IN) :: IOPT
270  INTEGER(KIND=C_LONG), VALUE, INTENT(IN) :: NPTS
271  INTEGER(KIND=C_LONG), INTENT(OUT) :: NRET
272 #else
273  INTEGER(KIND=C_INT), INTENT(IN) :: KGDS(200)
274  INTEGER(KIND=C_INT), VALUE, INTENT(IN) :: IOPT
275  INTEGER(KIND=C_INT), VALUE, INTENT(IN) :: NPTS
276  INTEGER(KIND=C_INT), INTENT(OUT) :: NRET
277 #endif
278 
279 #if (LSIZE==4)
280  REAL(KIND=c_float), VALUE, INTENT(IN) :: fill
281  REAL(KIND=c_float), INTENT(INOUT) :: xpts(npts),ypts(npts),rlon(npts),rlat(npts)
282  REAL(KIND=c_float), INTENT(OUT) :: crot(npts),srot(npts),xlon(npts),xlat(npts)
283  REAL(KIND=c_float), INTENT(OUT) :: ylon(npts),ylat(npts),area(npts)
284 #else
285  REAL(KIND=c_double), VALUE, INTENT(IN) :: fill
286  REAL(KIND=c_double), INTENT(INOUT) :: xpts(npts),ypts(npts),rlon(npts),rlat(npts)
287  REAL(KIND=c_double), INTENT(OUT) :: crot(npts),srot(npts),xlon(npts),xlat(npts)
288  REAL(KIND=c_double), INTENT(OUT) :: ylon(npts),ylat(npts),area(npts)
289 #endif
290 
291  CALL gdswzd(kgds,iopt,npts,fill,xpts,ypts,rlon,rlat,nret, &
292  crot,srot,xlon,xlat,ylon,ylat,area)
293 
294  END SUBROUTINE gdswzd_c_grib1
295 
296 end module gdswzd_c_mod
Module that contains C wrapper for routine gdswzd().
Definition: gdswzd_c.F90:7
subroutine gdswzd_c_grib1(KGDS, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
C wrapper for routine gdswzd.
Definition: gdswzd_c.F90:261
subroutine gdswzd_c(IGDTNUM, IGDTMPL, IGDTLEN, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
C wrapper for routine gdswzd().
Definition: gdswzd_c.F90:176
Driver module for gdswzd routines.
Definition: gdswzd_mod.F90:25