source: LMDZ5/trunk/libf/phylmd/atm2geo.F90 @ 3227

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

Correction on the calculation of the surface of the grid at the poles (problem was introduced
in r2222).
Due to the different distribution of OMP tasks in the dynamics and the physics, had to
introduce 2 new logical variables, is_pole_north_phy and is_pole_south_phy, and so decided
to rename the old is_north_pole/is_south_pole to is_north_pole_dyn/is_south_pole_dyn to
stay coherent and, hopefully, clear things up a bit.
LF

  • 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 2429 2016-01-27 12:43:09Z fairhead $
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.