Ignore:
Timestamp:
Dec 10, 2009, 10:02:56 AM (15 years ago)
Author:
Laurent Fairhead
Message:

Merged LMDZ4-dev branch changes r1241:1278 into the trunk
Running trunk and LMDZ4-dev in LMDZOR configuration on local
machine (sequential) and SX8 (4-proc) yields identical results
(restart and restartphy are identical binarily)
Log history from r1241 to r1278 is available by switching to
source:LMDZ4/branches/LMDZ4-dev-20091210

Location:
LMDZ4/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk

  • LMDZ4/trunk/libf/dyn3d/gcm.F

    r1147 r1279  
     1!
     2! $Id$
     3!
    14c
    25c
     
    110113      real time_step, t_wrt, t_ops
    111114
    112       REAL rdayvrai,rdaym_ini,rday_ecri
    113115      LOGICAL first
    114116
     
    132134      character (len=20) :: modname
    133135      character (len=80) :: abort_message
    134 
    135 C Calendrier
    136       LOGICAL true_calendar
    137       PARAMETER (true_calendar = .false.)
     136! locales pour gestion du temps
     137      INTEGER :: an, mois, jour
     138      REAL :: heure
     139
    138140
    139141c-----------------------------------------------------------------------
     
    160162
    161163
    162 c-----------------------------------------------------------------------
    163 c   Choix du calendrier
    164 c   -------------------
    165 
    166 #ifdef CPP_IOIPSL
    167       if (true_calendar) then
    168         call ioconf_calendar('gregorian')
    169       else
    170         call ioconf_calendar('360d')
    171       endif
    172 #endif
    173164c----------------------------------------------------------------------
    174165c  lecture des fichiers gcm.def ou run.def
     
    194185      endif
    195186!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     187c-----------------------------------------------------------------------
     188c   Choix du calendrier
     189c   -------------------
     190
     191c      calend = 'earth_365d'
     192
     193#ifdef CPP_IOIPSL
     194      if (calend == 'earth_360d') then
     195        call ioconf_calendar('360d')
     196        write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
     197      else if (calend == 'earth_365d') then
     198        call ioconf_calendar('noleap')
     199        write(lunout,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an'
     200      else if (calend == 'earth_366d') then
     201        call ioconf_calendar('gregorian')
     202        write(lunout,*)'CALENDRIER CHOISI: Terrestre bissextile'
     203      else
     204        abort_message = 'Mauvais choix de calendrier'
     205        call abort_gcm(modname,abort_message,1)
     206      endif
     207#endif
     208c-----------------------------------------------------------------------
    196209
    197210      IF (config_inca /= 'none') THEN
     
    294307     .  ' restart ne correspondent pas a celles lues dans '
    295308        write(lunout,*)' gcm.def'
     309        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     310        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    296311        if (raz_date .ne. 1) then
    297312          write(lunout,*)
     
    310325        raz_date = 0
    311326      endif
     327
    312328#ifdef CPP_IOIPSL
    313       call ioconf_startdate(annee_ref,0,day_ref, 0.)
    314 #endif
    315 
     329      mois = 1
     330      heure = 0.
     331      call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
     332      jH_ref = jD_ref - int(jD_ref)
     333      jD_ref = int(jD_ref)
     334
     335      call ioconf_startdate(INT(jD_ref), jH_ref)
     336
     337      write(lunout,*)'DEBUG'
     338      write(lunout,*)'annee_ref, mois, day_ref, heure, jD_ref'
     339      write(lunout,*)annee_ref, mois, day_ref, heure, jD_ref
     340      call ju2ymds(jD_ref+jH_ref,an, mois, jour, heure)
     341      write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure'
     342      write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure
     343#else
     344! Ehouarn: we still need to define JD_ref and JH_ref
     345! and since we don't know how many days there are in a year
     346! we set JD_ref to 0 (this should be improved ...)
     347      jD_ref=0
     348      jH_ref=0
     349#endif
    316350
    317351c  nombre d'etats dans les fichiers demarrage et histoire
     
    388422 300  FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//)
    389423
     424#ifdef CPP_IOIPSL
     425      call ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure)
     426      write (lunout,301)jour, mois, an
     427      call ju2ymds(jD_ref + day_end - day_ref, an, mois, jour, heure)
     428      write (lunout,302)jour, mois, an
     429 301  FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4)
     430 302  FORMAT('1'/,15x,'    au ', i2,'/',i2,'/',i4)
     431#endif
     432
    390433      if (planet_type.eq."earth") then
    391 #ifdef CPP_EARTH
    392       CALL dynredem0("restart.nc", day_end, phis)
    393 #endif
     434        CALL dynredem0("restart.nc", day_end, phis)
    394435      endif
    395436
     
    401442      t_ops = iecri * daysec
    402443      t_wrt = iecri * daysec
    403       CALL inithist(dynhist_file,day_ref,annee_ref,time_step,
    404      .              t_ops, t_wrt, histid, histvid)
    405 
    406       IF (ok_dynzon) THEN
    407          t_ops = iperiod * time_step
    408          t_wrt = periodav * daysec
    409          CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step,
    410      .        t_ops, t_wrt, histaveid)
    411       END IF
     444!      CALL inithist(dynhist_file,day_ref,annee_ref,time_step,
     445!    .              t_ops, t_wrt, histid, histvid)
     446
     447!     IF (ok_dynzon) THEN
     448!        t_ops = iperiod * time_step
     449!        t_wrt = periodav * daysec
     450!        CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step,
     451!    .        t_ops, t_wrt, histaveid)
     452!     END IF
    412453      dtav = iperiod*dtvr/daysec
    413454      endif
Note: See TracChangeset for help on using the changeset viewer.