source: dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/atm2geo.F90 @ 3983

Last change on this file since 3983 was 3818, checked in by millour, 10 years ago

Some partial cleanup on uses of "dimensions.h" in physics.
At this point 3D gcm compiles and bench seems to run fine :-)
EM

File size: 1.1 KB
Line 
1!
2! $Header$
3!
4SUBROUTINE 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
18
19
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 
34  IF (is_north_pole) THEN
35     pxx(:, 1) = - pte (1, 1)
36     pyy(:, 1) = - ptn (1, 1)
37     pzz(:, 1) = pzz(1,1)
38  ENDIF
39
40! Value at South Pole
41  IF (is_south_pole) THEN
42     pxx(:,jm) = pxx(1,jm)
43     pyy(:,jm) = pyy(1,jm)
44     pzz(:,jm) = pzz(1,jm)
45  ENDIF
46 
47END SUBROUTINE atm2geo
Note: See TracBrowser for help on using the repository browser.