/[lmdze]/trunk/Sources/phylmd/gr_phy_write.f
ViewVC logotype

Contents of /trunk/Sources/phylmd/gr_phy_write.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 189 - (show annotations)
Tue Mar 29 15:20:23 2016 UTC (8 years ago) by guez
File size: 1831 byte(s)
There was a function gr_phy_write_3d in dyn3d and a function
gr_phy_write_2d in module grid_change. Moved them into a new module
gr_phy_write_m under a generic interface gr_phy_write. Replaced calls
to gr_fi_ecrit by calls to gr_phy_write.

Removed arguments len, nloc and nd of cv30_compress.

Removed arguments wd and wd1 of cv30_uncompress, wd of cv30_yield, wd
of concvl, wd1 of cv_driver. Was just filled with 0. Removed option
ok_gust in physiq, never used.

In cv30_unsat, cv30_yield and cv_driver, we only need to define b to
level nl - 1.

1 module gr_phy_write_m
2
3 use dimens_m, only: iim, jjm
4 use dimphy, only: klon
5
6 IMPLICIT none
7
8 interface gr_phy_write
9 module procedure gr_phy_write_2d, gr_phy_write_3d
10 end interface gr_phy_write
11
12 private
13 public gr_phy_write
14
15 contains
16
17 function gr_phy_write_2d(pfi)
18
19 ! From phylmd/physiq.F, version 1.22 2006/02/20 09:38:28
20 ! Transforme une variable de la grille physique \`a la grille d'\'ecriture.
21 ! The grid for output files does not duplicate the first longitude
22 ! in the last longitude.
23
24 use grid_change, only: dyn_phy
25
26 REAL, intent(in):: pfi(:) ! (klon)
27 real gr_phy_write_2d(iim, jjm + 1)
28
29 ! Variable local to the procedure:
30 real field(iim, jjm + 1)
31
32 !-----------------------------------------------------------------------
33
34 if (size(pfi) /= klon) stop "gr_phy_write_2d"
35
36 ! Traitement des p\^oles :
37 field(2:, 1) = pfi(1)
38 field(2:, jjm + 1) = pfi(klon)
39
40 gr_phy_write_2d = unpack(pfi, dyn_phy(:iim, :), field)
41
42 END function gr_phy_write_2d
43
44 !********************************************
45
46 function gr_phy_write_3d(fi)
47
48 ! From phylmd/physiq.F, version 1.22 2006/02/20 09:38:28
49
50 ! Transforme une variable tri-dimensionnelle de la grille physique
51 ! \`a la grille d'\'ecriture. The grid for output files does not
52 ! duplicate the first longitude in the last longitude. Input array
53 ! has rank 2. Horizontal index is in the first dimension.
54
55 use nr_util, only: assert
56
57 REAL, intent(in):: fi(:, :) ! (klon, :)
58 real gr_phy_write_3d(iim, jjm + 1, size(fi, 2))
59
60 ! Local:
61 INTEGER l
62
63 !---------------
64
65 call assert(size(fi, 1) == klon, "gr_phy_write_3d")
66
67 DO l = 1, size(fi, 2)
68 gr_phy_write_3d(:, :, l) = gr_phy_write_2d(fi(:, l))
69 END DO
70
71 END function gr_phy_write_3d
72
73 end module gr_phy_write_m

  ViewVC Help
Powered by ViewVC 1.1.21