source: LMDZ5/trunk/libf/phylmd/write_bilKP_ins.h @ 1829

Last change on this file since 1829 was 1577, checked in by Laurent Fairhead, 13 years ago

Modifications au code qui permettent de commencer une simulation à n'importe
quelle heure de la journée. On fait toujours un nombre entier de jours de
simulation.
On spécifie cette heure de départ dans la variable starttime du run.def (la
valeur est en jour et elle est à zéro par défaut).
La valeur est sauvegardée dans le fichier restart.nc. Les valeurs lues dans
le fichier start et le run.def sont comparées en début de simulation. La
simulation s'arrête si elles ne sont pas égales sauf si une remise à zéro de
la date a été demandée.
Par ailleurs, la fréquence de lecture des conditions aux limites a été modifiée
pour qu'à chaque changement de jour, celles-ci soient mises à jour (jusqu'à
maintenant elles étaient mises à jour à une fréquence donnée qui, en cas de
départ de simulation à une heure différente de minuit, ne correspondait pas
forcèment à un changement dans la date).
Validation effectuée en traçant le flux solaire descendant au sommet de
l'atmosphère à différentes heures de la journée, après un redémarrage, en
s'assurant que le maximum est bien là où il est sensé être.


Modifications to the code to enable it to be started at any time of the day.
The code still runs for an integer number of days.
The start time is specified using variable starttime in the run.def file (the
value is in days and is zero by default).
The start time is saved in the restart.nc file at the end of the simulation.
The values read in from the start.nc file and the run.def file are compared
at the start of the simulation. If they differ, the simulation is aborted
unless the raz_date variable has been set.
Furthermore, the frequency at which boundary conditions are read in has been
modified so that they are updated everyday at midnight (until now, they were
updated at a certain frequency that, in case of a simulation starting at a time
other than midnight, did not ensure that those conditions would be updated each
day at midnight)
The modifications were validated by plotting the downward solaf flux at TOA at
different times of the day (and after having restarted the simulation) and
ensuring that the maximum of flux was at the right place according to local
time.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1 c
2c $Header$
3c
4      IF (ok_journe) THEN
5c
6      ndex2d = 0
7      ndex3d = 0
8c
9      itau_w = itau_phy + itap + start_time * day_step / iphysiq
10c
11c Champs 3D:
12c
13cym      CALL gr_fi_ecrit(klev, klon,iim,jjmp1, ue_lay,zx_tmp_3d)
14      CALL histwrite_phy(nid_bilKPins,"ue",itau_w,ue_lay)
15c
16cym      CALL gr_fi_ecrit(klev, klon,iim,jjmp1, ve_lay,zx_tmp_3d)
17      CALL histwrite_phy(nid_bilKPins,"ve",itau_w,ve_lay)
18c
19cym      CALL gr_fi_ecrit(klev, klon,iim,jjmp1, uq_lay,zx_tmp_3d)
20      CALL histwrite_phy(nid_bilKPins,"uq",itau_w,uq_lay)
21c
22cym      CALL gr_fi_ecrit(klev, klon,iim,jjmp1, vq_lay,zx_tmp_3d)
23      CALL histwrite_phy(nid_bilKPins,"vq",itau_w,vq_lay)
24c
25c Champs 3D:
26C
27cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d)
28      CALL histwrite_phy(nid_bilKPins,"temp",itau_w,t_seri)
29c
30cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,ivap), zx_tmp_3d)
31      CALL histwrite_phy(nid_bilKPins,"ovap",itau_w,qx(:,:,ivap))
32c
33cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d)
34      CALL histwrite_phy(nid_bilKPins,"geop",itau_w,zphi)
35c
36cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d)
37      CALL histwrite_phy(nid_bilKPins,"vitu",itau_w,u_seri)
38c
39cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d)
40      CALL histwrite_phy(nid_bilKPins,"vitv",itau_w,v_seri)
41c
42cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d)
43      CALL histwrite_phy(nid_bilKPins,"vitw",itau_w,omega)
44c
45cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d)
46      CALL histwrite_phy(nid_bilKPins,"pres",itau_w,pplay)
47c
48cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, paprs, zx_tmp_3d)
49      CALL histwrite_phy(nid_bilKPins,"play",itau_w,paprs)
50c
51cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldliq, zx_tmp_3d)
52      CALL histwrite_phy(nid_bilKPins,"oliq",itau_w,cldliq)
53c
54cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_dyn, zx_tmp_3d)
55      CALL histwrite_phy(nid_bilKPins,"dtdyn",itau_w,d_t_dyn)
56c
57cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_dyn, zx_tmp_3d)
58      CALL histwrite_phy(nid_bilKPins,"dqdyn",itau_w,d_q_dyn)
59c
60cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_con, zx_tmp_3d)
61      CALL histwrite_phy(nid_bilKPins,"dtcon",itau_w,d_t_con)
62c
63cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_con, zx_tmp_3d)
64      CALL histwrite_phy(nid_bilKPins,"ducon",itau_w,d_u_con)
65c
66cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_con, zx_tmp_3d)
67      CALL histwrite_phy(nid_bilKPins,"dvcon",itau_w,d_v_con)
68c
69cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_con, zx_tmp_3d)
70      CALL histwrite_phy(nid_bilKPins,"dqcon",itau_w,d_q_con)
71c
72cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_lsc, zx_tmp_3d)
73      CALL histwrite_phy(nid_bilKPins,"dtlsc",itau_w,d_t_lsc)
74c
75cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_lsc, zx_tmp_3d)
76      CALL histwrite_phy(nid_bilKPins,"dqlsc",itau_w,d_q_lsc)
77c
78cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_vdf, zx_tmp_3d)
79      CALL histwrite_phy(nid_bilKPins,"dtvdf",itau_w,d_t_vdf)
80c
81cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_vdf, zx_tmp_3d)
82      CALL histwrite_phy(nid_bilKPins,"dqvdf",itau_w,d_q_vdf)
83c
84cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_ajs, zx_tmp_3d)
85      CALL histwrite_phy(nid_bilKPins,"dtajs",itau_w,d_t_ajs)
86c
87cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_ajs, zx_tmp_3d)
88      CALL histwrite_phy(nid_bilKPins,"dqajs",itau_w,d_q_ajs)
89c
90cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_eva, zx_tmp_3d)
91      CALL histwrite_phy(nid_bilKPins,"dteva",itau_w,d_t_eva)
92c
93cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_eva, zx_tmp_3d)
94      CALL histwrite_phy(nid_bilKPins,"dqeva",itau_w,d_q_eva)
95c
96cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, heat, zx_tmp_3d)
97      CALL histwrite_phy(nid_bilKPins,"dtswr",itau_w,heat)
98c
99cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, heat0, zx_tmp_3d)
100      CALL histwrite_phy(nid_bilKPins,"dtsw0",itau_w,heat0)
101c
102cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cool, zx_tmp_3d)
103      CALL histwrite_phy(nid_bilKPins,"dtlwr",itau_w,cool)
104c
105cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cool0, zx_tmp_3d)
106      CALL histwrite_phy(nid_bilKPins,"dtlw0",itau_w,cool0)
107c
108cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_vdf, zx_tmp_3d)
109      CALL histwrite_phy(nid_bilKPins,"duvdf",itau_w,d_u_vdf)
110c
111cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_vdf, zx_tmp_3d)
112      CALL histwrite_phy(nid_bilKPins,"dvvdf",itau_w,d_v_vdf)
113c
114      IF (ok_orodr) THEN
115      IF (ok_orolf) THEN
116c
117      DO k = 1, klev
118      DO i = 1, klon
119        d_u_oli(i,k) = d_u_oro(i,k) + d_u_lif(i,k)
120        d_v_oli(i,k) = d_v_oro(i,k) + d_v_lif(i,k)
121      ENDDO
122      ENDDO
123c
124cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_oli, zx_tmp_3d)
125      CALL histwrite_phy(nid_bilKPins,"duoli",itau_w,d_u_oli)
126c
127cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_oli, zx_tmp_3d)
128      CALL histwrite_phy(nid_bilKPins,"dvoli",itau_w,d_v_oli)
129c
130      ENDIF
131      ENDIF
132C
133cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u, zx_tmp_3d)
134      CALL histwrite_phy(nid_bilKPins,"duphy",itau_w,d_u)
135c
136cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v, zx_tmp_3d)
137      CALL histwrite_phy(nid_bilKPins,"dvphy",itau_w,d_v)
138c
139cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t, zx_tmp_3d)
140      CALL histwrite_phy(nid_bilKPins,"dtphy",itau_w,d_t)
141c
142cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_qx(:,:,1), 
143cym     .zx_tmp_3d)
144      CALL histwrite_phy(nid_bilKPins,"dqphy",itau_w,d_qx(:,:,1))
145c
146cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_qx(:,:,2), 
147cym     .zx_tmp_3d)
148      CALL histwrite_phy(nid_bilKPins,"dqlphy",itau_w,d_qx(:,:,2))
149c
150cIM 280405 BEG
151c
152c Champs 2D:
153c
154c   Ecriture de champs dynamiques sur des niveaux de pression
155c     DO k=1, nlevSTD
156      DO k=1, 12
157c
158       IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k)
159       IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k)
160c
161       IF(bb2.EQ."850") THEN
162c
163cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1,usumSTD(:,k,1),zx_tmp_2d)
164        CALL histwrite_phy(nid_bilKPins,"u"//bb2,itau_w,usumSTD(:,k,1))
165c
166cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1,vsumSTD(:,k,1),zx_tmp_2d)
167        CALL histwrite_phy(nid_bilKPins,"v"//bb2,itau_w,vsumSTD(:,k,1))
168c
169       ENDIF !(bb2.EQ."850")
170c
171       ENDDO !k=1, 12
172c
173cIM 280405 END
174C
175      if (ok_sync) then
176        call histsync(nid_bilKPins)
177      endif
178       ENDIF
179
Note: See TracBrowser for help on using the repository browser.