Ignore:
Timestamp:
Jun 11, 2020, 9:35:53 PM (5 years ago)
Author:
jvatant
Message:

Titan GCM:Fix missing MESOSCALE cpp key in calchim

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/phytitan/calchim.F90

    r2326 r2368  
    6767  USE comcstfi_mod, ONLY: g, rad, pi, r, kbol
    6868  USE geometry_mod, ONLY: latitude
     69#ifndef MESOSCALE 
    6970  USE logic_mod, ONLY: moyzon_ch
    7071  USE moyzon_mod, ONLY: tmoy, playmoy
     72#endif
    7173
    7274  IMPLICIT NONE
     
    223225     PRINT*,'Init chemistry : pressure, density, temperature ... :'
    224226     PRINT*,'level, press_c (mbar), nb (cm-3), temp_c (K)'
    225      
     227
     228#ifndef MESOSCALE
     229!! JVO 20 : I put this CPP key because mesoscale cannot access tmoy and playmoy,
     230!  you should fix this when you will propeerly use chemistry !
     231
    226232     IF (ngrid.NE.1) THEN
    227233       DO l=1,klev
     
    232238       ENDDO
    233239     ELSE
     240#endif
    234241       DO l=1,klev
    235242          temp_c(l)  = ctemp(1,l)                             ! K
     
    238245          PRINT*, l, press_c(l), nb(l), temp_c(l)
    239246       ENDDO
     247#ifndef MESOSCALE
    240248     ENDIF
     249#endif
    241250
    242251     ! b. Extension in upper atmosphere with Vervack profile
     
    349358     ! -------------------------------------------------------------------------------------------------------
    350359
     360#ifndef MESOSCALE
    351361     IF ( ( moyzon_ch .AND. ( ig.EQ.1 .OR. (ABS(latitude(ig)-latitude(igm1)).GT.0.1*pi/180.0)) ) .OR. (.NOT. moyzon_ch) ) THEN
    352 
     362#endif
    353363        ! 1. Compute altitude for the grid point with hydrostat. equilib.
    354364        ! ---------------------------------------------------------------
     
    365375           nb(l)      = 1.e-4*press_c(l) / (kbol*temp_c(l))  ! cm-3
    366376        ENDDO
    367         rinter(klev+1)=(czlev(ig,klev+1)+rad)/1000.
     377        rinter(klev+1)=( (czlay(ig,klev) + ( czlay(ig,klev) - czlev(ig,klev))) +rad )/1000. ! You shall not use czlev(zlev+1) whose value is 1.e7 !
    368378
    369379        ! b. Extension in upper atmosphere with Vervack profile
     
    524534        ! NB: The full vertical composition grid will be created only for the outputs
    525535
    526 
     536#ifndef MESOSCALE
    527537     ELSE ! In 2D chemistry, if following grid point at same latitude, same zonal mean so don't do calculations again !
    528538        dqyc(ig,:,:)    = dqyc(igm1,:,:) ! will be put back in 3D with longitudinal variations assuming same relative tendencies within a lat band
    529539        ykim_up(:,ig,:) = ykim_up(:,igm1,:) ! no horizontal mixing in upper layers -> no longitudinal variations
    530540     ENDIF
     541#endif
    531542
    532543  ENDDO
Note: See TracChangeset for help on using the changeset viewer.