source: LMDZ4/branches/IPSL-CM4_IPCC_patches/libf/phylmd/atm2geo.F @ 5444

Last change on this file since 5444 was 524, checked in by lmdzadmin, 21 years ago

Initial revision

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