Changeset 4185 for trunk/LMDZ.VENUS


Ignore:
Timestamp:
Apr 13, 2026, 4:04:43 PM (4 weeks ago)
Author:
flefevre
Message:

Bug fix in mean Cp calculation used in the physics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/libf/phyvenus/concentrations2.F

    r3884 r4185  
    210210      end do
    211211
    212 
    213212!     update mass mixing ratio tracers
    214213
     
    216215         do ig = 1,klon
    217216            do i = 1,nqmx
    218 !               iq = niq(i)
    219217               zq(ig,l,i) = max(1.e-30, tr_seri(ig,l,i))
    220218            end do
     
    232230         do ig = 1,klon
    233231            do i = 1,nqmx-nmicro
    234 c               iq = niq(i)
    235232               mmean(ig,l) = mmean(ig,l) + zq(ig,l,i)/M_tr(i)
    236233            end do
     
    248245
    249246      do l = 1,klev
    250           do ig = 1,klon
    251 
    252             ntot = pplay(ig,l)/(RKBOL*zt(ig,l))*1.e-6  ! in #/cm3
     247         do ig = 1,klon
     248
     249            ntot = pplay(ig,l)/(RKBOL*zt(ig,l))*1.e-6       ! in #/cm3
    253250            rho(ig,l) = (ntot * mmean(ig,l))/RNAVO*1.e3     ! in kg/m3
    254 
    255 c            write(*,*),'Air density: ',ig, l, rho(0,l)           
    256 
    257 !!  WARNING -> Cp here below doesn't depend on T (cpdet)
    258251
    259252            do i = 1,nbq
    260253               iq = niq(i)
     254               if (iq == i_co2) then
     255                 cpnew(ig,l) = cpnew(ig,l) + zq(ig,l,iq)*cpdet(zt(ig,l))
     256               else
     257                 cpnew(ig,l) = cpnew(ig,l) + zq(ig,l,iq)*cpi(i)
     258               end if
    261259               ni(i) = ntot*zq(ig,l,iq)*mmean(ig,l)/M_tr(iq)
    262 !! On a une super formule pour calculer cp_co2 sur Venus
    263                if (iq == i_co2) then
    264                   cpnew(ig,l) = cpnew(ig,l) + ni(i)*cpdet(zt(ig,l))
    265                else
    266                   cpnew(ig,l) = cpnew(ig,l) + ni(i)*cpi(i)
    267                end if
    268260               akknew(ig,l) = akknew(ig,l) + ni(i)*aki(i)
    269261            end do
    270262 
    271             cpnew(ig,l) = cpnew(ig,l)/ntot
    272263            akknew(ig,l)= akknew(ig,l)/ntot
    273264
    274 
    275           end do
    276        end do
     265         end do
     266      end do
    277267
    278268      return
Note: See TracChangeset for help on using the changeset viewer.