Changeset 3853 for trunk/LMDZ.PLUTO/libf


Ignore:
Timestamp:
Jul 17, 2025, 4:36:29 AM (10 days ago)
Author:
tbertrand
Message:

Pluto PCM:
Implementing the CO cycle in the mode no_n2frost in the VTM and GCM
TB

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/cosurf.F

    r3844 r3853  
    22     &  tsurf,pplev,pdpsurf,pq,pdq,pqsurf,pdqsurf,pdqco,pdqsco)
    33       
    4       use callkeys_mod, only: dayfrac
     4      use callkeys_mod, only: dayfrac,no_n2frost
    55      use comcstfi_mod, only: g, r
    66      use comgeomfi_h
     
    5252      DATA vonk/0.4/
    5353     
     54      LOGICAL firstcall
     55      SAVE firstcall
     56      real,dimension(:),save,allocatable :: qsat_co_factor ! factor to prevent co frost formation if no n2 frost
     57!$OMP THREADPRIVATE(qsat_co_factor)
     58
     59      IF (firstcall) THEN
     60        firstcall=.false.
     61        ! If fixed distribution of N2, then no CO frost either
     62        ALLOCATE(qsat_co_factor(ngrid))
     63        qsat_co_factor(:)=1.
     64        IF (no_n2frost) then
     65           DO ig=1,ngrid
     66              if (pqsurf(ig,igcm_n2).eq.0.) then
     67                   qsat_co_factor(ig) = 1.e6
     68              endif
     69           ENDDO
     70        ENDIF
     71      ENDIF
     72
    5473      ! Calculation of turbulent flux : F=rho*cdrag*uv*(qsat-zq)
    5574   
  • trunk/LMDZ.PLUTO/libf/phypluto/vdifc_pluto_mod.F90

    r3844 r3853  
    100100      REAL zcst1
    101101      REAL zu2
    102       REAL qsat_co_factor(ngrid)   ! factor to prevent co frost formation if no n2 frost
    103102      EXTERNAL SSUM,SCOPY
    104103      REAL SSUM
    105104      LOGICAL firstcall
    106105      SAVE firstcall
     106      real,dimension(:),save,allocatable :: qsat_co_factor ! factor to prevent co frost formation if no n2 frost
     107!$OMP THREADPRIVATE(qsat_co_factor)
    107108
    108109      !!read fixed profile for kmix
     
    161162
    162163        ! If fixed distribution of N2, then no CO frost either
     164        ALLOCATE(qsat_co_factor(ngrid))
    163165        qsat_co_factor(:)=1.
    164166        IF (no_n2frost) then
     
    662664            !! Prevent CO condensation at the surface
    663665            if (.not.condcosurf) then
    664                qsat_co=qsat_co*1.e6
     666               qsat_co(:)=qsat_co(:)*1.e6
    665667            endif
    666668            if (no_n2frost) then
    667                qsat_co=qsat_co*qsat_co_factor     
     669               qsat_co(:)=qsat_co(:)*qsat_co_factor(:)     
    668670            endif
    669671
Note: See TracChangeset for help on using the changeset viewer.