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/advtrac.F

    r1146 r1279  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    3030#include "ener.h"
    3131#include "description.h"
     32#include "iniprint.h"
    3233
    3334c-------------------------------------------------------------------
     
    7475      DATA dum/.true./
    7576
     77      integer,save :: countcfl=0
     78      real cflx(ip1jmp1,llm)
     79      real cfly(ip1jm,llm)
     80      real cflz(ip1jmp1,llm)
     81      real, save :: cflxmax(llm),cflymax(llm),cflzmax(llm)
    7682
    7783      IF(iadvtr.EQ.0) THEN
     
    139145         ENDDO
    140146
     147
     148c-------------------------------------------------------------------
     149! Calcul des criteres CFL en X, Y et Z
     150c-------------------------------------------------------------------
     151
     152      if (countcfl == 0. ) then
     153          cflxmax(:)=0.
     154          cflymax(:)=0.
     155          cflzmax(:)=0.
     156      endif
     157
     158      countcfl=countcfl+iapp_tracvl
     159      cflx(:,:)=0.
     160      cfly(:,:)=0.
     161      cflz(:,:)=0.
     162      do l=1,llm
     163         do ij=iip2,ip1jm-1
     164            if (pbarug(ij,l)>=0.) then
     165                cflx(ij,l)=pbarug(ij,l)*dtvr/masse(ij,l)
     166            else
     167                cflx(ij,l)=-pbarug(ij,l)*dtvr/masse(ij+1,l)
     168            endif
     169         enddo
     170      enddo
     171      do l=1,llm
     172         do ij=iip2,ip1jm-1,iip1
     173            cflx(ij+iip1,l)=cflx(ij,l)
     174         enddo
     175      enddo
     176
     177      do l=1,llm
     178         do ij=1,ip1jm
     179            if (pbarvg(ij,l)>=0.) then
     180                cfly(ij,l)=pbarvg(ij,l)*dtvr/masse(ij,l)
     181            else
     182                cfly(ij,l)=-pbarvg(ij,l)*dtvr/masse(ij+iip1,l)
     183            endif
     184         enddo
     185      enddo
     186
     187      do l=2,llm
     188         do ij=1,ip1jm
     189            if (wg(ij,l)>=0.) then
     190                cflz(ij,l)=wg(ij,l)*dtvr/masse(ij,l)
     191            else
     192                cflz(ij,l)=-wg(ij,l)*dtvr/masse(ij,l-1)
     193            endif
     194         enddo
     195      enddo
     196
     197      do l=1,llm
     198         cflxmax(l)=max(cflxmax(l),maxval(cflx(:,l)))
     199         cflymax(l)=max(cflymax(l),maxval(cfly(:,l)))
     200         cflzmax(l)=max(cflzmax(l),maxval(cflz(:,l)))
     201      enddo
     202
     203!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     204! Par defaut, on sort le diagnostic des CFL tous les jours.
     205! Si on veut le sortir a chaque pas d'advection en cas de plantage
     206!     if (countcfl==iapp_tracvl) then
     207!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     208      if (countcfl==day_step) then
     209         do l=1,llm
     210         write(lunout,*) 'L, CFLmax '
     211     s   ,l,maxval(cflx(:,l)),maxval(cfly(:,l)),maxval(cflz(:,l))
     212         enddo
     213         countcfl=0
     214      endif
     215   
    141216c-------------------------------------------------------------------
    142217c   Advection proprement dite (Modification Le Croller (07/2001)
Note: See TracChangeset for help on using the changeset viewer.