source: LMDZ.3.3/branches/rel-LF/libf/phylmd/atm2geo.F @ 222

Last change on this file since 222 was 222, checked in by (none), 23 years ago

This commit was manufactured by cvs2svn to create branch 'rel-LF'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1C
2      SUBROUTINE atm2geo ( im, jm, pte, ptn, plon, plat, pxx, pyy, pzz )
3cc
4cc Change wind local atmospheric coordinates to
5cc geocentric
6cc
7c$$$      INCLUDE 'param.h'
8c
9      INTEGER, INTENT (in)              :: im, jm
10      REAL, DIMENSION (im,jm), INTENT (in) :: pte, ptn
11      REAL, DIMENSION (im,jm), INTENT (in) :: plon, plat
12      REAL, DIMENSION (im,jm), INTENT(out) :: pxx, pyy, pzz
13c
14      REAL, PARAMETER :: rpi = 3.141592653E0
15      REAL, PARAMETER :: rad = rpi / 180.0E0
16c
17      REAL, DIMENSION (im,jm) :: zsinlon, zcoslon
18      REAL, DIMENSION (im,jm) :: zsinlat, zcoslat
19c
20      LOGICAL, SAVE :: linit = .FALSE.
21c
22c$$$      IF ( .NOT. linit ) THEN
23          zsinlon = SIN (rad * plon)
24          zcoslon = COS (rad * plon)
25          zsinlat = SIN (rad * plat)
26          zcoslat = COS (rad * plat)
27          linit = .TRUE.
28c$$$      ENDIF
29c
30      pxx = - zsinlon * pte - zsinlat * zcoslon * ptn
31      pyy =   zcoslon * pte - zsinlat * zsinlon * ptn
32      pzz =   zcoslat * ptn
33c
34c Value at North Pole
35      pxx ( :,  1) = - ptn ( 1, 1)
36      pyy ( :,  1) = - pte ( 1, 1)
37      pzz ( :,  1) = 0.0
38c Value at South Pole
39      pxx ( :, jm) = + ptn ( 1, jm)
40      pyy ( :, jm) = + pte ( 1, jm)
41      pzz ( :, jm) = 0.0
42c
43      RETURN
44      END SUBROUTINE atm2geo
Note: See TracBrowser for help on using the repository browser.