IBM XL Fortran for AIX, V12.1 (5724-U82) Version 12.01.0000.0001 --- ../interp/bilinear_interp.F 03/09/11 11:03:43 >>>>> OPTIONS SECTION <<<<< *** Options In Effect *** == On / Off Options == CR DBG ESCAPE FULLPATH I4 INLGLUE NOLIBESSL NOLIBPOSIX OBJECT SOURCE STRICT SWAPOMP THREADED UNWIND ZEROSIZE == Options Of Integer Type == ALIAS_SIZE(65536) MAXMEM(-1) OPTIMIZE(2) SPILLSIZE(2000) STACKTEMP(0) == Options Of Character Type == 64(LARGETYPE) ALIAS(STD,NOINTPTR) ALIGN(BINDC(POWER),STRUCT(NATURAL)) ARCH(PWR6) ATTR(FULL) AUTODBL(NONE) DESCRIPTOR(V1) DIRECTIVE(IBM*,IBMT) ENUM() FLAG(I,I) FLOAT(RNDSNGL,MAF,FOLD,RNGCHK,SINGLE) FREE(F90) HALT(S) IEEE(NEAR) INTSIZE(4) LANGLVL(EXTENDED) REALSIZE(4) NOSAVE() TUNE(PWR6) UNROLL(AUTO) XREF(FULL) XLF2003(NOPOLYMORPHIC,NOBOZLITARGS,NOSTOPEXCEPT,NOVOLATILE,NOAUTOREALLOC,OLDNANINF) XLF77(LEADZERO,BLANKPAD) XLF90(NOSIGNEDZERO,NOAUTODEALLOC,OLDPAD) >>>>> SOURCE SECTION <<<<< 1 |#line 1 "../interp/bilinear_interp.F" 1 |!------------------------------------------------------------------------- 2 |! NASA Goddard Space Flight Center Land Information System (LIS) V3.0 3 |! Released May 2004 4 |! 5 |! See SOFTWARE DISTRIBUTION POLICY for software distribution policies 6 |! 7 |! The LIS source code and documentation are in the public domain, 8 |! available without fee for educational, research, non-commercial and 9 |! commercial purposes. Users may distribute the binary or source 10 |! code to third parties provided this statement appears on all copies and 11 |! that no charge is made for such copies. 12 |! 13 |! NASA GSFC MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE 14 |! SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED AS IS WITHOUT EXPRESS OR 15 |! IMPLIED WARRANTY. NEITHER NASA GSFC NOR THE US GOVERNMENT SHALL BE 16 |! LIABLE FOR ANY DAMAGES SUFFERED BY THE USER OF THIS SOFTWARE. 17 |! 18 |! See COPYRIGHT.TXT for copyright details. 19 |! 20 |!------------------------------------------------------------------------- 21 |!BOP 22 |! 23 |! !ROUTINE: bilinear_interp.F90 24 |! 25 |! !DESCRIPTION: 26 |! This subprogram performs bilinear interpolation 27 |! from any grid to any grid for scalar fields. The routine is based 28 |! on the spatial interpolation package ipolates from NCEP. 29 |! 30 |! The algorithm simply computes (weighted) averages 31 |! of bilinearly interpolated points arranged in a square box 32 |! centered around each output grid point and stretching 33 |! nearly halfway to each of the neighboring grid points. 34 |! options allow choices of number of points in each radius 35 |! from the center point (ipopt(1)) which defaults to 2 36 |! (if ipopt(1)=-1) meaning that 25 points will be averaged; 37 |! further options are the respective weights for the radius 38 |! points starting at the center point (ipopt(2:2+ipopt(1)) 39 |! which defaults to all 1 (if ipopt(2)=-1.). 40 |! only horizontal interpolation is performed. 41 |! the grids are defined by their grid description sections 42 |! 43 |! The grid description arrays are based on the decoding 44 |! schemes used by NCEP. However, in order to remove the integer 45 |! arithmetic employed in the original ipolates, the routines 46 |! are rewritten using real number manipulations. The general 47 |! structure remains the same. 48 |! 49 |! The current code recognizes the following projections: 50 |! (gridDesc(1)=0) equidistant cylindrical 51 |! (gridDesc(1)=1) mercator cylindrical 52 |! (gridDesc(1)=3) lambert conformal conical 53 |! (gridDesc(1)=4) gaussian cylindrical (spectral native) 54 |! (gridDesc(1)=5) polar stereographic azimuthal 55 |! (gridDesc(1)=202) rotated equidistant cylindrical (eta native) 56 |! where gridDesc could be either input gridDesci or output gridDesco. 57 |! as an added bonus the number of output grid points 58 |! and their latitudes and longitudes are also returned. 59 |! input bitmaps will be interpolated to output bitmaps. 60 |! output bitmaps will also be created when the output grid 61 |! extends outside of the domain of the input grid. 62 |! the output field is set to 0 where the output bitmap is off. 63 |! INPUT ARGUMENT LIST: 64 |! ipopt - integer (20) interpolation options 65 |! ipopt(1) is number of radius points 66 |! (defaults to 2 if ipopt(1)=-1); 67 |! ipopt(2:2+ipopt(1)) are respective weights 68 |! (defaults to all 1 if ipopt(2)=-1). 69 |! gridDesci - real(200) input domain description parameters 70 |! gridDesco - integer (200) output domain description parameters 71 |! mi - integer dimension of input grid fields 72 |! mo - integer dimension of output grid fields 73 |! ibi - integer input bitmap flags 74 |! li - logical*1 (mi) input bitmaps (if some ibi(k)=1) 75 |! gi - real (mi) input fields to interpolate 76 |! 77 |! OUTPUT ARGUMENT LIST: 78 |! no - integer number of output points 79 |! rlat - real (mo) output latitudes in degrees 80 |! rlon - real (mo) output longitudes in degrees 81 |! ibo - integer (km) output bitmap flags 82 |! lo - logical*1 (mo) output bitmaps (always output) 83 |! go - real (mo) output fields interpolated 84 |! iret - integer return code 85 |! 0 successful interpolation 86 |! 2 unrecognized input grid or no grid overlap 87 |! 3 unrecognized output grid 88 |! 31 invalid undefined output grid 89 |! 32 invalid budget method parameters 90 |! 91 |! !REVISION HISTORY: 92 |! 04-10-96 Mark Iredell; Initial Specification 93 |! 05-27-04 Sujay Kumar : Modified verision with floating point arithmetic, 94 |! 95 |! 96 |! 97 |! !INTERFACE: 98 |subroutine bilinear_interp(gridDesco,ibi,li,gi,ibo,lo,go,mi,mo, & 99 | rlat,rlon,w11,w12,w21,w22,n11,n12,n21,n22,IRET) 100 |!USES: 101 |!EOP 102 | implicit none 103 | integer iret,ier 104 | integer :: mi, mo,nn 105 | real :: w11(mo),w12(mo) 106 | real :: w21(mo),w22(mo) 107 | real :: rlat(mo),rlon(mo) 108 | integer :: n11(mo),n12(mo) 109 | integer :: n21(mo),n22(mo) 110 | real :: gridDesco(50) 111 | integer k, n 112 | integer ibi,ibo 113 | 114 | logical*1 li(mi),lo(mo) 115 | real gi(mi),go(mo) 116 | real xpts(mo),ypts(mo) 117 | real wo(mo) 118 | 119 | real, parameter :: fill=-9999. 120 | nn = mo 121 |! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 122 |! INTERPOLATE WITH OR WITHOUT BITMAPS 123 | do n=1, nn 124 | go(n)=0. 125 | wo(n)=0. 126 | 127 | if(li(n11(n))) then 128 | go(n)=go(n)+w11(n)*gi(n11(n)) 129 | wo(n)=wo(n)+w11(n) 130 | endif 131 | if(li(n21(n))) then 132 | go(n)=go(n)+w21(n)*gi(n21(n)) 133 | wo(n)=wo(n)+w21(n) 134 | endif 135 | if(li(n12(n))) then 136 | go(n)=go(n)+w12(n)*gi(n12(n)) 137 | wo(n)=wo(n)+w12(n) 138 | endif 139 | if(li(n22(n))) then 140 | go(n)=go(n)+w22(n)*gi(n22(n)) 141 | wo(n)=wo(n)+w22(n) 142 | endif 143 | enddo 144 | ibo=1 145 | do n=1,nn 146 | lo(n)=wo(n).ge.0.5 147 | if(lo(n)) then 148 | go(n)=go(n)/wo(n) 149 | else 150 | ibo=1 151 | go(n)=0. 152 | endif 153 | enddo 154 | if(gridDesco(1).eq.0) call polfixs(nn,mo,1,rlat,rlon,ibo,lo,go) 155 | 156 |end subroutine bilinear_interp >>>>> ATTRIBUTE AND CROSS REFERENCE SECTION <<<<< IDENTIFIER NAME CROSS REFERENCE AND ATTRIBUTES bilinear_interp Subroutine 0-98.12$ fill Parameter, Real(4) 0-119.22$ gi Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-115.8$ 0-98.45 0-128.28 0-132.28 0-136.28 0-140.28 go Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-115.15$ 0-98.55 0-124.6@ 0-128.9@ 0-128.15 0-132.9@ 0-132.15 0-136.9@ 0-136.15 0-140.9@ 0-140.15 0-148.9@ 0-148.15 0-151.9@ 0-154.63 griddesco Reference argument, Real(4) (1:50), Offset: 0, Alignment: full word 0-110.12$ 0-98.28 0-154.6 ibi Reference argument, Integer(4), Offset: 0, Alignment: full word 0-112.11$ 0-98.38 ibo Reference argument, Integer(4), Offset: 0, Alignment: full word 0-112.15$ 0-98.48 0-144.3@ 0-150.9@ 0-154.56 ier Automatic, Integer(4), Offset: 0, Alignment: full word 0-103.16$ iret Reference argument, Integer(4), Offset: 0, Alignment: full word 0-103.11$ 0-99.48 k Automatic, Integer(4), Offset: 0, Alignment: full word 0-111.11$ li Reference argument, Logical(1) (1:?), Offset: 0, Alignment: byte 0-114.13$ 0-98.42 0-127.9 0-131.9 0-135.9 0-139.9 lo Reference argument, Logical(1) (1:?), Offset: 0, Alignment: byte 0-114.20$ 0-98.52 0-146.6@ 0-147.9 0-154.60 mi Reference argument, Integer(4), Offset: 0, Alignment: full word 0-104.14$ 0-98.58 0-114.16 0-114.16 0-115.11 0-115.11 mo Reference argument, Integer(4), Offset: 0, Alignment: full word 0-104.18$ 0-98.61 0-105.15 0-105.15 0-105.23 0-105.23 0-106.15 0-106.15 0-106.23 0-106.23 0-107.16 0-107.16 0-107.25 0-107.25 0-108.18 0-108.18 0-108.26 0-108.26 0-109.18 0-109.18 0-109.26 0-109.26 0-114.23 0-114.23 0-115.18 0-115.18 0-116.13 0-116.13 0-116.22 0-116.22 0-117.11 0-117.11 0-120.8 0-154.41 n Automatic, Integer(4), Offset: 0, Alignment: full word 0-111.14$ 0-123.6@ 0-124.9 0-125.9 0-127.16 0-128.12 0-128.18 0-128.25 0-128.35 0-129.12 0-129.18 0-129.25 0-131.16 0-132.12 0-132.18 0-132.25 0-132.35 0-133.12 0-133.18 0-133.25 0-135.16 0-136.12 0-136.18 0-136.25 0-136.35 0-137.12 0-137.18 0-137.25 0-139.16 0-140.12 0-140.18 0-140.25 0-140.35 0-141.12 0-141.18 0-141.25 0-145.6@ 0-146.9 0-146.15 0-147.12 0-148.12 0-148.18 0-148.24 0-151.12 n11 Reference argument, Integer(4) (1:?), Offset: 0, Alignment: full word 0-108.14$ 0-99.32 0-127.12 0-128.31 n12 Reference argument, Integer(4) (1:?), Offset: 0, Alignment: full word 0-108.22$ 0-99.36 0-135.12 0-136.31 n21 Reference argument, Integer(4) (1:?), Offset: 0, Alignment: full word 0-109.14$ 0-99.40 0-131.12 0-132.31 n22 Reference argument, Integer(4) (1:?), Offset: 0, Alignment: full word 0-109.22$ 0-99.44 0-139.12 0-140.31 nn Automatic, Integer(4), Offset: 0, Alignment: full word 0-104.21$ 0-120.3@ 0-123.11 0-145.10 0-154.38 polfixs External Subroutine 0-154.30 rlat Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-107.11$ 0-99.6 0-154.46 rlon Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-107.20$ 0-99.11 0-154.51 w11 Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-105.11$ 0-99.16 0-128.21 0-129.21 w12 Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-105.19$ 0-99.20 0-136.21 0-137.21 w21 Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-106.11$ 0-99.24 0-132.21 0-133.21 w22 Reference argument, Real(4) (1:?), Offset: 0, Alignment: full word 0-106.19$ 0-99.28 0-140.21 0-141.21 wo Controlled Automatic, Real(4) (1:?), Offset: 0, Alignment: full word 0-117.8$ 0-125.6@ 0-129.9@ 0-129.15 0-133.9@ 0-133.15 0-137.9@ 0-137.15 0-141.9@ 0-141.15 0-146.12 0-148.21 xpts Controlled Automatic, Real(4) (1:?), Offset: 0, Alignment: full word 0-116.8$ ypts Controlled Automatic, Real(4) (1:?), Offset: 0, Alignment: full word 0-116.17$ ** bilinear_interp === End of Compilation 1 === >>>>> FILE TABLE SECTION <<<<< FILE CREATION FROM FILE NO FILENAME DATE TIME FILE LINE 0 ../interp/bilinear_interp.F 03/09/11 11:03:43 >>>>> COMPILATION EPILOGUE SECTION <<<<< FORTRAN Summary of Diagnosed Conditions TOTAL UNRECOVERABLE SEVERE ERROR WARNING INFORMATIONAL (U) (S) (E) (W) (I) 0 0 0 0 0 0 Source records read....................................... 157 1501-510 Compilation successful for file bilinear_interp.F. 1501-543 Object file created.