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

Version testing basée sur la r1706


Testing release based on r1706

Location:
LMDZ5/branches/testing
Files:
3 deleted
13 edited
1 copied

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/dyn3dpar/calfis_p.F

    r1669 r1707  
    684684     .             debut_split,    !! firstcall
    685685     .             lafin_split,    !! lastcall
    686      .             float(day_ini), !! pday <-- day_ini (dans temps.h)
     686     .             jD_cur,         !! pday. see leapfrog_p
    687687     .             jH_cur_split,   !! ptime "fraction of day"
    688688     .             zdt_split,      !! ptimestep
  • LMDZ5/branches/testing/libf/dyn3dpar/comconst.h

    r1505 r1707  
    2121      REAL dtdiss ! (s) time step for the dissipation
    2222      REAL rad ! (m) radius of the planet
    23       REAL r ! Gas constant R=8.31 J.K-1.mol-1
    24       REAL cpp   ! Cp
     23      REAL r ! Reduced Gas constant r=R/mu
     24             ! with R=8.31.. J.K-1.mol-1, mu: mol mass of atmosphere (kg/mol)
     25      REAL cpp   ! Specific heat Cp (J.kg-1.K-1)
    2526      REAL kappa ! kappa=R/Cp
    2627      REAL cotot
  • LMDZ5/branches/testing/libf/dyn3dpar/comdissnew.h

    r1319 r1707  
    1212
    1313      COMMON/comdissnew/ lstardis,nitergdiv,nitergrot,niterh,tetagdiv,  &
    14      &                   tetagrot,tetatemp,coefdis 
     14     &                   tetagrot,tetatemp,coefdis, vert_prof_dissip
    1515
    1616      LOGICAL lstardis
    1717      INTEGER nitergdiv, nitergrot, niterh
     18
     19      integer vert_prof_dissip ! vertical profile of horizontal dissipation
     20!     Allowed values:
     21!     0: rational fraction, function of pressure
     22!     1: tanh of altitude
     23
    1824      REAL     tetagdiv, tetagrot,  tetatemp, coefdis
    1925
  • LMDZ5/branches/testing/libf/dyn3dpar/conf_gcm.F

    r1665 r1707  
    66      SUBROUTINE conf_gcm( tapedef, etatinit, clesphy0 )
    77c
     8      USE control_mod
    89#ifdef CPP_IOIPSL
    910      use IOIPSL
     
    1617      use mod_hallo, ONLY : use_mpi_alloc
    1718      use parallel, ONLY : omp_chunk
    18       USE control_mod
    1919      USE infotrac, ONLY : type_trac
     20      use assert_m, only: assert
     21
    2022      IMPLICIT NONE
    2123c-----------------------------------------------------------------------
     
    4345#include "serre.h"
    4446#include "comdissnew.h"
    45 !#include "clesphys.h"
    46 #include "iniprint.h"
    4747#include "temps.h"
    4848#include "comconst.h"
    4949
    5050! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
     51! #include "clesphys.h"
     52#include "iniprint.h"
    5153c
    5254c
     
    105107        OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write',
    106108     &          STATUS='unknown',FORM='formatted')
    107 
    108109      ENDIF
    109110
     
    185186
    186187!Config  Key  = nsplit_phys
    187 !Config  Desc = nombre d'iteration de la physique
    188 !Config  Def  = 240
    189 !Config  Help = nombre d'itration de la physique
    190 !
    191188       nsplit_phys = 1
    192189       CALL getin('nsplit_phys',nsplit_phys)
     
    325322       CALL getin('tau_top_bound',tau_top_bound)
    326323
    327 !
    328324!Config  Key  = coefdis
    329325!Config  Desc = coefficient pour gamdissip
     
    608604      type_trac = 'lmdz'
    609605      CALL getin('type_trac',type_trac)
    610 
    611606
    612607!Config  Key  = config_inca
     
    830825
    831826!Config  Key  = ok_dynzon
    832 !Config  Desc = calcul et sortie des transports
     827!Config  Desc = sortie des transports zonaux dans la dynamique
    833828!Config  Def  = n
    834829!Config  Help = Permet de mettre en route le calcul des transports
     
    865860        write(lunout,*)"Le zoom en longitude est incompatible",
    866861     &                 " avec l'utilisation du filtre FFT ",
    867      &                 "---> filtre FFT désactivé "
     862     &                 "---> FFT filter not active"
    868863       use_filtre_fft=.FALSE.
    869864      ENDIF
     
    898893      ok_strato=.FALSE.
    899894      CALL getin('ok_strato',ok_strato)
     895
     896      vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
     897      CALL getin('vert_prof_dissip', vert_prof_dissip)
     898      call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1,
     899     $     "bad value for vert_prof_dissip")
    900900
    901901!Config  Key  = ok_gradsfile
     
    968968      write(lunout,*)' type_trac = ', type_trac
    969969      write(lunout,*)' config_inca = ', config_inca
    970       write(lunout,*)' ok_dynzon = ', ok_dynzon 
     970      write(lunout,*)' ok_dynzon = ', ok_dynzon
    971971      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
    972972      write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
  • LMDZ5/branches/testing/libf/dyn3dpar/filtreg_p.F

    r1665 r1707  
    214214     &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
    215215#else
    216                      champ_fft(:,j-jdfil+1,:)
     216                     champ_fft(:iim,j-jdfil+1,:)
    217217     &                    =matmul(matrinvn(:,:,j),champ_loc(:iim,j,:))
    218218#endif
     
    227227     &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
    228228#else
    229                      champ_fft(:,j-jdfil+1,:)
     229                     champ_fft(:iim,j-jdfil+1,:)
    230230     &                    =matmul(matriceun(:,:,j),champ_loc(:iim,j,:))
    231231#endif
     
    240240     &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
    241241#else
    242                      champ_fft(:,j-jdfil+1,:)
     242                     champ_fft(:iim,j-jdfil+1,:)
    243243     &                    =matmul(matricevn(:,:,j),champ_loc(:iim,j,:))
    244244#endif
     
    257257     &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
    258258#else
    259                      champ_fft(:,j-jdfil+1,:)
     259                     champ_fft(:iim,j-jdfil+1,:)
    260260     &                    =matmul(matrinvs(:,:,j-jfiltsu+1),
    261261     &                            champ_loc(:iim,j,:))
     
    272272     &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
    273273#else
    274                      champ_fft(:,j-jdfil+1,:)
     274                     champ_fft(:iim,j-jdfil+1,:)
    275275     &                    =matmul(matriceus(:,:,j-jfiltsu+1),
    276276     &                            champ_loc(:iim,j,:))
     
    287287     &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
    288288#else
    289                      champ_fft(:,j-jdfil+1,:)
     289                     champ_fft(:iim,j-jdfil+1,:)
    290290     &                    =matmul(matricevs(:,:,j-jfiltsv+1),
    291291     &                            champ_loc(:iim,j,:))
  • LMDZ5/branches/testing/libf/dyn3dpar/fxhyp.F

    r1403 r1707  
    4848c
    4949       REAL   dzoom
    50        REAL*8 xlon(iip1),xprimm(iip1),xuv
    51        REAL*8 xtild(0:nmax2)
    52        REAL*8 fhyp(0:nmax2),ffdx,beta,Xprimt(0:nmax2)
    53        REAL*8 Xf(0:nmax2),xxpr(0:nmax2)
    54        REAL*8 xvrai(iip1),xxprim(iip1)
    55        REAL*8 pi,depi,epsilon,xzoom,fa,fb
    56        REAL*8 Xf1, Xfi , a0,a1,a2,a3,xi2
     50       REAL(KIND=8) xlon(iip1),xprimm(iip1),xuv
     51       REAL(KIND=8) xtild(0:nmax2)
     52       REAL(KIND=8) fhyp(0:nmax2),ffdx,beta,Xprimt(0:nmax2)
     53       REAL(KIND=8) Xf(0:nmax2),xxpr(0:nmax2)
     54       REAL(KIND=8) xvrai(iip1),xxprim(iip1)
     55       REAL(KIND=8) pi,depi,epsilon,xzoom,fa,fb
     56       REAL(KIND=8) Xf1, Xfi , a0,a1,a2,a3,xi2
    5757       INTEGER i,it,ik,iter,ii,idif,ii1,ii2
    58        REAL*8 xi,xo1,xmoy,xlon2,fxm,Xprimin
    59        REAL*8 champmin,champmax,decalx
     58       REAL(KIND=8) xi,xo1,xmoy,xlon2,fxm,Xprimin
     59       REAL(KIND=8) champmin,champmax,decalx
    6060       INTEGER is2
    6161       SAVE is2
    6262
    63        REAL*8 heavyside
     63       REAL(KIND=8) heavyside
    6464
    6565       pi       = 2. * ASIN(1.)
     
    6868       xzoom    = xzoomdeg * pi/180.
    6969c
     70       if (iim==1) then
     71
     72          print*,'Longitudes calculees a la main pour iim=1'
     73
     74          rlonm025(1)=-pi/2.
     75          rlonv(1)=0.
     76          rlonu(1)=pi
     77          rlonp025(1)=pi/2.
     78          rlonm025(2)=rlonm025(1)+depi
     79          rlonv(2)=rlonv(1)+depi
     80          rlonu(2)=rlonu(1)+depi
     81          rlonp025(2)=rlonp025(1)+depi
     82
     83          xprimm025(:)=1.
     84          xprimv(:)=1.
     85          xprimu(:)=1.
     86          xprimp025(:)=1.
     87          champmin=depi
     88          champmax=depi
     89          return
     90
     91       endif
     92
    7093           decalx   = .75
    7194       IF( grossism.EQ.1..AND.scal180 )  THEN
     
    286309
    287310
     311
    288312       IF(ik.EQ.1.and.grossism.EQ.1.)  THEN
    289313         xvrai(1)    = xvrai(iip1)-depi
    290314         xxprim(1)   = xxprim(iip1)
    291315       ENDIF
     316
    292317       DO i = 1 , iim
    293318        xlon(i)     = xvrai(i)
  • LMDZ5/branches/testing/libf/dyn3dpar/gcm.F

    r1665 r1707  
    418418
    419419      CALL inidissip( lstardis, nitergdiv, nitergrot, niterh   ,
    420      *                tetagdiv, tetagrot , tetatemp              )
     420     *                tetagdiv, tetagrot , tetatemp, vert_prof_dissip)
    421421
    422422c-----------------------------------------------------------------------
    423423c   Initialisation de la physique :
    424424c   -------------------------------
    425       IF (call_iniphys.and.iflag_phys.eq.1) THEN
     425      IF (call_iniphys.and.(iflag_phys==1.or.iflag_phys>=100)) THEN
    426426         latfi(1)=rlatu(1)
    427427         lonfi(1)=0.
     
    446446! Physics:
    447447#ifdef CPP_PHYS
    448          CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys ,
    449      ,                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp     )
     448         CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys,
     449     &                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp,
     450     &                iflag_phys)
    450451#endif
    451452         call_iniphys=.false.
    452       ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1))
     453      ENDIF ! of IF (call_iniphys.and.(iflag_phys==1.or.iflag_phys>=100))
    453454
    454455
     
    481482 301  FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4)
    482483 302  FORMAT('1'/,15x,'    au ', i2,'/',i2,'/',i4)
    483 #endif
    484 
    485 #ifdef CPP_PHYS
    486 ! Create start file (startphy.nc) and boundary conditions (limit.nc)
    487 ! for the Earth verstion
    488        if (iflag_phys>=100) then
    489           call iniaqua(ngridmx,latfi,lonfi,iflag_phys)
    490        endif
    491484#endif
    492485
  • LMDZ5/branches/testing/libf/dyn3dpar/groupe_p.F

    r764 r1707  
    3737      integer i,j,l
    3838
    39       logical firstcall
    40       save firstcall
    41 c$OMP THREADPRIVATE(firstcall)
     39      logical firstcall,groupe_ok
     40      save firstcall,groupe_ok
     41c$OMP THREADPRIVATE(firstcall,groupe_ok)
    4242
    4343      data firstcall/.true./
     44      data groupe_ok/.true./
     45
    4446      integer ijb,ije,jjb,jje
    4547     
     48      if (iim==1) then
     49         groupe_ok=.false.
     50      endif
     51
    4652      if (firstcall) then
    47          if(mod(iim,2**ngroup).ne.0) stop'probleme du nombre ede point'
     53         if (groupe_ok) then
     54           if(mod(iim,2**ngroup).ne.0) stop'probleme du nombre de point'
     55         endif
    4856         firstcall=.false.
    4957      endif
     
    6674c$OMP END DO NOWAIT
    6775
    68       call groupeun_p(jjp1,llm,jjb,jje,zconvmm)
     76      if (groupe_ok) then
     77         call groupeun_p(jjp1,llm,jjb,jje,zconvmm)
     78      endif
    6979     
    7080      jjb=jj_begin-1
     
    7888c$OMP END DO NOWAIT
    7989
    80       call groupeun_p(jjm,llm,jjb,jje,pbarvm)
     90      if (groupe_ok) then
     91         call groupeun_p(jjm,llm,jjb,jje,pbarvm)
     92      endif
    8193
    8294c   Champs 3D
     
    101113      enddo
    102114c$OMP END DO NOWAIT
     115
    103116c    integration de la convergence de masse de haut  en bas ......
    104117   
  • LMDZ5/branches/testing/libf/dyn3dpar/inidissip.F90

    r1665 r1707  
    33!
    44SUBROUTINE inidissip ( lstardis,nitergdiv,nitergrot,niterh  , &
    5      tetagdiv,tetagrot,tetatemp             )
     5     tetagdiv,tetagrot,tetatemp, vert_prof_dissip)
    66  !=======================================================================
    77  !   initialisation de la dissipation horizontale
     
    2525  INTEGER,INTENT(in) :: nitergdiv,nitergrot,niterh
    2626  REAL,INTENT(in) :: tetagdiv,tetagrot,tetatemp
     27
     28  integer, INTENT(in):: vert_prof_dissip
     29  ! Vertical profile of horizontal dissipation
     30  ! Allowed values:
     31  ! 0: rational fraction, function of pressure
     32  ! 1: tanh of altitude
    2733
    2834! Local variables:
     
    167173  !   --------------------------------------------------
    168174
    169   if (ok_strato .and. llm==39) then
     175  if (vert_prof_dissip == 1) then
    170176     do l=1,llm
    171177        pseudoz=8.*log(preff/presnivs(l))
  • LMDZ5/branches/testing/libf/dyn3dpar/leapfrog_p.F

    r1665 r1707  
    139139      REAL :: secondes
    140140
     141      logical :: physic
    141142      LOGICAL first,callinigrads
    142143
     
    208209
    209210      itau = 0
     211      physic=.true.
     212      if (iflag_phys==0.or.iflag_phys==2) physic=.false.
    210213!      iday = day_ini+itau/day_step
    211214!      time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
     
    364367     s        apdiss = .TRUE.
    365368         IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward
    366      s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
     369     s          .and. physic                        ) apphys = .TRUE.
    367370      ELSE
    368371      ! Leapfrog/Matsuno time stepping
     
    370373         IF( MOD(itau+1,dissip_period).EQ.0 .AND. .NOT. forward )
    371374     s        apdiss = .TRUE.
    372          IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE.
     375         IF( MOD(itau+1,iphysiq).EQ.0.AND.physic) apphys=.TRUE.
    373376      END IF
    374377
     
    707710           jD_cur = jD_ref + day_ini - day_ref
    708711     $        + itau/day_step
     712
     713           IF (planet_type .eq."generic") THEN
     714              ! AS: we make jD_cur to be pday
     715              jD_cur = int(day_ini + itau/day_step)
     716           ENDIF
     717
    709718           jH_cur = jH_ref + start_time +                                &
    710719     &              mod(itau,day_step)/float(day_step)
  • LMDZ5/branches/testing/libf/dyn3dpar/parallel.F90

    r1664 r1707  
    489489          enddo
    490490         
    491         endif
     491        else
     492          ! Ehouarn: When in debug mode, ifort complains (for call MPI_GATHERV
     493          !          below) about Buffer_Recv() being not allocated.
     494          !          So make a dummy allocation.
     495          allocate(Buffer_Recv(1))
     496        endif ! of if (MPI_Rank==rank)
    492497 
    493498!$OMP CRITICAL (MPI)
  • LMDZ5/branches/testing/libf/dyn3dpar/paramet.h

    r792 r1707  
    1717      INTEGER jcfil,jcfllm
    1818
    19       PARAMETER( iip1= iim+1-1/iim,iip2=iim+2,iip3=iim+3                &
     19      PARAMETER( iip1= iim+1,iip2=iim+2,iip3=iim+3                      &
    2020     &    ,jjp1=jjm+1-1/jjm)
    2121      PARAMETER( llmp1 = llm+1,  llmp2 = llm+2, llmm1 = llm-1 )
Note: See TracChangeset for help on using the changeset viewer.