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

Last change on this file was 5159, checked in by abarral, 3 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
RevLine 
[5122]1! This module replaces grid/fxy_new.h
[5099]2
[5122]3MODULE lmdz_fxy_new
4  USE comconst_mod, ONLY: pi
5  USE serre_mod, ONLY: pxo, pyo, alphax, alphay, transx, transy
[5159]6  USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
7  USE lmdz_paramet
[5108]8  IMPLICIT NONE; PRIVATE
[5122]9  PUBLIC fx, fxprim, fy, fyprim
[5159]10
11
[5108]12CONTAINS
[5122]13  REAL FUNCTION ripx(ri)
14    REAL, INTENT(IN) :: ri
15    ripx = (ri - 1.0) * 2. * pi / REAL(iim)
16  END FUNCTION ripx
[5099]17
[5122]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
[524]22
[5122]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
[524]27
[5122]28  REAL FUNCTION bigy(rj)
29    REAL, INTENT(IN) :: rj
30    bigy = 2. * (REAL(jjp1) - rj) * pi / jjm
31  END FUNCTION bigy
[5108]32
[5122]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
[5108]37
[5122]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.