Changeset 2217


Ignore:
Timestamp:
Jan 14, 2020, 8:50:50 AM (5 years ago)
Author:
emillour
Message:

Mars GCM:
Bug fix in newstart "composition" option; added option "q=factor" in
newstart to multiply a tracer mixing ratio by a constant factor.
EM

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2214 r2217  
    28222822begining of the run.
    28232823
     2824== 14/01/2020 == EM
     2825Bug fix in newstart "composition" option; added option "q=factor" in
     2826newstart to multiply a tracer mixing ratio by a constant factor.
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F

    r2175 r2217  
    500500      write(*,*) 'qname        : change tracer name'
    501501      write(*,*) 'q=0          : ALL tracer =zero'
     502      write(*,*) 'q=factor     : change tracer value by a multiplicative
     503     & factor'
    502504      write(*,*) 'q=x          : give a specific uniform value to one
    503505     $ tracer'
     
    770772             ENDDO
    771773           ENDDO
     774
     775c       q=factor : change value of tracer by a multiplicative factor
     776c       ------------------------------------------------------------
     777        else if (trim(modif) .eq. 'q=factor') then
     778             write(*,*) 'Which tracer do you want to modify ?'
     779             do iq=1,nqtot
     780               write(*,*)iq,' : ',trim(tname(iq))
     781             enddo
     782             write(*,*) '(choose between 1 and ',nqtot,')'
     783             read(*,*) iq
     784             if ((iq.lt.1).or.(iq.gt.nqtot)) then
     785               ! wrong value for iq, go back to menu
     786               write(*,*) "wrong input value:",iq
     787               cycle
     788             endif
     789             write(*,*)"factor to multiply current mixing ratio by?"
     790             read(*,*) val
     791             
     792             q(1:iip1,1:jjp1,1:llm,iq)=q(1:iip1,1:jjp1,1:llm,iq)*val
     793             qsurf(1:ngridmx,iq)=qsurf(1:ngridmx,iq)*val
    772794
    773795c       q=x : initialise tracer manually
     
    10191041       !   molar mass of non-co2 atmosphere measured by MSL at Ls ~184
    10201042       
    1021            write(*,*)
     1043          else
     1044            ! Assume co2/n2/ar/o2/co are available
     1045            Mair_old=(q(iref,jref,1,igcm_co2)*mmol(igcm_co2)
     1046     &               +q(iref,jref,1,igcm_n2)*mmol(igcm_n2)
     1047     &               +q(iref,jref,1,igcm_ar)*mmol(igcm_ar)
     1048     &               +q(iref,jref,1,igcm_o2)*mmol(igcm_o2)
     1049     &               +q(iref,jref,1,igcm_co)*mmol(igcm_co))/Smmr
     1050          end if
     1051
     1052          write(*,*)
    10221053     &      "Air molar mass (g/mol) at reference site= ",Mair_old
    1023           end if
    10241054
    10251055        ! Ask for new volume mixing ratio at reference site
     
    11141144           enddo
    11151145          enddo
    1116 
    1117 
    1118 !          do l=1,llm
    1119 !           do j=1,jjp1
    1120 !            do i=1,iip1
    1121 !              Smmr_old = 0.
    1122 !              Smmr_new = 0.
    1123 !              do iq=1,nqtot 
    1124 !                if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2)
    1125 !     &          .or.(iq.eq.igcm_ar)
    1126 !     &          .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)) then
    1127 !                   Smmr_old = Smmr_old + q(i,j,l,iq) ! sum of old mmr
    1128 !                   q(i,j,l,iq)=q(i,j,l,iq)*coefvmr(iq)*Mair_old/Mair_new
    1129 !                   Smmr_new = Smmr_new + q(i,j,l,iq) ! sum of new mmr
    1130 !                end if
    1131 !              enddo
    1132 !              iloc = maxloc(q(i,j,l,:))
    1133 !              iqmax = iloc(1)
    1134 !              q(i,j,l,iqmax) = q(i,j,l,iqmax) + Smmr_old - Smmr_new
    1135 !            enddo
    1136 !           enddo
    1137 !          enddo
    11381146
    11391147          write(*,*)
Note: See TracChangeset for help on using the changeset viewer.