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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 189 - (hide annotations)
Tue Mar 29 15:20:23 2016 UTC (8 years, 1 month 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 guez 189 module gr_phy_write_m
2 guez 3
3 guez 189 use dimens_m, only: iim, jjm
4     use dimphy, only: klon
5    
6 guez 3 IMPLICIT none
7    
8 guez 189 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 guez 186 contains
16 guez 3
17 guez 189 function gr_phy_write_2d(pfi)
18 guez 3
19 guez 186 ! From phylmd/physiq.F, version 1.22 2006/02/20 09:38:28
20 guez 189 ! 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 guez 3
24 guez 189 use grid_change, only: dyn_phy
25 guez 3
26 guez 189 REAL, intent(in):: pfi(:) ! (klon)
27     real gr_phy_write_2d(iim, jjm + 1)
28 guez 3
29 guez 189 ! Variable local to the procedure:
30     real field(iim, jjm + 1)
31 guez 3
32 guez 189 !-----------------------------------------------------------------------
33 guez 186
34 guez 189 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 guez 186 !---------------
64    
65 guez 189 call assert(size(fi, 1) == klon, "gr_phy_write_3d")
66 guez 186
67 guez 189 DO l = 1, size(fi, 2)
68     gr_phy_write_3d(:, :, l) = gr_phy_write_2d(fi(:, l))
69     END DO
70 guez 186
71 guez 189 END function gr_phy_write_3d
72    
73     end module gr_phy_write_m

  ViewVC Help
Powered by ViewVC 1.1.21