Ignore:
Timestamp:
Oct 2, 2012, 5:57:45 PM (12 years ago)
Author:
Laurent Fairhead
Message:

Phasage de la dynamique parallèle localisée (petite mémoire) avec la branche LMDZ4V5.0-dev (fin de la branche)
Validation effectuée par comparaison des fichiers de sorties debug (u, v, t, q, masse, etc ...) d'une simulation sans physique
faite avec la version du modèle donnée paY. Meurdesoif et la version phasée avec la r1399 (fin de la branche LMDZ4V5.0-dev)


Phasing of the localised (low memory) parallel dynamics package with the LMDZ4V5.0-dev version of LMDZ
Validation consisted in comparing output debug files (u, v, t, q, masse, etc... ) of a no physics simulation
run with the version of the code given by Y. Meurdesoif and this version phased with r1399 (end of the LMDZ4V5.0-dev branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3dmem/gcm.F

    r1632 r1657  
    11!
    2 ! $Id: gcm.F 1316 2010-02-22 14:51:12Z acozic $
     2! $Id: gcm.F 1397 2010-06-02 12:57:39Z emillour $
    33!
    44c
     
    7070#include "description.h"
    7171#include "serre.h"
    72 #include "com_io_dyn.h"
     72!#include "com_io_dyn.h"
    7373#include "iniprint.h"
    7474#include "tracstoke.h"
     75#ifdef INCA
     76! Only INCA needs these informations (from the Earth's physics)
    7577#include "indicesol.h"
     78#endif
    7679
    7780      INTEGER         longcles
     
    273276      if (read_start) then
    274277      ! we still need to run iniacademic to initialize some
    275       ! constants & fields, if we run the 'newtonian' case:
    276         if (iflag_phys.eq.2) then
     278      ! constants & fields, if we run the 'newtonian' or 'SW' cases:
     279        if (iflag_phys.ne.1) then
    277280          CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0)
    278281        endif
    279 !#ifdef CPP_IOIPSL
     282
    280283        if (planet_type.eq."earth") then
    281284#ifdef CPP_EARTH
    282285! Load an Earth-format start file
    283286         CALL dynetat0_loc("start.nc",vcov,ucov,
    284      .              teta,q,masse,ps,phis, time_0)
     287     &              teta,q,masse,ps,phis, time_0)
     288#else
     289        ! SW model also has Earth-format start files
     290        ! (but can be used without the CPP_EARTH directive)
     291          if (iflag_phys.eq.0) then
     292            CALL dynetat0_loc("start.nc",vcov,ucov,
     293     &              teta,q,masse,ps,phis, time_0)
     294          endif
    285295#endif
    286296        endif ! of if (planet_type.eq."earth")
     
    326336C on remet le calendrier à zero si demande
    327337c
    328       if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     338      IF (raz_date == 1) THEN
     339        annee_ref = anneeref
     340        day_ref = dayref
     341        day_ini = dayref
     342        itau_dyn = 0
     343        itau_phy = 0
     344        time_0 = 0.
     345        write(lunout,*)
     346     .   'GCM: On reinitialise a la date lue dans gcm.def'
     347      ELSE IF (annee_ref .ne. anneeref .or. day_ref .ne. dayref) THEN
    329348        write(lunout,*)
    330349     .  'GCM: Attention les dates initiales lues dans le fichier'
     
    332351     .  ' restart ne correspondent pas a celles lues dans '
    333352        write(lunout,*)' gcm.def'
    334         write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    335         write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    336         if (raz_date .ne. 1) then
    337           write(lunout,*)
    338      .    'GCM: On garde les dates du fichier restart'
    339         else
    340           annee_ref = anneeref
    341           day_ref = dayref
    342           day_ini = dayref
    343           itau_dyn = 0
    344           itau_phy = 0
    345           time_0 = 0.
    346           write(lunout,*)
    347      .   'GCM: On reinitialise a la date lue dans gcm.def'
    348         endif
    349       ELSE
    350         raz_date = 0
    351       endif
     353        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     354        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     355        write(lunout,*)' Pas de remise a zero'
     356      ENDIF
     357c      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     358c        write(lunout,*)
     359c     .  'GCM: Attention les dates initiales lues dans le fichier'
     360c        write(lunout,*)
     361c     .  ' restart ne correspondent pas a celles lues dans '
     362c        write(lunout,*)' gcm.def'
     363c        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     364c        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     365c        if (raz_date .ne. 1) then
     366c          write(lunout,*)
     367c     .    'GCM: On garde les dates du fichier restart'
     368c        else
     369c          annee_ref = anneeref
     370c          day_ref = dayref
     371c          day_ini = dayref
     372c          itau_dyn = 0
     373c          itau_phy = 0
     374c          time_0 = 0.
     375c          write(lunout,*)
     376c     .   'GCM: On reinitialise a la date lue dans gcm.def'
     377c        endif
     378c      ELSE
     379c        raz_date = 0
     380c      endif
    352381
    353382#ifdef CPP_IOIPSL
     
    428457         if (planet_type.eq."earth") then
    429458#ifdef CPP_EARTH
    430          CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys ,
     459         CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys ,
    431460     ,                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp     )
    432461#endif
     
    473502
    474503#ifdef CPP_IOIPSL
    475       if ( 1.eq.1) then
    476504      time_step = zdtvr
    477       t_ops = iecri * daysec
    478       t_wrt = iecri * daysec
    479 !      CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step,
    480 !     .              t_ops, t_wrt, histid, histvid)
     505      IF (mpi_rank==0) then
     506        if (ok_dyn_ins) then
     507          ! initialize output file for instantaneous outputs
     508          ! t_ops = iecri * daysec ! do operations every t_ops
     509          t_ops =((1.0*iecri)/day_step) * daysec 
     510          t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     511          t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     512          CALL inithist(day_ref,annee_ref,time_step,
     513     &                  t_ops,t_wrt)
     514        endif
    481515
    482516      IF (ok_dyn_ave) THEN
    483          t_ops = iperiod * time_step
    484          t_wrt = periodav * daysec
     517         ! initialize output file for averaged outputs
     518         t_ops = iperiod * time_step ! do operations every t_ops
     519         t_wrt = periodav * daysec   ! write output every t_wrt
    485520         CALL initdynav_loc(day_ref,annee_ref,time_step,t_ops,t_wrt)
    486       END IF
     521        END IF
     522      ENDIF
    487523      dtav = iperiod*dtvr/daysec
    488       endif
    489 
    490 
    491524#endif
    492525! #endif of #ifdef CPP_IOIPSL
Note: See TracChangeset for help on using the changeset viewer.