source: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/ecrireg.F @ 1381

Last change on this file since 1381 was 940, checked in by Laurent Fairhead, 16 years ago

On remplace le fichier include dimphy.h par le module dimphy.F90i pour etre
coherent avec le partout
LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE ecriregs(unit,pz)
5      use dimphy
6      IMPLICIT none
7c-----------------------------------------------------------------------
8#include "dimensions.h"
9cccc#include "dimphy.h"
10#include "paramet.h"
11#include "comgeom.h"
12#include "comvert.h"
13#include "regdim.h"
14c
15c   arguments:
16c   ----------
17      INTEGER unit
18      REAL pz(klon)
19c
20c   local:
21c   ------
22      INTEGER i,j, ig
23      REAL zz(iim,jjm+1)
24      INTEGER nleng
25      PARAMETER (nleng=(i2_fin-i2_deb+1+i1_fin-i1_deb+1)
26     .                *(j_fin-j_deb+1))
27      REAL zzz(nleng)
28c
29c-----------------------------------------------------------------------
30c   passage a la grille dynamique:
31c   ------------------------------
32         DO i=1,iim
33            zz(i,1)=pz(1)
34            zz(i,jjm+1)=pz(klon)
35         ENDDO
36c
37c   traitement des point normaux
38         DO j=2,jjm
39            ig=2+(j-2)*iim
40            CALL SCOPY(iim,pz(ig),1,zz(1,j),1)
41         ENDDO
42c-----------------------------------------------------------------------
43      ig = 0
44      DO j = j_deb, j_fin
45         DO i=i1_deb,i1_fin
46            ig = ig + 1
47            zzz(ig) = zz(i,j)
48         ENDDO
49         DO i=i2_deb,i2_fin
50            ig = ig + 1
51            zzz(ig) = zz(i,j)
52         ENDDO
53      ENDDO
54#ifdef VPP
55      CALL ecriture(unit,zzz,nleng)
56#else
57      WRITE(unit) zzz
58#endif
59      RETURN
60      END
61      SUBROUTINE ecrirega(unit,pz)
62      USE dimphy
63      IMPLICIT none
64c-----------------------------------------------------------------------
65#include "dimensions.h"
66cccc#include "dimphy.h"
67#include "paramet.h"
68#include "comgeom.h"
69#include "comvert.h"
70#include "regdim.h"
71c
72c   arguments:
73c   ----------
74      INTEGER unit
75      REAL pz(klon,klev)
76c
77c   local:
78c   ------
79      INTEGER i,j,ilay,ig
80      REAL zz(iim,jjm+1,llm)
81      INTEGER nleng
82      PARAMETER (nleng=(i2_fin-i2_deb+1+i1_fin-i1_deb+1)
83     .                *(j_fin-j_deb+1))
84      REAL zzz(nleng)
85c-----------------------------------------------------------------------
86c   passage a la grille dynamique:
87c   ------------------------------
88      DO ilay=1,llm
89c   traitement des poles
90         DO i=1,iim
91            zz(i,1,ilay)=pz(1,ilay)
92            zz(i,jjm+1,ilay)=pz(klon,ilay)
93         ENDDO
94c   traitement des point normaux
95         DO j=2,jjm
96            ig=2+(j-2)*iim
97            CALL SCOPY(iim,pz(ig,ilay),1,zz(1,j,ilay),1)
98         ENDDO
99      ENDDO
100c-----------------------------------------------------------------------
101      DO ilay = 1, llm
102      ig = 0
103      DO j = j_deb, j_fin
104         DO i=i1_deb,i1_fin
105            ig = ig + 1
106            zzz(ig) = zz(i,j,ilay)
107         ENDDO
108         DO i=i2_deb,i2_fin
109            ig = ig + 1
110            zzz(ig) = zz(i,j,ilay)
111         ENDDO
112      ENDDO
113#ifdef VPP
114      CALL ecriture(unit,zzz,nleng)
115#else
116      WRITE(unit) zzz
117#endif
118      ENDDO
119
120      RETURN
121      END
Note: See TracBrowser for help on using the repository browser.