1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | C |
---|
5 | SUBROUTINE atm2geo ( im, jm, pte, ptn, plon, plat, pxx, pyy, pzz ) |
---|
6 | cc |
---|
7 | cc Change wind local atmospheric coordinates to |
---|
8 | cc geocentric |
---|
9 | cc |
---|
10 | c$$$ INCLUDE 'param.h' |
---|
11 | c |
---|
12 | INTEGER, INTENT (in) :: im, jm |
---|
13 | REAL, DIMENSION (im,jm), INTENT (in) :: pte, ptn |
---|
14 | REAL, DIMENSION (im,jm), INTENT (in) :: plon, plat |
---|
15 | REAL, DIMENSION (im,jm), INTENT(out) :: pxx, pyy, pzz |
---|
16 | c |
---|
17 | REAL, PARAMETER :: rpi = 3.141592653E0 |
---|
18 | REAL, PARAMETER :: rad = rpi / 180.0E0 |
---|
19 | c |
---|
20 | REAL, DIMENSION (im,jm) :: zsinlon, zcoslon |
---|
21 | REAL, DIMENSION (im,jm) :: zsinlat, zcoslat |
---|
22 | c |
---|
23 | LOGICAL, SAVE :: linit = .FALSE. |
---|
24 | c |
---|
25 | c$$$ IF ( .NOT. linit ) THEN |
---|
26 | zsinlon = SIN (rad * plon) |
---|
27 | zcoslon = COS (rad * plon) |
---|
28 | zsinlat = SIN (rad * plat) |
---|
29 | zcoslat = COS (rad * plat) |
---|
30 | linit = .TRUE. |
---|
31 | c$$$ ENDIF |
---|
32 | c |
---|
33 | pxx = - zsinlon * pte - zsinlat * zcoslon * ptn |
---|
34 | pyy = zcoslon * pte - zsinlat * zsinlon * ptn |
---|
35 | pzz = zcoslat * ptn |
---|
36 | c |
---|
37 | c Value at North Pole |
---|
38 | pxx ( :, 1) = - ptn ( 1, 1) |
---|
39 | pyy ( :, 1) = - pte ( 1, 1) |
---|
40 | pzz ( :, 1) = 0.0 |
---|
41 | c Value at South Pole |
---|
42 | pxx ( :, jm) = + ptn ( 1, jm) |
---|
43 | pyy ( :, jm) = + pte ( 1, jm) |
---|
44 | pzz ( :, jm) = 0.0 |
---|
45 | c |
---|
46 | RETURN |
---|
47 | END SUBROUTINE atm2geo |
---|