source: LMDZ6/branches/Amaury_dev/libf/grid/lmdz_fxy_sin.f90 @ 5139

Last change on this file since 5139 was 5123, checked in by abarral, 4 months ago

Correct various minor mistakes from previous commits

File size: 687 bytes
Line 
1! This module replaces grid/fxy_sin.h
2
3MODULE lmdz_fxy_sin
4  USE comconst_mod, ONLY: pi
5  IMPLICIT NONE; PRIVATE
6  PUBLIC fx, fxprim, fy, fyprim
7  INCLUDE "dimensions.h"
8CONTAINS
9
10  REAL FUNCTION fx(ri)
11    REAL, INTENT(IN) :: ri
12    fx = 2. * pi / REAL(iim) * (ri - 0.5 * REAL(iim) - 1.)
13  END FUNCTION fx
14
15  REAL FUNCTION fxprim(ri)
16    REAL, INTENT(IN) :: ri
17    fxprim = 2. * pi / REAL(iim)
18  END FUNCTION fxprim
19
20  REAL FUNCTION fy(rj)
21    REAL, INTENT(IN) :: rj
22    fy = ASIN(1. + 2. * ((1. - rj) / REAL(jjm)))
23  END FUNCTION fy
24
25  REAL FUNCTION fyprim(rj)
26    REAL, INTENT(IN) :: rj
27    fyprim = 1. / SQRT((rj - 1.) * (jjm + 1. - rj))
28  END FUNCTION fyprim
29END MODULE lmdz_fxy_sin
Note: See TracBrowser for help on using the repository browser.