60 #include "dimensions.h"
63 #include "comdissnew.h"
69 #include "description.h"
73 #include "tracstoke.h"
77 #include "indicesol.h"
82 REAL clesphy0( longcles )
90 REAL,
ALLOCATABLE,
SAVE :: vcov(:,:),ucov(:,:)
91 REAL,
ALLOCATABLE,
SAVE ::
teta(:,:)
92 REAL,
ALLOCATABLE,
SAVE ::
q(:,:,:)
93 REAL,
ALLOCATABLE,
SAVE :: ps(:)
98 REAL,
ALLOCATABLE,
SAVE :: masse(:,:)
99 REAL,
ALLOCATABLE,
SAVE ::
phis(:)
115 real time_step, t_wrt, t_ops
119 data call_iniphys/.true./
134 character (len=80) :: dynhist_file, dynhistave_file
135 character (len=20) :: modname
136 character (len=80) :: abort_message
138 INTEGER :: an, mois, jour
147 REAL zcufi(ngridmx),zcvfi(ngridmx)
148 REAL latfi(ngridmx),lonfi(ngridmx)
159 abort_message =
'last timestep reached'
161 descript =
'Run GCM LMDZ'
163 dynhist_file =
'dyn_hist'
164 dynhistave_file =
'dyn_hist_ave'
174 CALL
conf_gcm( 99, .true. , clesphy0 )
194 CALL init_interface_dyn_phys
218 if (calend ==
'earth_360d')
then
219 call ioconf_calendar(
'360d')
220 write(
lunout,*)
'CALENDRIER CHOISI: Terrestre a 360 jours/an'
221 else if (calend ==
'earth_365d')
then
222 call ioconf_calendar(
'noleap')
223 write(
lunout,*)
'CALENDRIER CHOISI: Terrestre a 365 jours/an'
224 else if (calend ==
'earth_366d')
then
225 call ioconf_calendar(
'gregorian')
226 write(
lunout,*)
'CALENDRIER CHOISI: Terrestre bissextile'
228 abort_message =
'Mauvais choix de calendrier'
233 IF (type_trac ==
'inca')
THEN
235 call init_const_lmdz(
236 $ nbtr,anneeref,dayref,
237 $ iphysiq,day_step,nday,
238 $ nbsrf, is_oce,is_sic,
242 $
iim,jjm+1,llm,klon_glo,mpi_size,
243 $ distrib_phys,comm_lmdz)
255 ALLOCATE(ucov(ijb_u:ije_u,llm))
256 ALLOCATE(vcov(ijb_v:ije_v,llm))
257 ALLOCATE(
teta(ijb_u:ije_u,llm))
258 ALLOCATE(masse(ijb_u:ije_u,llm))
259 ALLOCATE(ps(ijb_u:ije_u))
260 ALLOCATE(
phis(ijb_u:ije_u))
261 ALLOCATE(
q(ijb_u:ije_u,llm,nqtot))
291 .
'GCM: AVANT iniacademic AVANT AVANT AVANT AVANT'
301 IF(mod(day_step,iperiod).NE.0)
THEN
303 .
'Il faut choisir un nb de pas par jour multiple de iperiod'
307 IF(mod(day_step,iphysiq).NE.0)
THEN
309 *
'Il faut choisir un nb de pas par jour multiple de iphysiq'
313 zdtvr =
daysec/
REAL(day_step)
314 IF(
dtvr.NE.zdtvr)
THEN
316 .
'WARNING!!! changement de pas de temps',
dtvr,
'>',zdtvr
323 WRITE(
lunout,*)
' GCM: Attention l''heure de depart lue dans le'
324 &,
' fichier restart ne correspond pas à celle lue dans le run.def'
325 IF (raz_date == 1)
then
326 WRITE(
lunout,*)
'Je prends l''heure lue dans run.def'
329 WRITE(
lunout,*)
'Je m''arrete'
333 IF (raz_date == 1)
THEN
341 .
'GCM: On reinitialise a la date lue dans gcm.def'
344 .
'GCM: Attention les dates initiales lues dans le fichier'
346 .
' restart ne correspondent pas a celles lues dans '
350 write(
lunout,*)
' Pas de remise a zero'
381 jh_ref = jd_ref - int(jd_ref)
384 call ioconf_startdate(int(jd_ref), jh_ref)
387 write(
lunout,*)
'annee_ref, mois, day_ref, heure, jD_ref'
389 call ju2ymds(jd_ref+jh_ref,an, mois, jour, heure)
390 write(
lunout,*)
'jD_ref+jH_ref,an, mois, jour, heure'
391 write(
lunout,*)jd_ref+jh_ref,an, mois, jour, heure
450 .
'GCM: WARNING!!! vitesse verticale nulle dans la physique'
464 IF (type_trac ==
'inca')
THEN
467 CALL init_inca_dim(klon_omp,llm,
iim,jjm,
480 300
FORMAT(
'1'/,15
x,
'run du jour',i7,2
x,
'au jour',i7//)
484 write (
lunout,301)jour, mois, an
486 write (
lunout,302)jour, mois, an
487 301
FORMAT(
'1'/,15
x,
'run du ', i2,
'/',i2,
'/',i4)
488 302
FORMAT(
'1'/,15
x,
' au ', i2,
'/',i2,
'/',i4)
500 IF (mpi_rank==0)
then
504 t_ops =((1.0*iecri)/day_step) *
daysec
513 t_ops = iperiod * time_step
545 OPEN(
unit=5487,file=
'ok_lmdz',status=
'replace')
546 WRITE(5487,*)
'ok_lmdz'