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