subroutine Initialize_Experiment( &
  & cexperimentName &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: &
    & STRING

	use CBinding_Utility, only: &
		& c_f_string
		
  use experiment_impl_template, only: &
    & experiment_impl_Init
	
	implicit none
	
  character(len=1, kind=c_char), intent(in) :: cexperimentName(*)
  
 	character(STRING) :: experimentName
	
	call c_f_string(cexperimentName, experimentName)

  call experiment_impl_Init( &
    & experimentName=experimentName &
 		& )
 		
end subroutine Initialize_Experiment

subroutine setTopographicData_experiment( &
  & cptr_xy_Zs &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: &
    & STRING

  use Field_IcGrid2D_Manager, only: &
    & Field_IcGrid2D
		
  use experiment_impl_template, only: &
    & set_TopographicData
	
	implicit none
	
  type(c_ptr), value :: cptr_xy_Zs

  type(Field_IcGrid2D), pointer :: ptr_xy_Zs
	
  call c_f_pointer(cptr_xy_Zs, ptr_xy_Zs)

  call set_TopographicData( &
		& xy_Zs=ptr_xy_Zs &
		& )
		
end subroutine setTopographicData_experiment

subroutine setInitialFieldData_experiment( &
  & cptr_RhoBasic, cptr_PressBasic, &
  & cptr_VhNl, cptr_WNl, cptr_RNl, cptr_PNl, cptr_ENl, &
  & cptr_tfcoordz, cptr_tfcoordr &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: &
    & STRING

  use Field_Grid1D_Manager, only: &
    & Field_Grid1D

  use Field_IcGrid3D_Manager, only: &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only: &
    & TFCoord_IcGrid3D

	use CBinding_Utility, only: &
		& c_f_string
		
  use experiment_impl_template, only: &
    & set_initialFieldData
	
	implicit none
	
  type(c_ptr), value :: cptr_RhoBasic
  type(c_ptr), value :: cptr_PressBasic
  type(c_ptr), value :: cptr_VhNl
  type(c_ptr), value :: cptr_WNl
  type(c_ptr), value :: cptr_RNl
  type(c_ptr), value :: cptr_PNl
  type(c_ptr), value :: cptr_ENl
  type(c_ptr), value :: cptr_tfcoordz
  type(c_ptr), value :: cptr_tfcoordr

  type(Field_Grid1D), pointer :: ptr_RhoBasic
  type(Field_Grid1D), pointer :: ptr_PressBasic
  type(Field_IcGrid3D), pointer :: ptr_VhNl
  type(Field_IcGrid3D), pointer :: ptr_WNl
  type(Field_IcGrid3D), pointer :: ptr_RNl
  type(Field_IcGrid3D), pointer :: ptr_PNl
  type(Field_IcGrid3D), pointer :: ptr_ENl
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordz
  type(TFCoord_IcGrid3D), pointer :: ptr_tfcoordr
	
  call c_f_pointer(cptr_RhoBasic, ptr_RhoBasic)
  call c_f_pointer(cptr_PressBasic, ptr_PressBasic)
  call c_f_pointer(cptr_VhNl, ptr_VhNl)
  call c_f_pointer(cptr_WNl, ptr_WNl)
  call c_f_pointer(cptr_RNl, ptr_RNl)
  call c_f_pointer(cptr_PNl, ptr_PNl)
  call c_f_pointer(cptr_ENl, ptr_ENl)
  call c_f_pointer(cptr_tfcoordz, ptr_tfcoordz)
  call c_f_pointer(cptr_tfcoordr, ptr_tfcoordr)


  call set_initialFieldData( &
    & z_RhoBasic=ptr_RhoBasic, z_PressBasic=ptr_PressBasic, &
    & xyz_Vh=ptr_VhNl, xyr_W=ptr_WNl, &
    & xyz_RhoPerturb=ptr_RNl, xyz_PressPerturb=ptr_PNl, &
    & xyz_e=ptr_ENl, &
    & tfcoordz=ptr_tfcoordz, tfcoordr=ptr_tfcoordr )

end subroutine setInitialFieldData_experiment

subroutine longtimelevel_rkstep_updated_experiment( &
  & NStepLong, RKStep, cptr_RhoBasic, cptr_PressBasic, &
  & cptr_VhNl, cptr_WNl, cptr_RNl, cptr_ENl, &
  & cptr_QNl &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: &
    & STRING

  use Field_Grid1D_Manager, only: &
    & Field_Grid1D

  use Field_IcGrid3D_Manager, only: &
    & Field_IcGrid3D

  use experiment_impl_template, only: &
    & LongTimeLevel_RKStep_Updated

  implicit none

  integer(c_int), value :: NStepLong
  integer(c_int), value :: RKStep
  type(c_ptr), value :: cptr_RhoBasic
  type(c_ptr), value :: cptr_PressBasic
  type(c_ptr), value :: cptr_VhNl
  type(c_ptr), value :: cptr_WNl
  type(c_ptr), value :: cptr_RNl
  type(c_ptr), value :: cptr_ENl
  type(c_ptr), value :: cptr_QNl
  
  type(Field_IcGrid3D), pointer :: ptr_RhoBasic
  type(Field_IcGrid3D), pointer :: ptr_PressBasic
  type(Field_IcGrid3D), pointer :: ptr_VhNl
  type(Field_IcGrid3D), pointer :: ptr_WNl
  type(Field_IcGrid3D), pointer :: ptr_RNl
  type(Field_IcGrid3D), pointer :: ptr_ENl
  type(Field_IcGrid3D), pointer :: ptr_QNl

  call c_f_pointer(cptr_RhoBasic, ptr_RhoBasic)
  call c_f_pointer(cptr_PressBasic, ptr_PressBasic)
  call c_f_pointer(cptr_VhNl, ptr_VhNl)
  call c_f_pointer(cptr_WNl, ptr_WNl)
  call c_f_pointer(cptr_RNl, ptr_RNl)
  call c_f_pointer(cptr_ENl, ptr_ENl)
  call c_f_pointer(cptr_QNl, ptr_QNl)

  call LongTimeLevel_RKStep_Updated( &
    & NStepLong, RKStep, &
    & ptr_RhoBasic, ptr_PressBasic, &
    & ptr_VhNl, ptr_WNl, ptr_RNl, ptr_ENl, &
    & ptr_QNl )

end subroutine longtimelevel_rkstep_updated_experiment

subroutine longtimelevel_component_updated_experiment( &
  & NStepLong, RKStep, &
  & cptr_GR, cptr_GVh, cptr_GW, cptr_GEa &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: &
    & STRING

  use Field_Grid1D_Manager, only: &
    & Field_Grid1D

  use Field_IcGrid3D_Manager, only: &
    & Field_IcGrid3D

  use experiment_impl_template, only: &
    & LongTimeLevel_Component_Updated

  implicit none

  integer(c_int), value :: NStepLong
  integer(c_int), value :: RKStep
  type(c_ptr), value :: cptr_GR
  type(c_ptr), value :: cptr_GVh
  type(c_ptr), value :: cptr_GW
  type(c_ptr), value :: cptr_GEa
  
  type(Field_IcGrid3D), pointer :: ptr_GR, ptr_GVh, ptr_GW, ptr_GEa

  call c_f_pointer(cptr_GR, ptr_GR)
  call c_f_pointer(cptr_GVh, ptr_GVh)
  call c_f_pointer(cptr_GW, ptr_GW)
  call c_f_pointer(cptr_GEa, ptr_GEa)

  call LongTimeLevel_Component_Updated( &
    & NStepLong, RKStep, &
    & ptr_GR, ptr_GVh, ptr_GW, ptr_GEa & 
    & )

end subroutine longtimelevel_component_updated_experiment

subroutine shorttimelevel_updated_experiment( &
  & NStepLong, NStepShort, cptr_RhoBasic, cptr_PressBasic, &
  & cptr_xyz_VhDevNs, cptr_xyr_WDevNs, cptr_xyz_RDevNs, cptr_xyz_EDevNs, &
  & cptr_xyz_QNs &
  & )

  use, intrinsic :: iso_c_binding

  use dc_types, only: &
    & STRING

  use Field_Grid1D_Manager, only: &
    & Field_Grid1D
    
  use Field_IcGrid3D_Manager, only: &
    & Field_IcGrid3D
    
  use experiment_impl_template, only: &
    & ShortTimeLevel_updated

  implicit none

  integer(c_int), value :: NStepLong
  integer(c_int), value :: NStepShort
  type(c_ptr), value :: cptr_RhoBasic
  type(c_ptr), value :: cptr_PressBasic
  type(c_ptr), value :: cptr_xyz_VhDevNs
  type(c_ptr), value :: cptr_xyr_WDevNs
  type(c_ptr), value :: cptr_xyz_RDevNs
  type(c_ptr), value :: cptr_xyz_EDevNs
  type(c_ptr), value :: cptr_xyz_QNs

  type(Field_IcGrid3D), pointer :: ptr_RhoBasic
  type(Field_IcGrid3D), pointer :: ptr_PressBasic
  type(Field_IcGrid3D), pointer :: ptr_xyz_VhDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyr_WDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_RDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_EDevNs
  type(Field_IcGrid3D), pointer :: ptr_xyz_QNs

  call c_f_pointer(cptr_RhoBasic, ptr_RhoBasic)
  call c_f_pointer(cptr_PressBasic, ptr_PressBasic)
  call c_f_pointer(cptr_xyz_VhDevNs, ptr_xyz_VhDevNs)
  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_EDevNs, ptr_xyz_EDevNs)
  call c_f_pointer(cptr_xyz_QNs, ptr_xyz_QNs)

  call ShortTimeLevel_updated( &
    & NStepLong, NStepShort, &
    & ptr_RhoBasic, ptr_PressBasic, &
    & ptr_xyz_VhDevNs, ptr_xyr_WDevNs, &
    & ptr_xyz_RDevNs, ptr_xyz_EDevNs, ptr_xyz_QNs )

end subroutine shorttimelevel_updated_experiment

subroutine Finalize_Experiment()

  use experiment_impl_template, only: &
    & experiment_impl_Final

  implicit none

  call experiment_impl_Final()

end subroutine Finalize_Experiment



