source: LMDZ6/branches/Amaury_dev/libf/grid/lmdz_fxy_new.f90 @ 5185

Last change on this file since 5185 was 5159, checked in by abarral, 5 months ago

Put dimensions.h and paramet.h into modules

  • 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1! This module replaces grid/fxy_new.h
2
3MODULE lmdz_fxy_new
4  USE comconst_mod, ONLY: pi
5  USE serre_mod, ONLY: pxo, pyo, alphax, alphay, transx, transy
6  USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
7  USE lmdz_paramet
8  IMPLICIT NONE; PRIVATE
9  PUBLIC fx, fxprim, fy, fyprim
10
11
12CONTAINS
13  REAL FUNCTION ripx(ri)
14    REAL, INTENT(IN) :: ri
15    ripx = (ri - 1.0) * 2. * pi / REAL(iim)
16  END FUNCTION ripx
17
18  REAL FUNCTION fx(ri)
19    REAL, INTENT(IN) :: ri
20    fx = ripx(ri) + transx + alphax * SIN(ripx(ri) + transx - pxo) - pi
21  END FUNCTION fx
22
23  REAL FUNCTION fxprim(ri)
24    REAL, INTENT(IN) :: ri
25    fxprim = 2. * pi / REAL(iim) * (1. + alphax * COS(ripx(ri) + transx - pxo))
26  END FUNCTION fxprim
27
28  REAL FUNCTION bigy(rj)
29    REAL, INTENT(IN) :: rj
30    bigy = 2. * (REAL(jjp1) - rj) * pi / jjm
31  END FUNCTION bigy
32
33  REAL FUNCTION fy(rj)
34    REAL, INTENT(IN) :: rj
35    fy = (bigy(rj) + transy + alphay * SIN(bigy(rj) + transy - pyo)) / 2. - pi / 2.
36  END FUNCTION fy
37
38  REAL FUNCTION fyprim(rj)
39    REAL, INTENT(IN) :: rj
40    fyprim = (pi / jjm) * (1. + alphay * COS(bigy(rj) + transy - pyo))
41  END FUNCTION fyprim
42END MODULE lmdz_fxy_new
Note: See TracBrowser for help on using the repository browser.