subroutine smallTstep_calc_PDev_From_EDev( &
  & cptr_PDev, cptr_EDev, &
  & GasConst, Cv &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: DP

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use small_time_step_mod, only: &
    & calc_PDev_From_EDev

  implicit none

  type(c_ptr), value :: cptr_PDev
  type(c_ptr), value :: cptr_EDev
  real(DP), value :: GasConst
  real(DP), value :: Cv

  type(Field_IcGrid3D), pointer :: ptr_PDev, ptr_EDev

  call c_f_pointer(cptr_PDev, ptr_PDev)
  call c_f_pointer(cptr_EDev, ptr_EDev)

  call calc_PDev_From_EDev( &
    & ptr_PDev, ptr_EDev, &
    & GasConst, Cv )

end subroutine smallTstep_calc_PDev_From_EDev

subroutine smallTstep_calc_SmallTStepDevVar( &
  & cptr_DevVar, cptr_var, cptr_currentLTVar &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use small_time_step_mod, only: &
    & calc_smallTStepDevVar

  implicit none
  type(c_ptr), value :: cptr_DevVar
	type(c_ptr), value :: cptr_var
	type(c_ptr), value :: cptr_currentLTVar

  type(Field_IcGrid3D), pointer :: ptr_DevVar, ptr_var, ptr_currentLTVar
	
	call c_f_pointer(cptr_DevVar, ptr_DevVar)
  call c_f_pointer(cptr_var, ptr_var)
  call c_f_pointer(cptr_currentLTVar, ptr_currentLTVar)
  
  call calc_smallTStepDevVar(ptr_DevVar, ptr_var, ptr_currentLTVar)

end subroutine smallTstep_calc_SmallTStepDevVar

subroutine smallTstep_calc_VhDevAs( &
  & cptr_VhDevAs, &
  & cptr_VhDevNs, cptr_WDevNs, cptr_PDevNs, &
  & cptr_RhoNl, cptr_VhNl, cptr_WNl, &
  & cptr_HGradPNl, cptr_GVhNl, &
  & cptr_tfcoordz, cptr_derivate, cptr_vzderivate, &
  & DelTimeShort, alpha_dH &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

  use Derivate_Field_IcGrid2D_Manager, only:  &
    & Derivate_Field_IcGrid2D

  use VDerivate_Field_IcGrid3D_Manager, only:  &
    & VDerivate_Field_IcGrid3D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_VhDevAs

  implicit none

  type(c_ptr), value :: cptr_VhDevAs
  type(c_ptr), value :: cptr_VhDevNs
  type(c_ptr), value :: cptr_WDevNs
  type(c_ptr), value :: cptr_PDevNs
  type(c_ptr), value :: cptr_RhoNl
  type(c_ptr), value :: cptr_VhNl
  type(c_ptr), value :: cptr_WNl
  type(c_ptr), value :: cptr_HGradPNl
  type(c_ptr), value :: cptr_GVhNl
  type(c_ptr), value :: cptr_tfcoordz
  type(c_ptr), value :: cptr_derivate
  type(c_ptr), value :: cptr_vzderivate
  real(DP), value :: DelTimeShort
  real(DP), value :: alpha_dH

  type(Field_IcGrid3D), pointer :: ptr_VhDevAs
  type(Field_IcGrid3D), pointer :: ptr_VhDevNs
  type(Field_IcGrid3D), pointer :: ptr_WDevNs
  type(Field_IcGrid3D), pointer :: ptr_PDevNs
  type(Field_IcGrid3D), pointer :: ptr_RhoNl
  type(Field_IcGrid3D), pointer :: ptr_VhNl
  type(Field_IcGrid3D), pointer :: ptr_WNl
  type(Field_IcGrid3D), pointer :: ptr_HGradPNl
  type(Field_IcGrid3D), pointer :: ptr_GVhNl
  type(Derivate_Field_IcGrid2D), pointer :: ptr_derivate
  type(VDerivate_Field_IcGrid3D), pointer :: ptr_vzderivate
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz

  call c_f_pointer(cptr_VhDevAs, ptr_VhDevAs)
  call c_f_pointer(cptr_VhDevNs, ptr_VhDevNs)
  call c_f_pointer(cptr_WDevNs, ptr_WDevNs)
  call c_f_pointer(cptr_PDevNs, ptr_PDevNs)
  call c_f_pointer(cptr_RhoNl, ptr_RhoNl)
  call c_f_pointer(cptr_VhNl, ptr_VhNl)
  call c_f_pointer(cptr_WNl, ptr_WNl)
  call c_f_pointer(cptr_HGradPNl, ptr_HGradPNl)
  call c_f_pointer(cptr_GVhNl, ptr_GVhNl)
  call c_f_pointer(cptr_derivate, ptr_derivate)
  call c_f_pointer(cptr_vzderivate, ptr_vzderivate)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)


  call calc_VhDevAs( &
    & ptr_VhDevAs, &
    & ptr_VhDevNs, ptr_WDevNs, ptr_PDevNs, &
    & ptr_RhoNl, ptr_VhNl, ptr_WNl, ptr_HGradPNl,&
    & ptr_GVhNl, &
    & ptr_tfcoordz, ptr_derivate, ptr_vzderivate, &
    & DelTimeShort, alpha_dH )

end subroutine smallTstep_calc_VhDevAs


subroutine smallTstep_calc_SR( &
  & cptr_SR, &
  & cptr_VhDevAs, cptr_VhNl, cptr_WNl, cptr_GRNl, &
  & cptr_tfcoordz, cptr_derivate, cptr_vzderivate &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

  use Derivate_Field_IcGrid2D_Manager, only:  &
    & Derivate_Field_IcGrid2D

  use VDerivate_Field_IcGrid3D_Manager, only:  &
    & VDerivate_Field_IcGrid3D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_SR

  implicit none

  type(c_ptr), value :: cptr_SR
  type(c_ptr), value :: cptr_VhDevAs
  type(c_ptr), value :: cptr_VhNl
  type(c_ptr), value :: cptr_WNl
  type(c_ptr), value :: cptr_GRNl  
  type(c_ptr), value :: cptr_tfcoordz
  type(c_ptr), value :: cptr_derivate
  type(c_ptr), value :: cptr_vzderivate

  type(Field_IcGrid3D), pointer :: ptr_SR
  type(Field_IcGrid3D), pointer :: ptr_VhDevAs
  type(Field_IcGrid3D), pointer :: ptr_VhNl
  type(Field_IcGrid3D), pointer :: ptr_WNl
  type(Field_IcGrid3D), pointer :: ptr_GRNl
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz
  type(Derivate_Field_IcGrid2D), pointer :: ptr_derivate
  type(VDerivate_Field_IcGrid3D), pointer :: ptr_vzderivate


  call c_f_pointer(cptr_SR, ptr_SR)
  call c_f_pointer(cptr_VhDevAs, ptr_VhDevAs)
  call c_f_pointer(cptr_VhNl, ptr_VhNl)
  call c_f_pointer(cptr_WNl, ptr_WNl)
  call c_f_pointer(cptr_GRNl, ptr_GRNl)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)
  call c_f_pointer(cptr_derivate, ptr_derivate)
  call c_f_pointer(cptr_vzderivate, ptr_vzderivate)


  call calc_SR( &
    & ptr_SR, &
    & ptr_VhDevAs, ptr_VhNl, ptr_WNl, ptr_GRNl, &
    & ptr_tfcoordz, ptr_derivate, ptr_vzderivate )

end subroutine smallTstep_calc_SR

subroutine smallTstep_calc_SW( &
  & cptr_SW, &
  & cptr_buoyancyNl, &
  & cptr_GWNl, &
  & cptr_tfcoordz &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

  use Derivate_Field_IcGrid2D_Manager, only:  &
    & Derivate_Field_IcGrid2D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_SW

  implicit none

  type(c_ptr), value :: cptr_SW
  type(c_ptr), value :: cptr_buoyancyNl
  type(c_ptr), value :: cptr_GWNl
  type(c_ptr), value :: cptr_tfcoordz

  type(Field_IcGrid3D), pointer :: ptr_SW
  type(Field_IcGrid3D), pointer :: ptr_buoyancyNl
  type(Field_IcGrid3D), pointer :: ptr_GWNl
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz

  call c_f_pointer(cptr_SW, ptr_SW)
  call c_f_pointer(cptr_buoyancyNl, ptr_buoyancyNl)
  call c_f_pointer(cptr_GWNl, ptr_GWNl)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)

  call calc_SW( &
    & ptr_SW, &
    & ptr_buoyancyNl, ptr_GWNl,  &
    & ptr_tfcoordz )

end subroutine smallTstep_calc_SW

subroutine smallTstep_calc_SP( &
  & cptr_SP, &
  & cptr_VhDevAs, cptr_VhNl, cptr_WNl, &
  & cptr_xyz_RhoNl, cptr_HGradPNl, cptr_hNl, cptr_xyz_GEaNl, &
  & cptr_gtildeNl, &
  & cptr_tfcoordz, cptr_derivate, cptr_vzderivate, &
  & Rd, Cp, Cv &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

  use Derivate_Field_IcGrid2D_Manager, only:  &
    & Derivate_Field_IcGrid2D

  use VDerivate_Field_IcGrid3D_Manager, only:  &
    & VDerivate_Field_IcGrid3D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_SP

  implicit none

  type(c_ptr), value :: cptr_SP
  type(c_ptr), value :: cptr_VhDevAs
  type(c_ptr), value :: cptr_VhNl
  type(c_ptr), value :: cptr_WNl
  type(c_ptr), value :: cptr_xyz_RhoNl
  type(c_ptr), value :: cptr_HGradPNl
  type(c_ptr), value :: cptr_hNl
  type(c_ptr), value :: cptr_xyz_GEaNl
  type(c_ptr), value :: cptr_gtildeNl
  type(c_ptr), value :: cptr_tfcoordz
  type(c_ptr), value :: cptr_derivate
  type(c_ptr), value :: cptr_vzderivate
  real(DP), value :: Rd
  real(DP), value :: Cp
  real(DP), value :: Cv

  type(Field_IcGrid3D), pointer :: ptr_SP
  type(Field_IcGrid3D), pointer :: ptr_VhDevAs
  type(Field_IcGrid3D), pointer :: ptr_VhNl
  type(Field_IcGrid3D), pointer :: ptr_WNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_RhoNl
  type(Field_IcGrid3D), pointer :: ptr_HGradPNl
  type(Field_IcGrid3D), pointer :: ptr_hNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_GEaNl
  type(Field_IcGrid3D), pointer :: ptr_gtildeNl
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz
  type(Derivate_Field_IcGrid2D), pointer :: ptr_derivate
  type(VDerivate_Field_IcGrid3D), pointer :: ptr_vzderivate


  call c_f_pointer(cptr_SP, ptr_SP)
  call c_f_pointer(cptr_VhDevAs, ptr_VhDevAs)
  call c_f_pointer(cptr_VhNl, ptr_VhNl)
  call c_f_pointer(cptr_WNl, ptr_WNl)
  call c_f_pointer(cptr_xyz_RhoNl, ptr_xyz_RhoNl)
  call c_f_pointer(cptr_HGradPNl, ptr_HGradPNl)
  call c_f_pointer(cptr_hNl, ptr_hNl)
  call c_f_pointer(cptr_xyz_GEaNl, ptr_xyz_GEaNl)
  call c_f_pointer(cptr_gtildeNl, ptr_gtildeNl)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)
  call c_f_pointer(cptr_derivate, ptr_derivate)
  call c_f_pointer(cptr_vzderivate, ptr_vzderivate)

  call calc_SP( &
    & ptr_SP, &
    & ptr_VhDevAs, ptr_VhNl, ptr_WNl, &
    & ptr_xyz_RhoNl, ptr_HGradPNl, ptr_hNl, ptr_xyz_GEaNl, &
    & ptr_gtildeNl, ptr_tfcoordz, ptr_derivate, ptr_vzderivate, &
    & Rd, Cp, Cv )

end subroutine smallTstep_calc_SP

subroutine smallTstep_calc_WDevAs( &
  & cptr_xyr_WDevAs, cptr_xyr_WDevNs, &
  & cptr_xyz_RDevNs, cptr_xyz_PDevNs, cptr_xyz_VhDevAs, &
  & cptr_xyz_VhNl, cptr_xyr_WNl, & 
  & cptr_xyz_RhoNl, cptr_xyz_hNl, cptr_xyz_gtildeNl, &
  & cptr_xyz_SR, cptr_xyz_SP, cptr_xyr_SW, &
  & cptr_IcosaLorentzGrid, cptr_tfcoordz, cptr_tfcoordr, cptr_vrderivate, &
  & Grav, Rd, Cp, Cv, DelTimeShort, &
  & hydrostatic_opt &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use IcosahedralLorentzGrid_Manager, only: &
    & IcosahedralLorentzGrid
    
  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

  use VDerivate_Field_IcGrid3D_Manager, only:  &
    & VDerivate_Field_IcGrid3D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_WDevAs

  implicit none

  type(c_ptr), value :: cptr_xyr_WDevAs
  type(c_ptr), value :: cptr_xyr_WDevNs
  type(c_ptr), value :: cptr_xyz_RDevNs
  type(c_ptr), value :: cptr_xyz_PDevNs
  type(c_ptr), value :: cptr_xyz_VhDevAs  
  type(c_ptr), value :: cptr_xyz_VhNl
  type(c_ptr), value :: cptr_xyr_WNl
  type(c_ptr), value :: cptr_xyz_RhoNl
  type(c_ptr), value :: cptr_xyz_hNl
  type(c_ptr), value :: cptr_xyz_gtildeNl
  type(c_ptr), value :: cptr_xyz_SR
  type(c_ptr), value :: cptr_xyz_SP
  type(c_ptr), value :: cptr_xyr_SW
  type(c_ptr), value :: cptr_IcosaLorentzGrid  
  type(c_ptr), value :: cptr_tfcoordz  
  type(c_ptr), value :: cptr_tfcoordr
  type(c_ptr), value :: cptr_vrderivate
  real(DP), value :: Grav
  real(DP), value :: Rd
  real(DP), value :: Cp
  real(DP), value :: Cv
  real(DP), value :: DelTimeShort
  integer, value :: hydrostatic_opt

  type(Field_IcGrid3D), pointer :: ptr_xyr_WDevAs
  type(Field_IcGrid3D), pointer :: ptr_xyr_WDevNs
  type(Field_IcGrid3D), pointer :: ptr_z_RDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_RDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_PDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_VhNl
  type(Field_IcGrid3D), pointer :: ptr_xyr_WNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_VhDevAs
  type(Field_IcGrid3D), pointer :: ptr_xyz_RhoNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_hNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_gtildeNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_SR
  type(Field_IcGrid3D), pointer :: ptr_xyz_SP
  type(Field_IcGrid3D), pointer :: ptr_xyr_SW
  type(IcosahedralLorentzGrid), pointer :: ptr_IcosaLorentzGrid
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordr
  type(VDerivate_Field_IcGrid3D), pointer :: ptr_vrderivate
  logical :: lo_hydrostatic_option

  if ( hydrostatic_opt == 0 ) then
    lo_hydrostatic_option = .false.
  else
    lo_hydrostatic_option = .true.
  end if

!  write(*,*) 'hydn option:', lo_hydrostatic_option

  call c_f_pointer(cptr_xyr_WDevAs, ptr_xyr_WDevAs)
  call c_f_pointer(cptr_xyr_WDevNs, ptr_xyr_WDevNs)
  call c_f_pointer(cptr_xyz_RDevNs, ptr_xyz_RDevNs)
  call c_f_pointer(cptr_xyz_PDevNs, ptr_xyz_PDevNs)
  call c_f_pointer(cptr_xyz_VhDevAs, ptr_xyz_VhDevAs)
  call c_f_pointer(cptr_xyz_VhNl, ptr_xyz_VhNl)
  call c_f_pointer(cptr_xyr_WNl, ptr_xyr_WNl)
  call c_f_pointer(cptr_xyz_RhoNl, ptr_xyz_RhoNl)
  call c_f_pointer(cptr_xyz_hNl, ptr_xyz_hNl)
  call c_f_pointer(cptr_xyz_gtildeNl, ptr_xyz_gtildeNl)
  call c_f_pointer(cptr_xyz_SR, ptr_xyz_SR)
  call c_f_pointer(cptr_xyz_SP, ptr_xyz_SP)
  call c_f_pointer(cptr_xyr_SW, ptr_xyr_SW)
  call c_f_pointer(cptr_IcosaLorentzGrid, ptr_IcosaLorentzGrid)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)
  call c_f_pointer(cptr_tfcoordr, ptr_tfcoordr)
  call c_f_pointer(cptr_vrderivate, ptr_vrderivate)

  call calc_WDevAs( &
    & ptr_xyr_WDevAs, ptr_xyr_WDevNs, &
    & ptr_xyz_RDevNs, ptr_xyz_PDevNs, ptr_xyz_VhDevAs, &
    & ptr_xyz_VhNl, ptr_xyr_WNl, ptr_xyz_RhoNl, ptr_xyz_hNl, ptr_xyz_gtildeNl, &
    & ptr_xyz_SR, ptr_xyz_SP, ptr_xyr_SW, &
    & ptr_IcosaLorentzGrid, ptr_tfcoordz, ptr_tfcoordr, ptr_vrderivate, &
    & Grav, Rd, Cp, Cv, DelTimeShort, lo_hydrostatic_option )

end subroutine smallTstep_calc_WDevAs

subroutine smallTstep_calc_RDevAs( &
  & cptr_xyz_RDevAs, cptr_xyz_RDevNs, &
  & cptr_xyr_WDevAs, cptr_xyz_SR, &
  & cptr_tfcoordz, cptr_vzderivate, &
  & DelTimeShort &
  & )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

  use VDerivate_Field_IcGrid3D_Manager, only:  &
    & VDerivate_Field_IcGrid3D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_RDevAs

  implicit none

  type(c_ptr), value :: cptr_xyz_RDevAs
  type(c_ptr), value :: cptr_xyz_RDevNs
  type(c_ptr), value :: cptr_xyr_WDevAs
  type(c_ptr), value :: cptr_xyz_SR
  type(c_ptr), value :: cptr_tfcoordz
  type(c_ptr), value :: cptr_vzderivate
  real(DP), value :: DelTimeShort

  type(Field_IcGrid3D), pointer :: ptr_xyz_RDevAs
  type(Field_IcGrid3D), pointer :: ptr_xyz_RDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyr_WDevAs
  type(Field_IcGrid3D), pointer :: ptr_xyz_SR
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz
  type(VDerivate_Field_IcGrid3D), pointer :: ptr_vzderivate

  call c_f_pointer(cptr_xyz_RDevAs, ptr_xyz_RDevAs)
  call c_f_pointer(cptr_xyz_RDevNs, ptr_xyz_RDevNs)
  call c_f_pointer(cptr_xyr_WDevAs, ptr_xyr_WDevAs)
  call c_f_pointer(cptr_xyz_SR, ptr_xyz_SR)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)
  call c_f_pointer(cptr_vzderivate, ptr_vzderivate)

  call calc_RDevAs( &
    & ptr_xyz_RDevAs, ptr_xyz_RDevNs, &
    & ptr_xyr_WDevAs, ptr_xyz_SR, &
    & ptr_tfcoordz, ptr_vzderivate, &
    & DelTimeShort )

end subroutine smallTstep_calc_RDevAs

subroutine smallTstep_calc_EDevAs( &
  & cptr_EDevAs, cptr_EDevNs, &
  & cptr_ENl, cptr_RDevAs, cptr_VhDevAs, cptr_WDevAs, &
  & cptr_RDevNs, cptr_VhDevNs, cptr_WDevNs, &
  & cptr_xyz_RhoNl, cptr_VhNl, cptr_WNl, cptr_hNl, &
  & cptr_xyz_GEaNl, cptr_TEAs, cptr_TENs, &
  & cptr_tfcoordz, cptr_derivate, cptr_vzderivate, &
  & Grav, Cp, Cv, DelTimeShort )

  use, intrinsic :: iso_c_binding

  use Field_IcGrid3D_Manager, only:  &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only:  &
    & TFCoord_IcGrid3D

 use Derivate_Field_IcGrid2D_Manager, only:  &
    & Derivate_Field_IcGrid2D

  use VDerivate_Field_IcGrid3D_Manager, only:  &
    & VDerivate_Field_IcGrid3D

  use dc_types, only: DP

  use small_time_step_mod, only: &
    & calc_EDevAs

  implicit none

  type(c_ptr), value :: cptr_EDevAs
  type(c_ptr), value :: cptr_EDevNs
  type(c_ptr), value :: cptr_ENl
  type(c_ptr), value :: cptr_RDevAs
  type(c_ptr), value :: cptr_VhDevAs
  type(c_ptr), value :: cptr_WDevAs
  type(c_ptr), value :: cptr_RDevNs
  type(c_ptr), value :: cptr_VhDevNs
  type(c_ptr), value :: cptr_WDevNs
  type(c_ptr), value :: cptr_xyz_RhoNl
  type(c_ptr), value :: cptr_VhNl
  type(c_ptr), value :: cptr_WNl
  type(c_ptr), value :: cptr_hNl
  type(c_ptr), value :: cptr_xyz_GEaNl
  type(c_ptr), value :: cptr_TEAs
  type(c_ptr), value :: cptr_TENs
  type(c_ptr), value :: cptr_tfcoordz
  type(c_ptr), value :: cptr_derivate
  type(c_ptr), value :: cptr_vzderivate
  real(DP), value :: Grav
  real(DP), value :: Cp
  real(DP), value :: Cv
  real(DP), value :: DelTimeShort

  type(Field_IcGrid3D), pointer :: ptr_EDevNs
  type(Field_IcGrid3D), pointer :: ptr_EDevAs
  type(Field_IcGrid3D), pointer :: ptr_ENl
  type(Field_IcGrid3D), pointer :: ptr_RDevAs
  type(Field_IcGrid3D), pointer :: ptr_VhDevAs
  type(Field_IcGrid3D), pointer :: ptr_WDevAs
  type(Field_IcGrid3D), pointer :: ptr_RDevNs
  type(Field_IcGrid3D), pointer :: ptr_VhDevNs
  type(Field_IcGrid3D), pointer :: ptr_WDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_RhoNl
  type(Field_IcGrid3D), pointer :: ptr_VhNl
  type(Field_IcGrid3D), pointer :: ptr_WNl
  type(Field_IcGrid3D), pointer :: ptr_hNl
  type(Field_IcGrid3D), pointer :: ptr_xyz_GEaNl
  type(Field_IcGrid3D), pointer :: ptr_TEAs
  type(Field_IcGrid3D), pointer :: ptr_TENs
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz
  type(Derivate_Field_IcGrid2D), pointer :: ptr_derivate
  type(VDerivate_Field_IcGrid3D), pointer :: ptr_vzderivate

  call c_f_pointer(cptr_EDevAs, ptr_EDevAs)
  call c_f_pointer(cptr_EDevNs, ptr_EDevNs)
  call c_f_pointer(cptr_ENl, ptr_ENl)
  call c_f_pointer(cptr_RDevAs, ptr_RDevAs)
  call c_f_pointer(cptr_VhDevAs, ptr_VhDevAs)
  call c_f_pointer(cptr_WDevAs, ptr_WDevAs)
  call c_f_pointer(cptr_RDevNs, ptr_RDevNs)
  call c_f_pointer(cptr_VhDevNs, ptr_VhDevNs)
  call c_f_pointer(cptr_WDevNs, ptr_WDevNs)
  call c_f_pointer(cptr_xyz_RhoNl, ptr_xyz_RhoNl)
  call c_f_pointer(cptr_VhNl, ptr_VhNl)
  call c_f_pointer(cptr_WNl, ptr_WNl)
  call c_f_pointer(cptr_hNl, ptr_hNl)
  call c_f_pointer(cptr_xyz_GEaNl, ptr_xyz_GEaNl)
  call c_f_pointer(cptr_TEAs, ptr_TEAs)
  call c_f_pointer(cptr_TENs, ptr_TENs)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)
  call c_f_pointer(cptr_derivate, ptr_derivate)
  call c_f_pointer(cptr_vzderivate, ptr_vzderivate)

  call calc_EDevAs( &
    & ptr_EDevAs, ptr_EDevNs, ptr_ENl,  &
    & ptr_RDevAs, ptr_VhDevAs, ptr_WDevAs, &
    & ptr_RDevNs, ptr_VhDevNs, ptr_WDevNs, &
    & ptr_xyz_RhoNl,  &
    & ptr_VhNl, ptr_WNl, ptr_hNl, &
    & ptr_xyz_GEaNl, &
    & ptr_TEAs, ptr_TENs, &
    & ptr_tfcoordz, ptr_derivate, ptr_vzderivate, &
    & Grav, Cp, Cv, DelTimeShort )

end subroutine smallTStep_calc_EDevAs
