source: LMDZ4/trunk/libf/phylmd/geo2atm.F90 @ 1119

Last change on this file since 1119 was 1072, checked in by Laurent Fairhead, 16 years ago

Oublis lors du passage CVS -> svn
FH/LF

File size: 1.3 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
7   
8  IMPLICIT NONE
9  include 'dimensions.h'
10
11! Change wind corrdinates 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, PARAMETER :: rpi = 3.141592653E0
20  REAL, PARAMETER :: rad = rpi / 180.0E0
21 
22  REAL, DIMENSION (im,jm) :: zsinlon, zcoslon
23  REAL, DIMENSION (im,jm) :: zsinlat, zcoslat
24
25  zsinlon = SIN (rad * plon)
26  zcoslon = COS (rad * plon)
27  zsinlat = SIN (rad * plat)
28  zcoslat = COS (rad * plat)
29
30  pu = - px * zsinlon         + py * zcoslon
31  pv = - px * zsinlat*zcoslon - py * zsinlat*zsinlon + pz * zcoslat 
32  pr =   px * zcoslat*zcoslon + py * zcoslat*zsinlon + pz * zsinlat
33
34! Value at North Pole
35  IF (is_north_pole) THEN
36     pu(:,1) = - py(1,1)
37     pv(:,1) = - px(1,1)
38     pr(:,1) = 0.
39  ENDIF
40
41! Value at South Pole     
42  IF (is_south_pole) THEN
43     pu(:,jm) = py(1,jm)
44     pv(:,jm) = px(1,jm)
45     pr(:,jm) = 0.
46  ENDIF
47 
48END SUBROUTINE geo2atm
Note: See TracBrowser for help on using the repository browser.