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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 139 - (hide annotations)
Tue May 26 17:46:03 2015 UTC (9 years ago) by guez
File size: 5823 byte(s)
dynetat0 read rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d from
"start.nc" and then these variables were overwritten by
inigeom. Corrected this. Now, inigeom does not compute rlonu, rlatu,
rlonv and rlatv. Moreover, cu_2d, cv_2d, aire_2d are not written to
"restart.nc". Since xprimu, xprimv, xprimm025, xprimp025, rlatu1,
rlatu2, yprimu1, yprimu2 are computed at the same time as rlonu,
rlatu, rlonv, rlatv, and since it would not be convenient to separate
those computations, we decide to write xprimu, xprimv, xprimm025,
xprimp025, rlatu1, rlatu2, yprimu1, yprimu2 into "restart.nc", read
them from "start.nc" and not compute them in inigeom. So, in summary,
"start.nc" contains all the coordinates and their derivatives, and
inigeom only computes the 2D-variables.

Technical details:

Moved variables rlatu, rlonv, rlonu, rlatv, xprimu, xprimv from module
comgeom to module dynetat0_m. Upgraded local variables rlatu1,
yprimu1, rlatu2, yprimu2, xprimm025, xprimp025 of procedure inigeom to
variables of module dynetat0_m.

Removed unused local variable yprimu of procedure inigeom and
corresponding argument yyprimu of fyhyp.

Moved variables clat, clon, grossismx, grossismy, dzoomx, dzoomy,
taux, tauy from module serre to module dynetat0_m (since they are read
from "start.nc"). The default values are now defined in read_serre
instead of in the declarations. Changed name of module serre to
read_serre_m, no more module variable here.

The calls to fxhyp and fyhyp are moved from inigeom to etat0.

Side effects in programs other than gcm: etat0 and read_serre write
variables of module dynetat0; the programs test_fxyp and
test_inter_barxy need more source files.

Removed unused arguments len and nd of cv3_tracer. Removed unused
argument PPSOL of LWU.

Bug fix in test_inter_barxy: forgotten call to read_serre.

1 guez 31 SUBROUTINE initphysto(infile,rlon,rlat,tstep,t_ops,t_wrt,nq,fileid)
2 guez 3
3 guez 31 ! From phylmd/initphysto.F,v 1.2 2004/06/22 11:45:32
4     ! Routine d'initialisation des ecritures des fichiers histoires LMDZ
5     ! au format IOIPSL
6 guez 3
7 guez 31 ! Appels succesifs des routines: histbeg
8     ! histhori
9     ! histver
10     ! histdef
11     ! histend
12 guez 3
13 guez 31 ! Entree:
14 guez 3
15 guez 31 ! infile: nom du fichier histoire a creer
16     ! day0,anne0: date de reference
17     ! tstep: duree du pas de temps en seconde
18     ! t_ops: frequence de l'operation pour IOIPSL
19     ! t_wrt: frequence d'ecriture sur le fichier
20     ! nq: nombre de traceurs
21 guez 3
22 guez 31 ! Sortie:
23     ! fileid: ID du fichier netcdf cree
24     ! filevid:ID du fichier netcdf pour la grille v
25 guez 3
26 guez 31 ! L. Fairhead, 03/99
27 guez 3
28 guez 129 use dynetat0_m, only: day_ref, annee_ref
29 guez 61 USE histbeg_totreg_m, ONLY : histbeg_totreg
30     USE histdef_m, ONLY : histdef
31     USE histend_m, ONLY : histend
32     use histsync_m, only: histsync
33     USE histvert_m, ONLY : histvert
34 guez 31 USE dimens_m
35     USE paramet_m
36     USE comconst
37     USE indicesol
38     USE dimphy
39 guez 57 use conf_gcm_m
40 guez 31 USE comgeom
41 guez 39 USE nr_util, ONLY : pi
42 guez 92 USE ymds2ju_m
43 guez 3
44 guez 31 IMPLICIT NONE
45 guez 3
46 guez 31 ! Arguments
47 guez 108 CHARACTER(len=*) infile
48 guez 31 INTEGER nhoriid, i
49     REAL, INTENT (IN) :: tstep
50     REAL t_ops, t_wrt
51     INTEGER fileid, filevid
52     INTEGER nq, l
53     REAL nivsigs(llm)
54 guez 3
55 guez 31 ! Variables locales
56 guez 3
57 guez 31 INTEGER tau0
58     REAL zjulian
59 guez 108 CHARACTER(len=3) str
60     CHARACTER(len=10) ctrac
61 guez 31 INTEGER iq
62     INTEGER uhoriid, vhoriid, thoriid, zvertiid
63     INTEGER ii, jj
64     LOGICAL ok_sync
65     REAL zx_lon(iim,jjm+1), zx_lat(iim,jjm+1)
66 guez 3
67 guez 31 REAL, INTENT (IN) :: rlon(klon), rlat(klon)
68 guez 3
69 guez 31 !-----------------------------------------------------
70 guez 3
71 guez 31 ! Initialisations
72     str = 'q '
73     ctrac = 'traceur '
74     ok_sync = .TRUE.
75 guez 3
76 guez 31 ! Appel a histbeg: creation du fichier netcdf et initialisations
77     ! diverses
78 guez 3
79 guez 129 CALL ymds2ju(annee_ref,1,day_ref,0.0,zjulian)
80 guez 31 tau0 = 0
81 guez 3
82 guez 31 CALL gr_fi_ecrit(1,klon,iim,jjm+1,rlon,zx_lon)
83     DO i = 1, iim
84     zx_lon(i,1) = rlon(i+1)
85     zx_lon(i,jjm+1) = rlon(i+1)
86     END DO
87     CALL gr_fi_ecrit(1,klon,iim,jjm+1,rlat,zx_lat)
88 guez 3
89    
90 guez 31 CALL histbeg_totreg(infile,zx_lon(:,1),zx_lat(1,:),1,iim,1,jjm+1,tau0, &
91     zjulian,tstep,nhoriid,fileid)
92 guez 3
93 guez 31 ! Appel a histvert pour la grille verticale
94 guez 3
95 guez 31 DO l = 1, llm
96     nivsigs(l) = float(l)
97     END DO
98 guez 3
99 guez 67 CALL histvert(fileid,'sig_s','Niveaux sigma','sigma_level',nivsigs, &
100 guez 31 zvertiid)
101 guez 3
102 guez 31 ! Appels a histdef pour la definition des variables a sauvegarder
103 guez 3
104 guez 31 CALL histdef(fileid,'phis','Surface geop. height','-',iim,jjm+1,nhoriid, &
105     1,1,1,-99,'once',t_ops,t_wrt)
106 guez 3
107 guez 31 CALL histdef(fileid,'aire','Grid area','-',iim,jjm+1,nhoriid,1,1,1,-99, &
108     'once',t_ops,t_wrt)
109 guez 3
110 guez 31 CALL histdef(fileid,'dtime','tps phys ','s',1,1,nhoriid,1,1,1,-99, &
111     'once',t_ops,t_wrt)
112 guez 3
113 guez 31 CALL histdef(fileid,'istphy','tps stock','s',1,1,nhoriid,1,1,1,-99, &
114     'once',t_ops,t_wrt)
115 guez 3
116 guez 31 ! T
117 guez 3
118 guez 31 CALL histdef(fileid,'t','Temperature','K',iim,jjm+1,nhoriid,llm,1,llm, &
119     zvertiid,'inst(X)',t_ops,t_wrt)
120 guez 3
121 guez 31 CALL histdef(fileid,'mfu','flx m. pan. mt','kg m/s',iim,jjm+1,nhoriid, &
122     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
123 guez 3
124 guez 31 CALL histdef(fileid,'mfd','flx m. pan. des','kg m/s',iim,jjm+1,nhoriid, &
125     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
126    
127    
128     ! en_u
129    
130     CALL histdef(fileid,'en_u','flx ent pan mt','kg m/s',iim,jjm+1,nhoriid, &
131     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
132    
133     CALL histdef(fileid,'de_u','flx det pan mt','kg m/s',iim,jjm+1,nhoriid, &
134     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
135    
136    
137     ! en_d
138    
139     CALL histdef(fileid,'en_d','flx ent pan dt','kg m/s',iim,jjm+1,nhoriid, &
140     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
141    
142    
143    
144     ! de_d
145    
146     CALL histdef(fileid,'de_d','flx det pan dt','kg m/s',iim,jjm+1,nhoriid, &
147     llm,1,llm,zvertiid,'inst(X)',t_ops,t_wrt)
148    
149     ! coefh frac_impa,frac_nucl
150    
151     CALL histdef(fileid,'coefh',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
152     zvertiid,'inst(X)',t_ops,t_wrt)
153    
154     ! abderrahmane le 16 09 02
155     CALL histdef(fileid,'fm_th',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
156     zvertiid,'inst(X)',t_ops,t_wrt)
157    
158     CALL histdef(fileid,'en_th',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
159     zvertiid,'inst(X)',t_ops,t_wrt)
160     ! fin aj
161    
162     CALL histdef(fileid,'frac_impa',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
163     zvertiid,'inst(X)',t_ops,t_wrt)
164    
165     CALL histdef(fileid,'frac_nucl',' ',' ',iim,jjm+1,nhoriid,llm,1,llm, &
166     zvertiid,'inst(X)',t_ops,t_wrt)
167    
168    
169     ! pyu1
170    
171     CALL histdef(fileid,'pyu1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
172     'inst(X)',t_ops,t_wrt)
173    
174    
175     ! pyv1
176    
177     CALL histdef(fileid,'pyv1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
178     'inst(X)',t_ops,t_wrt)
179    
180     CALL histdef(fileid,'ftsol1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
181     'inst(X)',t_ops,t_wrt)
182    
183    
184     ! ftsol2
185    
186     CALL histdef(fileid,'ftsol2',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
187     'inst(X)',t_ops,t_wrt)
188    
189    
190     ! ftsol3
191    
192     CALL histdef(fileid,'ftsol3',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
193     'inst(X)',t_ops,t_wrt)
194    
195    
196     ! ftsol4
197    
198     CALL histdef(fileid,'ftsol4',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
199     'inst(X)',t_ops,t_wrt)
200    
201    
202     ! rain
203    
204     CALL histdef(fileid,'rain',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
205     'inst(X)',t_ops,t_wrt)
206    
207    
208     ! psrf1
209    
210     CALL histdef(fileid,'psrf1',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
211     'inst(X)',t_ops,t_wrt)
212    
213    
214     ! psrf2
215    
216     CALL histdef(fileid,'psrf2',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
217     'inst(X)',t_ops,t_wrt)
218    
219    
220     ! psrf3
221    
222     CALL histdef(fileid,'psrf3',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
223     'inst(X)',t_ops,t_wrt)
224    
225    
226     ! psrf4
227    
228     CALL histdef(fileid,'psrf4',' ',' ',iim,jjm+1,nhoriid,1,1,1,-99, &
229     'inst(X)',t_ops,t_wrt)
230    
231     CALL histend(fileid)
232     IF (ok_sync) CALL histsync
233    
234     END SUBROUTINE initphysto

  ViewVC Help
Powered by ViewVC 1.1.21