109 XPTS,YPTS,RLON,RLAT,NRET, &
110 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
112 class(
ip_grid),
intent(in) :: grid
113 INTEGER,
INTENT(IN ) :: IOPT, NPTS
114 INTEGER,
INTENT( OUT) :: NRET
116 REAL,
INTENT(IN ) :: FILL
117 REAL,
INTENT(INOUT) :: RLON(NPTS),RLAT(NPTS)
118 REAL,
INTENT(INOUT) :: XPTS(NPTS),YPTS(NPTS)
119 REAL,
OPTIONAL,
INTENT( OUT) :: CROT(NPTS),SROT(NPTS)
120 REAL,
OPTIONAL,
INTENT( OUT) :: XLON(NPTS),XLAT(NPTS)
121 REAL,
OPTIONAL,
INTENT( OUT) :: YLON(NPTS),YLAT(NPTS),AREA(NPTS)
123 INTEGER :: IS1, IM, JM, NM, KSCAN, NSCAN, N
124 INTEGER :: IOPF, NN, I, J
125 INTEGER :: I_OFFSET_ODD, I_OFFSET_EVEN
146 type is(ip_rot_equid_cylind_egrid)
156 i=(n-im*(j-1))*2-mod(j+kscan,2)
161 IF (mod(jm,2)==0.AND.mod(i,2)==0.AND.kscan==0) j = j + 1
162 IF (mod(jm,2)==0.AND.mod(i,2)==0.AND.kscan==1) j = j - 1
164 xpts(n)=is1+(i-(j-kscan))/2
165 ypts(n)=(i+(j-kscan))/2
190 call grid%gdswzd(iopf,npts,fill, &
191 xpts,ypts,rlon,rlat,nret, &
192 crot,srot,xlon,xlat,ylon,ylat,area)
275 XPTS,YPTS,RLON,RLAT,NRET, &
276 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
280 INTEGER,
INTENT(IN ) :: IGDTNUM, IGDTLEN
281 INTEGER,
INTENT(IN ) :: IGDTMPL(IGDTLEN)
282 INTEGER,
INTENT(IN ) :: IOPT, NPTS
283 INTEGER,
INTENT( OUT) :: NRET
285 REAL,
INTENT(IN ) :: FILL
286 REAL,
INTENT(INOUT) :: RLON, RLAT
287 REAL,
INTENT(INOUT) :: XPTS, YPTS
288 REAL,
OPTIONAL,
INTENT( OUT) :: CROT, SROT
289 REAL,
OPTIONAL,
INTENT( OUT) :: XLON, XLAT
290 REAL,
OPTIONAL,
INTENT( OUT) :: YLON, YLAT, AREA
292 REAL :: RLONA(1),RLATA(1)
293 REAL :: XPTSA(1),YPTSA(1)
294 REAL :: CROTA(1),SROTA(1)
295 REAL :: XLONA(1),XLATA(1)
296 REAL :: YLONA(1),YLATA(1),AREAA(1)
307 IF (.NOT.
PRESENT(crot) .AND. &
308 .NOT.
PRESENT(srot) .AND. &
309 .NOT.
PRESENT(xlon) .AND. &
310 .NOT.
PRESENT(xlat) .AND. &
311 .NOT.
PRESENT(ylon) .AND. &
312 .NOT.
PRESENT(ylat) .AND. &
313 .NOT.
PRESENT(area) )
THEN
316 xptsa,yptsa,rlona,rlata,nret)
327 IF (
PRESENT(crot) .AND. &
328 PRESENT(srot) .AND. &
329 .NOT.
PRESENT(xlon) .AND. &
330 .NOT.
PRESENT(xlat) .AND. &
331 .NOT.
PRESENT(ylon) .AND. &
332 .NOT.
PRESENT(ylat) .AND. &
333 .NOT.
PRESENT(area) )
THEN
336 xptsa,yptsa,rlona,rlata,nret,crota,srota)
349 IF (
PRESENT(crot) .AND. &
350 PRESENT(srot) .AND. &
351 PRESENT(xlon) .AND. &
352 PRESENT(xlat) .AND. &
353 PRESENT(ylon) .AND. &
354 PRESENT(ylat) .AND. &
358 xptsa,yptsa,rlona,rlata,nret, &
359 crota,srota,xlona,xlata,ylona,ylata,areaa)
457 XPTS,YPTS,RLON,RLAT,NRET, &
458 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
462 INTEGER,
INTENT(IN ) :: IGDTNUM, IGDTLEN
463 INTEGER,
INTENT(IN ) :: IGDTMPL(IGDTLEN)
464 INTEGER,
INTENT(IN ) :: IOPT, NPTS
465 INTEGER,
INTENT( OUT) :: NRET
467 REAL,
INTENT(IN ) :: FILL
468 REAL,
INTENT(INOUT) :: RLON(:,:),RLAT(:,:)
469 REAL,
INTENT(INOUT) :: XPTS(:,:),YPTS(:,:)
470 REAL,
OPTIONAL,
INTENT( OUT) :: CROT(:,:),SROT(:,:)
471 REAL,
OPTIONAL,
INTENT( OUT) :: XLON(:,:),XLAT(:,:)
472 REAL,
OPTIONAL,
INTENT( OUT) :: YLON(:,:),YLAT(:,:),AREA(:,:)
475 xpts,ypts,rlon,rlat,nret, &
476 crot,srot,xlon,xlat,ylon,ylat,area)
664 XPTS,YPTS,RLON,RLAT,NRET, &
665 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
666 INTEGER,
INTENT(IN ) :: IGDTNUM, IGDTLEN
667 INTEGER,
INTENT(IN ) :: IGDTMPL(IGDTLEN)
668 INTEGER,
INTENT(IN ) :: IOPT, NPTS
669 INTEGER,
INTENT( OUT) :: NRET
671 REAL,
INTENT(IN ) :: FILL
672 REAL,
INTENT(INOUT) :: RLON(NPTS),RLAT(NPTS)
673 REAL,
INTENT(INOUT) :: XPTS(NPTS),YPTS(NPTS)
674 REAL,
OPTIONAL,
INTENT( OUT) :: CROT(NPTS),SROT(NPTS)
675 REAL,
OPTIONAL,
INTENT( OUT) :: XLON(NPTS),XLAT(NPTS)
676 REAL,
OPTIONAL,
INTENT( OUT) :: YLON(NPTS),YLAT(NPTS),AREA(NPTS)
679 class(
ip_grid),
allocatable :: grid
685 xpts,ypts,rlon,rlat,nret, &
686 crot,srot,xlon,xlat,ylon,ylat,area)
757 SUBROUTINE gdswzd_grib1(KGDS,IOPT,NPTS,FILL,XPTS,YPTS,RLON,RLAT,NRET, &
758 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
759 INTEGER,
INTENT(IN ) :: IOPT, KGDS(200), NPTS
760 INTEGER,
INTENT( OUT) :: NRET
762 REAL,
INTENT(IN ) :: FILL
763 REAL,
INTENT(INOUT) :: RLON(NPTS),RLAT(NPTS)
764 REAL,
INTENT(INOUT) :: XPTS(NPTS),YPTS(NPTS)
765 REAL,
OPTIONAL,
INTENT( OUT) :: CROT(NPTS),SROT(NPTS)
766 REAL,
OPTIONAL,
INTENT( OUT) :: XLON(NPTS),XLAT(NPTS)
767 REAL,
OPTIONAL,
INTENT( OUT) :: YLON(NPTS),YLAT(NPTS),AREA(NPTS)
771 class(
ip_grid),
allocatable :: grid
777 xpts,ypts,rlon,rlat,nret, &
778 crot,srot,xlon,xlat,ylon,ylat,area)
851 CROT,SROT,XLON,XLAT,YLON,YLAT,AREA)
854 INTEGER,
INTENT(IN ) :: IOPT, KGDS(200), NPTS
855 INTEGER,
INTENT( OUT) :: NRET
857 REAL,
INTENT(IN ) :: FILL
858 REAL,
INTENT(INOUT) :: RLON(:,:),RLAT(:,:)
859 REAL,
INTENT(INOUT) :: XPTS(:,:),YPTS(:,:)
860 REAL,
OPTIONAL,
INTENT( OUT) :: CROT(:,:),SROT(:,:)
861 REAL,
OPTIONAL,
INTENT( OUT) :: XLON(:,:),XLAT(:,:)
862 REAL,
OPTIONAL,
INTENT( OUT) :: YLON(:,:),YLAT(:,:),AREA(:,:)
866 class(
ip_grid),
allocatable :: grid
872 xpts,ypts,rlon,rlat,nret, &
873 crot,srot,xlon,xlat,ylon,ylat,area)
Driver module for gdswzd routines.
subroutine, public gdswzd_grib1(KGDS, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
Decodes the grib grid description section and returns one of the following (for 1-d arrays):
subroutine gdswzd_grid(grid, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
Returns one of the following for a grid object:
subroutine, public gdswzd_2d_array_grib1(KGDS, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
Decodes the grib grid description section and returns one of the following (for 2-d arrays):
subroutine gdswzd_scalar(IGDTNUM, IGDTMPL, IGDTLEN, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
Decodes the grib 2 grid definition template and returns one of the following (for scalars):
subroutine gdswzd_1d_array(IGDTNUM, IGDTMPL, IGDTLEN, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
Decodes the grib 2 grid definition template and returns one of the following:
subroutine gdswzd_2d_array(IGDTNUM, IGDTMPL, IGDTLEN, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA)
Decodes the grib 2 grid definition template and returns one of the following (for 2d-arrays):
Uses derived type grid descriptor objects to abstract away the raw Grib-1 and Grib-2 grid definitions...
Routines for creating an ip_grid given a Grib descriptor.
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.