























































































































 


































































































































































 






























































































































































































































































 



















































 










 








































































































































































































































 










                                
                                

                                
                                

                                
                                

                                



















































































subroutine EHFinder_Init_F(cctk_dim,cctk_gsh,cctk_lsh,cctk_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignment,cctk_&
  &alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_time,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_levof&
  &f,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cctk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3&
  &, X0center_arrays,X0dxg,X0dxg2,X0dyg,X0dyg2,X0dzg,X0dzg2,X0eh_area,X0eh_area2,X0eh_centroid2_x,X0eh_centroid2_y,X0eh_centroid2_z&
  &,X0eh_centroid_x,X0eh_centroid_y,X0eh_centroid_z,X0eh_circ_eq,X0eh_circ_eq2,X0eh_circ_pol,X0eh_circ_pol2,X0generator_arrays,X0ge&
  &nerator_arrays2,X0integrate_tmp_array,X0interp_metric_arrays,X0surface_arrays,X0surface_int_array,X0surface_tmp_arrays,X0xg,X0xg&
  &2,X0yg,X0yg2,X0zg,X0zg2,X1dxg2,X1dyg2,X1dzg2,X1generator_arrays2,X1integrate_tmp_array,X1interp_metric_arrays,X1surface_arrays,X&
  &1surface_int_array,X1surface_tmp_arrays,X1xg2,X1yg2,X1zg2,dfsq_length,dfx_length,dfy_length,dfz_length,dxg2_length,dxg_length,dy&
  &g2_length,dyg_length,dzg2_length,dzg_length,eh_area2_length,eh_area_length,eh_centroid2_x_length,eh_centroid2_y_length,eh_centro&
  &id2_z_length,eh_centroid_x_length,eh_centroid_y_length,eh_centroid_z_length,eh_circ_eq2_length,eh_circ_eq_length,eh_circ_pol2_le&
  &ngth,eh_circ_pol_length,eh_mask_bak_length,eh_mask_length,f_length,fbak_length,ftmp_length,sf_length,sftmp_length,tm_mask_length&
  &,xg2_length,xg_length,yg2_length,yg_length,zg2_length,zg_length,alpg,alpg2,betaxg,betaxg2,betayg,betayg2,betazg,betazg2,center,c&
  &osphi,costheta,cphi,ctheta,da,dfdx_interp,dfdy_interp,dfdz_interp,dfsq,dfx,dfxg,dfxg2,dfy,dfyg,dfyg2,dfz,dfzg,dfzg2,dlphi,dlthet&
  &a,drdphi,drdtheta,drsurf,dxg,dxg2,dyg,dyg2,dzg,dzg2,eh_area,eh_area2,eh_centroid2_x,eh_centroid2_y,eh_centroid2_z,eh_centroid_x,&
  &eh_centroid_y,eh_centroid_z,eh_circ_eq,eh_circ_eq2,eh_circ_pol,eh_circ_pol2,eh_mask,eh_mask_bak,f,f_p,f_p_p,f_interp,fbak,find_s&
  &urface_status,ftmp,g3xx,g3xy,g3xz,g3yy,g3yz,g3zz,gpp,gtp,gtt,gxxg,gxxg2,gxxi,gxyg,gxyg2,gxyi,gxzg,gxzg2,gxzi,gyyg,gyyg2,gyyi,gyz&
  &g,gyzg2,gyzi,gzzg,gzzg2,gzzi,int_tmp,integrate_counter,interp_x,interp_y,interp_z,levelset_counter,more_levelsets,more_points,mo&
  &re_surfaces,n_since_last_reduction,niter_reinit,phi_sym_factor,phiweights,points_counter,psig,psig2,psii,re_init_control,rsurf,s&
  &c,sf,sftmp,sinphi,sintheta,surface_counter,sym_factor,theta_sym_factor,thetaweights,tm_mask,weights,xg,xg_p,xg_p_p,xg2,xg2_p,xg2&
  &_p_p,xgf,xgf2,yg,yg_p,yg_p_p,yg2,yg2_p,yg2_p_p,ygf,ygf2,zg,zg_p,zg_p_p,zg2,zg2_p,zg2_p_p,zgf,zgf2, active_slicing_handle,alp,alp&
  &_p,alp_p_p,betax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state&
  &,dtalp,dtalp_p,dtalp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state&
  &,dtshift_state,emask,gxx,gxx_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p&
  &,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kxy_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kzz_p,kzz_p_p,psi,psix,psixx,psix&
  &y,psixz,psiy,psiyy,psiyz,psiz,psizz,r,shift_state,space_mask,x,y,z)

  use EHFinder_mod

  implicit none

  INTEGER*4 EHFinder_MaxNumEvolvedVars
  integer, parameter :: cctki_use_EHFinder_MaxNumEvolvedVars = kind(EHFinder_MaxNumEvolvedVars)
  INTEGER*4 EHFinder_Max_Evolved_Array_Size
  integer, parameter :: cctki_use_EHFinder_Max_Evolved_Array_Size = kind(EHFinder_Max_Evolved_Array_Size)
  INTEGER*4 EHFinder_Num_ArrayEvolved_Vars
  integer, parameter :: cctki_use_EHFinder_Num_ArrayEvolved_Vars = kind(EHFinder_Num_ArrayEvolved_Vars)
  COMMON /ehfinderrest/EHFinder_MaxNumEvolvedVars, EHFinder_Max_Evolved_Array_Size, EHFinder_Num_ArrayEvolved_Vars
  REAL*8 cas_a (10)
  integer, parameter :: cctki_use_cas_a = kind(cas_a)
  REAL*8 cas_b (10)
  integer, parameter :: cctki_use_cas_b = kind(cas_b)
  REAL*8 center_x
  integer, parameter :: cctki_use_center_x = kind(center_x)
  REAL*8 center_y
  integer, parameter :: cctki_use_center_y = kind(center_y)
  REAL*8 center_z
  integer, parameter :: cctki_use_center_z = kind(center_z)
  REAL*8 initial_a (10)
  integer, parameter :: cctki_use_initial_a = kind(initial_a)
  REAL*8 initial_b (10)
  integer, parameter :: cctki_use_initial_b = kind(initial_b)
  REAL*8 initial_c (10)
  integer, parameter :: cctki_use_initial_c = kind(initial_c)
  REAL*8 initial_rad (10)
  integer, parameter :: cctki_use_initial_rad = kind(initial_rad)
  REAL*8 rotation_alpha (10)
  integer, parameter :: cctki_use_rotation_alpha = kind(rotation_alpha)
  REAL*8 rotation_beta (10)
  integer, parameter :: cctki_use_rotation_beta = kind(rotation_beta)
  REAL*8 rotation_gamma (10)
  integer, parameter :: cctki_use_rotation_gamma = kind(rotation_gamma)
  REAL*8 shell_width
  integer, parameter :: cctki_use_shell_width = kind(shell_width)
  REAL*8 translate_x (10)
  integer, parameter :: cctki_use_translate_x = kind(translate_x)
  REAL*8 translate_y (10)
  integer, parameter :: cctki_use_translate_y = kind(translate_y)
  REAL*8 translate_z (10)
  integer, parameter :: cctki_use_translate_z = kind(translate_z)
  integer*8 area_calculation_method
  integer, parameter :: cctki_use_area_calculation_method = kind(area_calculation_method)
  integer*8 area_interpolator
  integer, parameter :: cctki_use_area_interpolator = kind(area_interpolator)
  integer*8 eh_lapse_type
  integer, parameter :: cctki_use_eh_lapse_type = kind(eh_lapse_type)
  integer*8 eh_metric_type
  integer, parameter :: cctki_use_eh_metric_type = kind(eh_metric_type)
  integer*8 eh_shift_type
  integer, parameter :: cctki_use_eh_shift_type = kind(eh_shift_type)
  integer*8 file_type
  integer, parameter :: cctki_use_file_type = kind(file_type)
  integer*8 generator_distribution
  integer, parameter :: cctki_use_generator_distribution = kind(generator_distribution)
  integer*8 generator_interpolator
  integer, parameter :: cctki_use_generator_interpolator = kind(generator_interpolator)
  integer*8 generator_tracking_method
  integer, parameter :: cctki_use_generator_tracking_method = kind(generator_tracking_method)
  integer*8 initial_f (10)
  integer, parameter :: cctki_use_initial_f = kind(initial_f)
  integer*8 mode
  integer, parameter :: cctki_use_mode = kind(mode)
  integer*8 pde_differences
  integer, parameter :: cctki_use_pde_differences = kind(pde_differences)
  integer*8 re_init_int_method
  integer, parameter :: cctki_use_re_init_int_method = kind(re_init_int_method)
  integer*8 surface_direction
  integer, parameter :: cctki_use_surface_direction = kind(surface_direction)
  integer*8 surface_interpolator
  integer, parameter :: cctki_use_surface_interpolator = kind(surface_interpolator)
  integer*8 upwind_type
  integer, parameter :: cctki_use_upwind_type = kind(upwind_type)
  INTEGER*4 area_interpolation_order
  integer, parameter :: cctki_use_area_interpolation_order = kind(area_interpolation_order)
  INTEGER*4 cheat
  integer, parameter :: cctki_use_cheat = kind(cheat)
  INTEGER*4 cheat_iterations
  integer, parameter :: cctki_use_cheat_iterations = kind(cheat_iterations)
  INTEGER*4 eh_number_level_sets
  integer, parameter :: cctki_use_eh_number_level_sets = kind(eh_number_level_sets)
  INTEGER*4 evolve_generators
  integer, parameter :: cctki_use_evolve_generators = kind(evolve_generators)
  INTEGER*4 generator_interpolation_order
  integer, parameter :: cctki_use_generator_interpolation_order = kind(generator_interpolation_order)
  INTEGER*4 last_iteration_number
  integer, parameter :: cctki_use_last_iteration_number = kind(last_iteration_number)
  INTEGER*4 maximum_surface_number
  integer, parameter :: cctki_use_maximum_surface_number = kind(maximum_surface_number)
  INTEGER*4 n_array_ghosts
  integer, parameter :: cctki_use_n_array_ghosts = kind(n_array_ghosts)
  INTEGER*4 nphi
  integer, parameter :: cctki_use_nphi = kind(nphi)
  INTEGER*4 ntheta
  integer, parameter :: cctki_use_ntheta = kind(ntheta)
  INTEGER*4 number_of_generators
  integer, parameter :: cctki_use_number_of_generators = kind(number_of_generators)
  INTEGER*4 number_of_generators_phi
  integer, parameter :: cctki_use_number_of_generators_phi = kind(number_of_generators_phi)
  INTEGER*4 number_of_generators_theta
  integer, parameter :: cctki_use_number_of_generators_theta = kind(number_of_generators_theta)
  INTEGER*4 re_init_max_iter
  integer, parameter :: cctki_use_re_init_max_iter = kind(re_init_max_iter)
  INTEGER*4 re_init_undo
  integer, parameter :: cctki_use_re_init_undo = kind(re_init_undo)
  INTEGER*4 re_init_verbose
  integer, parameter :: cctki_use_re_init_verbose = kind(re_init_verbose)
  INTEGER*4 re_initialize_every
  integer, parameter :: cctki_use_re_initialize_every = kind(re_initialize_every)
  INTEGER*4 read_conformal_factor_once
  integer, parameter :: cctki_use_read_conformal_factor_once = kind(read_conformal_factor_once)
  INTEGER*4 saved_iteration_every
  integer, parameter :: cctki_use_saved_iteration_every = kind(saved_iteration_every)
  INTEGER*4 surface_interpolation_order
  integer, parameter :: cctki_use_surface_interpolation_order = kind(surface_interpolation_order)
  INTEGER*4 use_inner_excision
  integer, parameter :: cctki_use_use_inner_excision = kind(use_inner_excision)
  INTEGER*4 use_outer_excision
  integer, parameter :: cctki_use_use_outer_excision = kind(use_outer_excision)
  INTEGER*4 use_user_center
  integer, parameter :: cctki_use_use_user_center = kind(use_user_center)
  COMMON /EHFinderpriv/cas_a, cas_b, center_x, center_y, center_z, initial_a, initial_b, initial_c, initial_rad, rotation_alpha, ro&
  &tation_beta, rotation_gamma, shell_width, translate_x, translate_y, translate_z, area_calculation_method, area_interpolator, eh_&
  &lapse_type, eh_metric_type, eh_shift_type, file_type, generator_distribution, generator_interpolator, generator_tracking_method,&
  & initial_f, mode, pde_differences, re_init_int_method, surface_direction, surface_interpolator, upwind_type, area_interpolation_&
  &order, cheat, cheat_iterations, eh_number_level_sets, evolve_generators, generator_interpolation_order, last_iteration_number, m&
  &aximum_surface_number, n_array_ghosts, nphi, ntheta, number_of_generators, number_of_generators_phi, number_of_generators_theta,&
  & re_init_max_iter, re_init_undo, re_init_verbose, re_initialize_every, read_conformal_factor_once, saved_iteration_every, surfac&
  &e_interpolation_order, use_inner_excision, use_outer_excision, use_user_center
  integer*8 CCTKH0
  integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
  integer*8 CCTKH1
  integer, parameter :: cctki_use_CCTKH1 = kind(CCTKH1)
  integer*8 CCTKH2
  integer, parameter :: cctki_use_CCTKH2 = kind(CCTKH2)
  integer*8 CCTKH3
  integer, parameter :: cctki_use_CCTKH3 = kind(CCTKH3)
  integer*8 initial_data
  integer, parameter :: cctki_use_initial_data = kind(initial_data)
  integer*8 CCTKH4
  integer, parameter :: cctki_use_CCTKH4 = kind(CCTKH4)
  integer*8 CCTKH5
  integer, parameter :: cctki_use_CCTKH5 = kind(CCTKH5)
  integer*8 initial_lapse
  integer, parameter :: cctki_use_initial_lapse = kind(initial_lapse)
  integer*8 initial_shift
  integer, parameter :: cctki_use_initial_shift = kind(initial_shift)
  integer*8 CCTKH6
  integer, parameter :: cctki_use_CCTKH6 = kind(CCTKH6)
  integer*8 CCTKH7
  integer, parameter :: cctki_use_CCTKH7 = kind(CCTKH7)
  integer*8 CCTKH9
  integer, parameter :: cctki_use_CCTKH9 = kind(CCTKH9)
  integer*8 metric_type
  integer, parameter :: cctki_use_metric_type = kind(metric_type)
  integer*8 CCTKH11
  integer, parameter :: cctki_use_CCTKH11 = kind(CCTKH11)
  integer*8 CCTKH12
  integer, parameter :: cctki_use_CCTKH12 = kind(CCTKH12)
  INTEGER*4 CCTKH8
  integer, parameter :: cctki_use_CCTKH8 = kind(CCTKH8)
  INTEGER*4 CCTKH10
  integer, parameter :: cctki_use_CCTKH10 = kind(CCTKH10)
  INTEGER*4 CCTKH13
  integer, parameter :: cctki_use_CCTKH13 = kind(CCTKH13)
  COMMON /ADMBASErest/CCTKH0, CCTKH1, CCTKH2, CCTKH3, initial_data, CCTKH4, CCTKH5, initial_lapse, initial_shift, CCTKH6, CCTKH7, C&
  &CTKH9, metric_type, CCTKH11, CCTKH12, CCTKH8, CCTKH10, CCTKH13
  REAL*8 CCTKH14
  integer, parameter :: cctki_use_CCTKH14 = kind(CCTKH14)
  REAL*8 CCTKH15
  integer, parameter :: cctki_use_CCTKH15 = kind(CCTKH15)
  REAL*8 CCTKH16
  integer, parameter :: cctki_use_CCTKH16 = kind(CCTKH16)
  REAL*8 CCTKH17
  integer, parameter :: cctki_use_CCTKH17 = kind(CCTKH17)
  REAL*8 CCTKH26
  integer, parameter :: cctki_use_CCTKH26 = kind(CCTKH26)
  REAL*8 CCTKH27
  integer, parameter :: cctki_use_CCTKH27 = kind(CCTKH27)
  REAL*8 CCTKH28
  integer, parameter :: cctki_use_CCTKH28 = kind(CCTKH28)
  REAL*8 CCTKH29
  integer, parameter :: cctki_use_CCTKH29 = kind(CCTKH29)
  REAL*8 CCTKH30
  integer, parameter :: cctki_use_CCTKH30 = kind(CCTKH30)
  REAL*8 CCTKH31
  integer, parameter :: cctki_use_CCTKH31 = kind(CCTKH31)
  REAL*8 CCTKH32
  integer, parameter :: cctki_use_CCTKH32 = kind(CCTKH32)
  REAL*8 CCTKH33
  integer, parameter :: cctki_use_CCTKH33 = kind(CCTKH33)
  integer*8 bitant_plane
  integer, parameter :: cctki_use_bitant_plane = kind(bitant_plane)
  integer*8 domain
  integer, parameter :: cctki_use_domain = kind(domain)
  integer*8 quadrant_direction
  integer, parameter :: cctki_use_quadrant_direction = kind(quadrant_direction)
  integer*8 CCTKH18
  integer, parameter :: cctki_use_CCTKH18 = kind(CCTKH18)
  integer*8 CCTKH25
  integer, parameter :: cctki_use_CCTKH25 = kind(CCTKH25)
  INTEGER*4 CCTKH19
  integer, parameter :: cctki_use_CCTKH19 = kind(CCTKH19)
  INTEGER*4 CCTKH20
  integer, parameter :: cctki_use_CCTKH20 = kind(CCTKH20)
  INTEGER*4 CCTKH21
  integer, parameter :: cctki_use_CCTKH21 = kind(CCTKH21)
  INTEGER*4 CCTKH22
  integer, parameter :: cctki_use_CCTKH22 = kind(CCTKH22)
  INTEGER*4 CCTKH23
  integer, parameter :: cctki_use_CCTKH23 = kind(CCTKH23)
  INTEGER*4 CCTKH24
  integer, parameter :: cctki_use_CCTKH24 = kind(CCTKH24)
  COMMON /GRIDrest/CCTKH14, CCTKH15, CCTKH16, CCTKH17, CCTKH26, CCTKH27, CCTKH28, CCTKH29, CCTKH30, CCTKH31, CCTKH32, CCTKH33, bita&
  &nt_plane, domain, quadrant_direction, CCTKH18, CCTKH25, CCTKH19, CCTKH20, CCTKH21, CCTKH22, CCTKH23, CCTKH24
  INTEGER*4 MoL_Max_Evolved_Array_Size
  integer, parameter :: cctki_use_MoL_Max_Evolved_Array_Size = kind(MoL_Max_Evolved_Array_Size)
  INTEGER*4 CCTKH34
  integer, parameter :: cctki_use_CCTKH34 = kind(CCTKH34)
  INTEGER*4 MoL_Num_ArrayEvolved_Vars
  integer, parameter :: cctki_use_MoL_Num_ArrayEvolved_Vars = kind(MoL_Num_ArrayEvolved_Vars)
  INTEGER*4 CCTKH35
  integer, parameter :: cctki_use_CCTKH35 = kind(CCTKH35)
  INTEGER*4 CCTKH36
  integer, parameter :: cctki_use_CCTKH36 = kind(CCTKH36)
  INTEGER*4 MoL_Num_Evolved_Vars
  integer, parameter :: cctki_use_MoL_Num_Evolved_Vars = kind(MoL_Num_Evolved_Vars)
  INTEGER*4 CCTKH37
  integer, parameter :: cctki_use_CCTKH37 = kind(CCTKH37)
  INTEGER*4 CCTKH38
  integer, parameter :: cctki_use_CCTKH38 = kind(CCTKH38)
  INTEGER*4 CCTKH39
  integer, parameter :: cctki_use_CCTKH39 = kind(CCTKH39)
  COMMON /METHODOFLINESrest/MoL_Max_Evolved_Array_Size, CCTKH34, MoL_Num_ArrayEvolved_Vars, CCTKH35, CCTKH36, MoL_Num_Evolved_Vars,&
  & CCTKH37, CCTKH38, CCTKH39
  INTEGER*4 use_mask
  integer, parameter :: cctki_use_use_mask = kind(use_mask)
  COMMON /SPACEMASKrest/use_mask

  INTEGER cctk_dim
  integer, parameter :: cctki_use_cctk_dim = kind(cctk_dim)
  INTEGER cctk_gsh (cctk_dim)
  integer, parameter :: cctki_use_cctk_gsh = kind(cctk_gsh)
  INTEGER cctk_lsh (cctk_dim)
  integer, parameter :: cctki_use_cctk_lsh = kind(cctk_lsh)
  INTEGER cctk_lbnd (cctk_dim)
  integer, parameter :: cctki_use_cctk_lbnd = kind(cctk_lbnd)
  INTEGER cctk_ubnd (cctk_dim)
  integer, parameter :: cctki_use_cctk_ubnd = kind(cctk_ubnd)
  INTEGER cctk_tile_min (cctk_dim)
  integer, parameter :: cctki_use_cctk_tile_min = kind(cctk_tile_min)
  INTEGER cctk_tile_max (cctk_dim)
  integer, parameter :: cctki_use_cctk_tile_max = kind(cctk_tile_max)
  INTEGER cctk_ash (cctk_dim)
  integer, parameter :: cctki_use_cctk_ash = kind(cctk_ash)
  INTEGER cctk_alignment
  integer, parameter :: cctki_use_cctk_alignment = kind(cctk_alignment)
  INTEGER cctk_alignment_offset
  integer, parameter :: cctki_use_cctk_alignment_offset = kind(cctk_alignment_offset)
  INTEGER cctk_from (cctk_dim)
  integer, parameter :: cctki_use_cctk_from = kind(cctk_from)
  INTEGER cctk_to (cctk_dim)
  integer, parameter :: cctki_use_cctk_to = kind(cctk_to)
  INTEGER cctk_bbox (2*cctk_dim)
  integer, parameter :: cctki_use_cctk_bbox = kind(cctk_bbox)
  REAL*8 cctk_delta_time
  integer, parameter :: cctki_use_cctk_delta_time = kind(cctk_delta_time)
  REAL*8 cctk_time
  integer, parameter :: cctki_use_cctk_time = kind(cctk_time)
  REAL*8 cctk_delta_space (cctk_dim)
  integer, parameter :: cctki_use_cctk_delta_space = kind(cctk_delta_space)
  REAL*8 cctk_origin_space (cctk_dim)
  integer, parameter :: cctki_use_cctk_origin_space = kind(cctk_origin_space)
  INTEGER cctk_levfac (cctk_dim)
  integer, parameter :: cctki_use_cctk_levfac = kind(cctk_levfac)
  INTEGER cctk_levoff (cctk_dim)
  integer, parameter :: cctki_use_cctk_levoff = kind(cctk_levoff)
  INTEGER cctk_levoffdenom (cctk_dim)
  integer, parameter :: cctki_use_cctk_levoffdenom = kind(cctk_levoffdenom)
  INTEGER cctk_timefac
  integer, parameter :: cctki_use_cctk_timefac = kind(cctk_timefac)
  INTEGER cctk_convlevel
  integer, parameter :: cctki_use_cctk_convlevel = kind(cctk_convlevel)
  INTEGER cctk_convfac
  integer, parameter :: cctki_use_cctk_convfac = kind(cctk_convfac)
  INTEGER cctk_nghostzones (cctk_dim)
  integer, parameter :: cctki_use_cctk_nghostzones = kind(cctk_nghostzones)
  INTEGER cctk_iteration
  integer, parameter :: cctki_use_cctk_iteration = kind(cctk_iteration)
  integer*8 cctkGH
  integer, parameter :: cctki_use_cctkGH = kind(cctkGH)
  INTEGER cctk_ash1
  integer, parameter :: cctki_use_cctk_ash1 = kind(cctk_ash1)
  INTEGER cctk_ash2
  integer, parameter :: cctki_use_cctk_ash2 = kind(cctk_ash2)
  INTEGER cctk_ash3
  integer, parameter :: cctki_use_cctk_ash3 = kind(cctk_ash3)
  INTEGER X0center_arrays
  INTEGER X0dxg
  INTEGER X0dxg2
  INTEGER X0dyg
  INTEGER X0dyg2
  INTEGER X0dzg
  INTEGER X0dzg2
  INTEGER X0eh_area
  INTEGER X0eh_area2
  INTEGER X0eh_centroid2_x
  INTEGER X0eh_centroid2_y
  INTEGER X0eh_centroid2_z
  INTEGER X0eh_centroid_x
  INTEGER X0eh_centroid_y
  INTEGER X0eh_centroid_z
  INTEGER X0eh_circ_eq
  INTEGER X0eh_circ_eq2
  INTEGER X0eh_circ_pol
  INTEGER X0eh_circ_pol2
  INTEGER X0generator_arrays
  INTEGER X0generator_arrays2
  INTEGER X0integrate_tmp_array
  INTEGER X0interp_metric_arrays
  INTEGER X0surface_arrays
  INTEGER X0surface_int_array
  INTEGER X0surface_tmp_arrays
  INTEGER X0xg
  INTEGER X0xg2
  INTEGER X0yg
  INTEGER X0yg2
  INTEGER X0zg
  INTEGER X0zg2
  INTEGER X1dxg2
  INTEGER X1dyg2
  INTEGER X1dzg2
  INTEGER X1generator_arrays2
  INTEGER X1integrate_tmp_array
  INTEGER X1interp_metric_arrays
  INTEGER X1surface_arrays
  INTEGER X1surface_int_array
  INTEGER X1surface_tmp_arrays
  INTEGER X1xg2
  INTEGER X1yg2
  INTEGER X1zg2
  INTEGER dfsq_length
  INTEGER dfx_length
  INTEGER dfy_length
  INTEGER dfz_length
  INTEGER dxg2_length
  INTEGER dxg_length
  INTEGER dyg2_length
  INTEGER dyg_length
  INTEGER dzg2_length
  INTEGER dzg_length
  INTEGER eh_area2_length
  INTEGER eh_area_length
  INTEGER eh_centroid2_x_length
  INTEGER eh_centroid2_y_length
  INTEGER eh_centroid2_z_length
  INTEGER eh_centroid_x_length
  INTEGER eh_centroid_y_length
  INTEGER eh_centroid_z_length
  INTEGER eh_circ_eq2_length
  INTEGER eh_circ_eq_length
  INTEGER eh_circ_pol2_length
  INTEGER eh_circ_pol_length
  INTEGER eh_mask_bak_length
  INTEGER eh_mask_length
  INTEGER f_length
  INTEGER fbak_length
  INTEGER ftmp_length
  INTEGER sf_length
  INTEGER sftmp_length
  INTEGER tm_mask_length
  INTEGER xg2_length
  INTEGER xg_length
  INTEGER yg2_length
  INTEGER yg_length
  INTEGER zg2_length
  INTEGER zg_length
  REAL*8 alpg (X0generator_arrays)
  integer, parameter :: cctki_use_alpg = kind(alpg)
  REAL*8 alpg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_alpg2 = kind(alpg2)
  REAL*8 betaxg (X0generator_arrays)
  integer, parameter :: cctki_use_betaxg = kind(betaxg)
  REAL*8 betaxg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_betaxg2 = kind(betaxg2)
  REAL*8 betayg (X0generator_arrays)
  integer, parameter :: cctki_use_betayg = kind(betayg)
  REAL*8 betayg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_betayg2 = kind(betayg2)
  REAL*8 betazg (X0generator_arrays)
  integer, parameter :: cctki_use_betazg = kind(betazg)
  REAL*8 betazg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_betazg2 = kind(betazg2)
  REAL*8 center (X0center_arrays)
  integer, parameter :: cctki_use_center = kind(center)
  REAL*8 cosphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_cosphi = kind(cosphi)
  REAL*8 costheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_costheta = kind(costheta)
  REAL*8 cphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_cphi = kind(cphi)
  REAL*8 ctheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_ctheta = kind(ctheta)
  REAL*8 da (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_da = kind(da)
  REAL*8 dfdx_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_dfdx_interp = kind(dfdx_interp)
  REAL*8 dfdy_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_dfdy_interp = kind(dfdy_interp)
  REAL*8 dfdz_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_dfdz_interp = kind(dfdz_interp)
  REAL*8 dfsq (cctk_ash1,cctk_ash2,cctk_ash3,dfsq_length)
  integer, parameter :: cctki_use_dfsq = kind(dfsq)
  REAL*8 dfx (cctk_ash1,cctk_ash2,cctk_ash3,dfx_length)
  integer, parameter :: cctki_use_dfx = kind(dfx)
  REAL*8 dfxg (X0generator_arrays)
  integer, parameter :: cctki_use_dfxg = kind(dfxg)
  REAL*8 dfxg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_dfxg2 = kind(dfxg2)
  REAL*8 dfy (cctk_ash1,cctk_ash2,cctk_ash3,dfy_length)
  integer, parameter :: cctki_use_dfy = kind(dfy)
  REAL*8 dfyg (X0generator_arrays)
  integer, parameter :: cctki_use_dfyg = kind(dfyg)
  REAL*8 dfyg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_dfyg2 = kind(dfyg2)
  REAL*8 dfz (cctk_ash1,cctk_ash2,cctk_ash3,dfz_length)
  integer, parameter :: cctki_use_dfz = kind(dfz)
  REAL*8 dfzg (X0generator_arrays)
  integer, parameter :: cctki_use_dfzg = kind(dfzg)
  REAL*8 dfzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_dfzg2 = kind(dfzg2)
  REAL*8 dlphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_dlphi = kind(dlphi)
  REAL*8 dltheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_dltheta = kind(dltheta)
  REAL*8 drdphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_drdphi = kind(drdphi)
  REAL*8 drdtheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_drdtheta = kind(drdtheta)
  REAL*8 drsurf (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_drsurf = kind(drsurf)
  REAL*8 dxg (X0dxg,dxg_length)
  integer, parameter :: cctki_use_dxg = kind(dxg)
  REAL*8 dxg2 (X0dxg2,X1dxg2,dxg2_length)
  integer, parameter :: cctki_use_dxg2 = kind(dxg2)
  REAL*8 dyg (X0dyg,dyg_length)
  integer, parameter :: cctki_use_dyg = kind(dyg)
  REAL*8 dyg2 (X0dyg2,X1dyg2,dyg2_length)
  integer, parameter :: cctki_use_dyg2 = kind(dyg2)
  REAL*8 dzg (X0dzg,dzg_length)
  integer, parameter :: cctki_use_dzg = kind(dzg)
  REAL*8 dzg2 (X0dzg2,X1dzg2,dzg2_length)
  integer, parameter :: cctki_use_dzg2 = kind(dzg2)
  REAL*8 eh_area (X0eh_area,eh_area_length)
  integer, parameter :: cctki_use_eh_area = kind(eh_area)
  REAL*8 eh_area2 (X0eh_area2,eh_area2_length)
  integer, parameter :: cctki_use_eh_area2 = kind(eh_area2)
  REAL*8 eh_centroid2_x (X0eh_centroid2_x,eh_centroid2_x_length)
  integer, parameter :: cctki_use_eh_centroid2_x = kind(eh_centroid2_x)
  REAL*8 eh_centroid2_y (X0eh_centroid2_y,eh_centroid2_y_length)
  integer, parameter :: cctki_use_eh_centroid2_y = kind(eh_centroid2_y)
  REAL*8 eh_centroid2_z (X0eh_centroid2_z,eh_centroid2_z_length)
  integer, parameter :: cctki_use_eh_centroid2_z = kind(eh_centroid2_z)
  REAL*8 eh_centroid_x (X0eh_centroid_x,eh_centroid_x_length)
  integer, parameter :: cctki_use_eh_centroid_x = kind(eh_centroid_x)
  REAL*8 eh_centroid_y (X0eh_centroid_y,eh_centroid_y_length)
  integer, parameter :: cctki_use_eh_centroid_y = kind(eh_centroid_y)
  REAL*8 eh_centroid_z (X0eh_centroid_z,eh_centroid_z_length)
  integer, parameter :: cctki_use_eh_centroid_z = kind(eh_centroid_z)
  REAL*8 eh_circ_eq (X0eh_circ_eq,eh_circ_eq_length)
  integer, parameter :: cctki_use_eh_circ_eq = kind(eh_circ_eq)
  REAL*8 eh_circ_eq2 (X0eh_circ_eq2,eh_circ_eq2_length)
  integer, parameter :: cctki_use_eh_circ_eq2 = kind(eh_circ_eq2)
  REAL*8 eh_circ_pol (X0eh_circ_pol,eh_circ_pol_length)
  integer, parameter :: cctki_use_eh_circ_pol = kind(eh_circ_pol)
  REAL*8 eh_circ_pol2 (X0eh_circ_pol2,eh_circ_pol2_length)
  integer, parameter :: cctki_use_eh_circ_pol2 = kind(eh_circ_pol2)
  INTEGER*4 eh_mask (cctk_ash1,cctk_ash2,cctk_ash3,eh_mask_length)
  integer, parameter :: cctki_use_eh_mask = kind(eh_mask)
  INTEGER*4 eh_mask_bak (cctk_ash1,cctk_ash2,cctk_ash3,eh_mask_bak_length)
  integer, parameter :: cctki_use_eh_mask_bak = kind(eh_mask_bak)
  REAL*8 f (cctk_ash1,cctk_ash2,cctk_ash3,f_length)
  integer, parameter :: cctki_use_f = kind(f)
  REAL*8 f_p (cctk_ash1,cctk_ash2,cctk_ash3,f_length)
  integer, parameter :: cctki_use_f_p = kind(f_p)
  REAL*8 f_p_p (cctk_ash1,cctk_ash2,cctk_ash3,f_length)
  integer, parameter :: cctki_use_f_p_p = kind(f_p_p)
  REAL*8 f_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_f_interp = kind(f_interp)
  REAL*8 fbak (cctk_ash1,cctk_ash2,cctk_ash3,fbak_length)
  integer, parameter :: cctki_use_fbak = kind(fbak)
  INTEGER*4 find_surface_status
  integer, parameter :: cctki_use_find_surface_status = kind(find_surface_status)
  REAL*8 ftmp (cctk_ash1,cctk_ash2,cctk_ash3,ftmp_length)
  integer, parameter :: cctki_use_ftmp = kind(ftmp)
  REAL*8 g3xx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3xx = kind(g3xx)
  REAL*8 g3xy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3xy = kind(g3xy)
  REAL*8 g3xz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3xz = kind(g3xz)
  REAL*8 g3yy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3yy = kind(g3yy)
  REAL*8 g3yz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3yz = kind(g3yz)
  REAL*8 g3zz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3zz = kind(g3zz)
  REAL*8 gpp (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_gpp = kind(gpp)
  REAL*8 gtp (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_gtp = kind(gtp)
  REAL*8 gtt (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_gtt = kind(gtt)
  REAL*8 gxxg (X0generator_arrays)
  integer, parameter :: cctki_use_gxxg = kind(gxxg)
  REAL*8 gxxg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gxxg2 = kind(gxxg2)
  REAL*8 gxxi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gxxi = kind(gxxi)
  REAL*8 gxyg (X0generator_arrays)
  integer, parameter :: cctki_use_gxyg = kind(gxyg)
  REAL*8 gxyg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gxyg2 = kind(gxyg2)
  REAL*8 gxyi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gxyi = kind(gxyi)
  REAL*8 gxzg (X0generator_arrays)
  integer, parameter :: cctki_use_gxzg = kind(gxzg)
  REAL*8 gxzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gxzg2 = kind(gxzg2)
  REAL*8 gxzi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gxzi = kind(gxzi)
  REAL*8 gyyg (X0generator_arrays)
  integer, parameter :: cctki_use_gyyg = kind(gyyg)
  REAL*8 gyyg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gyyg2 = kind(gyyg2)
  REAL*8 gyyi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gyyi = kind(gyyi)
  REAL*8 gyzg (X0generator_arrays)
  integer, parameter :: cctki_use_gyzg = kind(gyzg)
  REAL*8 gyzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gyzg2 = kind(gyzg2)
  REAL*8 gyzi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gyzi = kind(gyzi)
  REAL*8 gzzg (X0generator_arrays)
  integer, parameter :: cctki_use_gzzg = kind(gzzg)
  REAL*8 gzzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gzzg2 = kind(gzzg2)
  REAL*8 gzzi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gzzi = kind(gzzi)
  REAL*8 int_tmp (X0integrate_tmp_array,X1integrate_tmp_array)
  integer, parameter :: cctki_use_int_tmp = kind(int_tmp)
  INTEGER*4 integrate_counter
  integer, parameter :: cctki_use_integrate_counter = kind(integrate_counter)
  REAL*8 interp_x (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_interp_x = kind(interp_x)
  REAL*8 interp_y (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_interp_y = kind(interp_y)
  REAL*8 interp_z (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_interp_z = kind(interp_z)
  INTEGER*4 levelset_counter
  integer, parameter :: cctki_use_levelset_counter = kind(levelset_counter)
  INTEGER*4 more_levelsets
  integer, parameter :: cctki_use_more_levelsets = kind(more_levelsets)
  INTEGER*4 more_points
  integer, parameter :: cctki_use_more_points = kind(more_points)
  INTEGER*4 more_surfaces
  integer, parameter :: cctki_use_more_surfaces = kind(more_surfaces)
  INTEGER*4 n_since_last_reduction (X0surface_int_array,X1surface_int_array)
  integer, parameter :: cctki_use_n_since_last_reduction = kind(n_since_last_reduction)
  INTEGER*4 niter_reinit
  integer, parameter :: cctki_use_niter_reinit = kind(niter_reinit)
  REAL*8 phi_sym_factor
  integer, parameter :: cctki_use_phi_sym_factor = kind(phi_sym_factor)
  REAL*8 phiweights (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_phiweights = kind(phiweights)
  INTEGER*4 points_counter
  integer, parameter :: cctki_use_points_counter = kind(points_counter)
  REAL*8 psig (X0generator_arrays)
  integer, parameter :: cctki_use_psig = kind(psig)
  REAL*8 psig2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_psig2 = kind(psig2)
  REAL*8 psii (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_psii = kind(psii)
  INTEGER*4 re_init_control
  integer, parameter :: cctki_use_re_init_control = kind(re_init_control)
  REAL*8 rsurf (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_rsurf = kind(rsurf)
  REAL*8 sc (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_sc = kind(sc)
  REAL*8 sf (cctk_ash1,cctk_ash2,cctk_ash3,sf_length)
  integer, parameter :: cctki_use_sf = kind(sf)
  REAL*8 sftmp (cctk_ash1,cctk_ash2,cctk_ash3,sftmp_length)
  integer, parameter :: cctki_use_sftmp = kind(sftmp)
  REAL*8 sinphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_sinphi = kind(sinphi)
  REAL*8 sintheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_sintheta = kind(sintheta)
  INTEGER*4 surface_counter
  integer, parameter :: cctki_use_surface_counter = kind(surface_counter)
  REAL*8 sym_factor
  integer, parameter :: cctki_use_sym_factor = kind(sym_factor)
  REAL*8 theta_sym_factor
  integer, parameter :: cctki_use_theta_sym_factor = kind(theta_sym_factor)
  REAL*8 thetaweights (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_thetaweights = kind(thetaweights)
  INTEGER*4 tm_mask (cctk_ash1,cctk_ash2,cctk_ash3,tm_mask_length)
  integer, parameter :: cctki_use_tm_mask = kind(tm_mask)
  REAL*8 weights (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_weights = kind(weights)
  REAL*8 xg (X0xg,xg_length)
  integer, parameter :: cctki_use_xg = kind(xg)
  REAL*8 xg_p (X0xg,xg_length)
  integer, parameter :: cctki_use_xg_p = kind(xg_p)
  REAL*8 xg_p_p (X0xg,xg_length)
  integer, parameter :: cctki_use_xg_p_p = kind(xg_p_p)
  REAL*8 xg2 (X0xg2,X1xg2,xg2_length)
  integer, parameter :: cctki_use_xg2 = kind(xg2)
  REAL*8 xg2_p (X0xg2,X1xg2,xg2_length)
  integer, parameter :: cctki_use_xg2_p = kind(xg2_p)
  REAL*8 xg2_p_p (X0xg2,X1xg2,xg2_length)
  integer, parameter :: cctki_use_xg2_p_p = kind(xg2_p_p)
  REAL*8 xgf (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_xgf = kind(xgf)
  REAL*8 xgf2 (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_xgf2 = kind(xgf2)
  REAL*8 yg (X0yg,yg_length)
  integer, parameter :: cctki_use_yg = kind(yg)
  REAL*8 yg_p (X0yg,yg_length)
  integer, parameter :: cctki_use_yg_p = kind(yg_p)
  REAL*8 yg_p_p (X0yg,yg_length)
  integer, parameter :: cctki_use_yg_p_p = kind(yg_p_p)
  REAL*8 yg2 (X0yg2,X1yg2,yg2_length)
  integer, parameter :: cctki_use_yg2 = kind(yg2)
  REAL*8 yg2_p (X0yg2,X1yg2,yg2_length)
  integer, parameter :: cctki_use_yg2_p = kind(yg2_p)
  REAL*8 yg2_p_p (X0yg2,X1yg2,yg2_length)
  integer, parameter :: cctki_use_yg2_p_p = kind(yg2_p_p)
  REAL*8 ygf (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_ygf = kind(ygf)
  REAL*8 ygf2 (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_ygf2 = kind(ygf2)
  REAL*8 zg (X0zg,zg_length)
  integer, parameter :: cctki_use_zg = kind(zg)
  REAL*8 zg_p (X0zg,zg_length)
  integer, parameter :: cctki_use_zg_p = kind(zg_p)
  REAL*8 zg_p_p (X0zg,zg_length)
  integer, parameter :: cctki_use_zg_p_p = kind(zg_p_p)
  REAL*8 zg2 (X0zg2,X1zg2,zg2_length)
  integer, parameter :: cctki_use_zg2 = kind(zg2)
  REAL*8 zg2_p (X0zg2,X1zg2,zg2_length)
  integer, parameter :: cctki_use_zg2_p = kind(zg2_p)
  REAL*8 zg2_p_p (X0zg2,X1zg2,zg2_length)
  integer, parameter :: cctki_use_zg2_p_p = kind(zg2_p_p)
  REAL*8 zgf (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_zgf = kind(zgf)
  REAL*8 zgf2 (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_zgf2 = kind(zgf2)
  INTEGER*4 active_slicing_handle
  integer, parameter :: cctki_use_active_slicing_handle = kind(active_slicing_handle)
  REAL*8 alp (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_alp = kind(alp)
  REAL*8 alp_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_alp_p = kind(alp_p)
  REAL*8 alp_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_alp_p_p = kind(alp_p_p)
  REAL*8 betax (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betax = kind(betax)
  REAL*8 betax_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betax_p = kind(betax_p)
  REAL*8 betax_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betax_p_p = kind(betax_p_p)
  REAL*8 betay (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betay = kind(betay)
  REAL*8 betay_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betay_p = kind(betay_p)
  REAL*8 betay_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betay_p_p = kind(betay_p_p)
  REAL*8 betaz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betaz = kind(betaz)
  REAL*8 betaz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betaz_p = kind(betaz_p)
  REAL*8 betaz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betaz_p_p = kind(betaz_p_p)
  REAL*8 coarse_dx
  integer, parameter :: cctki_use_coarse_dx = kind(coarse_dx)
  REAL*8 coarse_dy
  integer, parameter :: cctki_use_coarse_dy = kind(coarse_dy)
  REAL*8 coarse_dz
  integer, parameter :: cctki_use_coarse_dz = kind(coarse_dz)
  INTEGER*4 conformal_state
  integer, parameter :: cctki_use_conformal_state = kind(conformal_state)
  REAL*8 dtalp (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtalp = kind(dtalp)
  REAL*8 dtalp_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtalp_p = kind(dtalp_p)
  REAL*8 dtalp_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtalp_p_p = kind(dtalp_p_p)
  REAL*8 dtbetax (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetax = kind(dtbetax)
  REAL*8 dtbetax_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetax_p = kind(dtbetax_p)
  REAL*8 dtbetax_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetax_p_p = kind(dtbetax_p_p)
  REAL*8 dtbetay (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetay = kind(dtbetay)
  REAL*8 dtbetay_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetay_p = kind(dtbetay_p)
  REAL*8 dtbetay_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetay_p_p = kind(dtbetay_p_p)
  REAL*8 dtbetaz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetaz = kind(dtbetaz)
  REAL*8 dtbetaz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetaz_p = kind(dtbetaz_p)
  REAL*8 dtbetaz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetaz_p_p = kind(dtbetaz_p_p)
  INTEGER*4 dtlapse_state
  integer, parameter :: cctki_use_dtlapse_state = kind(dtlapse_state)
  INTEGER*4 dtshift_state
  integer, parameter :: cctki_use_dtshift_state = kind(dtshift_state)
  REAL*8 emask (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_emask = kind(emask)
  REAL*8 gxx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxx = kind(gxx)
  REAL*8 gxx_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxx_p = kind(gxx_p)
  REAL*8 gxx_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxx_p_p = kind(gxx_p_p)
  REAL*8 gxy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxy = kind(gxy)
  REAL*8 gxy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxy_p = kind(gxy_p)
  REAL*8 gxy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxy_p_p = kind(gxy_p_p)
  REAL*8 gxz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxz = kind(gxz)
  REAL*8 gxz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxz_p = kind(gxz_p)
  REAL*8 gxz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxz_p_p = kind(gxz_p_p)
  REAL*8 gyy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyy = kind(gyy)
  REAL*8 gyy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyy_p = kind(gyy_p)
  REAL*8 gyy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyy_p_p = kind(gyy_p_p)
  REAL*8 gyz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyz = kind(gyz)
  REAL*8 gyz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyz_p = kind(gyz_p)
  REAL*8 gyz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyz_p_p = kind(gyz_p_p)
  REAL*8 gzz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gzz = kind(gzz)
  REAL*8 gzz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gzz_p = kind(gzz_p)
  REAL*8 gzz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gzz_p_p = kind(gzz_p_p)
  REAL*8 kxx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxx = kind(kxx)
  REAL*8 kxx_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxx_p = kind(kxx_p)
  REAL*8 kxx_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxx_p_p = kind(kxx_p_p)
  REAL*8 kxy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxy = kind(kxy)
  REAL*8 kxy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxy_p = kind(kxy_p)
  REAL*8 kxy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxy_p_p = kind(kxy_p_p)
  REAL*8 kxz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxz = kind(kxz)
  REAL*8 kxz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxz_p = kind(kxz_p)
  REAL*8 kxz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxz_p_p = kind(kxz_p_p)
  REAL*8 kyy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyy = kind(kyy)
  REAL*8 kyy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyy_p = kind(kyy_p)
  REAL*8 kyy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyy_p_p = kind(kyy_p_p)
  REAL*8 kyz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyz = kind(kyz)
  REAL*8 kyz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyz_p = kind(kyz_p)
  REAL*8 kyz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyz_p_p = kind(kyz_p_p)
  REAL*8 kzz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kzz = kind(kzz)
  REAL*8 kzz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kzz_p = kind(kzz_p)
  REAL*8 kzz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kzz_p_p = kind(kzz_p_p)
  REAL*8 psi (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psi = kind(psi)
  REAL*8 psix (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psix = kind(psix)
  REAL*8 psixx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psixx = kind(psixx)
  REAL*8 psixy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psixy = kind(psixy)
  REAL*8 psixz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psixz = kind(psixz)
  REAL*8 psiy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiy = kind(psiy)
  REAL*8 psiyy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiyy = kind(psiyy)
  REAL*8 psiyz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiyz = kind(psiyz)
  REAL*8 psiz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiz = kind(psiz)
  REAL*8 psizz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psizz = kind(psizz)
  REAL*8 r (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_r = kind(r)
  INTEGER*4 shift_state
  integer, parameter :: cctki_use_shift_state = kind(shift_state)
  INTEGER*4 space_mask (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_space_mask = kind(space_mask)
  REAL*8 x (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_x = kind(x)
  REAL*8 y (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_y = kind(y)
  REAL*8 z (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_z = kind(z)
  interface
  integer*8 function CCTK_PointerTo (var)
  implicit none
  type(*),dimension(..),TARGET :: var
  end function CCTK_PointerTo
  end interface
  interface
  integer function CCTK_Equals (arg1, arg2)
  implicit none
  integer*8 arg1
  character(*) arg2
  end function CCTK_Equals
  integer function CCTK_MyProc (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_MyProc
  integer function CCTK_nProcs (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_nProcs
  integer function CCTK_IsThornActive (name)
  implicit none
  character(*) name
  end function CCTK_IsThornActive
  integer*8 function CCTK_NullPointer ()
  implicit none
  end function CCTK_NullPointer
  end interface
  interface
  INTEGER*4 function Boundary_SelectGroupForBC (GH, faces, boundary_width, table_handle, var_name, bc_name)
  implicit none
  integer*8 GH
  INTEGER*4 faces
  INTEGER*4 boundary_width
  INTEGER*4 table_handle
  character(*) var_name
  character(*) bc_name
  end function Boundary_SelectGroupForBC
  end interface
  interface
  INTEGER*4 function MoLRegisterEvolvedGroup (EvolvedIndex, RHSIndex)
  implicit none
  INTEGER*4 EvolvedIndex
  INTEGER*4 RHSIndex
  end function MoLRegisterEvolvedGroup
  end interface

  INTEGER*4 :: i, j, k, l, status
  REAL*8, dimension(3) :: xp, xpt
  REAL*8, dimension(3,3) :: txyz
  REAL*8 :: cosa, sina, cosb, sinb, cosc, sinc
  REAL*8 :: last_time
  REAL*8 :: theta, dtheta, thetamin, thetamax, r_el
  REAL*8 :: phi, dphi, phimin, phimax
  REAL*8 :: costh, sinth, cosph, sinph
  INTEGER*4, dimension(1) :: lsh, lbnd
  INTEGER*4, dimension(2) :: lsh2, lbnd2


  nx = cctk_lsh(1)
  ny = cctk_lsh(2)
  nz = cctk_lsh(3)





  last_time = abs(cctk_delta_time) * ( last_iteration_number + &
                cheat_iterations ) / saved_iteration_every

  if ( cheat == 1 ) then
  last_time = abs(cctk_delta_time) * ( last_iteration_number + &
                cheat_iterations ) / saved_iteration_every
    cctk_iteration = -cheat_iterations
  else
    last_time = abs(cctk_delta_time) * last_iteration_number &
                                     / saved_iteration_every
  end if
  cctk_time = last_time




  if ( allocated(re_init_this_level_set) ) then
    deallocate ( re_init_this_level_set )
  end if
  allocate ( re_init_this_level_set(eh_number_level_sets) )
  if ( allocated(re_initialize_undone) ) then
    deallocate ( re_initialize_undone )
  end if
  allocate ( re_initialize_undone(eh_number_level_sets) )

  if ( evolve_generators .gt. 0 ) then

    if ( (CCTK_Equals( domain, 'full' ) .ne. 0) ) then
      thetamin = zero; thetamax = pi
      phimin = zero; phimax = 2*pi
    else if ( (CCTK_Equals( domain, 'bitant') .ne. 0) ) then
      if ( (CCTK_Equals( bitant_plane, 'xy' ) .ne. 0) ) then
        thetamin = zero; thetamax = half * pi
        phimin = zero; phimax = 2*pi
      else  if ( (CCTK_Equals( bitant_plane, 'xz' ) .ne. 0) ) then
        thetamin = zero; thetamax = pi
        phimin = zero; phimax = pi
      else
        thetamin = zero; thetamax = pi
        phimin = -half * pi; phimax = half * pi
      end if
    else if ( (CCTK_Equals( domain, 'quadrant' ) .ne. 0) ) then
      if ( (CCTK_Equals( quadrant_direction, 'x' ) .ne. 0) ) then
        thetamin = zero; thetamax = half * pi
        phimin = zero; phimax = pi
      else if ( (CCTK_Equals( quadrant_direction, 'y' ) .ne. 0) ) then
        thetamin = zero; thetamax = half * pi
        phimin = -half * pi; phimax = half * pi
      else
        thetamin = zero; thetamax = pi
        phimin = zero; phimax = half * pi
      end if
    else if ( (CCTK_Equals( domain, 'octant' ) .ne. 0) ) then
      thetamin = zero; thetamax = half * pi
      phimin = zero; phimax = half * pi
    end if
                   
    if ( (CCTK_Equals( generator_distribution, 'line' ) .ne. 0) ) then

      call CCTK_GrouplbndGN ( status, cctkGH, 1, lbnd, 'ehfinder::xg' )
      if ( status .lt. 0 ) then
        call CCTK_Warn( 0,100,"EHFinder_Init.F90","EHFinder", 'cannot get lower bounds for generator arrays' )
      end if
      call CCTK_GrouplshGN ( status, cctkGH, 1, lsh, 'ehfinder::xg' )
      if ( status .lt. 0 ) then
        call CCTK_Warn( 0,104,"EHFinder_Init.F90","EHFinder", 'cannot get local size for generator arrays' )
      end if

      if ( number_of_generators .eq. 1 ) then
        theta = half * ( thetamax - thetamin ) + thetamin
      else
        dtheta = ( thetamax - thetamin ) / ( number_of_generators - 1 )
      end if

    else if ( (CCTK_Equals( generator_distribution, '2D array' ) .ne. 0) ) then

      call CCTK_GrouplbndGN ( status, cctkGH, 2, lbnd2, 'ehfinder::xg2' )
      if ( status .lt. 0 ) then
        call CCTK_Warn( 0,117,"EHFinder_Init.F90","EHFinder", 'cannot get lower bounds for generator arrays' )
      end if
      call CCTK_GrouplshGN ( status, cctkGH, 2, lsh2, 'ehfinder::xg2' )
      if ( status .lt. 0 ) then
        call CCTK_Warn( 0,121,"EHFinder_Init.F90","EHFinder", 'cannot get local size for generator arrays' )
      end if

      if ( number_of_generators_theta .eq. 1 ) then
        theta = half * ( thetamax - thetamin ) + thetamin
      else
        dtheta = ( thetamax - thetamin ) / ( number_of_generators_theta )
      end if

      if ( number_of_generators_phi .eq. 1 ) then
        phi = half * ( phimax - phimin ) + phimin
      else
        dphi = ( phimax - phimin ) / ( number_of_generators_phi )
      end if

    end if
  end if

  do l = 1, eh_number_level_sets


    if ( (CCTK_Equals( initial_f(l), 'sphere' ) .ne. 0) ) then



      f(:,:,:,l) = sqrt( ( x - translate_x(l) )**2 + &
                         ( y - translate_y(l) )**2 + &
                         ( z - translate_z(l) )**2 ) - initial_rad(l)
      if ( evolve_generators .gt. 0 ) then
        if ( (CCTK_Equals( generator_distribution, 'line' ) .ne. 0) ) then
          do i = 1, lsh(1)
            theta = thetamin + dtheta * ( i + lbnd(1) - 1 ) + half * dtheta
            xg(i,l) = initial_rad(l) * sin(theta) + translate_x(l)
            yg(i,l) = translate_y(l)
            zg(i,l) = initial_rad(l) * cos(theta) + translate_z(l)
          end do
        else if ( (CCTK_Equals( generator_distribution, '2D array' ) .ne. 0) ) then
          do j = 1, lsh2(2)
            phi = phimin + dphi * ( j + lbnd2(2) - 1 ) + half * dphi
            cosph = cos(phi); sinph = sin(phi)
            do i = 1, lsh2(1)
              theta = thetamin + dtheta * ( i + lbnd2(1) - 1 )
              costh = cos(theta); sinth = sin(theta)
              xg2(i,j,l) = initial_rad(l) * sinth * cosph + translate_x(l)
              yg2(i,j,l) = initial_rad(l) * sinth * sinph + translate_x(l)
              zg2(i,j,l) = initial_rad(l) * costh + translate_z(l)
            end do
          end do
        end if
      end if
    end if


    if ( (CCTK_Equals( initial_f(l), 'ellipsoid' ) .ne. 0) ) then


      cosa = cos(rotation_alpha(l))
      sina = sin(rotation_alpha(l))
      cosb = cos(rotation_beta(l))
      sinb = sin(rotation_beta(l))
      cosc = cos(rotation_gamma(l))
      sinc = sin(rotation_gamma(l))



      txyz(1,1) = cosa * cosb
      txyz(1,2) = sina * cosb
      txyz(1,3) = -sinb
      txyz(2,1) = cosa * sinb * sinc - sina * cosc
      txyz(2,2) = sina * sinb * sinc + cosa * cosc
      txyz(2,3) = cosb * sinc
      txyz(3,1) = cosa * sinb * cosc + sina * sinc
      txyz(3,2) = sina * sinb * cosc - cosa * sinc
      txyz(3,3) = cosb * cosc




      do k = 1, nz
        do j = 1, ny
          do i = 1, nx
            xp(1) = x(i,j,k) - translate_x(l)
            xp(2) = y(i,j,k) - translate_y(l)
            xp(3) = z(i,j,k) - translate_z(l)
            xpt = matmul ( txyz, xp )
            f(i,j,k,l) = sqrt( xpt(1)**2 / initial_a(l)**2 + &
                             xpt(2)**2 / initial_b(l)**2 + &
                             xpt(3)**2 / initial_c(l)**2) - 1.0
          end do
        end do
      end do

      if ( evolve_generators .gt. 0 ) then
        if ( (CCTK_Equals( generator_distribution, 'line' ) .ne. 0) ) then
          do i = 1, lsh(1)
            theta = thetamin + dtheta * ( i + lbnd(1) - 1 )
            costh = cos(theta); sinth = sin(theta)
            r_el = sqrt ( one / ( sinth**2 / initial_a(l)**2 + &
                           costh**2 / initial_c(l)**2 ) )
            xp(1) = r_el * sinth + translate_x(l)
            xp(2) = translate_y(l)
            xp(3) = r_el * costh + translate_z(l)
            xpt = matmul ( txyz, xp )
            xg(i,l) = xpt(1)
            yg(i,l) = xpt(2)
            zg(i,l) = xpt(3)
          end do
        else if ( (CCTK_Equals( generator_distribution, '2D array' ) .ne. 0) ) then
          do j = 1, lsh2(2)
            phi = phimin + dphi * ( j + lbnd2(2) - 1 ) + half * dphi
            cosph = cos(phi); sinph = sin(phi)
            do i = 1, lsh2(1)
              theta = thetamin + dtheta * ( i + lbnd2(1) - 1 ) + half * dtheta
              costh = cos(theta); sinth = sin(theta)
              r_el = sqrt ( one / &
                            ( sinth**2*cosph**2 / initial_a(l)**2 + &
                              sinth**2*sinph**2 / initial_b(l)**2 + &
                              costh**2 / initial_c(l)**2 ) )
              xp(1) = r_el * sinth * cosph + translate_x(l)
              xp(2) = r_el * sinth * sinph + translate_y(l)
              xp(3) = r_el * costh + translate_z(l)
              xpt = matmul ( txyz, xp )
              xg2(i,j,l) = xpt(1)
              yg2(i,j,l) = xpt(2)
              zg2(i,j,l) = xpt(3) 
            end do
          end do






        end if
      end if
    end if


    if ( (CCTK_Equals( initial_f(l), 'cassini' ) .ne. 0) ) then
      f(:,:,:,l) = (x**2+y**2+z**2)**2 + cas_a(l)**4 - &
            2*cas_a(l)**2*(x**2 - (y**2+z**2)) - cas_b(l)**4
    end if
  end do


  eh_mask = 0

  return
end subroutine EHFinder_Init_F

subroutine EHFinder_Init(cctk_dim,cctk_gsh,cctk_lsh,cctk_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignment,cctk_al&
  &ignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_time,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_levoff,&
  &cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cctk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3, &
  &X0center_arrays,X0dxg,X0dxg2,X0dyg,X0dyg2,X0dzg,X0dzg2,X0eh_area,X0eh_area2,X0eh_centroid2_x,X0eh_centroid2_y,X0eh_centroid2_z,X&
  &0eh_centroid_x,X0eh_centroid_y,X0eh_centroid_z,X0eh_circ_eq,X0eh_circ_eq2,X0eh_circ_pol,X0eh_circ_pol2,X0generator_arrays,X0gene&
  &rator_arrays2,X0integrate_tmp_array,X0interp_metric_arrays,X0surface_arrays,X0surface_int_array,X0surface_tmp_arrays,X0xg,X0xg2,&
  &X0yg,X0yg2,X0zg,X0zg2,X1dxg2,X1dyg2,X1dzg2,X1generator_arrays2,X1integrate_tmp_array,X1interp_metric_arrays,X1surface_arrays,X1s&
  &urface_int_array,X1surface_tmp_arrays,X1xg2,X1yg2,X1zg2,dfsq_length,dfx_length,dfy_length,dfz_length,dxg2_length,dxg_length,dyg2&
  &_length,dyg_length,dzg2_length,dzg_length,eh_area2_length,eh_area_length,eh_centroid2_x_length,eh_centroid2_y_length,eh_centroid&
  &2_z_length,eh_centroid_x_length,eh_centroid_y_length,eh_centroid_z_length,eh_circ_eq2_length,eh_circ_eq_length,eh_circ_pol2_leng&
  &th,eh_circ_pol_length,eh_mask_bak_length,eh_mask_length,f_length,fbak_length,ftmp_length,sf_length,sftmp_length,tm_mask_length,x&
  &g2_length,xg_length,yg2_length,yg_length,zg2_length,zg_length,alpg,alpg2,betaxg,betaxg2,betayg,betayg2,betazg,betazg2,center,cos&
  &phi,costheta,cphi,ctheta,da,dfdx_interp,dfdy_interp,dfdz_interp,dfsq,dfx,dfxg,dfxg2,dfy,dfyg,dfyg2,dfz,dfzg,dfzg2,dlphi,dltheta,&
  &drdphi,drdtheta,drsurf,dxg,dxg2,dyg,dyg2,dzg,dzg2,eh_area,eh_area2,eh_centroid2_x,eh_centroid2_y,eh_centroid2_z,eh_centroid_x,eh&
  &_centroid_y,eh_centroid_z,eh_circ_eq,eh_circ_eq2,eh_circ_pol,eh_circ_pol2,eh_mask,eh_mask_bak,f,f_p,f_p_p,f_interp,fbak,find_sur&
  &face_status,ftmp,g3xx,g3xy,g3xz,g3yy,g3yz,g3zz,gpp,gtp,gtt,gxxg,gxxg2,gxxi,gxyg,gxyg2,gxyi,gxzg,gxzg2,gxzi,gyyg,gyyg2,gyyi,gyzg,&
  &gyzg2,gyzi,gzzg,gzzg2,gzzi,int_tmp,integrate_counter,interp_x,interp_y,interp_z,levelset_counter,more_levelsets,more_points,more&
  &_surfaces,n_since_last_reduction,niter_reinit,phi_sym_factor,phiweights,points_counter,psig,psig2,psii,re_init_control,rsurf,sc,&
  &sf,sftmp,sinphi,sintheta,surface_counter,sym_factor,theta_sym_factor,thetaweights,tm_mask,weights,xg,xg_p,xg_p_p,xg2,xg2_p,xg2_p&
  &_p,xgf,xgf2,yg,yg_p,yg_p_p,yg2,yg2_p,yg2_p_p,ygf,ygf2,zg,zg_p,zg_p_p,zg2,zg2_p,zg2_p_p,zgf,zgf2, active_slicing_handle,alp,alp_p&
  &,alp_p_p,betax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,d&
  &talp,dtalp_p,dtalp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,d&
  &tshift_state,emask,gxx,gxx_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,k&
  &xx,kxx_p,kxx_p_p,kxy,kxy_p,kxy_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kzz_p,kzz_p_p,psi,psix,psixx,psixy,&
  &psixz,psiy,psiyy,psiyz,psiz,psizz,r,shift_state,space_mask,x,y,z)

  use EHFinder_mod

  implicit none

  INTEGER*4 EHFinder_MaxNumEvolvedVars
  integer, parameter :: cctki_use_EHFinder_MaxNumEvolvedVars = kind(EHFinder_MaxNumEvolvedVars)
  INTEGER*4 EHFinder_Max_Evolved_Array_Size
  integer, parameter :: cctki_use_EHFinder_Max_Evolved_Array_Size = kind(EHFinder_Max_Evolved_Array_Size)
  INTEGER*4 EHFinder_Num_ArrayEvolved_Vars
  integer, parameter :: cctki_use_EHFinder_Num_ArrayEvolved_Vars = kind(EHFinder_Num_ArrayEvolved_Vars)
  COMMON /ehfinderrest/EHFinder_MaxNumEvolvedVars, EHFinder_Max_Evolved_Array_Size, EHFinder_Num_ArrayEvolved_Vars
  REAL*8 cas_a (10)
  integer, parameter :: cctki_use_cas_a = kind(cas_a)
  REAL*8 cas_b (10)
  integer, parameter :: cctki_use_cas_b = kind(cas_b)
  REAL*8 center_x
  integer, parameter :: cctki_use_center_x = kind(center_x)
  REAL*8 center_y
  integer, parameter :: cctki_use_center_y = kind(center_y)
  REAL*8 center_z
  integer, parameter :: cctki_use_center_z = kind(center_z)
  REAL*8 initial_a (10)
  integer, parameter :: cctki_use_initial_a = kind(initial_a)
  REAL*8 initial_b (10)
  integer, parameter :: cctki_use_initial_b = kind(initial_b)
  REAL*8 initial_c (10)
  integer, parameter :: cctki_use_initial_c = kind(initial_c)
  REAL*8 initial_rad (10)
  integer, parameter :: cctki_use_initial_rad = kind(initial_rad)
  REAL*8 rotation_alpha (10)
  integer, parameter :: cctki_use_rotation_alpha = kind(rotation_alpha)
  REAL*8 rotation_beta (10)
  integer, parameter :: cctki_use_rotation_beta = kind(rotation_beta)
  REAL*8 rotation_gamma (10)
  integer, parameter :: cctki_use_rotation_gamma = kind(rotation_gamma)
  REAL*8 shell_width
  integer, parameter :: cctki_use_shell_width = kind(shell_width)
  REAL*8 translate_x (10)
  integer, parameter :: cctki_use_translate_x = kind(translate_x)
  REAL*8 translate_y (10)
  integer, parameter :: cctki_use_translate_y = kind(translate_y)
  REAL*8 translate_z (10)
  integer, parameter :: cctki_use_translate_z = kind(translate_z)
  integer*8 area_calculation_method
  integer, parameter :: cctki_use_area_calculation_method = kind(area_calculation_method)
  integer*8 area_interpolator
  integer, parameter :: cctki_use_area_interpolator = kind(area_interpolator)
  integer*8 eh_lapse_type
  integer, parameter :: cctki_use_eh_lapse_type = kind(eh_lapse_type)
  integer*8 eh_metric_type
  integer, parameter :: cctki_use_eh_metric_type = kind(eh_metric_type)
  integer*8 eh_shift_type
  integer, parameter :: cctki_use_eh_shift_type = kind(eh_shift_type)
  integer*8 file_type
  integer, parameter :: cctki_use_file_type = kind(file_type)
  integer*8 generator_distribution
  integer, parameter :: cctki_use_generator_distribution = kind(generator_distribution)
  integer*8 generator_interpolator
  integer, parameter :: cctki_use_generator_interpolator = kind(generator_interpolator)
  integer*8 generator_tracking_method
  integer, parameter :: cctki_use_generator_tracking_method = kind(generator_tracking_method)
  integer*8 initial_f (10)
  integer, parameter :: cctki_use_initial_f = kind(initial_f)
  integer*8 mode
  integer, parameter :: cctki_use_mode = kind(mode)
  integer*8 pde_differences
  integer, parameter :: cctki_use_pde_differences = kind(pde_differences)
  integer*8 re_init_int_method
  integer, parameter :: cctki_use_re_init_int_method = kind(re_init_int_method)
  integer*8 surface_direction
  integer, parameter :: cctki_use_surface_direction = kind(surface_direction)
  integer*8 surface_interpolator
  integer, parameter :: cctki_use_surface_interpolator = kind(surface_interpolator)
  integer*8 upwind_type
  integer, parameter :: cctki_use_upwind_type = kind(upwind_type)
  INTEGER*4 area_interpolation_order
  integer, parameter :: cctki_use_area_interpolation_order = kind(area_interpolation_order)
  INTEGER*4 cheat
  integer, parameter :: cctki_use_cheat = kind(cheat)
  INTEGER*4 cheat_iterations
  integer, parameter :: cctki_use_cheat_iterations = kind(cheat_iterations)
  INTEGER*4 eh_number_level_sets
  integer, parameter :: cctki_use_eh_number_level_sets = kind(eh_number_level_sets)
  INTEGER*4 evolve_generators
  integer, parameter :: cctki_use_evolve_generators = kind(evolve_generators)
  INTEGER*4 generator_interpolation_order
  integer, parameter :: cctki_use_generator_interpolation_order = kind(generator_interpolation_order)
  INTEGER*4 last_iteration_number
  integer, parameter :: cctki_use_last_iteration_number = kind(last_iteration_number)
  INTEGER*4 maximum_surface_number
  integer, parameter :: cctki_use_maximum_surface_number = kind(maximum_surface_number)
  INTEGER*4 n_array_ghosts
  integer, parameter :: cctki_use_n_array_ghosts = kind(n_array_ghosts)
  INTEGER*4 nphi
  integer, parameter :: cctki_use_nphi = kind(nphi)
  INTEGER*4 ntheta
  integer, parameter :: cctki_use_ntheta = kind(ntheta)
  INTEGER*4 number_of_generators
  integer, parameter :: cctki_use_number_of_generators = kind(number_of_generators)
  INTEGER*4 number_of_generators_phi
  integer, parameter :: cctki_use_number_of_generators_phi = kind(number_of_generators_phi)
  INTEGER*4 number_of_generators_theta
  integer, parameter :: cctki_use_number_of_generators_theta = kind(number_of_generators_theta)
  INTEGER*4 re_init_max_iter
  integer, parameter :: cctki_use_re_init_max_iter = kind(re_init_max_iter)
  INTEGER*4 re_init_undo
  integer, parameter :: cctki_use_re_init_undo = kind(re_init_undo)
  INTEGER*4 re_init_verbose
  integer, parameter :: cctki_use_re_init_verbose = kind(re_init_verbose)
  INTEGER*4 re_initialize_every
  integer, parameter :: cctki_use_re_initialize_every = kind(re_initialize_every)
  INTEGER*4 read_conformal_factor_once
  integer, parameter :: cctki_use_read_conformal_factor_once = kind(read_conformal_factor_once)
  INTEGER*4 saved_iteration_every
  integer, parameter :: cctki_use_saved_iteration_every = kind(saved_iteration_every)
  INTEGER*4 surface_interpolation_order
  integer, parameter :: cctki_use_surface_interpolation_order = kind(surface_interpolation_order)
  INTEGER*4 use_inner_excision
  integer, parameter :: cctki_use_use_inner_excision = kind(use_inner_excision)
  INTEGER*4 use_outer_excision
  integer, parameter :: cctki_use_use_outer_excision = kind(use_outer_excision)
  INTEGER*4 use_user_center
  integer, parameter :: cctki_use_use_user_center = kind(use_user_center)
  COMMON /EHFinderpriv/cas_a, cas_b, center_x, center_y, center_z, initial_a, initial_b, initial_c, initial_rad, rotation_alpha, ro&
  &tation_beta, rotation_gamma, shell_width, translate_x, translate_y, translate_z, area_calculation_method, area_interpolator, eh_&
  &lapse_type, eh_metric_type, eh_shift_type, file_type, generator_distribution, generator_interpolator, generator_tracking_method,&
  & initial_f, mode, pde_differences, re_init_int_method, surface_direction, surface_interpolator, upwind_type, area_interpolation_&
  &order, cheat, cheat_iterations, eh_number_level_sets, evolve_generators, generator_interpolation_order, last_iteration_number, m&
  &aximum_surface_number, n_array_ghosts, nphi, ntheta, number_of_generators, number_of_generators_phi, number_of_generators_theta,&
  & re_init_max_iter, re_init_undo, re_init_verbose, re_initialize_every, read_conformal_factor_once, saved_iteration_every, surfac&
  &e_interpolation_order, use_inner_excision, use_outer_excision, use_user_center
  integer*8 CCTKH0
  integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
  integer*8 CCTKH1
  integer, parameter :: cctki_use_CCTKH1 = kind(CCTKH1)
  integer*8 CCTKH2
  integer, parameter :: cctki_use_CCTKH2 = kind(CCTKH2)
  integer*8 CCTKH3
  integer, parameter :: cctki_use_CCTKH3 = kind(CCTKH3)
  integer*8 initial_data
  integer, parameter :: cctki_use_initial_data = kind(initial_data)
  integer*8 CCTKH4
  integer, parameter :: cctki_use_CCTKH4 = kind(CCTKH4)
  integer*8 CCTKH5
  integer, parameter :: cctki_use_CCTKH5 = kind(CCTKH5)
  integer*8 initial_lapse
  integer, parameter :: cctki_use_initial_lapse = kind(initial_lapse)
  integer*8 initial_shift
  integer, parameter :: cctki_use_initial_shift = kind(initial_shift)
  integer*8 CCTKH6
  integer, parameter :: cctki_use_CCTKH6 = kind(CCTKH6)
  integer*8 CCTKH7
  integer, parameter :: cctki_use_CCTKH7 = kind(CCTKH7)
  integer*8 CCTKH9
  integer, parameter :: cctki_use_CCTKH9 = kind(CCTKH9)
  integer*8 metric_type
  integer, parameter :: cctki_use_metric_type = kind(metric_type)
  integer*8 CCTKH11
  integer, parameter :: cctki_use_CCTKH11 = kind(CCTKH11)
  integer*8 CCTKH12
  integer, parameter :: cctki_use_CCTKH12 = kind(CCTKH12)
  INTEGER*4 CCTKH8
  integer, parameter :: cctki_use_CCTKH8 = kind(CCTKH8)
  INTEGER*4 CCTKH10
  integer, parameter :: cctki_use_CCTKH10 = kind(CCTKH10)
  INTEGER*4 CCTKH13
  integer, parameter :: cctki_use_CCTKH13 = kind(CCTKH13)
  COMMON /ADMBASErest/CCTKH0, CCTKH1, CCTKH2, CCTKH3, initial_data, CCTKH4, CCTKH5, initial_lapse, initial_shift, CCTKH6, CCTKH7, C&
  &CTKH9, metric_type, CCTKH11, CCTKH12, CCTKH8, CCTKH10, CCTKH13
  REAL*8 CCTKH14
  integer, parameter :: cctki_use_CCTKH14 = kind(CCTKH14)
  REAL*8 CCTKH15
  integer, parameter :: cctki_use_CCTKH15 = kind(CCTKH15)
  REAL*8 CCTKH16
  integer, parameter :: cctki_use_CCTKH16 = kind(CCTKH16)
  REAL*8 CCTKH17
  integer, parameter :: cctki_use_CCTKH17 = kind(CCTKH17)
  REAL*8 CCTKH26
  integer, parameter :: cctki_use_CCTKH26 = kind(CCTKH26)
  REAL*8 CCTKH27
  integer, parameter :: cctki_use_CCTKH27 = kind(CCTKH27)
  REAL*8 CCTKH28
  integer, parameter :: cctki_use_CCTKH28 = kind(CCTKH28)
  REAL*8 CCTKH29
  integer, parameter :: cctki_use_CCTKH29 = kind(CCTKH29)
  REAL*8 CCTKH30
  integer, parameter :: cctki_use_CCTKH30 = kind(CCTKH30)
  REAL*8 CCTKH31
  integer, parameter :: cctki_use_CCTKH31 = kind(CCTKH31)
  REAL*8 CCTKH32
  integer, parameter :: cctki_use_CCTKH32 = kind(CCTKH32)
  REAL*8 CCTKH33
  integer, parameter :: cctki_use_CCTKH33 = kind(CCTKH33)
  integer*8 bitant_plane
  integer, parameter :: cctki_use_bitant_plane = kind(bitant_plane)
  integer*8 domain
  integer, parameter :: cctki_use_domain = kind(domain)
  integer*8 quadrant_direction
  integer, parameter :: cctki_use_quadrant_direction = kind(quadrant_direction)
  integer*8 CCTKH18
  integer, parameter :: cctki_use_CCTKH18 = kind(CCTKH18)
  integer*8 CCTKH25
  integer, parameter :: cctki_use_CCTKH25 = kind(CCTKH25)
  INTEGER*4 CCTKH19
  integer, parameter :: cctki_use_CCTKH19 = kind(CCTKH19)
  INTEGER*4 CCTKH20
  integer, parameter :: cctki_use_CCTKH20 = kind(CCTKH20)
  INTEGER*4 CCTKH21
  integer, parameter :: cctki_use_CCTKH21 = kind(CCTKH21)
  INTEGER*4 CCTKH22
  integer, parameter :: cctki_use_CCTKH22 = kind(CCTKH22)
  INTEGER*4 CCTKH23
  integer, parameter :: cctki_use_CCTKH23 = kind(CCTKH23)
  INTEGER*4 CCTKH24
  integer, parameter :: cctki_use_CCTKH24 = kind(CCTKH24)
  COMMON /GRIDrest/CCTKH14, CCTKH15, CCTKH16, CCTKH17, CCTKH26, CCTKH27, CCTKH28, CCTKH29, CCTKH30, CCTKH31, CCTKH32, CCTKH33, bita&
  &nt_plane, domain, quadrant_direction, CCTKH18, CCTKH25, CCTKH19, CCTKH20, CCTKH21, CCTKH22, CCTKH23, CCTKH24
  INTEGER*4 MoL_Max_Evolved_Array_Size
  integer, parameter :: cctki_use_MoL_Max_Evolved_Array_Size = kind(MoL_Max_Evolved_Array_Size)
  INTEGER*4 CCTKH34
  integer, parameter :: cctki_use_CCTKH34 = kind(CCTKH34)
  INTEGER*4 MoL_Num_ArrayEvolved_Vars
  integer, parameter :: cctki_use_MoL_Num_ArrayEvolved_Vars = kind(MoL_Num_ArrayEvolved_Vars)
  INTEGER*4 CCTKH35
  integer, parameter :: cctki_use_CCTKH35 = kind(CCTKH35)
  INTEGER*4 CCTKH36
  integer, parameter :: cctki_use_CCTKH36 = kind(CCTKH36)
  INTEGER*4 MoL_Num_Evolved_Vars
  integer, parameter :: cctki_use_MoL_Num_Evolved_Vars = kind(MoL_Num_Evolved_Vars)
  INTEGER*4 CCTKH37
  integer, parameter :: cctki_use_CCTKH37 = kind(CCTKH37)
  INTEGER*4 CCTKH38
  integer, parameter :: cctki_use_CCTKH38 = kind(CCTKH38)
  INTEGER*4 CCTKH39
  integer, parameter :: cctki_use_CCTKH39 = kind(CCTKH39)
  COMMON /METHODOFLINESrest/MoL_Max_Evolved_Array_Size, CCTKH34, MoL_Num_ArrayEvolved_Vars, CCTKH35, CCTKH36, MoL_Num_Evolved_Vars,&
  & CCTKH37, CCTKH38, CCTKH39
  INTEGER*4 use_mask
  integer, parameter :: cctki_use_use_mask = kind(use_mask)
  COMMON /SPACEMASKrest/use_mask

  INTEGER cctk_dim
  integer, parameter :: cctki_use_cctk_dim = kind(cctk_dim)
  INTEGER cctk_gsh (cctk_dim)
  integer, parameter :: cctki_use_cctk_gsh = kind(cctk_gsh)
  INTEGER cctk_lsh (cctk_dim)
  integer, parameter :: cctki_use_cctk_lsh = kind(cctk_lsh)
  INTEGER cctk_lbnd (cctk_dim)
  integer, parameter :: cctki_use_cctk_lbnd = kind(cctk_lbnd)
  INTEGER cctk_ubnd (cctk_dim)
  integer, parameter :: cctki_use_cctk_ubnd = kind(cctk_ubnd)
  INTEGER cctk_tile_min (cctk_dim)
  integer, parameter :: cctki_use_cctk_tile_min = kind(cctk_tile_min)
  INTEGER cctk_tile_max (cctk_dim)
  integer, parameter :: cctki_use_cctk_tile_max = kind(cctk_tile_max)
  INTEGER cctk_ash (cctk_dim)
  integer, parameter :: cctki_use_cctk_ash = kind(cctk_ash)
  INTEGER cctk_alignment
  integer, parameter :: cctki_use_cctk_alignment = kind(cctk_alignment)
  INTEGER cctk_alignment_offset
  integer, parameter :: cctki_use_cctk_alignment_offset = kind(cctk_alignment_offset)
  INTEGER cctk_from (cctk_dim)
  integer, parameter :: cctki_use_cctk_from = kind(cctk_from)
  INTEGER cctk_to (cctk_dim)
  integer, parameter :: cctki_use_cctk_to = kind(cctk_to)
  INTEGER cctk_bbox (2*cctk_dim)
  integer, parameter :: cctki_use_cctk_bbox = kind(cctk_bbox)
  REAL*8 cctk_delta_time
  integer, parameter :: cctki_use_cctk_delta_time = kind(cctk_delta_time)
  REAL*8 cctk_time
  integer, parameter :: cctki_use_cctk_time = kind(cctk_time)
  REAL*8 cctk_delta_space (cctk_dim)
  integer, parameter :: cctki_use_cctk_delta_space = kind(cctk_delta_space)
  REAL*8 cctk_origin_space (cctk_dim)
  integer, parameter :: cctki_use_cctk_origin_space = kind(cctk_origin_space)
  INTEGER cctk_levfac (cctk_dim)
  integer, parameter :: cctki_use_cctk_levfac = kind(cctk_levfac)
  INTEGER cctk_levoff (cctk_dim)
  integer, parameter :: cctki_use_cctk_levoff = kind(cctk_levoff)
  INTEGER cctk_levoffdenom (cctk_dim)
  integer, parameter :: cctki_use_cctk_levoffdenom = kind(cctk_levoffdenom)
  INTEGER cctk_timefac
  integer, parameter :: cctki_use_cctk_timefac = kind(cctk_timefac)
  INTEGER cctk_convlevel
  integer, parameter :: cctki_use_cctk_convlevel = kind(cctk_convlevel)
  INTEGER cctk_convfac
  integer, parameter :: cctki_use_cctk_convfac = kind(cctk_convfac)
  INTEGER cctk_nghostzones (cctk_dim)
  integer, parameter :: cctki_use_cctk_nghostzones = kind(cctk_nghostzones)
  INTEGER cctk_iteration
  integer, parameter :: cctki_use_cctk_iteration = kind(cctk_iteration)
  integer*8 cctkGH
  integer, parameter :: cctki_use_cctkGH = kind(cctkGH)
  INTEGER cctk_ash1
  integer, parameter :: cctki_use_cctk_ash1 = kind(cctk_ash1)
  INTEGER cctk_ash2
  integer, parameter :: cctki_use_cctk_ash2 = kind(cctk_ash2)
  INTEGER cctk_ash3
  integer, parameter :: cctki_use_cctk_ash3 = kind(cctk_ash3)
  INTEGER X0center_arrays
  INTEGER X0dxg
  INTEGER X0dxg2
  INTEGER X0dyg
  INTEGER X0dyg2
  INTEGER X0dzg
  INTEGER X0dzg2
  INTEGER X0eh_area
  INTEGER X0eh_area2
  INTEGER X0eh_centroid2_x
  INTEGER X0eh_centroid2_y
  INTEGER X0eh_centroid2_z
  INTEGER X0eh_centroid_x
  INTEGER X0eh_centroid_y
  INTEGER X0eh_centroid_z
  INTEGER X0eh_circ_eq
  INTEGER X0eh_circ_eq2
  INTEGER X0eh_circ_pol
  INTEGER X0eh_circ_pol2
  INTEGER X0generator_arrays
  INTEGER X0generator_arrays2
  INTEGER X0integrate_tmp_array
  INTEGER X0interp_metric_arrays
  INTEGER X0surface_arrays
  INTEGER X0surface_int_array
  INTEGER X0surface_tmp_arrays
  INTEGER X0xg
  INTEGER X0xg2
  INTEGER X0yg
  INTEGER X0yg2
  INTEGER X0zg
  INTEGER X0zg2
  INTEGER X1dxg2
  INTEGER X1dyg2
  INTEGER X1dzg2
  INTEGER X1generator_arrays2
  INTEGER X1integrate_tmp_array
  INTEGER X1interp_metric_arrays
  INTEGER X1surface_arrays
  INTEGER X1surface_int_array
  INTEGER X1surface_tmp_arrays
  INTEGER X1xg2
  INTEGER X1yg2
  INTEGER X1zg2
  INTEGER dfsq_length
  INTEGER dfx_length
  INTEGER dfy_length
  INTEGER dfz_length
  INTEGER dxg2_length
  INTEGER dxg_length
  INTEGER dyg2_length
  INTEGER dyg_length
  INTEGER dzg2_length
  INTEGER dzg_length
  INTEGER eh_area2_length
  INTEGER eh_area_length
  INTEGER eh_centroid2_x_length
  INTEGER eh_centroid2_y_length
  INTEGER eh_centroid2_z_length
  INTEGER eh_centroid_x_length
  INTEGER eh_centroid_y_length
  INTEGER eh_centroid_z_length
  INTEGER eh_circ_eq2_length
  INTEGER eh_circ_eq_length
  INTEGER eh_circ_pol2_length
  INTEGER eh_circ_pol_length
  INTEGER eh_mask_bak_length
  INTEGER eh_mask_length
  INTEGER f_length
  INTEGER fbak_length
  INTEGER ftmp_length
  INTEGER sf_length
  INTEGER sftmp_length
  INTEGER tm_mask_length
  INTEGER xg2_length
  INTEGER xg_length
  INTEGER yg2_length
  INTEGER yg_length
  INTEGER zg2_length
  INTEGER zg_length
  REAL*8 alpg (X0generator_arrays)
  integer, parameter :: cctki_use_alpg = kind(alpg)
  REAL*8 alpg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_alpg2 = kind(alpg2)
  REAL*8 betaxg (X0generator_arrays)
  integer, parameter :: cctki_use_betaxg = kind(betaxg)
  REAL*8 betaxg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_betaxg2 = kind(betaxg2)
  REAL*8 betayg (X0generator_arrays)
  integer, parameter :: cctki_use_betayg = kind(betayg)
  REAL*8 betayg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_betayg2 = kind(betayg2)
  REAL*8 betazg (X0generator_arrays)
  integer, parameter :: cctki_use_betazg = kind(betazg)
  REAL*8 betazg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_betazg2 = kind(betazg2)
  REAL*8 center (X0center_arrays)
  integer, parameter :: cctki_use_center = kind(center)
  REAL*8 cosphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_cosphi = kind(cosphi)
  REAL*8 costheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_costheta = kind(costheta)
  REAL*8 cphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_cphi = kind(cphi)
  REAL*8 ctheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_ctheta = kind(ctheta)
  REAL*8 da (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_da = kind(da)
  REAL*8 dfdx_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_dfdx_interp = kind(dfdx_interp)
  REAL*8 dfdy_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_dfdy_interp = kind(dfdy_interp)
  REAL*8 dfdz_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_dfdz_interp = kind(dfdz_interp)
  REAL*8 dfsq (cctk_ash1,cctk_ash2,cctk_ash3,dfsq_length)
  integer, parameter :: cctki_use_dfsq = kind(dfsq)
  REAL*8 dfx (cctk_ash1,cctk_ash2,cctk_ash3,dfx_length)
  integer, parameter :: cctki_use_dfx = kind(dfx)
  REAL*8 dfxg (X0generator_arrays)
  integer, parameter :: cctki_use_dfxg = kind(dfxg)
  REAL*8 dfxg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_dfxg2 = kind(dfxg2)
  REAL*8 dfy (cctk_ash1,cctk_ash2,cctk_ash3,dfy_length)
  integer, parameter :: cctki_use_dfy = kind(dfy)
  REAL*8 dfyg (X0generator_arrays)
  integer, parameter :: cctki_use_dfyg = kind(dfyg)
  REAL*8 dfyg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_dfyg2 = kind(dfyg2)
  REAL*8 dfz (cctk_ash1,cctk_ash2,cctk_ash3,dfz_length)
  integer, parameter :: cctki_use_dfz = kind(dfz)
  REAL*8 dfzg (X0generator_arrays)
  integer, parameter :: cctki_use_dfzg = kind(dfzg)
  REAL*8 dfzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_dfzg2 = kind(dfzg2)
  REAL*8 dlphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_dlphi = kind(dlphi)
  REAL*8 dltheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_dltheta = kind(dltheta)
  REAL*8 drdphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_drdphi = kind(drdphi)
  REAL*8 drdtheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_drdtheta = kind(drdtheta)
  REAL*8 drsurf (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_drsurf = kind(drsurf)
  REAL*8 dxg (X0dxg,dxg_length)
  integer, parameter :: cctki_use_dxg = kind(dxg)
  REAL*8 dxg2 (X0dxg2,X1dxg2,dxg2_length)
  integer, parameter :: cctki_use_dxg2 = kind(dxg2)
  REAL*8 dyg (X0dyg,dyg_length)
  integer, parameter :: cctki_use_dyg = kind(dyg)
  REAL*8 dyg2 (X0dyg2,X1dyg2,dyg2_length)
  integer, parameter :: cctki_use_dyg2 = kind(dyg2)
  REAL*8 dzg (X0dzg,dzg_length)
  integer, parameter :: cctki_use_dzg = kind(dzg)
  REAL*8 dzg2 (X0dzg2,X1dzg2,dzg2_length)
  integer, parameter :: cctki_use_dzg2 = kind(dzg2)
  REAL*8 eh_area (X0eh_area,eh_area_length)
  integer, parameter :: cctki_use_eh_area = kind(eh_area)
  REAL*8 eh_area2 (X0eh_area2,eh_area2_length)
  integer, parameter :: cctki_use_eh_area2 = kind(eh_area2)
  REAL*8 eh_centroid2_x (X0eh_centroid2_x,eh_centroid2_x_length)
  integer, parameter :: cctki_use_eh_centroid2_x = kind(eh_centroid2_x)
  REAL*8 eh_centroid2_y (X0eh_centroid2_y,eh_centroid2_y_length)
  integer, parameter :: cctki_use_eh_centroid2_y = kind(eh_centroid2_y)
  REAL*8 eh_centroid2_z (X0eh_centroid2_z,eh_centroid2_z_length)
  integer, parameter :: cctki_use_eh_centroid2_z = kind(eh_centroid2_z)
  REAL*8 eh_centroid_x (X0eh_centroid_x,eh_centroid_x_length)
  integer, parameter :: cctki_use_eh_centroid_x = kind(eh_centroid_x)
  REAL*8 eh_centroid_y (X0eh_centroid_y,eh_centroid_y_length)
  integer, parameter :: cctki_use_eh_centroid_y = kind(eh_centroid_y)
  REAL*8 eh_centroid_z (X0eh_centroid_z,eh_centroid_z_length)
  integer, parameter :: cctki_use_eh_centroid_z = kind(eh_centroid_z)
  REAL*8 eh_circ_eq (X0eh_circ_eq,eh_circ_eq_length)
  integer, parameter :: cctki_use_eh_circ_eq = kind(eh_circ_eq)
  REAL*8 eh_circ_eq2 (X0eh_circ_eq2,eh_circ_eq2_length)
  integer, parameter :: cctki_use_eh_circ_eq2 = kind(eh_circ_eq2)
  REAL*8 eh_circ_pol (X0eh_circ_pol,eh_circ_pol_length)
  integer, parameter :: cctki_use_eh_circ_pol = kind(eh_circ_pol)
  REAL*8 eh_circ_pol2 (X0eh_circ_pol2,eh_circ_pol2_length)
  integer, parameter :: cctki_use_eh_circ_pol2 = kind(eh_circ_pol2)
  INTEGER*4 eh_mask (cctk_ash1,cctk_ash2,cctk_ash3,eh_mask_length)
  integer, parameter :: cctki_use_eh_mask = kind(eh_mask)
  INTEGER*4 eh_mask_bak (cctk_ash1,cctk_ash2,cctk_ash3,eh_mask_bak_length)
  integer, parameter :: cctki_use_eh_mask_bak = kind(eh_mask_bak)
  REAL*8 f (cctk_ash1,cctk_ash2,cctk_ash3,f_length)
  integer, parameter :: cctki_use_f = kind(f)
  REAL*8 f_p (cctk_ash1,cctk_ash2,cctk_ash3,f_length)
  integer, parameter :: cctki_use_f_p = kind(f_p)
  REAL*8 f_p_p (cctk_ash1,cctk_ash2,cctk_ash3,f_length)
  integer, parameter :: cctki_use_f_p_p = kind(f_p_p)
  REAL*8 f_interp (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_f_interp = kind(f_interp)
  REAL*8 fbak (cctk_ash1,cctk_ash2,cctk_ash3,fbak_length)
  integer, parameter :: cctki_use_fbak = kind(fbak)
  INTEGER*4 find_surface_status
  integer, parameter :: cctki_use_find_surface_status = kind(find_surface_status)
  REAL*8 ftmp (cctk_ash1,cctk_ash2,cctk_ash3,ftmp_length)
  integer, parameter :: cctki_use_ftmp = kind(ftmp)
  REAL*8 g3xx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3xx = kind(g3xx)
  REAL*8 g3xy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3xy = kind(g3xy)
  REAL*8 g3xz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3xz = kind(g3xz)
  REAL*8 g3yy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3yy = kind(g3yy)
  REAL*8 g3yz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3yz = kind(g3yz)
  REAL*8 g3zz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_g3zz = kind(g3zz)
  REAL*8 gpp (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_gpp = kind(gpp)
  REAL*8 gtp (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_gtp = kind(gtp)
  REAL*8 gtt (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_gtt = kind(gtt)
  REAL*8 gxxg (X0generator_arrays)
  integer, parameter :: cctki_use_gxxg = kind(gxxg)
  REAL*8 gxxg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gxxg2 = kind(gxxg2)
  REAL*8 gxxi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gxxi = kind(gxxi)
  REAL*8 gxyg (X0generator_arrays)
  integer, parameter :: cctki_use_gxyg = kind(gxyg)
  REAL*8 gxyg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gxyg2 = kind(gxyg2)
  REAL*8 gxyi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gxyi = kind(gxyi)
  REAL*8 gxzg (X0generator_arrays)
  integer, parameter :: cctki_use_gxzg = kind(gxzg)
  REAL*8 gxzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gxzg2 = kind(gxzg2)
  REAL*8 gxzi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gxzi = kind(gxzi)
  REAL*8 gyyg (X0generator_arrays)
  integer, parameter :: cctki_use_gyyg = kind(gyyg)
  REAL*8 gyyg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gyyg2 = kind(gyyg2)
  REAL*8 gyyi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gyyi = kind(gyyi)
  REAL*8 gyzg (X0generator_arrays)
  integer, parameter :: cctki_use_gyzg = kind(gyzg)
  REAL*8 gyzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gyzg2 = kind(gyzg2)
  REAL*8 gyzi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gyzi = kind(gyzi)
  REAL*8 gzzg (X0generator_arrays)
  integer, parameter :: cctki_use_gzzg = kind(gzzg)
  REAL*8 gzzg2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_gzzg2 = kind(gzzg2)
  REAL*8 gzzi (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_gzzi = kind(gzzi)
  REAL*8 int_tmp (X0integrate_tmp_array,X1integrate_tmp_array)
  integer, parameter :: cctki_use_int_tmp = kind(int_tmp)
  INTEGER*4 integrate_counter
  integer, parameter :: cctki_use_integrate_counter = kind(integrate_counter)
  REAL*8 interp_x (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_interp_x = kind(interp_x)
  REAL*8 interp_y (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_interp_y = kind(interp_y)
  REAL*8 interp_z (X0surface_tmp_arrays,X1surface_tmp_arrays)
  integer, parameter :: cctki_use_interp_z = kind(interp_z)
  INTEGER*4 levelset_counter
  integer, parameter :: cctki_use_levelset_counter = kind(levelset_counter)
  INTEGER*4 more_levelsets
  integer, parameter :: cctki_use_more_levelsets = kind(more_levelsets)
  INTEGER*4 more_points
  integer, parameter :: cctki_use_more_points = kind(more_points)
  INTEGER*4 more_surfaces
  integer, parameter :: cctki_use_more_surfaces = kind(more_surfaces)
  INTEGER*4 n_since_last_reduction (X0surface_int_array,X1surface_int_array)
  integer, parameter :: cctki_use_n_since_last_reduction = kind(n_since_last_reduction)
  INTEGER*4 niter_reinit
  integer, parameter :: cctki_use_niter_reinit = kind(niter_reinit)
  REAL*8 phi_sym_factor
  integer, parameter :: cctki_use_phi_sym_factor = kind(phi_sym_factor)
  REAL*8 phiweights (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_phiweights = kind(phiweights)
  INTEGER*4 points_counter
  integer, parameter :: cctki_use_points_counter = kind(points_counter)
  REAL*8 psig (X0generator_arrays)
  integer, parameter :: cctki_use_psig = kind(psig)
  REAL*8 psig2 (X0generator_arrays2,X1generator_arrays2)
  integer, parameter :: cctki_use_psig2 = kind(psig2)
  REAL*8 psii (X0interp_metric_arrays,X1interp_metric_arrays)
  integer, parameter :: cctki_use_psii = kind(psii)
  INTEGER*4 re_init_control
  integer, parameter :: cctki_use_re_init_control = kind(re_init_control)
  REAL*8 rsurf (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_rsurf = kind(rsurf)
  REAL*8 sc (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_sc = kind(sc)
  REAL*8 sf (cctk_ash1,cctk_ash2,cctk_ash3,sf_length)
  integer, parameter :: cctki_use_sf = kind(sf)
  REAL*8 sftmp (cctk_ash1,cctk_ash2,cctk_ash3,sftmp_length)
  integer, parameter :: cctki_use_sftmp = kind(sftmp)
  REAL*8 sinphi (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_sinphi = kind(sinphi)
  REAL*8 sintheta (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_sintheta = kind(sintheta)
  INTEGER*4 surface_counter
  integer, parameter :: cctki_use_surface_counter = kind(surface_counter)
  REAL*8 sym_factor
  integer, parameter :: cctki_use_sym_factor = kind(sym_factor)
  REAL*8 theta_sym_factor
  integer, parameter :: cctki_use_theta_sym_factor = kind(theta_sym_factor)
  REAL*8 thetaweights (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_thetaweights = kind(thetaweights)
  INTEGER*4 tm_mask (cctk_ash1,cctk_ash2,cctk_ash3,tm_mask_length)
  integer, parameter :: cctki_use_tm_mask = kind(tm_mask)
  REAL*8 weights (X0surface_arrays,X1surface_arrays)
  integer, parameter :: cctki_use_weights = kind(weights)
  REAL*8 xg (X0xg,xg_length)
  integer, parameter :: cctki_use_xg = kind(xg)
  REAL*8 xg_p (X0xg,xg_length)
  integer, parameter :: cctki_use_xg_p = kind(xg_p)
  REAL*8 xg_p_p (X0xg,xg_length)
  integer, parameter :: cctki_use_xg_p_p = kind(xg_p_p)
  REAL*8 xg2 (X0xg2,X1xg2,xg2_length)
  integer, parameter :: cctki_use_xg2 = kind(xg2)
  REAL*8 xg2_p (X0xg2,X1xg2,xg2_length)
  integer, parameter :: cctki_use_xg2_p = kind(xg2_p)
  REAL*8 xg2_p_p (X0xg2,X1xg2,xg2_length)
  integer, parameter :: cctki_use_xg2_p_p = kind(xg2_p_p)
  REAL*8 xgf (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_xgf = kind(xgf)
  REAL*8 xgf2 (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_xgf2 = kind(xgf2)
  REAL*8 yg (X0yg,yg_length)
  integer, parameter :: cctki_use_yg = kind(yg)
  REAL*8 yg_p (X0yg,yg_length)
  integer, parameter :: cctki_use_yg_p = kind(yg_p)
  REAL*8 yg_p_p (X0yg,yg_length)
  integer, parameter :: cctki_use_yg_p_p = kind(yg_p_p)
  REAL*8 yg2 (X0yg2,X1yg2,yg2_length)
  integer, parameter :: cctki_use_yg2 = kind(yg2)
  REAL*8 yg2_p (X0yg2,X1yg2,yg2_length)
  integer, parameter :: cctki_use_yg2_p = kind(yg2_p)
  REAL*8 yg2_p_p (X0yg2,X1yg2,yg2_length)
  integer, parameter :: cctki_use_yg2_p_p = kind(yg2_p_p)
  REAL*8 ygf (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_ygf = kind(ygf)
  REAL*8 ygf2 (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_ygf2 = kind(ygf2)
  REAL*8 zg (X0zg,zg_length)
  integer, parameter :: cctki_use_zg = kind(zg)
  REAL*8 zg_p (X0zg,zg_length)
  integer, parameter :: cctki_use_zg_p = kind(zg_p)
  REAL*8 zg_p_p (X0zg,zg_length)
  integer, parameter :: cctki_use_zg_p_p = kind(zg_p_p)
  REAL*8 zg2 (X0zg2,X1zg2,zg2_length)
  integer, parameter :: cctki_use_zg2 = kind(zg2)
  REAL*8 zg2_p (X0zg2,X1zg2,zg2_length)
  integer, parameter :: cctki_use_zg2_p = kind(zg2_p)
  REAL*8 zg2_p_p (X0zg2,X1zg2,zg2_length)
  integer, parameter :: cctki_use_zg2_p_p = kind(zg2_p_p)
  REAL*8 zgf (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_zgf = kind(zgf)
  REAL*8 zgf2 (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_zgf2 = kind(zgf2)
  INTEGER*4 active_slicing_handle
  integer, parameter :: cctki_use_active_slicing_handle = kind(active_slicing_handle)
  REAL*8 alp (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_alp = kind(alp)
  REAL*8 alp_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_alp_p = kind(alp_p)
  REAL*8 alp_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_alp_p_p = kind(alp_p_p)
  REAL*8 betax (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betax = kind(betax)
  REAL*8 betax_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betax_p = kind(betax_p)
  REAL*8 betax_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betax_p_p = kind(betax_p_p)
  REAL*8 betay (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betay = kind(betay)
  REAL*8 betay_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betay_p = kind(betay_p)
  REAL*8 betay_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betay_p_p = kind(betay_p_p)
  REAL*8 betaz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betaz = kind(betaz)
  REAL*8 betaz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betaz_p = kind(betaz_p)
  REAL*8 betaz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_betaz_p_p = kind(betaz_p_p)
  REAL*8 coarse_dx
  integer, parameter :: cctki_use_coarse_dx = kind(coarse_dx)
  REAL*8 coarse_dy
  integer, parameter :: cctki_use_coarse_dy = kind(coarse_dy)
  REAL*8 coarse_dz
  integer, parameter :: cctki_use_coarse_dz = kind(coarse_dz)
  INTEGER*4 conformal_state
  integer, parameter :: cctki_use_conformal_state = kind(conformal_state)
  REAL*8 dtalp (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtalp = kind(dtalp)
  REAL*8 dtalp_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtalp_p = kind(dtalp_p)
  REAL*8 dtalp_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtalp_p_p = kind(dtalp_p_p)
  REAL*8 dtbetax (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetax = kind(dtbetax)
  REAL*8 dtbetax_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetax_p = kind(dtbetax_p)
  REAL*8 dtbetax_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetax_p_p = kind(dtbetax_p_p)
  REAL*8 dtbetay (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetay = kind(dtbetay)
  REAL*8 dtbetay_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetay_p = kind(dtbetay_p)
  REAL*8 dtbetay_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetay_p_p = kind(dtbetay_p_p)
  REAL*8 dtbetaz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetaz = kind(dtbetaz)
  REAL*8 dtbetaz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetaz_p = kind(dtbetaz_p)
  REAL*8 dtbetaz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_dtbetaz_p_p = kind(dtbetaz_p_p)
  INTEGER*4 dtlapse_state
  integer, parameter :: cctki_use_dtlapse_state = kind(dtlapse_state)
  INTEGER*4 dtshift_state
  integer, parameter :: cctki_use_dtshift_state = kind(dtshift_state)
  REAL*8 emask (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_emask = kind(emask)
  REAL*8 gxx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxx = kind(gxx)
  REAL*8 gxx_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxx_p = kind(gxx_p)
  REAL*8 gxx_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxx_p_p = kind(gxx_p_p)
  REAL*8 gxy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxy = kind(gxy)
  REAL*8 gxy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxy_p = kind(gxy_p)
  REAL*8 gxy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxy_p_p = kind(gxy_p_p)
  REAL*8 gxz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxz = kind(gxz)
  REAL*8 gxz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxz_p = kind(gxz_p)
  REAL*8 gxz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gxz_p_p = kind(gxz_p_p)
  REAL*8 gyy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyy = kind(gyy)
  REAL*8 gyy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyy_p = kind(gyy_p)
  REAL*8 gyy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyy_p_p = kind(gyy_p_p)
  REAL*8 gyz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyz = kind(gyz)
  REAL*8 gyz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyz_p = kind(gyz_p)
  REAL*8 gyz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gyz_p_p = kind(gyz_p_p)
  REAL*8 gzz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gzz = kind(gzz)
  REAL*8 gzz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gzz_p = kind(gzz_p)
  REAL*8 gzz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_gzz_p_p = kind(gzz_p_p)
  REAL*8 kxx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxx = kind(kxx)
  REAL*8 kxx_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxx_p = kind(kxx_p)
  REAL*8 kxx_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxx_p_p = kind(kxx_p_p)
  REAL*8 kxy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxy = kind(kxy)
  REAL*8 kxy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxy_p = kind(kxy_p)
  REAL*8 kxy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxy_p_p = kind(kxy_p_p)
  REAL*8 kxz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxz = kind(kxz)
  REAL*8 kxz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxz_p = kind(kxz_p)
  REAL*8 kxz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kxz_p_p = kind(kxz_p_p)
  REAL*8 kyy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyy = kind(kyy)
  REAL*8 kyy_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyy_p = kind(kyy_p)
  REAL*8 kyy_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyy_p_p = kind(kyy_p_p)
  REAL*8 kyz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyz = kind(kyz)
  REAL*8 kyz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyz_p = kind(kyz_p)
  REAL*8 kyz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kyz_p_p = kind(kyz_p_p)
  REAL*8 kzz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kzz = kind(kzz)
  REAL*8 kzz_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kzz_p = kind(kzz_p)
  REAL*8 kzz_p_p (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_kzz_p_p = kind(kzz_p_p)
  REAL*8 psi (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psi = kind(psi)
  REAL*8 psix (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psix = kind(psix)
  REAL*8 psixx (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psixx = kind(psixx)
  REAL*8 psixy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psixy = kind(psixy)
  REAL*8 psixz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psixz = kind(psixz)
  REAL*8 psiy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiy = kind(psiy)
  REAL*8 psiyy (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiyy = kind(psiyy)
  REAL*8 psiyz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiyz = kind(psiyz)
  REAL*8 psiz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psiz = kind(psiz)
  REAL*8 psizz (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_psizz = kind(psizz)
  REAL*8 r (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_r = kind(r)
  INTEGER*4 shift_state
  integer, parameter :: cctki_use_shift_state = kind(shift_state)
  INTEGER*4 space_mask (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_space_mask = kind(space_mask)
  REAL*8 x (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_x = kind(x)
  REAL*8 y (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_y = kind(y)
  REAL*8 z (cctk_ash1,cctk_ash2,cctk_ash3)
  integer, parameter :: cctki_use_z = kind(z)
  interface
  integer*8 function CCTK_PointerTo (var)
  implicit none
  type(*),dimension(..),TARGET :: var
  end function CCTK_PointerTo
  end interface
  interface
  integer function CCTK_Equals (arg1, arg2)
  implicit none
  integer*8 arg1
  character(*) arg2
  end function CCTK_Equals
  integer function CCTK_MyProc (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_MyProc
  integer function CCTK_nProcs (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_nProcs
  integer function CCTK_IsThornActive (name)
  implicit none
  character(*) name
  end function CCTK_IsThornActive
  integer*8 function CCTK_NullPointer ()
  implicit none
  end function CCTK_NullPointer
  end interface
  interface
  INTEGER*4 function Boundary_SelectGroupForBC (GH, faces, boundary_width, table_handle, var_name, bc_name)
  implicit none
  integer*8 GH
  INTEGER*4 faces
  INTEGER*4 boundary_width
  INTEGER*4 table_handle
  character(*) var_name
  character(*) bc_name
  end function Boundary_SelectGroupForBC
  end interface
  interface
  INTEGER*4 function MoLRegisterEvolvedGroup (EvolvedIndex, RHSIndex)
  implicit none
  INTEGER*4 EvolvedIndex
  INTEGER*4 RHSIndex
  end function MoLRegisterEvolvedGroup
  end interface


  delta = max ( (cctk_delta_space(1)/cctk_levfac(1)), (cctk_delta_space(2)/cctk_levfac(2)), (cctk_delta_space(3)/cctk_levfac(3)) )


  ex_value = - ( one + shell_width ) * delta 


  call CCTK_ReductionArrayHandle ( max_handle, 'maximum' )
  if ( max_handle .lt. 0 ) then
    call CCTK_Warn(0,290,"EHFinder_Init.F90","EHFinder",'Could not obtain a handle for maximum reduction')
  end if
  call CCTK_ReductionArrayHandle ( min_handle, 'minimum' )
  if ( min_handle .lt. 0 ) then
    call CCTK_Warn(0,294,"EHFinder_Init.F90","EHFinder",'Could not obtain a handle for minimum reduction')
  end if
  call CCTK_ReductionArrayHandle ( sum_handle, 'sum' )
  if ( sum_handle .lt. 0 ) then
    call CCTK_Warn(0,298,"EHFinder_Init.F90","EHFinder",'Could not obtain a handle for sum reduction')
  end if

end subroutine EHFinder_Init
