caladvtrac.f90 Source File


This file depends on

sourcefile~~caladvtrac.f90~~EfferentGraph sourcefile~caladvtrac.f90 caladvtrac.f90 sourcefile~paramet_mod_h.f90 paramet_mod_h.f90 sourcefile~caladvtrac.f90->sourcefile~paramet_mod_h.f90 sourcefile~control_mod.f90 control_mod.f90 sourcefile~caladvtrac.f90->sourcefile~control_mod.f90 sourcefile~infotrac.f90 infotrac.f90 sourcefile~caladvtrac.f90->sourcefile~infotrac.f90 sourcefile~comconst_mod.f90 comconst_mod.f90 sourcefile~caladvtrac.f90->sourcefile~comconst_mod.f90 sourcefile~infotrac.f90->sourcefile~control_mod.f90 sourcefile~iniprint_mod_h.f90 iniprint_mod_h.f90 sourcefile~infotrac.f90->sourcefile~iniprint_mod_h.f90 sourcefile~lmdz_cppkeys_wrapper.f90 lmdz_cppkeys_wrapper.F90 sourcefile~infotrac.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~strings_mod.f90 strings_mod.f90 sourcefile~infotrac.f90->sourcefile~strings_mod.f90 sourcefile~readtracfiles_mod.f90 readTracFiles_mod.f90 sourcefile~infotrac.f90->sourcefile~readtracfiles_mod.f90 sourcefile~lmdz_reprobus_wrappers.f90 lmdz_reprobus_wrappers.F90 sourcefile~infotrac.f90->sourcefile~lmdz_reprobus_wrappers.f90 sourcefile~readtracfiles_mod.f90->sourcefile~strings_mod.f90 sourcefile~ioipsl_getin_p_mod.f90 ioipsl_getin_p_mod.f90 sourcefile~readtracfiles_mod.f90->sourcefile~ioipsl_getin_p_mod.f90 sourcefile~mod_grid_phy_lmdz.f90 mod_grid_phy_lmdz.f90 sourcefile~lmdz_reprobus_wrappers.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~strings_mod.f90 sourcefile~mod_phys_lmdz_para.f90 mod_phys_lmdz_para.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~mod_phys_lmdz_transfert_para.f90 mod_phys_lmdz_transfert_para.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_phys_lmdz_mpi_data.f90 mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~print_control_mod.f90 print_control_mod.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~print_control_mod.f90 sourcefile~mod_phys_lmdz_omp_data.f90 mod_phys_lmdz_omp_data.F90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_omp_data.f90 sourcefile~mod_phys_lmdz_omp_transfert.f90 mod_phys_lmdz_omp_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_omp_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90 mod_phys_lmdz_mpi_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_mpi_transfert.f90 sourcefile~mod_phys_lmdz_omp_transfert.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_omp_transfert.f90->sourcefile~mod_phys_lmdz_omp_data.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~print_control_mod.f90 sourcefile~lmdz_mpi.f90 lmdz_mpi.F90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~print_control_mod.f90 sourcefile~dimphy.f90 dimphy.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~dimphy.f90

Contents

Source Code


Source Code

!
! $Id: caladvtrac.f90 5285 2024-10-28 13:33:29Z abarral $
!
!
!
      SUBROUTINE caladvtrac(q,pbaru,pbarv , &
              p ,masse, dq ,  teta, &
              flxw, pk)
  !
  USE infotrac, ONLY : nqtot
  USE control_mod, ONLY : iapp_tracvl,planet_type
  USE comconst_mod, ONLY: dtvr

  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
USE paramet_mod_h
IMPLICIT NONE
  !
  ! Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron
  !
  ! F.Codron (10/99) : ajout humidite specifique pour eau vapeur
  !=======================================================================
  !
  !   Shema de  Van Leer
  !
  !=======================================================================





  !   Arguments:
  !   ----------
  REAL :: pbaru( ip1jmp1,llm ),pbarv( ip1jm,llm),masse(ip1jmp1,llm)
  REAL :: p( ip1jmp1,llmp1),q( ip1jmp1,llm,nqtot)
  real :: dq(ip1jmp1,llm,nqtot)
  REAL :: teta( ip1jmp1,llm),pk( ip1jmp1,llm)
  REAL               :: flxw(ip1jmp1,llm)

  !  ..................................................................
  !
  !  .. dq n'est utilise et dimensionne que pour l'eau  vapeur et liqu.
  !
  !  ..................................................................
  !
  !   Local:
  !   ------

  EXTERNAL  advtrac,minmaxq, qminimum
  INTEGER :: ij,l, iq, iapptrac
  REAL :: finmasse(ip1jmp1,llm), dtvrtrac

  !c
  !
  ! Earth-specific stuff for the first 2 tracers (water)
  if (planet_type.eq."earth") then
  ! initialisation
  ! CRisi: il faut gérer tous les traceurs si on veut pouvoir faire des
  ! isotopes
     ! dq(:,:,1:2)=q(:,:,1:2)
    dq(:,:,1:nqtot)=q(:,:,1:nqtot)

  !  test des valeurs minmax
  !c        CALL minmaxq(q(1,1,1),1.e33,-1.e33,'Eau vapeur (a) ')
  !c        CALL minmaxq(q(1,1,2),1.e33,-1.e33,'Eau liquide(a) ')
  endif ! of if (planet_type.eq."earth")
  !   advection

    CALL advtrac( pbaru,pbarv, &
          p,  masse,q,iapptrac, teta, &
          flxw, pk)

  !

  IF( iapptrac.EQ.iapp_tracvl ) THEN
    if (planet_type.eq."earth") then
  ! Earth-specific treatment for the first 2 tracers (water)
  !
  !c          CALL minmaxq(q(1,1,1),1.e33,-1.e33,'Eau vapeur     ')
  !c          CALL minmaxq(q(1,1,2),1.e33,-1.e33,'Eau liquide    ')

  !c     ....  Calcul  de deltap  qu'on stocke dans finmasse   ...
  !
      DO l = 1, llm
       DO ij = 1, ip1jmp1
         finmasse(ij,l) =  p(ij,l) - p(ij,l+1)
       ENDDO
      ENDDO

      ! !write(*,*) 'caladvtrac 87'
      CALL qminimum( q, nqtot, finmasse )
      ! !write(*,*) 'caladvtrac 89'

      CALL SCOPY   ( ip1jmp1*llm, masse, 1, finmasse,       1 )
      CALL filtreg ( finmasse ,  jjp1,  llm, -2, 2, .TRUE., 1 )
  !
  !   *****  Calcul de dq pour l'eau , pour le passer a la physique ******
  !   ********************************************************************
  !
      dtvrtrac = iapp_tracvl * dtvr
  !
       DO iq = 1 , nqtot
        DO l = 1 , llm
         DO ij = 1,ip1jmp1
         dq(ij,l,iq) = ( q(ij,l,iq) - dq(ij,l,iq) ) * finmasse(ij,l) &
               /  dtvrtrac
         ENDDO
        ENDDO
       ENDDO
  !
    endif ! of if (planet_type.eq."earth")
  ELSE
    if (planet_type.eq."earth") then
  ! Earth-specific treatment for the first 2 tracers (water)
      dq(:,:,1:nqtot)=0.
    endif ! of if (planet_type.eq."earth")
  ENDIF ! of IF( iapptrac.EQ.iapp_tracvl )

END SUBROUTINE caladvtrac