source: LMDZ5/branches/IPSLCM5A2.1_ISO/libf/phyiso/geo2atm.F90 @ 3699

Last change on this file since 3699 was 3331, checked in by acozic, 7 years ago

Add modification for isotopes

  • Property svn:executable set to *
File size: 1.4 KB
Line 
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
7
8  IMPLICIT NONE
9  INCLUDE 'YOMCST.h'
10
11! Change wind coordinates from cartesian geocentric to local spherical
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
19  REAL :: rad
20
21
22  rad = rpi / 180.0E0
23 
24  pu(:,:) = &
25       - px(:,:) * SIN(rad * plon(:,:)) &
26       + py(:,:) * COS(rad * plon(:,:))
27
28  pv(:,:) = &
29       - px(:,:) * SIN(rad * plat(:,:)) * COS(rad * plon(:,:)) &
30       - py(:,:) * SIN(rad * plat(:,:)) * SIN(rad * plon(:,:)) &
31       + pz(:,:) * COS(rad * plat(:,:)) 
32
33  pr(:,:) = &
34       + px(:,:) * COS(rad * plat(:,:)) * COS(rad * plon(:,:)) &
35       + py(:,:) * COS(rad * plat(:,:)) * SIN(rad * plon(:,:)) &
36       + pz(:,:) * SIN(rad * plat(:,:))
37
38  ! Value at North Pole
39  IF (is_north_pole_dyn) THEN
40     pu(:, 1) = -px (1,1)
41     pv(:, 1) = -py (1,1)
42     pr(:, 1) = 0.0
43  ENDIF
44 
45  ! Value at South Pole     
46  IF (is_south_pole_dyn) THEN
47     pu(:,jm) = -px (1,jm)
48     pv(:,jm) = -py (1,jm)
49     pr(:,jm) = 0.0
50  ENDIF
51 
52END SUBROUTINE geo2atm
Note: See TracBrowser for help on using the repository browser.