Ignore:
Timestamp:
Nov 2, 2021, 3:54:30 PM (3 years ago)
Author:
Ehouarn Millour
Message:

Cleanup for tracers. Stop if there is no "traceur.def" file to read, rather than try to guess number and type of tracers.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d_common/infotrac.F90

    r3945 r3998  
    219219          write(lunout,*) 'nqtrue=',nqtrue
    220220       ELSE
    221           WRITE(lunout,*) trim(modname),': Problem in opening traceur.def'
    222           WRITE(lunout,*) trim(modname),': WARNING using defaut values'
    223           IF (planet_type=='earth') THEN
    224             nqtrue=4 ! Default value for Earth
    225           ELSE
    226             nqtrue=1 ! Default value for other planets
    227           ENDIF
     221          WRITE(lunout,*) trim(modname),': Failed opening traceur.def'
     222          CALL abort_gcm(modname,"file traceur.def not found!",1)
    228223       ENDIF
    229224!jyg<
     
    251246          READ(90,*) nqo
    252247       ELSE
    253           WRITE(lunout,*) trim(modname),': Using default value for nqo'
    254           nqo=2
     248          WRITE(lunout,*) trim(modname),': Failed opening traceur.def'
     249          CALL abort_gcm(modname,"file traceur.def not found!",1)
    255250       ENDIF
    256251       IF (nqo /= 2 .AND. nqo /= 3 ) THEN
     
    321316!---------------------------------------------------------------------
    322317    IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag' .OR. type_trac == 'co2i') THEN
    323 
    324        IF(ierr.EQ.0) THEN
    325318
    326319          ! Continue to read tracer.def
     
    370363          CLOSE(90) 
    371364
    372        ELSE ! Without tracer.def, set default values
    373 
    374          if (planet_type=="earth") then
    375           ! for Earth, default is to have 4 tracers
    376           hadv(1) = 14
    377           vadv(1) = 14
    378           tnom_0(1) = 'H2Ov'
    379           tnom_transp(1) = 'air'
    380           hadv(2) = 10
    381           vadv(2) = 10
    382           tnom_0(2) = 'H2Ol'
    383           tnom_transp(2) = 'air'
    384           hadv(3) = 10
    385           vadv(3) = 10
    386           tnom_0(3) = 'RN'
    387           tnom_transp(3) = 'air'
    388           hadv(4) = 10
    389           vadv(4) = 10
    390           tnom_0(4) = 'PB'
    391           tnom_transp(4) = 'air'
    392          else ! default for other planets
    393           hadv(1) = 10
    394           vadv(1) = 10
    395           tnom_0(1) = 'dummy'
    396           tnom_transp(1) = 'dummy'
    397          endif ! of if (planet_type=="earth")
    398 
    399        ENDIF
    400        
    401365       WRITE(lunout,*) trim(modname),': Valeur de traceur.def :'
    402366       WRITE(lunout,*) trim(modname),': nombre total de traceurs ',nqtrue
     
    480444! et les schemas d'advection associes. excepte pour ceux lus
    481445! dans traceur.def
    482        IF (ierr .eq. 0) then
    483446
    484447          DO iq=1,nqo+nqCO2
     
    530493          CLOSE(90) 
    531494
    532        ELSE  !! if traceur.def doesn't exist
    533 
    534           tnom_0(1)='H2Ov'
    535           tnom_transp(1) = 'air'
    536           tnom_0(2)='H2Ol'
    537           tnom_transp(2) = 'air'
    538           hadv(1) = 10
    539           hadv(2) = 10
    540           vadv(1) = 10
    541           vadv(2) = 10
    542 
    543        ENDIF
    544495 
    545496#ifdef INCA
Note: See TracChangeset for help on using the changeset viewer.