Ignore:
Timestamp:
Nov 2, 2010, 12:38:23 PM (14 years ago)
Author:
emillour
Message:

Debut de mise a jour de la dynamique parallele par rapport aux modifs dans la partie sequentielle.

Mais NON TESTE , car pas (encore) possibilite de compiler et faire tourner cas simple (type newtonien sans physique).

Voir commit_v8.log pour les details.

Ehouarn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libf/dyn3dpar/infotrac.F90

    r7 r8  
    6565    INTEGER :: nqtrue  ! number of tracers read from tracer.def, without higer order of moment
    6666    INTEGER :: iq, new_iq, iiq, jq, ierr
    67 
     67 
    6868    character(len=*),parameter :: modname="infotrac_init"
    6969!-----------------------------------------------------------------------
     
    8484    descrq(30)='PRA'
    8585   
    86 
    87     IF (config_inca=='none') THEN
     86    IF (planet_type=='earth') THEN
     87     IF (config_inca=='none') THEN
    8888       type_trac='lmdz'
     89     ELSE
     90       type_trac='inca'
     91     END IF
    8992    ELSE
    90        type_trac='inca'
    91     END IF
     93     type_trac='plnt'  ! planets... May want to dissociate between each later.
     94    ENDIF
    9295
    9396!-----------------------------------------------------------------------
     
    97100!
    98101!-----------------------------------------------------------------------
    99     IF (type_trac == 'lmdz') THEN
     102    IF (planet_type=='earth') THEN
     103     IF (type_trac == 'lmdz') THEN
    100104       OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr)
    101105       IF(ierr.EQ.0) THEN
    102           WRITE(lunout,*) trim(modname),': Open traceur.def : ok'
     106          WRITE(lunout,*) 'Open traceur.def : ok'
    103107          READ(90,*) nqtrue
    104108       ELSE
    105           WRITE(lunout,*) trim(modname),': Problem in opening traceur.def'
    106           WRITE(lunout,*) trim(modname),': WARNING using defaut values'
     109          WRITE(lunout,*) 'Problem in opening traceur.def'
     110          WRITE(lunout,*) 'ATTENTION using defaut values'
    107111          nqtrue=4 ! Defaut value
    108112       END IF
    109        if ( planet_type=='earth') then
    110          ! For Earth, water vapour & liquid tracers are not in the physics
    111          nbtr=nqtrue-2
    112        else
    113          ! Other planets (for now); we have the same number of tracers
    114          ! in the dynamics than in the physics
    115          nbtr=nqtrue
    116        endif
    117     ELSE
     113       ! For Earth, water vapour & liquid tracers are not in the physics
     114       nbtr=nqtrue-2
     115     ELSE
    118116       ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F
    119117       nqtrue=nbtr+2
    120     END IF
    121 
    122     IF ((planet_type=="earth").and.(nqtrue < 2)) THEN
     118     END IF
     119
     120     IF (nqtrue < 2) THEN
    123121       WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum'
    124122       CALL abort_gcm('infotrac_init','Not enough tracers',1)
    125     END IF
     123     END IF
     124
     125    ELSE  ! not Earth
     126       OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr)
     127       IF(ierr.EQ.0) THEN
     128          WRITE(lunout,*) 'Open traceur.def : ok'
     129          READ(90,*) nqtrue
     130       ELSE
     131          WRITE(lunout,*) 'Problem in opening traceur.def'
     132          WRITE(lunout,*) 'ATTENTION using defaut values: nqtrue=1'
     133          nqtrue=1 ! Defaut value
     134       END IF
     135       ! Other planets (for now); we have the same number of tracers
     136       ! in the dynamics than in the physics
     137       nbtr=nqtrue
     138     
     139    ENDIF  ! planet_type
    126140!
    127141! Allocate variables depending on nqtrue and nbtr
     
    158172!    Get choice of advection schema from file tracer.def or from INCA
    159173!---------------------------------------------------------------------
    160     IF (type_trac == 'lmdz') THEN
     174    IF (planet_type=='earth') THEN
     175     IF (type_trac == 'lmdz') THEN
    161176       IF(ierr.EQ.0) THEN
    162177          ! Continue to read tracer.def
     
    194209       END DO
    195210
    196     ELSE  ! type_trac=inca : config_inca='aero' ou 'chem'
     211     ELSE  ! type_trac=inca : config_inca='aero' ou 'chem'
    197212! le module de chimie fournit les noms des traceurs
    198213! et les schemas d'advection associes.
     
    213228       END DO
    214229
    215     END IF ! type_trac
     230     END IF ! type_trac
     231
     232    ELSE  ! not Earth
     233       IF(ierr.EQ.0) THEN
     234          ! Continue to read tracer.def
     235          DO iq=1,nqtrue
     236             READ(90,999) hadv(iq),vadv(iq),tnom_0(iq)
     237          END DO
     238          CLOSE(90) 
     239       ELSE ! Without tracer.def
     240          hadv(1) = 10
     241          vadv(1) = 10
     242          tnom_0(1) = 'dummy'
     243       END IF
     244       
     245       WRITE(lunout,*) trim(modname),': Valeur de traceur.def :'
     246       WRITE(lunout,*) trim(modname),': nombre de traceurs ',nqtrue
     247       DO iq=1,nqtrue
     248          WRITE(lunout,*) hadv(iq),vadv(iq),tnom_0(iq)
     249       END DO
     250
     251    ENDIF  ! planet_type
    216252
    217253!-----------------------------------------------------------------------
     
    280316       tname(new_iq)= tnom_0(iq)
    281317       IF (iadv(new_iq)==0) THEN
    282           ttext(new_iq)=trim(str1)
     318          ttext(new_iq)=str1(1:lnblnk(str1))
    283319       ELSE
    284           ttext(new_iq)=trim(tnom_0(iq))//descrq(iadv(new_iq))
     320          ttext(new_iq)=str1(1:lnblnk(str1))//descrq(iadv(new_iq))
    285321       END IF
    286322
Note: See TracChangeset for help on using the changeset viewer.