source: LMDZ5/branches/testing/libf/phylmd/geo2atm.F90 @ 2839

Last change on this file since 2839 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
File size: 1.4 KB
RevLine 
[1072]1!
2! $Header: /home/cvsroot/LMDZ4/libf/phylmd/geo2atm.F90,v 1.1 2008-12-05 17:56:40 lsce Exp $
3!
4SUBROUTINE geo2atm(im, jm, px, py, pz, plon, plat, pu, pv, pr)
5  USE dimphy
6  USE mod_phys_lmdz_para
[1146]7
[1072]8  IMPLICIT NONE
[1146]9  INCLUDE 'YOMCST.h'
[1072]10
[1146]11! Change wind coordinates from cartesian geocentric to local spherical
[1072]12! NB! Fonctionne probablement uniquement en MPI seul (sans OpenMP)
13!
14  INTEGER, INTENT (IN)                 :: im, jm
15  REAL, DIMENSION (im,jm), INTENT(IN)  :: px, py, pz
16  REAL, DIMENSION (im,jm), INTENT(IN)  :: plon, plat
17  REAL, DIMENSION (im,jm), INTENT(OUT) :: pu, pv, pr
18
[1146]19  REAL :: rad
20
21
22  rad = rpi / 180.0E0
[1072]23 
[1146]24  pu(:,:) = &
25       - px(:,:) * SIN(rad * plon(:,:)) &
26       + py(:,:) * COS(rad * plon(:,:))
[1072]27
[1146]28  pv(:,:) = &
29       - px(:,:) * SIN(rad * plat(:,:)) * COS(rad * plon(:,:)) &
30       - py(:,:) * SIN(rad * plat(:,:)) * SIN(rad * plon(:,:)) &
31       + pz(:,:) * COS(rad * plat(:,:)) 
[1072]32
[1146]33  pr(:,:) = &
34       + px(:,:) * COS(rad * plat(:,:)) * COS(rad * plon(:,:)) &
35       + py(:,:) * COS(rad * plat(:,:)) * SIN(rad * plon(:,:)) &
36       + pz(:,:) * SIN(rad * plat(:,:))
[1072]37
[1146]38  ! Value at North Pole
[2435]39  IF (is_north_pole_dyn) THEN
[1385]40     pu(:, 1) = -px (1,1)
41     pv(:, 1) = -py (1,1)
42     pr(:, 1) = 0.0
[1072]43  ENDIF
[1146]44 
45  ! Value at South Pole     
[2435]46  IF (is_south_pole_dyn) THEN
[1385]47     pu(:,jm) = -px (1,jm)
48     pv(:,jm) = -py (1,jm)
49     pr(:,jm) = 0.0
[1072]50  ENDIF
[1146]51 
[1072]52END SUBROUTINE geo2atm
Note: See TracBrowser for help on using the repository browser.