Changeset 125 for trunk/SRC/Interpolation/angle.pro
- Timestamp:
- 07/06/06 16:10:25 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/angle.pro
r121 r125 1 1 ;--------- 2 2 ;+ 3 ; @file_comments north stereographic polar projection 3 ; @file_comments 4 ; north stereographic polar projection 4 5 ; 5 6 ; @param plam {in}{required} 6 7 ; 7 ; @param pphi {in}{required} 8 ; @param pphi {in}{required} 8 9 ; 9 10 ; @keyword DOUBLE {default=0} use double precision (default is float) 10 11 ; 11 12 ; @returns 12 ; gsinu,gcosu : sinus and cosinus of the angle 13 ; gsinv,gcosv between north-south direction 13 ; gsinu,gcosu : sinus and cosinus of the angle 14 ; gsinv,gcosv between north-south direction 14 15 ; gsint,gcost and the j-direction of the mesh 15 16 ; 16 ; @restrictions to compute the lateral boundary conditions, we assume17 ; t hat:17 ; @restrictions 18 ; to compute the lateral boundary conditions, we assume that: 18 19 ; (1) the first line is similar to the second line 19 ; => gcosu[*, 0] = gcosu[*, 1] 20 ; => gsinu[*, 0] = gsinu[*, 1] 20 ; => gcosu[*, 0] = gcosu[*, 1] 21 ; => gsinu[*, 0] = gsinu[*, 1] 21 22 ; (2) the grid follows OPA x periodicity rule, first column is 22 23 ; equal to the next to last column … … 26 27 ; 27 28 ; @history 28 ; --------------29 29 ; Original : 96-07 (O. Marti) 30 30 ; 98-06 (G. Madec) 31 ; Feb 2005: IDL adaptation S. Masson 31 ; Feb 2005: IDL adaptation S. Masson 32 32 ; 33 33 ; @version $Id$ 34 34 ; 35 35 ;- 36 ;---------37 36 ; 38 37 FUNCTION fsnspp, plam, pphi, DOUBLE = double … … 47 46 a = 2. * tan( !pi/4. - !pi/180.*float(pphi)/2. ) 48 47 x = cos( !pi/180.*float(plam) ) * a 49 y = sin( !pi/180.*float(plam) ) * a 48 y = sin( !pi/180.*float(plam) ) * a 50 49 ENDELSE 51 50 RETURN, {x:x, y:y} … … 150 149 znpv01 = -1; free memory 151 150 IF keyword_set(double) THEN zmnpvt = 1.e-14 > zmnpvt $ 152 ELSE zmnpvt = 1.e-6 > zmnpvt 151 ELSE zmnpvt = 1.e-6 > zmnpvt 153 152 ; ... j-direction: f-point segment direction (u-point) 154 153 zxffu = znpf00.x - znpf01.x … … 157 156 znpf01 = -1; free memory 158 157 IF keyword_set(double) THEN zmnpfu = 1.e-14 > zmnpfu $ 159 ELSE zmnpfu = 1.e-6 > zmnpfu 158 ELSE zmnpfu = 1.e-6 > zmnpfu 160 159 ; ... i-direction: f-point segment direction (v-point) 161 160 zxffv = znpf00.x - znpf10.x 162 zyffv = znpf00.y - znpf10.y 161 zyffv = znpf00.y - znpf10.y 163 162 znpf00 = -1 & znpf10 = -1; free memory 164 163 zmnpfv = sqrt ( temporary(znnpv) * ( zxffv*zxffv + zyffv*zyffv ) ) 165 164 IF keyword_set(double) THEN zmnpfv = 1.e-14 > zmnpfv $ 166 ELSE zmnpfv = 1.e-6 > zmnpfv 165 ELSE zmnpfv = 1.e-6 > zmnpfv 167 166 ; ... cosinus and sinus using scalar and vectorial products 168 167 gsint = ( znpt.x*zyvvt - znpt.y*zxvvt ) / zmnpvt … … 193 192 ; ================================ 194 193 ; 195 gcost[*, 0] = gcost[*, 1] 196 gsint[*, 0] = gsint[*, 1] 197 gcosu[*, 0] = gcosu[*, 1] 198 gsinu[*, 0] = gsinu[*, 1] 194 gcost[*, 0] = gcost[*, 1] 195 gsint[*, 0] = gsint[*, 1] 196 gcosu[*, 0] = gcosu[*, 1] 197 gsinu[*, 0] = gsinu[*, 1] 199 198 gcosv[0, *] = gcosv[jpj-2, *] 200 199 gsinv[0, *] = gsinv[jpj-2, *]
Note: See TracChangeset
for help on using the changeset viewer.