Ignore:
Timestamp:
Jul 1, 2010, 11:02:53 AM (14 years ago)
Author:
Laurent Fairhead
Message:

Merged LMDZ4V5.0-dev branch changes r1292:r1399 to trunk.

Validation:
Validation consisted in compiling the HEAD revision of the trunk,
LMDZ4V5.0-dev branch and the merged sources and running different
configurations on local and SX8 machines comparing results.

Local machine: bench configuration, 32x24x11, gfortran

  • IPSLCM5A configuration (comparison between trunk and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent
  • MH07 configuration, new physics package (comparison between LMDZ4V5.0-dev branch and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent

SX8 machine (brodie), 96x95x39 on 4 processors:

  • IPSLCM5A configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent
  • MH07 configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent

Changes to the makegcm and create_make_gcm scripts to take into account
main programs in F90 files


Fusion de la branche LMDZ4V5.0-dev (r1292:r1399) au tronc principal

Validation:
La validation a consisté à compiler la HEAD de le trunk et de la banche
LMDZ4V5.0-dev et les sources fusionnées et de faire tourner le modéle selon
différentes configurations en local et sur SX8 et de comparer les résultats

En local: 32x24x11, config bench/gfortran

  • pour une config IPSLCM5A (comparaison tronc/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux (à part sur RN et Pb)
    • fichiers histoire égaux
  • pour une config nlle physique (MH07) (comparaison LMDZ4v5.0-dev/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux
    • fichiers histoire équivalents

Sur brodie, 96x95x39 sur 4 proc:

  • pour une config IPSLCM5A:
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc
  • pour une config MH07
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc

Changement sur makegcm et create_make-gcm pour pouvoir prendre en compte des
programmes principaux en *F90

Location:
LMDZ4/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk

  • LMDZ4/trunk/libf/phylmd/yamada4.F

    r938 r1403  
    3838c    iflag_pbl=7 : MY 2.0.Fournier
    3939c    iflag_pbl=8 : MY 2.5
    40 c    iflag_pbl=9 : un test ?
     40c    iflag_pbl>=9 : MY 2.5 avec diffusion verticale
    4141
    4242c.......................................................................
     
    6666
    6767      integer nlay,nlev
    68 cym      PARAMETER (nlay=klev)
    69 cym      PARAMETER (nlev=klev+1)
    7068
    7169      logical first
     
    9896      real fl,zzz,zl0,zq2,zn2
    9997
    100 cym      real rino(klon,klev+1),smyam(klon,klev),styam(klon,klev)
    101 cym     s  ,lyam(klon,klev),knyam(klon,klev)
    102 cym     s  ,w2yam(klon,klev),t2yam(klon,klev)
    103       real,allocatable,save,dimension(:,:) :: rino,smyam,styam,lyam,
    104      s                                        knyam,w2yam,t2yam
    105 cym      common/pbldiag/rino,smyam,styam,lyam,knyam,w2yam,t2yam
    106 c$OMP THREADPRIVATE(rino,smyam,styam,lyam,knyam,w2yam,t2yam)
     98      real rino(klon,klev+1),smyam(klon,klev),styam(klon,klev)
     99     s  ,lyam(klon,klev),knyam(klon,klev)
     100     s  ,w2yam(klon,klev),t2yam(klon,klev)
    107101      logical,save :: firstcall=.true.
    108102c$OMP THREADPRIVATE(firstcall)       
     
    119113     
    120114      if (firstcall) then
    121         allocate(rino(klon,klev+1),smyam(klon,klev),styam(klon,klev))
    122         allocate(lyam(klon,klev),knyam(klon,klev))
    123         allocate(w2yam(klon,klev),t2yam(klon,klev))
    124115        allocate(l0(klon))
    125116        firstcall=.false.
     
    127118
    128119
    129       if (.not.(iflag_pbl.ge.6.and.iflag_pbl.le.9)) then
     120      if (.not.(iflag_pbl.ge.6.and.iflag_pbl.le.10)) then
    130121           stop'probleme de coherence dans appel a MY'
    131122      endif
     
    412403      enddo
    413404
    414 c     if (iflag_pbl.ge.7..and.0.eq.1) then
    415 c        q2(:,1)=q2(:,2)
    416 c        call vdif_q2(dt,g,rconst,plev,temp,kq,q2)
    417 c     endif
     405! Transport diffusif vertical de la TKE.
     406      if (iflag_pbl.ge.9) then
     407!       print*,'YAMADA VDIF'
     408        q2(:,1)=q2(:,2)
     409        call vdif_q2(dt,g,rconst,ngrid,plev,temp,kq,q2)
     410      endif
    418411
    419412c   Traitement des cas noctrunes avec l'introduction d'une longueur
     
    492485      return
    493486      end
     487      SUBROUTINE vdif_q2(timestep,gravity,rconst,ngrid,plev,temp,
     488     &  kmy,q2)
     489      use dimphy
     490      IMPLICIT NONE
     491c.......................................................................
     492#include "dimensions.h"
     493cccc#include "dimphy.h"
     494c.......................................................................
     495c
     496c dt : pas de temps
     497
     498      real plev(klon,klev+1)
     499      real temp(klon,klev)
     500      real timestep
     501      real gravity,rconst
     502      real kstar(klon,klev+1),zz
     503      real kmy(klon,klev+1)
     504      real q2(klon,klev+1)
     505      real deltap(klon,klev+1)
     506      real denom(klon,klev+1),alpha(klon,klev+1),beta(klon,klev+1)
     507      integer ngrid
     508
     509      integer i,k
     510
     511!       print*,'RD=',rconst
     512      do k=1,klev
     513         do i=1,ngrid
     514c test
     515!       print*,'i,k',i,k
     516!       print*,'temp(i,k)=',temp(i,k)
     517!       print*,'(plev(i,k)-plev(i,k+1))=',plev(i,k),plev(i,k+1)
     518            zz=(plev(i,k)+plev(i,k+1))*gravity/(rconst*temp(i,k))
     519            kstar(i,k)=0.125*(kmy(i,k+1)+kmy(i,k))*zz*zz
     520     s      /(plev(i,k)-plev(i,k+1))*timestep
     521         enddo
     522      enddo
     523
     524      do k=2,klev
     525         do i=1,ngrid
     526            deltap(i,k)=0.5*(plev(i,k-1)-plev(i,k+1))
     527         enddo
     528      enddo
     529      do i=1,ngrid
     530         deltap(i,1)=0.5*(plev(i,1)-plev(i,2))
     531         deltap(i,klev+1)=0.5*(plev(i,klev)-plev(i,klev+1))
     532         denom(i,klev+1)=deltap(i,klev+1)+kstar(i,klev)
     533         alpha(i,klev+1)=deltap(i,klev+1)*q2(i,klev+1)/denom(i,klev+1)
     534         beta(i,klev+1)=kstar(i,klev)/denom(i,klev+1)
     535      enddo
     536
     537      do k=klev,2,-1
     538         do i=1,ngrid
     539            denom(i,k)=deltap(i,k)+(1.-beta(i,k+1))*
     540     s      kstar(i,k)+kstar(i,k-1)
     541c   correction d'un bug 10 01 2001
     542            alpha(i,k)=(q2(i,k)*deltap(i,k)
     543     s      +kstar(i,k)*alpha(i,k+1))/denom(i,k)
     544            beta(i,k)=kstar(i,k-1)/denom(i,k)
     545         enddo
     546      enddo
     547
     548c  Si on recalcule q2(1)
     549      if(1.eq.0) then
     550      do i=1,ngrid
     551         denom(i,1)=deltap(i,1)+(1-beta(i,2))*kstar(i,1)
     552         q2(i,1)=(q2(i,1)*deltap(i,1)
     553     s      +kstar(i,1)*alpha(i,2))/denom(i,1)
     554      enddo
     555      endif
     556c   sinon, on peut sauter cette boucle...
     557
     558      do k=2,klev+1
     559         do i=1,ngrid
     560            q2(i,k)=alpha(i,k)+beta(i,k)*q2(i,k-1)
     561         enddo
     562      enddo
     563
     564      return
     565      end
     566      SUBROUTINE vdif_q2e(timestep,gravity,rconst,ngrid,
     567     &   plev,temp,kmy,q2)
     568      use dimphy
     569      IMPLICIT NONE
     570c.......................................................................
     571#include "dimensions.h"
     572cccc#include "dimphy.h"
     573c.......................................................................
     574c
     575c dt : pas de temps
     576
     577      real plev(klon,klev+1)
     578      real temp(klon,klev)
     579      real timestep
     580      real gravity,rconst
     581      real kstar(klon,klev+1),zz
     582      real kmy(klon,klev+1)
     583      real q2(klon,klev+1)
     584      real deltap(klon,klev+1)
     585      real denom(klon,klev+1),alpha(klon,klev+1),beta(klon,klev+1)
     586      integer ngrid
     587
     588      integer i,k
     589
     590      do k=1,klev
     591         do i=1,ngrid
     592            zz=(plev(i,k)+plev(i,k+1))*gravity/(rconst*temp(i,k))
     593            kstar(i,k)=0.125*(kmy(i,k+1)+kmy(i,k))*zz*zz
     594     s      /(plev(i,k)-plev(i,k+1))*timestep
     595         enddo
     596      enddo
     597
     598      do k=2,klev
     599         do i=1,ngrid
     600            deltap(i,k)=0.5*(plev(i,k-1)-plev(i,k+1))
     601         enddo
     602      enddo
     603      do i=1,ngrid
     604         deltap(i,1)=0.5*(plev(i,1)-plev(i,2))
     605         deltap(i,klev+1)=0.5*(plev(i,klev)-plev(i,klev+1))
     606      enddo
     607
     608      do k=klev,2,-1
     609         do i=1,ngrid
     610            q2(i,k)=q2(i,k)+
     611     s      ( kstar(i,k)*(q2(i,k+1)-q2(i,k))
     612     s       -kstar(i,k-1)*(q2(i,k)-q2(i,k-1)) )
     613     s      /deltap(i,k)
     614         enddo
     615      enddo
     616
     617      do i=1,ngrid
     618         q2(i,1)=q2(i,1)+
     619     s   ( kstar(i,1)*(q2(i,2)-q2(i,1))
     620     s                                      )
     621     s   /deltap(i,1)
     622         q2(i,klev+1)=q2(i,klev+1)+
     623     s   (
     624     s    -kstar(i,klev)*(q2(i,klev+1)-q2(i,klev)) )
     625     s   /deltap(i,klev+1)
     626      enddo
     627
     628      return
     629      end
Note: See TracChangeset for help on using the changeset viewer.