source: LMDZ5/trunk/libf/phylmd/geo2atm.F90 @ 2101

Last change on this file since 2101 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • 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
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 'dimensions.h'
10  INCLUDE 'YOMCST.h'
11
12! Change wind coordinates from cartesian geocentric to local spherical
13! NB! Fonctionne probablement uniquement en MPI seul (sans OpenMP)
14!
15  INTEGER, INTENT (IN)                 :: im, jm
16  REAL, DIMENSION (im,jm), INTENT(IN)  :: px, py, pz
17  REAL, DIMENSION (im,jm), INTENT(IN)  :: plon, plat
18  REAL, DIMENSION (im,jm), INTENT(OUT) :: pu, pv, pr
19
20  REAL :: rad
21
22
23  rad = rpi / 180.0E0
24 
25  pu(:,:) = &
26       - px(:,:) * SIN(rad * plon(:,:)) &
27       + py(:,:) * COS(rad * plon(:,:))
28
29  pv(:,:) = &
30       - px(:,:) * SIN(rad * plat(:,:)) * COS(rad * plon(:,:)) &
31       - py(:,:) * SIN(rad * plat(:,:)) * SIN(rad * plon(:,:)) &
32       + pz(:,:) * COS(rad * plat(:,:)) 
33
34  pr(:,:) = &
35       + px(:,:) * COS(rad * plat(:,:)) * COS(rad * plon(:,:)) &
36       + py(:,:) * COS(rad * plat(:,:)) * SIN(rad * plon(:,:)) &
37       + pz(:,:) * SIN(rad * plat(:,:))
38
39  ! Value at North Pole
40  IF (is_north_pole) THEN
41     pu(:, 1) = -px (1,1)
42     pv(:, 1) = -py (1,1)
43     pr(:, 1) = 0.0
44  ENDIF
45 
46  ! Value at South Pole     
47  IF (is_south_pole) THEN
48     pu(:,jm) = -px (1,jm)
49     pv(:,jm) = -py (1,jm)
50     pr(:,jm) = 0.0
51  ENDIF
52 
53END SUBROUTINE geo2atm
Note: See TracBrowser for help on using the repository browser.