[524] | 1 | ! |
---|
[2429] | 2 | ! $Id: atm2geo.F90 2429 2016-01-27 12:43:09Z snguyen $ |
---|
[524] | 3 | ! |
---|
[1126] | 4 | SUBROUTINE atm2geo ( im, jm, pte, ptn, plon, plat, pxx, pyy, pzz ) |
---|
| 5 | USE dimphy |
---|
| 6 | USE mod_phys_lmdz_para |
---|
| 7 | IMPLICIT NONE |
---|
| 8 | INCLUDE 'YOMCST.h' |
---|
| 9 | ! |
---|
| 10 | ! Change wind local atmospheric coordinates to geocentric |
---|
| 11 | ! |
---|
| 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 | |
---|
| 17 | REAL :: rad |
---|
[776] | 18 | |
---|
[766] | 19 | |
---|
[1126] | 20 | rad = rpi / 180.0E0 |
---|
| 21 | |
---|
| 22 | pxx(:,:) = & |
---|
| 23 | - pte(:,:) * SIN(rad * plon(:,:)) & |
---|
| 24 | - ptn(:,:) * SIN(rad * plat(:,:)) * COS(rad * plon(:,:)) |
---|
| 25 | |
---|
| 26 | pyy(:,:) = & |
---|
| 27 | + pte(:,:) * COS(rad * plon(:,:)) & |
---|
| 28 | - ptn(:,:) * SIN(rad * plat(:,:)) * SIN(rad * plon(:,:)) |
---|
| 29 | |
---|
| 30 | pzz(:,:) = & |
---|
| 31 | + ptn(:,:) * COS(rad * plat (:,:)) |
---|
| 32 | |
---|
| 33 | ! Value at North Pole |
---|
[2429] | 34 | IF (is_north_pole_dyn) THEN |
---|
[1385] | 35 | pxx(:, 1) = - pte (1, 1) |
---|
| 36 | pyy(:, 1) = - ptn (1, 1) |
---|
[1126] | 37 | pzz(:, 1) = pzz(1,1) |
---|
| 38 | ENDIF |
---|
| 39 | |
---|
| 40 | ! Value at South Pole |
---|
[2429] | 41 | IF (is_south_pole_dyn) THEN |
---|
[1126] | 42 | pxx(:,jm) = pxx(1,jm) |
---|
| 43 | pyy(:,jm) = pyy(1,jm) |
---|
| 44 | pzz(:,jm) = pzz(1,jm) |
---|
| 45 | ENDIF |
---|
| 46 | |
---|
| 47 | END SUBROUTINE atm2geo |
---|