source: LMDZ5/branches/IPSLCM6.0.8/libf/phylmd/atm2geo.F90 @ 5179

Last change on this file since 5179 was 2435, checked in by Laurent Fairhead, 9 years ago

Merged trunk changes r2396:2434 into testing branch

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1!
2! $Id: atm2geo.F90 2435 2016-01-28 16:02:13Z abarral $
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_dyn) 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_dyn) 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.