Ignore:
Timestamp:
Mar 11, 2015, 3:55:23 PM (9 years ago)
Author:
Ehouarn Millour
Message:

Some cleanup and tidying up in the dynamics/physics interface.
EM

File:
1 edited

Legend:

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

    r2222 r2225  
    2626! Only INCA needs these informations (from the Earth's physics)
    2727      USE indice_sol_mod
     28      USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb
    2829#endif
    2930
     
    3334! dynamique -> physique pour l'initialisation
    3435#ifdef CPP_PHYS
    35       USE dimphy
    36       USE comgeomphy
    37       USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb
     36!      USE dimphy
     37!      USE comgeomphy
    3838#endif
    3939!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    119119      LOGICAL first
    120120
    121       LOGICAL call_iniphys
    122       data call_iniphys/.true./
     121!      LOGICAL call_iniphys
     122!      data call_iniphys/.true./
    123123
    124124c+jld variables test conservation energie
     
    141141      REAL :: heure
    142142
    143 
    144 c-----------------------------------------------------------------------
    145 c    variables pour l'initialisation de la physique :
    146 c    ------------------------------------------------
    147       INTEGER ngridmx
    148       PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm   )
    149       REAL zcufi(ngridmx),zcvfi(ngridmx)
    150       REAL latfi(ngridmx),lonfi(ngridmx)
    151       REAL airefi(ngridmx)
    152       SAVE latfi, lonfi, airefi
    153 
    154143c-----------------------------------------------------------------------
    155144c   Initialisations:
     
    188177#ifdef CPP_PHYS
    189178      CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
    190       call InitComgeomphy
     179!      call InitComgeomphy ! now done in iniphysiq
    191180#endif
    192181!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    417406c   -------------------------------
    418407
    419       IF (call_iniphys.and.(iflag_phys==1.or.iflag_phys>=100)) THEN
    420          latfi(1)=rlatu(1)
    421          lonfi(1)=0.
    422          zcufi(1) = cu(1)
    423          zcvfi(1) = cv(1)
    424          DO j=2,jjm
    425             DO i=1,iim
    426                latfi((j-2)*iim+1+i)= rlatu(j)
    427                lonfi((j-2)*iim+1+i)= rlonv(i)
    428                zcufi((j-2)*iim+1+i) = cu((j-1)*iip1+i)
    429                zcvfi((j-2)*iim+1+i) = cv((j-1)*iip1+i)
    430             ENDDO
    431          ENDDO
    432          latfi(ngridmx)= rlatu(jjp1)
    433          lonfi(ngridmx)= 0.
    434          zcufi(ngridmx) = cu(ip1jm+1)
    435          zcvfi(ngridmx) = cv(ip1jm-iim)
    436          CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi)
    437          ! Poles are single points on physics grid
    438          airefi(1)=sum(aire(1:iim))
    439          airefi(ngridmx)=sum(aire(ip1jmp1-(iim+1)+1:ip1jmp1-1))
    440 !         WRITE(lunout,*)
    441 !     .       'GCM: WARNING!!! vitesse verticale nulle dans la physique'
     408      IF ((iflag_phys==1).or.(iflag_phys>=100)) THEN
    442409! Physics:
    443410#ifdef CPP_PHYS
    444          CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys,
    445      &                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp,
     411         CALL iniphysiq(iim,jjm,llm,daysec,day_ini,dtphys/nsplit_phys,
     412     &                rlatu,rlonv,aire,cu,cv,rad,g,r,cpp,
    446413     &                iflag_phys)
    447414#endif
    448          call_iniphys=.false.
    449       ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1))
     415      ENDIF ! of IF ((iflag_phys==1).or.(iflag_phys>=100))
    450416
    451417c  numero de stockage pour les fichiers de redemarrage:
Note: See TracChangeset for help on using the changeset viewer.