MODULE caldyn_vars_mod
   USE field_mod
   USE transfert_mod
   IMPLICIT NONE
   PRIVATE
   SAVE

   INTEGER, PUBLIC, PARAMETER :: conserv_energy = 1, conserv_enstrophy = 2, conserv_gassmann = 3, &
                                 kinetic_trisk = 1, kinetic_consistent = 2, &
                                 caldyn_vert_noncons = 1, caldyn_vert_cons = 2

   INTEGER, PUBLIC :: caldyn_conserv, caldyn_kinetic, caldyn_vert_variant
   !$OMP THREADPRIVATE(caldyn_conserv, caldyn_kinetic, caldyn_vert_variant)

   LOGICAL, PUBLIC :: hydrostatic
   !$OMP THREADPRIVATE(hydrostatic)

   LOGICAL, PUBLIC :: dysl, dysl_geopot, dysl_pvort_only, dysl_caldyn_fast, dysl_caldyn_coriolis, dysl_slow_hydro, dysl_caldyn_vert
   !$OMP THREADPRIVATE(dysl, dysl_geopot, dysl_pvort_only, dysl_caldyn_fast, dysl_caldyn_coriolis, dysl_slow_hydro, dysl_caldyn_vert)

   ! temporary shared variables for caldyn
   TYPE(t_field), POINTER, PUBLIC :: f_out_u(:), f_qu(:), f_qv(:), f_Kv(:), f_hv(:), &
                                     f_pk(:), f_wwuu(:), f_planetvel(:), &
                                     f_berni(:), f_Ftheta(:), &
                                     f_Fel(:), f_gradPhi2(:), f_wil(:), f_Wetadot(:)

   TYPE(t_message), PUBLIC :: req_ps, req_mass, req_theta_rhodz, req_u, req_qu, req_geopot, req_w, req_Kv

END MODULE caldyn_vars_mod
