groupe_loc.f90 Source File


This file depends on

sourcefile~~groupe_loc.f90~~EfferentGraph sourcefile~groupe_loc.f90 groupe_loc.f90 sourcefile~parallel_lmdz.f90 parallel_lmdz.F90 sourcefile~groupe_loc.f90->sourcefile~parallel_lmdz.f90 sourcefile~comconst_mod.f90 comconst_mod.f90 sourcefile~groupe_loc.f90->sourcefile~comconst_mod.f90 sourcefile~paramet_mod_h.f90 paramet_mod_h.f90 sourcefile~groupe_loc.f90->sourcefile~paramet_mod_h.f90 sourcefile~comgeom2_mod_h.f90 comgeom2_mod_h.f90 sourcefile~groupe_loc.f90->sourcefile~comgeom2_mod_h.f90 sourcefile~groupe_mod.f90 groupe_mod.f90 sourcefile~groupe_loc.f90->sourcefile~groupe_mod.f90 sourcefile~write_field_loc.f90 write_field_loc.f90 sourcefile~groupe_loc.f90->sourcefile~write_field_loc.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~comgeom2_mod_h.f90->sourcefile~paramet_mod_h.f90 sourcefile~groupe_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~groupe_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~advtrac_mod.f90 advtrac_mod.f90 sourcefile~groupe_mod.f90->sourcefile~advtrac_mod.f90 sourcefile~allocate_field_mod.f90 allocate_field_mod.f90 sourcefile~groupe_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~bands.f90 bands.f90 sourcefile~groupe_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~advtrac_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~advtrac_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~advtrac_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~advtrac_mod.f90->sourcefile~bands.f90 sourcefile~vlspltgen_mod.f90 vlspltgen_mod.f90 sourcefile~advtrac_mod.f90->sourcefile~vlspltgen_mod.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~strings_mod.f90 strings_mod.f90 sourcefile~write_field.f90->sourcefile~strings_mod.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~lmdz_cppkeys_wrapper.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~print_control_mod.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~lmdz_cppkeys_wrapper.f90 sourcefile~infotrac_phy.f90->sourcefile~strings_mod.f90 sourcefile~infotrac_phy.f90->sourcefile~ioipsl_getin_p_mod.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~vlspltgen_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~vlspltgen_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~vlspltgen_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~vlspltgen_mod.f90->sourcefile~bands.f90 sourcefile~vlz_mod.f90 vlz_mod.f90 sourcefile~vlspltgen_mod.f90->sourcefile~vlz_mod.f90 sourcefile~infotrac.f90 infotrac.f90 sourcefile~vlspltgen_mod.f90->sourcefile~infotrac.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~vlz_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~vlz_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~vlz_mod.f90->sourcefile~bands.f90 sourcefile~vlz_mod.f90->sourcefile~infotrac.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~infotrac.f90->sourcefile~iniprint_mod_h.f90 sourcefile~infotrac.f90->sourcefile~control_mod.f90 sourcefile~infotrac.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~infotrac.f90->sourcefile~strings_mod.f90 sourcefile~infotrac.f90->sourcefile~readtracfiles_mod.f90 sourcefile~infotrac.f90->sourcefile~lmdz_reprobus_wrappers.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

subroutine groupe_loc(pext,pbaru,pbarv,pbarum,pbarvm,wm)
  USE comgeom2_mod_h
  USE parallel_lmdz
  USE Write_field_loc
  USE groupe_mod
  USE comconst_mod, ONLY: ngroup
  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
USE paramet_mod_h
implicit none

  !   sous-programme servant a fitlrer les champs de flux de masse aux
  !   poles en "regroupant" les mailles 2 par 2 puis 4 par 4 etc. au fur
  !   et a mesure qu'on se rapproche du pole.
  !
  !   en entree: pext, pbaru et pbarv
  !
  !   en sortie:  pbarum,pbarvm et wm.
  !
  !   remarque, le wm est recalcule a partir des pbaru pbarv et on n'a donc
  !   pas besoin de w en entree.




  ! integer ngroup
  ! parameter (ngroup=3)


  real :: pbaru(iip1,jjb_u:jje_u,llm),pbarv(iip1,jjb_v:jje_v,llm)
  real :: pext(iip1,jjb_u:jje_u,llm)

  real :: pbarum(iip1,jjb_u:jje_u,llm),pbarvm(iip1,jjb_v:jje_v,llm)
  real :: wm(iip1,jjb_u:jje_u,llm)


  real :: uu

  integer :: i,j,l

  logical :: firstcall
  save firstcall
!$OMP THREADPRIVATE(firstcall)

  integer :: ijb,ije,jjb,jje

  !   Champs 1D

  call convflu_loc(pbaru,pbarv,llm,zconvm)

  !
  !  call scopy(ijp1llm,zconvm,1,zconvmm,1)
  !  call scopy(ijmllm,pbarv,1,pbarvm,1)

  jjb=jj_begin
  jje=jj_end

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  do l=1,llm
    zconvmm(:,jjb:jje,l)=zconvm(:,jjb:jje,l)
  enddo
!$OMP END DO NOWAIT

  call groupeun_loc(jjp1,llm,jjb_u,jje_u,jjb,jje,zconvmm)

  jjb=jj_begin-1
  jje=jj_end
  if (pole_nord) jjb=jj_begin
  if (pole_sud)  jje=jj_end-1
!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  do l=1,llm
    pbarvm(:,jjb:jje,l)=pbarv(:,jjb:jje,l)
  enddo
!$OMP END DO NOWAIT

  call groupeun_loc(jjm,llm,jjb_v,jje_v,jjb,jje,pbarvm)
  !   Champs 3D

  jjb=jj_begin
  jje=jj_end
  if (pole_nord) jjb=jj_begin+1
  if (pole_sud)  jje=jj_end-1

!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  do l=1,llm
     do j=jjb,jje
        uu=pbaru(iim,j,l)
        do i=1,iim
           uu=uu+pbarvm(i,j,l)-pbarvm(i,j-1,l)-zconvmm(i,j,l)
           pbarum(i,j,l)=uu
  ! zconvm(i,j,l ) =  xflu(i-1,j,l)-xflu(i,j,l)+
  !    *                      yflu(i,j,l)-yflu(i,j-1,l)
        enddo
        pbarum(iip1,j,l)=pbarum(1,j,l)
     enddo
  enddo
!$OMP END DO NOWAIT
  !    integration de la convergence de masse de haut  en bas ......

  jjb=jj_begin
  jje=jj_end

!$OMP BARRIER
!$OMP MASTER
  do  l = llm-1,1,-1
      do j=jjb,jje
         do i=1,iip1
            zconvmm(i,j,l)=zconvmm(i,j,l)+zconvmm(i,j,l+1)
         enddo
      enddo
  enddo

  if (.not. pole_sud) then
    zconvmm(:,jj_end+1,:)=0
  !ym	wm(:,jj_end+1,:)=0
  endif

!$OMP END MASTER
!$OMP BARRIER

  CALL vitvert_loc(zconvmm,wm)

  return
end subroutine groupe_loc