Changeset 1787 for trunk


Ignore:
Timestamp:
Sep 25, 2017, 4:02:05 PM (7 years ago)
Author:
jvatant
Message:

Fixed a bug in calchim and physiq_mod on conversion of tendencies to 3D and molar ratio / mass ratio

-> we assume same 2D relative tendency on all lat in calchim and adjust longitudinal variations

--JVO

Location:
trunk/LMDZ.TITAN
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/README

    r1764 r1787  
    13221322 - Added a tmpk variable
    13231323 - Save ~ 50% time on the RT, ~30% on the whole code on the tested simulations
     1324
     1325== 25/09/2017 == JVO
     1326Fixed a bug in calchim and physiq_mod on conversion of tendencies to 3D and molar ratio / mass ratio
     1327 ->  we assume same 2D relative tendency on all lat in calchim and adjust longitudinal variations
  • trunk/LMDZ.TITAN/libf/phytitan/calchim.F90

    r1672 r1787  
    277277!                BOUCLE SUR LES LATITUDES
    278278!
     279!                * Permet de faire le calcul une seule fois par lat
     280!
    279281      DO j=1,nlon
    280282     
     
    492494!              FIN: BOUCLE SUR LES LATITUDES
    493495
    494       else      ! same latitude, we don't do calculations again
    495         dqyc(j,:,:) = dqyc(jm1,:,:)
     496      else      ! same latitude, we don't do calculations again, only adjust longitudinal variations
     497        dqyc(j,:,:) = dqyc(jm1,:,:)/qy_c(jm1,:,:)*qy_c(j,:,:)
    496498      endif
    497499
  • trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90

    r1722 r1787  
    380380     
    381381      real ychim(ngrid,nlayer,nq-nmicro)   
     382
     383      real rat_mmol(nq) ! Molar fraction ratio
    382384
    383385      ! 2D vmr tendencies ( chemistry and condensation )
     
    470472         endif
    471473
     474         rat_mmol(:) = mmol(:) / mugaz
    472475
    473476!        Read 'startfi.nc' file.
     
    10051008         if (callchim) then
    10061009
     1010            ! Utilisation de la moyenne zonale dans calchim
    10071011            zplev(:,:) = zplevbar(:,:)
    10081012            zplay(:,:) = zplaybar(:,:)
     
    10131017            if (nq.gt.nmicro) then
    10141018               do iq = nmicro+1,nq
    1015                   ychim(:,:,iq-nmicro) = pq(:,:,iq)
     1019                  ychim(:,:,iq-nmicro) = pq(:,:,iq) * rat_mmol(iq) ! convert to molar fraction
    10161020               enddo
    10171021            endif
     
    10401044           
    10411045            if (nq.gt.nmicro) then
    1042                ! We convert tendencies back to 3D and mass mixing ratio
     1046               ! We convert tendencies back to mass mixing ratio
    10431047               do iq=nmicro+1,nq
    1044                   zdqchi(:,:,iq) = dycchi(:,:,iq-nmicro)*pq(:,:,iq) / ychim(:,:,iq-nmicro)
    1045                   zdqmph(:,:,iq) = dycmph(:,:,iq-nmicro)*pq(:,:,iq) / ychim(:,:,iq-nmicro)
     1048                  zdqchi(:,:,iq) = dycchi(:,:,iq-nmicro) / rat_mmol(iq)
     1049                  zdqmph(:,:,iq) = dycmph(:,:,iq-nmicro) / rat_mmol(iq)
    10461050               enddo
    10471051
Note: See TracChangeset for help on using the changeset viewer.