source: LMDZ5/trunk/libf/phylmd/write_paramLMDZ_phy.h @ 1842

Last change on this file since 1842 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: 3.3 KB
Line 
1c
2c calcul moyennes globales
3c
4       zx_tmp_fi2d=bils*airephy
5       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gbils)
6       zx_tmp_fi2d=evap*airephy
7       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gevap)
8       zx_tmp_fi2d(:)=fevap(:, is_ter)*airephy(:)
9       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gevapt)
10       zx_tmp_fi2d=zxfluxlat*airephy
11       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,glat)
12       zx_tmp_fi2d=(topsw0-toplw0)*airephy
13       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gnet0)
14       zx_tmp_fi2d=(topsw-toplw)*airephy
15       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gnet)
16       zx_tmp_fi2d=(rain_fall+snow_fall)*airephy
17       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,grain)
18       zx_tmp_fi2d=zxtsol*airephy
19       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gtsol)
20       zx_tmp_fi2d=zt2m*airephy
21       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gt2m)
22       zx_tmp_fi2d=prw*airephy
23       CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gprw)
24c
25c$OMP MASTER
26      if (is_mpi_root) then     
27c
28      ndex2d = 0
29      itau_w = itau_phy + itap + start_time * day_step / iphysiq
30c
31c Variables globales
32c
33      zx_tmp_0d=R_ecc
34      CALL histwrite(nid_ctesGCM,"R_ecc",itau_w,
35     .               zx_tmp_0d,np,ndex2d)
36c
37      zx_tmp_0d=R_peri
38      CALL histwrite(nid_ctesGCM,"R_peri",itau_w,
39     .               zx_tmp_0d,np,ndex2d)
40c
41      zx_tmp_0d=R_incl
42      CALL histwrite(nid_ctesGCM,"R_incl",itau_w,
43     .               zx_tmp_0d,np,ndex2d)
44c
45      zx_tmp_0d=solaire
46      CALL histwrite(nid_ctesGCM,"solaire",itau_w,
47     .               zx_tmp_0d,np,ndex2d)
48c
49      zx_tmp_0d=co2_ppm
50      CALL histwrite(nid_ctesGCM,"co2_ppm",itau_w,
51     .               zx_tmp_0d,np,ndex2d)
52c
53      zx_tmp_0d=CH4_ppb
54      CALL histwrite(nid_ctesGCM,"CH4_ppb",itau_w,
55     .               zx_tmp_0d,np,ndex2d)
56c
57      zx_tmp_0d=N2O_ppb
58      CALL histwrite(nid_ctesGCM,"N2O_ppb",itau_w,
59     .               zx_tmp_0d,np,ndex2d)
60c
61      zx_tmp_0d=CFC11_ppt
62      CALL histwrite(nid_ctesGCM,"CFC11_ppt",itau_w,
63     .               zx_tmp_0d,np,ndex2d)
64c
65      zx_tmp_0d=CFC12_ppt
66      CALL histwrite(nid_ctesGCM,"CFC12_ppt",itau_w,
67     .               zx_tmp_0d,np,ndex2d)
68c
69c=================================================================
70c moyennes globales
71c
72      CALL histwrite(nid_ctesGCM,"bils",itau_w,
73     .               gbils,np,ndex2d)
74      CALL histwrite(nid_ctesGCM,"evap",itau_w,
75     .               gevap,np,ndex2d)
76      CALL histwrite(nid_ctesGCM,"evap_land",itau_w,
77     .               gevapt,np,ndex2d)
78      CALL histwrite(nid_ctesGCM,"flat",itau_w,
79     .               glat,np,ndex2d)
80      CALL histwrite(nid_ctesGCM,"nettop0",itau_w,
81     .               gnet0,np,ndex2d)
82      CALL histwrite(nid_ctesGCM,"nettop",itau_w,
83     .               gnet,np,ndex2d)
84      CALL histwrite(nid_ctesGCM,"precip",itau_w,
85     .               grain,np,ndex2d)
86      CALL histwrite(nid_ctesGCM,"tsol",itau_w,
87     .               gtsol,np,ndex2d)
88      CALL histwrite(nid_ctesGCM,"t2m",itau_w,
89     .               gt2m,np,ndex2d)
90      CALL histwrite(nid_ctesGCM,"prw",itau_w,
91     .               gprw,np,ndex2d)
92c=================================================================
93c
94      if (ok_sync) then
95        call histsync(nid_ctesGCM)
96      endif
97c
98      endif !(is_mpi_root) then     
99c$OMP END MASTER
Note: See TracBrowser for help on using the repository browser.