Ignore:
Timestamp:
Jan 11, 2013, 10:19:19 AM (11 years ago)
Author:
Laurent Fairhead
Message:

Version testing basée sur la r1706


Testing release based on r1706

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/dyn3dmem/gcm.F

    r1669 r1707  
    11!
    2 ! $Id: gcm.F 1403 2010-07-01 09:02:53Z fairhead $
     2! $Id$
    33!
    44c
     
    2020      USE control_mod
    2121
    22 ! Ehouarn: for now these only apply to Earth:
    23 #ifdef CPP_EARTH
     22#ifdef CPP_PHYS
    2423      USE mod_grid_phy_lmdz
    2524      USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb
     
    8786
    8887      REAL zdtvr
    89 c      INTEGER nbetatmoy, nbetatdem,nbetat
    90       INTEGER nbetatmoy, nbetatdem
    9188
    9289c   variables dynamiques
     
    189186      call ini_getparam("out.def")
    190187      call Read_Distrib
    191 ! Ehouarn : temporarily (?) keep this only for Earth
    192       if (planet_type.eq."earth") then
    193 #ifdef CPP_EARTH
     188
     189#ifdef CPP_PHYS
    194190        CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys)
    195191#endif
    196       endif ! of if (planet_type.eq."earth")
    197192      CALL set_bands
    198 #ifdef CPP_EARTH
    199 ! Ehouarn: For now only Earth physics is parallel
     193#ifdef CPP_PHYS
    200194      CALL Init_interface_dyn_phys
    201195#endif
     
    209203c$OMP END PARALLEL
    210204
    211 ! Ehouarn : temporarily (?) keep this only for Earth
    212       if (planet_type.eq."earth") then
    213 #ifdef CPP_EARTH
     205#ifdef CPP_PHYS
    214206c$OMP PARALLEL
    215207      call InitComgeomphy
    216208c$OMP END PARALLEL
    217209#endif
    218       endif ! of if (planet_type.eq."earth")
    219210
    220211c-----------------------------------------------------------------------
     
    240231#endif
    241232
    242       IF (config_inca /= 'none') THEN
     233      IF (type_trac == 'inca') THEN
    243234#ifdef INCA
    244235         call init_const_lmdz(
     
    282273        endif
    283274
    284         if (planet_type.eq."earth") then
    285 #ifdef CPP_EARTH
     275!        if (planet_type.eq."earth") then
    286276! Load an Earth-format start file
    287277         CALL dynetat0_loc("start.nc",vcov,ucov,
    288278     &              teta,q,masse,ps,phis, time_0)
    289 #else
    290         ! SW model also has Earth-format start files
    291         ! (but can be used without the CPP_EARTH directive)
    292           if (iflag_phys.eq.0) then
    293             CALL dynetat0_loc("start.nc",vcov,ucov,
    294      &              teta,q,masse,ps,phis, time_0)
    295           endif
    296 #endif
    297         endif ! of if (planet_type.eq."earth")
     279!        endif ! of if (planet_type.eq."earth")
     280
    298281c       write(73,*) 'ucov',ucov
    299282c       write(74,*) 'vcov',vcov
     
    337320C on remet le calendrier à zero si demande
    338321c
     322      IF (start_time /= starttime) then
     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'
     327          start_time = starttime
     328        ELSE
     329          WRITE(lunout,*)'Je m''arrete'
     330          CALL abort
     331        ENDIF
     332      ENDIF
    339333      IF (raz_date == 1) THEN
    340334        annee_ref = anneeref
     
    404398#endif
    405399
    406 c  nombre d'etats dans les fichiers demarrage et histoire
    407       nbetatdem = nday / iecri
    408       nbetatmoy = nday / periodav + 1
    409400
    410401c-----------------------------------------------------------------------
    411402c   Initialisation des constantes dynamiques :
    412403c   ------------------------------------------
    413       dtvr = zdtvr
    414       CALL iniconst
     404        dtvr = zdtvr
     405        CALL iniconst
    415406
    416407c-----------------------------------------------------------------------
    417408c   Initialisation de la geometrie :
    418409c   --------------------------------
    419       CALL inigeom
     410        CALL inigeom
    420411
    421412c-----------------------------------------------------------------------
    422413c   Initialisation du filtre :
    423414c   --------------------------
    424       CALL inifilr
     415        CALL inifilr
    425416c
    426417c-----------------------------------------------------------------------
     
    429420
    430421      CALL inidissip( lstardis, nitergdiv, nitergrot, niterh   ,
    431      *                tetagdiv, tetagrot , tetatemp              )
     422     *                tetagdiv, tetagrot , tetatemp, vert_prof_dissip)
    432423
    433424c-----------------------------------------------------------------------
    434425c   Initialisation de la physique :
    435426c   -------------------------------
    436       IF (call_iniphys.and.iflag_phys.eq.1) THEN
     427      IF (call_iniphys.and.(iflag_phys==1.or.iflag_phys>=100)) THEN
    437428         latfi(1)=rlatu(1)
    438429         lonfi(1)=0.
     
    455446         WRITE(lunout,*)
    456447     .       'GCM: WARNING!!! vitesse verticale nulle dans la physique'
    457 ! Earth:
    458          if (planet_type.eq."earth") then
    459 #ifdef CPP_EARTH
    460          CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys ,
    461      ,                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp     )
    462 #endif
    463          endif ! of if (planet_type.eq."earth")
     448! Physics:
     449#ifdef CPP_PHYS
     450         CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys,
     451     &                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp,
     452     &                iflag_phys)
     453#endif
    464454         call_iniphys=.false.
    465       ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1))
     455      ENDIF ! of IF (call_iniphys.and.(iflag_phys==1.or.iflag_phys>=100))
    466456
    467457
     
    469459c   Initialisation des dimensions d'INCA :
    470460c   --------------------------------------
    471       IF (config_inca /= 'none') THEN
     461      IF (type_trac == 'inca') THEN
    472462!$OMP PARALLEL
    473463#ifdef INCA
     
    496486#endif
    497487
    498       if (planet_type.eq."earth") then
     488!      if (planet_type.eq."earth") then
     489! Write an Earth-format restart file
    499490        CALL dynredem0_loc("restart.nc", day_end, phis)
    500       endif
     491!      endif
    501492
    502493      ecripar = .TRUE.
     
    544535c       write(78,*) 'q',q
    545536
    546 c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logic/)
     537c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
    547538      CALL leapfrog_loc(ucov,vcov,teta,ps,masse,phis,q,clesphy0,
    548539     .              time_0)
Note: See TracChangeset for help on using the changeset viewer.