leapfrog_mod.f90 Source File


This file depends on

sourcefile~~leapfrog_mod.f90~~EfferentGraph sourcefile~leapfrog_mod.f90 leapfrog_mod.f90 sourcefile~parallel_lmdz.f90 parallel_lmdz.F90 sourcefile~leapfrog_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~call_calfis_mod.f90 call_calfis_mod.f90 sourcefile~leapfrog_mod.f90->sourcefile~call_calfis_mod.f90 sourcefile~paramet_mod_h.f90 paramet_mod_h.f90 sourcefile~leapfrog_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~allocate_field_mod.f90 allocate_field_mod.f90 sourcefile~leapfrog_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~integrd_mod.f90 integrd_mod.f90 sourcefile~leapfrog_mod.f90->sourcefile~integrd_mod.f90 sourcefile~caldyn_mod.f90 caldyn_mod.f90 sourcefile~leapfrog_mod.f90->sourcefile~caldyn_mod.f90 sourcefile~infotrac.f90 infotrac.f90 sourcefile~leapfrog_mod.f90->sourcefile~infotrac.f90 sourcefile~call_dissip_mod.f90 call_dissip_mod.f90 sourcefile~leapfrog_mod.f90->sourcefile~call_dissip_mod.f90 sourcefile~bands.f90 bands.f90 sourcefile~leapfrog_mod.f90->sourcefile~bands.f90 sourcefile~caladvtrac_mod.f90 caladvtrac_mod.f90 sourcefile~leapfrog_mod.f90->sourcefile~caladvtrac_mod.f90 sourcefile~parallel_lmdz.f90->sourcefile~paramet_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~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~call_calfis_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~call_calfis_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~call_calfis_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~call_calfis_mod.f90->sourcefile~infotrac.f90 sourcefile~call_calfis_mod.f90->sourcefile~bands.f90 sourcefile~comvert_mod.f90 comvert_mod.f90 sourcefile~call_calfis_mod.f90->sourcefile~comvert_mod.f90 sourcefile~call_calfis_mod.f90->sourcefile~control_mod.f90 sourcefile~write_field_loc.f90 write_field_loc.f90 sourcefile~call_calfis_mod.f90->sourcefile~write_field_loc.f90 sourcefile~call_calfis_mod.f90->sourcefile~vampir.f90 sourcefile~exner_hyb_loc_m.f90 exner_hyb_loc_m.f90 sourcefile~call_calfis_mod.f90->sourcefile~exner_hyb_loc_m.f90 sourcefile~comconst_mod.f90 comconst_mod.f90 sourcefile~call_calfis_mod.f90->sourcefile~comconst_mod.f90 sourcefile~exner_milieu_loc_m.f90 exner_milieu_loc_m.f90 sourcefile~call_calfis_mod.f90->sourcefile~exner_milieu_loc_m.f90 sourcefile~logic_mod.f90 logic_mod.f90 sourcefile~call_calfis_mod.f90->sourcefile~logic_mod.f90 sourcefile~write_field.f90 write_field.f90 sourcefile~call_calfis_mod.f90->sourcefile~write_field.f90 sourcefile~call_calfis_mod.f90->sourcefile~iniprint_mod_h.f90 sourcefile~temps_mod.f90 temps_mod.f90 sourcefile~call_calfis_mod.f90->sourcefile~temps_mod.f90 sourcefile~lmdz_cppkeys_wrapper.f90 lmdz_cppkeys_wrapper.F90 sourcefile~call_calfis_mod.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~mod_hallo.f90 mod_hallo.f90 sourcefile~call_calfis_mod.f90->sourcefile~mod_hallo.f90 sourcefile~times.f90 times.f90 sourcefile~call_calfis_mod.f90->sourcefile~times.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~integrd_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~integrd_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~integrd_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~integrd_mod.f90->sourcefile~bands.f90 sourcefile~advect_new_mod.f90 advect_new_mod.f90 sourcefile~integrd_mod.f90->sourcefile~advect_new_mod.f90 sourcefile~caldyn_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~caldyn_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~caldyn_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~caldyn_mod.f90->sourcefile~bands.f90 sourcefile~caldyn_mod.f90->sourcefile~advect_new_mod.f90 sourcefile~infotrac.f90->sourcefile~control_mod.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~infotrac.f90->sourcefile~iniprint_mod_h.f90 sourcefile~infotrac.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~call_dissip_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~call_dissip_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~call_dissip_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~call_dissip_mod.f90->sourcefile~bands.f90 sourcefile~dissip_mod.f90 dissip_mod.f90 sourcefile~call_dissip_mod.f90->sourcefile~dissip_mod.f90 sourcefile~call_dissip_mod.f90->sourcefile~write_field_loc.f90 sourcefile~call_dissip_mod.f90->sourcefile~vampir.f90 sourcefile~comgeom_mod_h.f90 comgeom_mod_h.f90 sourcefile~call_dissip_mod.f90->sourcefile~comgeom_mod_h.f90 sourcefile~call_dissip_mod.f90->sourcefile~mod_hallo.f90 sourcefile~call_dissip_mod.f90->sourcefile~times.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~bands.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~bands.f90->sourcefile~times.f90 sourcefile~caladvtrac_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~caladvtrac_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~caladvtrac_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~caladvtrac_mod.f90->sourcefile~infotrac.f90 sourcefile~caladvtrac_mod.f90->sourcefile~bands.f90 sourcefile~advtrac_mod.f90 advtrac_mod.f90 sourcefile~caladvtrac_mod.f90->sourcefile~advtrac_mod.f90 sourcefile~groupe_mod.f90 groupe_mod.f90 sourcefile~caladvtrac_mod.f90->sourcefile~groupe_mod.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~dissip_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~dissip_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~dissip_mod.f90->sourcefile~bands.f90 sourcefile~gradiv2_mod.f90 gradiv2_mod.f90 sourcefile~dissip_mod.f90->sourcefile~gradiv2_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~wxios_mod.f90->sourcefile~strings_mod.f90 sourcefile~wxios_mod.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~wxios_mod.f90->sourcefile~iniprint_mod_h.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~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~write_field_loc.f90->sourcefile~parallel_lmdz.f90 sourcefile~write_field_loc.f90->sourcefile~paramet_mod_h.f90 sourcefile~write_field_loc.f90->sourcefile~write_field.f90 sourcefile~write_field_loc.f90->sourcefile~mod_hallo.f90 sourcefile~exner_hyb_loc_m.f90->sourcefile~parallel_lmdz.f90 sourcefile~exner_hyb_loc_m.f90->sourcefile~paramet_mod_h.f90 sourcefile~exner_hyb_loc_m.f90->sourcefile~comvert_mod.f90 sourcefile~exner_hyb_loc_m.f90->sourcefile~write_field_loc.f90 sourcefile~exner_hyb_loc_m.f90->sourcefile~comconst_mod.f90 sourcefile~exner_hyb_loc_m.f90->sourcefile~comgeom_mod_h.f90 sourcefile~mod_filtreg_p.f90 mod_filtreg_p.F90 sourcefile~exner_hyb_loc_m.f90->sourcefile~mod_filtreg_p.f90 sourcefile~exner_milieu_loc_m.f90->sourcefile~parallel_lmdz.f90 sourcefile~exner_milieu_loc_m.f90->sourcefile~paramet_mod_h.f90 sourcefile~exner_milieu_loc_m.f90->sourcefile~comvert_mod.f90 sourcefile~exner_milieu_loc_m.f90->sourcefile~comconst_mod.f90 sourcefile~exner_milieu_loc_m.f90->sourcefile~comgeom_mod_h.f90 sourcefile~exner_milieu_loc_m.f90->sourcefile~mod_filtreg_p.f90 sourcefile~comgeom_mod_h.f90->sourcefile~paramet_mod_h.f90 sourcefile~readtracfiles_mod.f90->sourcefile~strings_mod.f90 sourcefile~readtracfiles_mod.f90->sourcefile~ioipsl_getin_p_mod.f90 sourcefile~groupe_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~groupe_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~groupe_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~groupe_mod.f90->sourcefile~bands.f90 sourcefile~groupe_mod.f90->sourcefile~advtrac_mod.f90 sourcefile~write_field.f90->sourcefile~strings_mod.f90 sourcefile~advect_new_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~advect_new_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~advect_new_mod.f90->sourcefile~bands.f90 sourcefile~lmdz_reprobus_wrappers.f90->sourcefile~mod_grid_phy_lmdz.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~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~times.f90->sourcefile~parallel_lmdz.f90 sourcefile~times.f90->sourcefile~paramet_mod_h.f90 sourcefile~times.f90->sourcefile~lmdz_mpi.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~nxgraro2_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~nxgraro2_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~nxgraro2_mod.f90->sourcefile~bands.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~strings_mod.f90 sourcefile~infotrac_phy.f90->sourcefile~readtracfiles_mod.f90 sourcefile~infotrac_phy.f90->sourcefile~lmdz_reprobus_wrappers.f90 sourcefile~infotrac_phy.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~infotrac_phy.f90->sourcefile~iniprint_mod_h.f90 sourcefile~infotrac_phy.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~infotrac_phy.f90->sourcefile~ioipsl_getin_p_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_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~strings_mod.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_filtreg_p.f90->sourcefile~parallel_lmdz.f90 sourcefile~mod_filtreg_p.f90->sourcefile~paramet_mod_h.f90 sourcefile~coefils_mod_h.f90 coefils_mod_h.f90 sourcefile~mod_filtreg_p.f90->sourcefile~coefils_mod_h.f90 sourcefile~filtreg_mod.f90 filtreg_mod.F90 sourcefile~mod_filtreg_p.f90->sourcefile~filtreg_mod.f90 sourcefile~timer_filtre.f90 timer_filtre.f90 sourcefile~mod_filtreg_p.f90->sourcefile~timer_filtre.f90 sourcefile~mod_filtre_fft_loc.f90 mod_filtre_fft_loc.F90 sourcefile~mod_filtreg_p.f90->sourcefile~mod_filtre_fft_loc.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 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~infotrac.f90 sourcefile~vlspltgen_mod.f90->sourcefile~bands.f90 sourcefile~vlz_mod.f90 vlz_mod.f90 sourcefile~vlspltgen_mod.f90->sourcefile~vlz_mod.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~filtreg_mod.f90->sourcefile~paramet_mod_h.f90 sourcefile~filtreg_mod.f90->sourcefile~comconst_mod.f90 sourcefile~filtreg_mod.f90->sourcefile~logic_mod.f90 sourcefile~filtreg_mod.f90->sourcefile~comgeom_mod_h.f90 sourcefile~filtreg_mod.f90->sourcefile~coefils_mod_h.f90 sourcefile~serre_mod.f90 serre_mod.f90 sourcefile~filtreg_mod.f90->sourcefile~serre_mod.f90 sourcefile~vlz_mod.f90->sourcefile~parallel_lmdz.f90 sourcefile~vlz_mod.f90->sourcefile~allocate_field_mod.f90 sourcefile~vlz_mod.f90->sourcefile~infotrac.f90 sourcefile~vlz_mod.f90->sourcefile~bands.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~mod_fft.f90 mod_fft.F90 sourcefile~mod_filtre_fft_loc.f90->sourcefile~mod_fft.f90 sourcefile~mod_fft_wrapper.f90 mod_fft_wrapper.f90 sourcefile~mod_fft.f90->sourcefile~mod_fft_wrapper.f90

Files dependent on this one

sourcefile~~leapfrog_mod.f90~~AfferentGraph sourcefile~leapfrog_mod.f90 leapfrog_mod.f90 sourcefile~leapfrog_loc.f90 leapfrog_loc.f90 sourcefile~leapfrog_loc.f90->sourcefile~leapfrog_mod.f90

Contents

Source Code


Source Code

MODULE leapfrog_mod

  REAL,POINTER,SAVE :: ucov(:,:) ! zonal covariant wind
  REAL,POINTER,SAVE :: vcov(:,:) ! meridional covariant wind
  REAL,POINTER,SAVE :: teta(:,:) ! potential temperature
  REAL,POINTER,SAVE :: ps(:) ! surface pressure
  REAL,POINTER,SAVE :: masse(:,:) ! air mass
  REAL,POINTER,SAVE :: phis(:) ! geopotential at the surface
  REAL,POINTER,SAVE :: q(:,:,:) ! advected tracers
  REAL,POINTER,SAVE :: p(:,:) ! interlayer pressure
  REAL,POINTER,SAVE :: pks(:) ! Exner at the surface
  REAL,POINTER,SAVE :: pk(:,:) ! Exner at mid-layer
  REAL,POINTER,SAVE :: pkf(:,:) ! filtered Exner
  REAL,POINTER,SAVE :: phi(:,:) ! geopotential
  REAL,POINTER,SAVE :: w(:,:) ! vertical velocity
  REAL,POINTER,SAVE :: pbaru(:,:)
  REAL,POINTER,SAVE :: pbarv(:,:)
  REAL,POINTER,SAVE :: vcovm1(:,:)
  REAL,POINTER,SAVE :: ucovm1(:,:)
  REAL,POINTER,SAVE :: tetam1(:,:)
  REAL,POINTER,SAVE :: psm1(:)
  REAL,POINTER,SAVE :: massem1(:,:)
  REAL,POINTER,SAVE :: dv(:,:)
  REAL,POINTER,SAVE :: du(:,:)
  REAL,POINTER,SAVE :: dteta(:,:)
  REAL,POINTER,SAVE :: dp(:)
  REAL,POINTER,SAVE :: dq(:,:,:)
  REAL,POINTER,SAVE :: finvmaold(:,:)
  REAL,POINTER,SAVE :: flxw(:,:)
  REAL,POINTER,SAVE :: unat(:,:)
  REAL,POINTER,SAVE :: vnat(:,:)
 

  
CONTAINS

  SUBROUTINE leapfrog_allocate
  USE bands
  USE allocate_field_mod
  USE parallel_lmdz
  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
  USE paramet_mod_h
  USE infotrac
  USE caldyn_mod,ONLY : caldyn_allocate
  USE integrd_mod,ONLY : integrd_allocate
  USE caladvtrac_mod,ONLY : caladvtrac_allocate
  USE call_calfis_mod,ONLY : call_calfis_allocate
  USE call_dissip_mod, ONLY : call_dissip_allocate
  IMPLICIT NONE
  TYPE(distrib),POINTER :: d


    d=>distrib_caldyn
    CALL allocate_u(ucov,llm,d)
    CALL allocate_v(vcov,llm,d)
    CALL allocate_u(teta,llm,d)
    CALL allocate_u(ps,d)
    CALL allocate_u(masse,llm,d)
    CALL allocate_u(phis,d)
    CALL allocate_u(q,llm,nqtot,d)
    CALL allocate_u(p,llmp1,d)
    CALL allocate_u(pks,d)
    CALL allocate_u(pk,llm,d)
    CALL allocate_u(pkf,llm,d)
    CALL allocate_u(phi,llm,d)
    CALL allocate_u(w,llm,d)
    CALL allocate_u(pbaru,llm,d)
    CALL allocate_v(pbarv,llm,d)
    CALL allocate_v(vcovm1,llm,d)
    CALL allocate_u(ucovm1,llm,d)
    CALL allocate_u(tetam1,llm,d)
    CALL allocate_u(psm1,d)
    CALL allocate_u(massem1,llm,d)
    CALL allocate_v(dv,llm,d)
    CALL allocate_u(du,llm,d)
    CALL allocate_u(dteta,llm,d)
    CALL allocate_u(dp,d)
    CALL allocate_u(dq,llm,nqtot,d)
    CALL allocate_u(finvmaold,llm,d)
    CALL allocate_u(flxw,llm,d)
    CALL allocate_u(unat,llm,d)
    CALL allocate_v(vnat,llm,d)
    
    CALL caldyn_allocate
    CALL integrd_allocate
    CALL caladvtrac_allocate
    CALL call_calfis_allocate
    CALL call_dissip_allocate
        
  END SUBROUTINE leapfrog_allocate
  
  SUBROUTINE leapfrog_switch_caldyn(dist)
  USE allocate_field_mod
  USE bands
  USE parallel_lmdz
  USE caldyn_mod,ONLY : caldyn_switch_caldyn
  USE integrd_mod,ONLY : integrd_switch_caldyn
  USE caladvtrac_mod,ONLY : caladvtrac_switch_caldyn
  IMPLICIT NONE
    TYPE(distrib),INTENT(IN) :: dist

    CALL switch_u(ucov,distrib_caldyn,dist)
    CALL switch_v(vcov,distrib_caldyn,dist)
    CALL switch_u(teta,distrib_caldyn,dist)
    CALL switch_u(ps,distrib_caldyn,dist)
    CALL switch_u(masse,distrib_caldyn,dist)
    CALL switch_u(phis,distrib_caldyn,dist,up=halo_max,down=halo_max)
    CALL switch_u(q,distrib_caldyn,dist)
    CALL switch_u(p,distrib_caldyn,dist)
    CALL switch_u(pks,distrib_caldyn,dist)
    CALL switch_u(pk,distrib_caldyn,dist)
    CALL switch_u(pkf,distrib_caldyn,dist)
    CALL switch_u(phi,distrib_caldyn,dist)
    CALL switch_u(w,distrib_caldyn,dist)
    CALL switch_u(pbaru,distrib_caldyn,dist)
    CALL switch_v(pbarv,distrib_caldyn,dist)
    CALL switch_v(vcovm1,distrib_caldyn,dist)
    CALL switch_u(ucovm1,distrib_caldyn,dist)
    CALL switch_u(tetam1,distrib_caldyn,dist)
    CALL switch_u(psm1,distrib_caldyn,dist)
    CALL switch_u(massem1,distrib_caldyn,dist)
    CALL switch_v(dv,distrib_caldyn,dist)
    CALL switch_u(du,distrib_caldyn,dist)
    CALL switch_u(dteta,distrib_caldyn,dist)
    CALL switch_u(dp,distrib_caldyn,dist)
    CALL switch_u(dq,distrib_caldyn,dist)
    CALL switch_u(finvmaold,distrib_caldyn,dist)
    CALL switch_u(flxw,distrib_caldyn,dist)
    CALL switch_u(unat,distrib_caldyn,dist)
    CALL switch_v(vnat,distrib_caldyn,dist)

    
    CALL caldyn_switch_caldyn(dist)
    CALL integrd_switch_caldyn(dist)
    CALL caladvtrac_switch_caldyn(dist)
    
  END SUBROUTINE leapfrog_switch_caldyn
  
  SUBROUTINE leapfrog_switch_dissip(dist)
  USE allocate_field_mod
  USE bands
  USE parallel_lmdz
  USE call_dissip_mod,ONLY : call_dissip_switch_dissip
  IMPLICIT NONE
    TYPE(distrib),INTENT(IN) :: dist

    CALL call_dissip_switch_dissip(dist)
    
  END SUBROUTINE leapfrog_switch_dissip
  
END MODULE leapfrog_mod