Changeset 321 for trunk


Ignore:
Timestamp:
Oct 21, 2011, 10:20:46 AM (14 years ago)
Author:
emillour
Message:

Mars GCM:

  • Corrected small bug in newstart: initracer was not always used and thus some tracer indexes (igm_co2, igcm_h2o_vap,...) were not set. This however means that we now also call inifis from newstart and that we read in flags set in 'callphys.def' (required for sanity checks in initracer). Also adapted 'inichim_readcallphys': removed some obsolescent tests on number of tracers for given combinations of options.

EM

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r320 r321  
    10861086  are put in the diagfi.nc file (as was the case before).
    10871087 
     1088== 21/10/2011 == EM
     1089- Corrected small bug in newstart: initracer was not always used and thus
     1090  some tracer indexes (igm_co2, igcm_h2o_vap,...) were not set. This
     1091  however means that we now also call inifis from newstart and that we read
     1092  in flags set in 'callphys.def' (required for sanity checks in initracer).
     1093  Also adapted 'inichim_readcallphys': removed some obsolescent tests on
     1094  number of tracers for given combinations of options.
  • trunk/LMDZ.MARS/libf/aeronomars/inichim_readcallphys.F

    r38 r321  
    209209
    210210! Test of incompatibility:
    211 ! if doubleq is used, then dustbin should be 1
    212 
    213          if (doubleq.and.(dustbin.ne.1)) then
    214            print*,'if doubleq is used, then dustbin should be 1'
     211! if doubleq is used, then dustbin should be at least 2
     212
     213         if (doubleq.and.(dustbin.lt.2)) then
     214           print*,'if doubleq is used, then dustbin should be > 1'
    215215           stop
    216216         endif
     
    451451         print*,' 1 water vapour tracer'
    452452         print*,' 1 water ice tracer'
    453          if (nqmx.ne.4) then
    454            print*,'nqmx should be 4 with these options.'
     453         if (nqmx.lt.4) then
     454           print*,'nqmx should be at least 4 with these options.'
    455455                   print*,'(or check callphys.def)'
    456456           stop
     
    458458       endif
    459459
    460        if ((doubleq).and..not.(h2o)) then
     460!       if ((doubleq).and..not.(h2o)) then
    461461!         print*,' 1: dust ; 2: dust (doubleq)'
    462          print*,' 2 dust tracers (doubleq)'
    463          if (nqmx.ne.2) then
    464            print*,'nqmx should be 2 with these options...'
    465                    print*,'(or check callphys.def)'
    466            stop
    467          endif
    468        endif
    469 
    470        if (.not.(doubleq).and.(h2o).and.
    471      $     (chem)) then
    472          if (dustbin.gt.0) then
     462!         print*,' 2 dust tracers (doubleq)'
     463!         if (nqmx.ne.2) then
     464!           print*,'nqmx should be 2 with these options...'
     465!                  print*,'(or check callphys.def)'
     466!           stop
     467!         endif
     468!       endif
     469
     470!       if (.not.(doubleq).and.(h2o).and.
     471!     $     (chem)) then
     472!         if (dustbin.gt.0) then
    473473!           print*,' 1 to ',dustbin,': dust bins'
    474            print*,dustbin,' dust bins'
    475          endif
     474!           print*,dustbin,' dust bins'
     475!         endif
    476476!         print*,nqchem_min,' to ',nqmx-2,': chemistry'
    477477!         print*,nqmx-1,': water ice ; ',nqmx,': water vapor'
    478          print*,nqmx-2-dustbin,' chemistry tracers'
    479          print*,' 1 water vapour tracer'
    480          print*,' 1 water ice tracer'
    481        endif
    482 
    483        if (.not.(doubleq).and.(h2o).and.
    484      $     .not.(chem)) then
    485          if (dustbin.gt.0) then
     478!         print*,nqmx-2-dustbin,' chemistry tracers'
     479!         print*,' 1 water vapour tracer'
     480!         print*,' 1 water ice tracer'
     481!       endif
     482
     483!       if (.not.(doubleq).and.(h2o).and.
     484!     $     .not.(chem)) then
     485!         if (dustbin.gt.0) then
    486486!           print*,' 1 to ',dustbin,': dust bins'
    487            print*,dustbin,' dust bins'
    488          endif
     487!           print*,dustbin,' dust bins'
     488!         endif
    489489!         print*,nqmx-1,': water ice ; ',nqmx,': water vapor'
    490          print*,' 1 water vapour tracer'
    491          print*,' 1 water ice tracer'
    492          if (nqmx.ne.(dustbin+2)) then
    493            print*,'nqmx should be ',(dustbin+2),
    494      $            ' with these options...'
    495                    print*,'(or check callphys.def)'
    496            stop
    497          endif
    498        endif
    499 
    500        if (.not.(doubleq).and..not.(h2o)) then
    501          if (dustbin.gt.0) then
     490!         print*,' 1 water vapour tracer'
     491!         print*,' 1 water ice tracer'
     492!         if (nqmx.ne.(dustbin+2)) then
     493!           print*,'nqmx should be ',(dustbin+2),
     494!     $            ' with these options...'
     495!                  print*,'(or check callphys.def)'
     496!           stop
     497!         endif
     498!       endif
     499
     500!       if (.not.(doubleq).and..not.(h2o)) then
     501!         if (dustbin.gt.0) then
    502502!           print*,' 1 to ',dustbin,': dust bins'
    503            print*,dustbin,' dust bins'
    504            if (nqmx.ne.dustbin) then
    505              print*,'nqmx should be ',dustbin,
    506      $              ' with these options...'
    507              print*,'(or check callphys.def)'
    508              stop
    509            endif
    510          else
    511            print*,'dustbin=',dustbin,
    512      $            ': tracer should be F with these options...'
    513      $           ,'UNLESS you just want to move tracers around '
    514          endif
    515        endif
     503!           print*,dustbin,' dust bins'
     504!           if (nqmx.ne.dustbin) then
     505!             print*,'nqmx should be ',dustbin,
     506!     $              ' with these options...'
     507!             print*,'(or check callphys.def)'
     508!             stop
     509!           endif
     510!         else
     511!           print*,'dustbin=',dustbin,
     512!     $            ': tracer should be F with these options...'
     513!     $           ,'UNLESS you just want to move tracers around '
     514!         endif
     515!       endif
    516516
    517517      endif ! of if (tracer)
  • trunk/LMDZ.MARS/libf/dyn3d/newstart.F

    r224 r321  
    347347      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi)
    348348
     349! also initialize various physics flags/settings which might be needed
     350!    (for instance initracer needs to know about some flags, and/or
     351!      'datafile' path may be changed by user)
     352      call inifis(ngridmx,llm,day_ini,daysec,dtphys,
     353     &                latfi,lonfi,airefi,rad,g,r,cpp)
     354
    349355c=======================================================================
    350356c   lecture topographie, albedo, inertie thermique, relief sous-maille
     
    361367        relief="mola"
    362368c     enddo
    363 
    364 ! before using datareadnc, "datafile" must be set (normaly done in inifis)
    365       datafile="/u/forget/WWW/datagcm/datafile" ! default value
    366       call getin("datadir",datafile) ! in case user specified another path
    367369
    368370      CALL datareadnc(relief,phis,alb,surfith,z0S,
     
    457459        tnom(1:nqmx)=noms(1:nqmx)
    458460        write(*,*) 'Newstart: updated tracer names'
     461      else
     462       ! initialize tracer names and indexes (igcm_co2, igcm_h2o_vap, ...)
     463        call initracer(qsurf,co2ice)
    459464      endif
    460465
     
    883888          DO l=1,llm
    884889            DO j=1,jjp1
    885               DO i=1,iip1
     890              DO i=1,iip1-1
    886891                q(i,j,l,igcm_h2o_vap)=150.e-6 * (rlatu(j)+pi/2.) / pi
    887892              ENDDO
     893              ! We want to have the very same value at lon -180 and lon 180
     894              q(iip1,j,l,igcm_h2o_vap) = q(1,j,l,igcm_h2o_vap)
    888895            ENDDO
    889896          ENDDO
Note: See TracChangeset for help on using the changeset viewer.