dissip_loc.f90 Source File


This file depends on

sourcefile~~dissip_loc.f90~~EfferentGraph sourcefile~dissip_loc.f90 dissip_loc.f90 sourcefile~parallel_lmdz.f90 parallel_lmdz.F90 sourcefile~dissip_loc.f90->sourcefile~parallel_lmdz.f90 sourcefile~comconst_mod.f90 comconst_mod.f90 sourcefile~dissip_loc.f90->sourcefile~comconst_mod.f90 sourcefile~paramet_mod_h.f90 paramet_mod_h.f90 sourcefile~dissip_loc.f90->sourcefile~paramet_mod_h.f90 sourcefile~comdissnew_mod_h.f90 comdissnew_mod_h.f90 sourcefile~dissip_loc.f90->sourcefile~comdissnew_mod_h.f90 sourcefile~comgeom_mod_h.f90 comgeom_mod_h.f90 sourcefile~dissip_loc.f90->sourcefile~comgeom_mod_h.f90 sourcefile~dissip_mod.f90 dissip_mod.f90 sourcefile~dissip_loc.f90->sourcefile~dissip_mod.f90 sourcefile~write_field_loc.f90 write_field_loc.f90 sourcefile~dissip_loc.f90->sourcefile~write_field_loc.f90 sourcefile~comdissipn_mod_h.f90 comdissipn_mod_h.f90 sourcefile~dissip_loc.f90->sourcefile~comdissipn_mod_h.f90 sourcefile~parallel_lmdz.f90->sourcefile~paramet_mod_h.f90 sourcefile~vampir.f90 vampir.F90 sourcefile~parallel_lmdz.f90->sourcefile~vampir.f90 sourcefile~lmdz_mpi.f90 lmdz_mpi.F90 sourcefile~parallel_lmdz.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_const_mpi.f90 mod_const_mpi.f90 sourcefile~parallel_lmdz.f90->sourcefile~mod_const_mpi.f90 sourcefile~iniprint_mod_h.f90 iniprint_mod_h.f90 sourcefile~parallel_lmdz.f90->sourcefile~iniprint_mod_h.f90 sourcefile~control_mod.f90 control_mod.f90 sourcefile~parallel_lmdz.f90->sourcefile~control_mod.f90 sourcefile~wxios_mod.f90 wxios_mod.F90 sourcefile~parallel_lmdz.f90->sourcefile~wxios_mod.f90 sourcefile~comgeom_mod_h.f90->sourcefile~paramet_mod_h.f90 sourcefile~dissip_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~gradiv2_mod.f90 gradiv2_mod.f90 sourcefile~dissip_mod.f90->sourcefile~gradiv2_mod.f90 sourcefile~allocate_field_mod.f90 allocate_field_mod.f90 sourcefile~dissip_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~nxgraro2_mod.f90 nxgraro2_mod.f90 sourcefile~dissip_mod.f90->sourcefile~nxgraro2_mod.f90 sourcefile~divgrad2_mod.f90 divgrad2_mod.f90 sourcefile~dissip_mod.f90->sourcefile~divgrad2_mod.f90 sourcefile~bands.f90 bands.f90 sourcefile~dissip_mod.f90->sourcefile~bands.f90 sourcefile~write_field_loc.f90->sourcefile~parallel_lmdz.f90 sourcefile~write_field_loc.f90->sourcefile~paramet_mod_h.f90 sourcefile~write_field.f90 write_field.f90 sourcefile~write_field_loc.f90->sourcefile~write_field.f90 sourcefile~mod_hallo.f90 mod_hallo.f90 sourcefile~write_field_loc.f90->sourcefile~mod_hallo.f90 sourcefile~gradiv2_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~gradiv2_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~gradiv2_mod.f90->sourcefile~bands.f90 sourcefile~allocate_field_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~allocate_field_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~allocate_field_mod.f90->sourcefile~mod_hallo.f90 sourcefile~nxgraro2_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~nxgraro2_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~nxgraro2_mod.f90->sourcefile~bands.f90 sourcefile~strings_mod.f90 strings_mod.f90 sourcefile~write_field.f90->sourcefile~strings_mod.f90 sourcefile~divgrad2_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~divgrad2_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~divgrad2_mod.f90->sourcefile~bands.f90 sourcefile~mod_hallo.f90->sourcefile~parallel_lmdz.f90 sourcefile~mod_hallo.f90->sourcefile~paramet_mod_h.f90 sourcefile~mod_hallo.f90->sourcefile~lmdz_mpi.f90 sourcefile~bands.f90->sourcefile~parallel_lmdz.f90 sourcefile~mod_phys_lmdz_para.f90 mod_phys_lmdz_para.f90 sourcefile~bands.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~times.f90 times.f90 sourcefile~bands.f90->sourcefile~times.f90 sourcefile~lmdz_cppkeys_wrapper.f90 lmdz_cppkeys_wrapper.F90 sourcefile~bands.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~wxios_mod.f90->sourcefile~iniprint_mod_h.f90 sourcefile~wxios_mod.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~lmdz_xios.f90 lmdz_xios.F90 sourcefile~wxios_mod.f90->sourcefile~lmdz_xios.f90 sourcefile~dimphy.f90 dimphy.f90 sourcefile~wxios_mod.f90->sourcefile~dimphy.f90 sourcefile~mod_phys_lmdz_mpi_data.f90 mod_phys_lmdz_mpi_data.f90 sourcefile~wxios_mod.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~geometry_mod.f90 geometry_mod.f90 sourcefile~wxios_mod.f90->sourcefile~geometry_mod.f90 sourcefile~infotrac_phy.f90 infotrac_phy.F90 sourcefile~wxios_mod.f90->sourcefile~infotrac_phy.f90 sourcefile~wxios_mod.f90->sourcefile~strings_mod.f90 sourcefile~print_control_mod.f90 print_control_mod.f90 sourcefile~wxios_mod.f90->sourcefile~print_control_mod.f90 sourcefile~mod_phys_lmdz_transfert_para.f90 mod_phys_lmdz_transfert_para.f90 sourcefile~wxios_mod.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_grid_phy_lmdz.f90 mod_grid_phy_lmdz.f90 sourcefile~wxios_mod.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~nrtype.f90 nrtype.f90 sourcefile~wxios_mod.f90->sourcefile~nrtype.f90 sourcefile~ioipsl_getin_p_mod.f90 ioipsl_getin_p_mod.f90 sourcefile~wxios_mod.f90->sourcefile~ioipsl_getin_p_mod.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~print_control_mod.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_grid_phy_lmdz.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~times.f90->sourcefile~parallel_lmdz.f90 sourcefile~times.f90->sourcefile~paramet_mod_h.f90 sourcefile~times.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~print_control_mod.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~geometry_mod.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~geometry_mod.f90->sourcefile~nrtype.f90 sourcefile~infotrac_phy.f90->sourcefile~iniprint_mod_h.f90 sourcefile~infotrac_phy.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~infotrac_phy.f90->sourcefile~strings_mod.f90 sourcefile~infotrac_phy.f90->sourcefile~ioipsl_getin_p_mod.f90 sourcefile~infotrac_phy.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~readtracfiles_mod.f90 readTracFiles_mod.f90 sourcefile~infotrac_phy.f90->sourcefile~readtracfiles_mod.f90 sourcefile~lmdz_reprobus_wrappers.f90 lmdz_reprobus_wrappers.F90 sourcefile~infotrac_phy.f90->sourcefile~lmdz_reprobus_wrappers.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_mpi_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_mpi_transfert.f90 mod_phys_lmdz_mpi_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_mpi_transfert.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~strings_mod.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_transfert_para.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_transfert.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~readtracfiles_mod.f90->sourcefile~strings_mod.f90 sourcefile~readtracfiles_mod.f90->sourcefile~ioipsl_getin_p_mod.f90 sourcefile~lmdz_reprobus_wrappers.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~dimphy.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

Contents

Source Code


Source Code

!
! $Id: $
!
SUBROUTINE dissip_loc( vcov,ucov,teta,p, dv,du,dh )
  !
  USE comgeom_mod_h
  USE comdissipn_mod_h
  USE comdissnew_mod_h
  USE parallel_lmdz
  USE write_field_loc
  USE dissip_mod, ONLY: dissip_allocate
  USE comconst_mod, ONLY: dtdiss
  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
USE paramet_mod_h
IMPLICIT NONE


  ! ..  Avec nouveaux operateurs star :  gradiv2 , divgrad2, nxgraro2  ...
                              ! (  10/01/98  )

  !=======================================================================
  !
  !   Auteur:  P. Le Van
  !   -------
  !
  !   Objet:
  !   ------
  !
  !   Dissipation horizontale
  !
  !=======================================================================
  !-----------------------------------------------------------------------
  !   Declarations:
  !   -------------




  !   Arguments:
  !   ----------

  REAL,INTENT(IN) :: vcov(ijb_v:ije_v,llm) ! covariant meridional wind
  REAL,INTENT(IN) :: ucov(ijb_u:ije_u,llm) ! covariant zonal wind
  REAL,INTENT(IN) :: teta(ijb_u:ije_u,llm) ! potential temperature
  REAL,INTENT(IN) :: p(ijb_u:ije_u,llmp1) ! interlayer pressure
  ! ! tendencies (.../s) on covariant winds and potential temperature
  REAL,INTENT(OUT) :: dv(ijb_v:ije_v,llm)
  REAL,INTENT(OUT) :: du(ijb_u:ije_u,llm)
  REAL,INTENT(OUT) :: dh(ijb_u:ije_u,llm)

  !   Local:
  !   ------

  REAL :: gdx(ijb_u:ije_u,llm),gdy(ijb_v:ije_v,llm)
  REAL :: grx(ijb_u:ije_u,llm),gry(ijb_v:ije_v,llm)
  REAL :: te1dt(llm),te2dt(llm),te3dt(llm)
  REAL :: deltapres(ijb_u:ije_u,llm)

  INTEGER :: l,ij

  REAL :: SSUM
  integer :: ijb,ije

  LOGICAl,SAVE :: first=.TRUE.
!$OMP THREADPRIVATE(first)

  IF (first) THEN
    CALL dissip_allocate
    first=.FALSE.
  ENDIF
  !-----------------------------------------------------------------------
  !   initialisations:
  !   ----------------

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  DO l=1,llm
     te1dt(l) = tetaudiv(l) * dtdiss
     te2dt(l) = tetaurot(l) * dtdiss
     te3dt(l) = tetah(l)    * dtdiss
  ENDDO
!$OMP END DO NOWAIT
   ! CALL initial0( ijp1llm, du )
   ! CALL initial0( ijmllm , dv )
   ! CALL initial0( ijp1llm, dh )

  ijb=ij_begin
  ije=ij_end

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  DO l=1,llm
    du(ijb:ije,l)=0
    dh(ijb:ije,l)=0
  ENDDO
!$OMP END DO NOWAIT

  if (pole_sud) ije=ij_end-iip1

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  DO l=1,llm
    dv(ijb:ije,l)=0
  ENDDO
!$OMP END DO NOWAIT

  !-----------------------------------------------------------------------
  !   Calcul de la dissipation:
  !   -------------------------

  !   Calcul de la partie   grad  ( div ) :
  !   -------------------------------------



  IF(lstardis) THEN
   ! IF (.FALSE.) THEN
     CALL gradiv2_loc( llm,ucov,vcov,nitergdiv,gdx,gdy )
  ELSE
      ! CALL gradiv_p ( llm,ucov,vcov,nitergdiv,gdx,gdy )
  ENDIF

  ijb=ij_begin
  ije=ij_end
  if (pole_sud) ije=ij_end-iip1

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  DO l=1,llm
     if (pole_nord) then
       DO ij = 1, iip1
          gdx(     ij ,l) = 0.
       ENDDO
     endif

     if (pole_sud) then
       DO ij = 1, iip1
          gdx(ij+ip1jm,l) = 0.
       ENDDO
     endif

     if (pole_nord) ijb=ij_begin+iip1
     DO ij = ijb,ije
        du(ij,l) = du(ij,l) - te1dt(l) *gdx(ij,l)
     ENDDO

     if (pole_nord) ijb=ij_begin
     DO ij = ijb,ije
        dv(ij,l) = dv(ij,l) - te1dt(l) *gdy(ij,l)
     ENDDO

   ENDDO
!$OMP END DO NOWAIT
  !   calcul de la partie   n X grad ( rot ):
  !   ---------------------------------------

  IF(lstardis) THEN
   ! IF (.FALSE.) THEN
     CALL nxgraro2_loc( llm,ucov, vcov, nitergrot,grx,gry )
  ELSE
      ! CALL nxgrarot_p( llm,ucov, vcov, nitergrot,grx,gry )
  ENDIF

  ijb=ij_begin
  ije=ij_end
  if (pole_sud) ije=ij_end-iip1

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  DO l=1,llm

     if (pole_nord) then
       DO ij = 1, iip1
          grx(ij,l) = 0.
       ENDDO
     endif

     if (pole_nord) ijb=ij_begin+iip1
     DO ij = ijb,ije
        du(ij,l) = du(ij,l) - te2dt(l) * grx(ij,l)
     ENDDO

     if (pole_nord) ijb=ij_begin
     DO ij =  ijb, ije
        dv(ij,l) = dv(ij,l) - te2dt(l) * gry(ij,l)
     ENDDO

  ENDDO
!$OMP END DO NOWAIT

  !   calcul de la partie   div ( grad ):
  !   -----------------------------------


  IF(lstardis) THEN
   ! IF (.FALSE.) THEN

  ijb=ij_begin
  ije=ij_end

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
   DO l = 1, llm
      DO ij = ijb, ije
        deltapres(ij,l) = AMAX1( 0.,  p(ij,l) - p(ij,l+1) )
      ENDDO
   ENDDO
!$OMP END DO NOWAIT
     CALL divgrad2_loc( llm,teta, deltapres  ,niterh, gdx )
  ELSE
      ! CALL divgrad_p ( llm,teta, niterh, gdx        )
  ENDIF

  ijb=ij_begin
  ije=ij_end

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  DO l = 1,llm
     DO ij = ijb,ije
        dh( ij,l ) = dh( ij,l ) - te3dt(l) * gdx( ij,l )
     ENDDO
  ENDDO
!$OMP END DO NOWAIT

  RETURN
END SUBROUTINE dissip_loc