diff --git a/src/meshfem3D/save_arrays_solver_hdf5.F90 b/src/meshfem3D/save_arrays_solver_hdf5.F90 index 03506a848..d7a6d9faf 100644 --- a/src/meshfem3D/save_arrays_solver_hdf5.F90 +++ b/src/meshfem3D/save_arrays_solver_hdf5.F90 @@ -447,9 +447,11 @@ subroutine save_arrays_solver_hdf5(idoubling,ibool,xstore,ystore,zstore, & call h5_write_dataset_collect_hyperslab_in_group('c66store', c66store, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) else if (TRANSVERSE_ISOTROPY) then - call h5_write_dataset_collect_hyperslab_in_group('kappahstore', kappahstore, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('kappahstore', kappahstore, & + (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('muhstore', muhstore, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('eta_anisostore', eta_anisostore, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('eta_anisostore', eta_anisostore, & + (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) endif endif ! for azimutahl aniso kernels @@ -496,7 +498,8 @@ subroutine save_arrays_solver_hdf5(idoubling,ibool,xstore,ystore,zstore, & ! ocean load mass matrix if (OCEANS .and. iregion_code == IREGION_CRUST_MANTLE) then - call h5_write_dataset_collect_hyperslab_in_group('rmass_ocean_load', rmass_ocean_load, (/sum(offset_nnodes_oceans(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('rmass_ocean_load', rmass_ocean_load, & + (/sum(offset_nnodes_oceans(0:myrank-1))/), H5_COL) endif ! close group for iregion_code @@ -528,34 +531,52 @@ subroutine save_arrays_solver_hdf5(idoubling,ibool,xstore,ystore,zstore, & call h5_write_dataset_collect_hyperslab_in_group('sub_nspec2D_top', (/arr_nspec2d_top(myrank)/), (/myrank/), H5_COL) if (arr_nspec2d_xmin(myrank) /= 0) then - call h5_write_dataset_collect_hyperslab_in_group('ibelm_xmin', ibelm_xmin, (/sum(arr_nspec2d_xmin(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_xmin', normal_xmin, (/0,0,0,sum(arr_nspec2d_xmin(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_xmin', jacobian2D_xmin, (/0,0,sum(arr_nspec2d_xmin(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_xmin', ibelm_xmin, & + (/sum(arr_nspec2d_xmin(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_xmin', normal_xmin, & + (/0,0,0,sum(arr_nspec2d_xmin(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_xmin', jacobian2D_xmin, & + (/0,0,sum(arr_nspec2d_xmin(0:myrank-1))/), H5_COL) endif if (arr_nspec2d_xmax(myrank) /= 0) then - call h5_write_dataset_collect_hyperslab_in_group('ibelm_xmax', ibelm_xmax, (/sum(arr_nspec2d_xmax(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_xmax', normal_xmax, (/0,0,0,sum(arr_nspec2d_xmax(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_xmax', jacobian2D_xmax, (/0,0,sum(arr_nspec2d_xmax(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_xmax', ibelm_xmax, & + (/sum(arr_nspec2d_xmax(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_xmax', normal_xmax, & + (/0,0,0,sum(arr_nspec2d_xmax(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_xmax', jacobian2D_xmax, & + (/0,0,sum(arr_nspec2d_xmax(0:myrank-1))/), H5_COL) endif if (arr_nspec2d_ymin(myrank) /= 0) then - call h5_write_dataset_collect_hyperslab_in_group('ibelm_ymin', ibelm_ymin, (/sum(arr_nspec2d_ymin(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_ymin', normal_ymin, (/0,0,0,sum(arr_nspec2d_ymin(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_ymin', jacobian2D_ymin, (/0,0,sum(arr_nspec2d_ymin(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_ymin', ibelm_ymin, & + (/sum(arr_nspec2d_ymin(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_ymin', normal_ymin, & + (/0,0,0,sum(arr_nspec2d_ymin(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_ymin', jacobian2D_ymin, & + (/0,0,sum(arr_nspec2d_ymin(0:myrank-1))/), H5_COL) endif if (arr_nspec2d_ymax(myrank) /= 0) then - call h5_write_dataset_collect_hyperslab_in_group('ibelm_ymax', ibelm_ymax, (/sum(arr_nspec2d_ymax(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_ymax', normal_ymax, (/0,0,0,sum(arr_nspec2d_ymax(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_ymax', jacobian2D_ymax, (/0,0,sum(arr_nspec2d_ymax(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_ymax', ibelm_ymax, & + (/sum(arr_nspec2d_ymax(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_ymax', normal_ymax, & + (/0,0,0,sum(arr_nspec2d_ymax(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_ymax', jacobian2D_ymax, & + (/0,0,sum(arr_nspec2d_ymax(0:myrank-1))/), H5_COL) endif if (arr_nspec2d_bottom(myrank) /= 0) then - call h5_write_dataset_collect_hyperslab_in_group('ibelm_bottom', ibelm_bottom, (/sum(arr_nspec2d_bottom(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_bottom', normal_bottom, (/0,0,0,sum(arr_nspec2d_bottom(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_bottom', jacobian2D_bottom, (/0,0,sum(arr_nspec2d_bottom(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_bottom', ibelm_bottom, & + (/sum(arr_nspec2d_bottom(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_bottom', normal_bottom, & + (/0,0,0,sum(arr_nspec2d_bottom(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_bottom', jacobian2D_bottom, & + (/0,0,sum(arr_nspec2d_bottom(0:myrank-1))/), H5_COL) endif if (arr_nspec2d_top(myrank) /= 0) then - call h5_write_dataset_collect_hyperslab_in_group('ibelm_top', ibelm_top, (/sum(arr_nspec2d_top(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_top', normal_top, (/0,0,0,sum(arr_nspec2d_top(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_top', jacobian2D_top, (/0,0,sum(arr_nspec2d_top(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_top', ibelm_top, & + (/sum(arr_nspec2d_top(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_top', normal_top, & + (/0,0,0,sum(arr_nspec2d_top(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('jacobian2D_top', jacobian2D_top, & + (/0,0,sum(arr_nspec2d_top(0:myrank-1))/), H5_COL) endif ! close group for iregion_code @@ -574,8 +595,10 @@ subroutine save_arrays_solver_hdf5(idoubling,ibool,xstore,ystore,zstore, & ! create dataset for attenuation call h5_write_dataset_collect_hyperslab_in_group('tau_s_store', tau_s_store, (/myrank*N_SLS/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('tau_e_store', tau_e_store, (/0,0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('Qmu_store', Qmu_store, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('tau_e_store', tau_e_store, & + (/0,0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('Qmu_store', Qmu_store, & + (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('att_f_c_source', (/ATT_F_C_SOURCE/), (/myrank/), H5_COL) call h5_close_group() @@ -742,13 +765,16 @@ subroutine save_arrays_boundary_hdf5() call h5_write_dataset_collect_hyperslab_in_group('sub_NSPEC2D_670_top', (/act_arr_nspec2d_670_top(myrank)/), (/myrank/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('sub_NSPEC2D_670_bot', (/act_arr_nspec2d_670_bot(myrank)/), (/myrank/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('ibelm_moho_top', ibelm_moho_top, (/sum(arr_nspec2d_moho_top(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('ibelm_moho_bot', ibelm_moho_bot, (/sum(arr_nspec2d_moho_bot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_moho_top', ibelm_moho_top, & + (/sum(arr_nspec2d_moho_top(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('ibelm_moho_bot', ibelm_moho_bot, & + (/sum(arr_nspec2d_moho_bot(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('ibelm_400_top', ibelm_400_top, (/sum(arr_nspec2d_400_top(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('ibelm_400_bot', ibelm_400_bot, (/sum(arr_nspec2d_400_bot(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('ibelm_670_top', ibelm_670_top, (/sum(arr_nspec2d_670_top(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('ibelm_670_bot', ibelm_670_bot, (/sum(arr_nspec2d_670_bot(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('normal_moho', normal_moho, (/0,0,0,sum(arr_nspec2d_moho_top(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('normal_moho', normal_moho, & + (/0,0,0,sum(arr_nspec2d_moho_top(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('normal_400', normal_400, (/0,0,0,sum(arr_nspec2d_400_top(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('normal_670', normal_670, (/0,0,0,sum(arr_nspec2d_670_top(0:myrank-1))/), H5_COL) @@ -868,7 +894,8 @@ subroutine save_MPI_arrays_hdf5(iregion_code,LOCAL_PATH, & call h5_create_dataset_gen_in_group("max_nibool_interfaces", (/NPROCTOT/), 1, 1) call h5_create_dataset_gen_in_group("my_neighbors", (/sum(offset_num_interfaces(:))/), 1, 1) call h5_create_dataset_gen_in_group("nibool_interfaces", (/sum(offset_num_interfaces(:))/), 1, 1) - call h5_create_dataset_gen_in_group("ibool_interfaces", (/maxval(offset_max_nibool_interfaces),sum(offset_num_interfaces(:))/), 2, 1) + call h5_create_dataset_gen_in_group("ibool_interfaces", & + (/maxval(offset_max_nibool_interfaces),sum(offset_num_interfaces(:))/), 2, 1) else ! dummy call h5_create_dataset_gen_in_group("max_nibool_interfaces", (/NPROCTOT/), 1, 1) @@ -887,7 +914,8 @@ subroutine save_MPI_arrays_hdf5(iregion_code,LOCAL_PATH, & ! mesh coloring if (sum(offset_num_colors_outer) + sum(offset_num_colors_inner) > 0) then - call h5_create_dataset_gen_in_group("num_elem_colors", (/sum(offset_num_colors_outer(:)) + sum(offset_num_colors_inner(:))/), 1, 1) + call h5_create_dataset_gen_in_group("num_elem_colors", & + (/sum(offset_num_colors_outer(:)) + sum(offset_num_colors_inner(:))/), 1, 1) else ! dummy call h5_create_dataset_gen_in_group("num_elem_colors", (/NPROCTOT/), 1, 1) @@ -910,18 +938,25 @@ subroutine save_MPI_arrays_hdf5(iregion_code,LOCAL_PATH, & ! write datasets call h5_write_dataset_collect_hyperslab_in_group('offset_num_interfaces', (/offset_num_interfaces(myrank)/), (/myrank/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('offset_max_nibool_interfaces', (/offset_max_nibool_interfaces(myrank)/), (/myrank/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('offset_max_nibool_interfaces', & + (/offset_max_nibool_interfaces(myrank)/), (/myrank/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('offset_nspec_inner', (/offset_nspec_inner(myrank)/), (/myrank/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('offset_nspec_outer', (/offset_nspec_outer(myrank)/), (/myrank/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('offset_num_phase_ispec', (/offset_num_phase_ispec(myrank)/), (/myrank/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('offset_num_colors_outer', (/offset_num_colors_outer(myrank)/), (/myrank/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group('offset_num_colors_inner', (/offset_num_colors_inner(myrank)/), (/myrank/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('offset_num_phase_ispec', & + (/offset_num_phase_ispec(myrank)/), (/myrank/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('offset_num_colors_outer', & + (/offset_num_colors_outer(myrank)/), (/myrank/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('offset_num_colors_inner', & + (/offset_num_colors_inner(myrank)/), (/myrank/), H5_COL) if (sum(offset_num_interfaces) > 0) then call h5_write_dataset_collect_hyperslab_in_group("max_nibool_interfaces", (/max_nibool_interfaces/), (/myrank/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group("my_neighbors", my_neighbors, (/sum(offset_num_interfaces(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group("nibool_interfaces", nibool_interfaces, (/sum(offset_num_interfaces(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group("ibool_interfaces", ibool_interfaces, (/0,sum(offset_num_interfaces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("my_neighbors", my_neighbors, & + (/sum(offset_num_interfaces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("nibool_interfaces", nibool_interfaces, & + (/sum(offset_num_interfaces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("ibool_interfaces", ibool_interfaces, & + (/0,sum(offset_num_interfaces(0:myrank-1))/), H5_COL) else ! dummy call h5_write_dataset_collect_hyperslab_in_group("max_nibool_interfaces", (/max_nibool_interfaces/), (/myrank/), H5_COL) @@ -932,7 +967,8 @@ subroutine save_MPI_arrays_hdf5(iregion_code,LOCAL_PATH, & ! num_phase_ispec if (sum(offset_num_phase_ispec) > 0) then - call h5_write_dataset_collect_hyperslab_in_group("phase_ispec_inner", phase_ispec_inner, (/sum(offset_num_phase_ispec(0:myrank-1)),0/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("phase_ispec_inner", phase_ispec_inner, & + (/sum(offset_num_phase_ispec(0:myrank-1)),0/), H5_COL) else ! dummy call h5_write_dataset_collect_hyperslab_in_group("phase_ispec_inner", phase_ispec_inner, (/myrank,0/), H5_COL) @@ -940,7 +976,8 @@ subroutine save_MPI_arrays_hdf5(iregion_code,LOCAL_PATH, & ! mesh coloring if (sum(offset_num_colors_outer) + sum(offset_num_colors_inner) > 0) then - call h5_write_dataset_collect_hyperslab_in_group("num_elem_colors", num_elem_colors, (/sum(offset_num_colors_outer(0:myrank-1)) + sum(offset_num_colors_inner(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("num_elem_colors", num_elem_colors, & + (/sum(offset_num_colors_outer(0:myrank-1)) + sum(offset_num_colors_inner(0:myrank-1))/), H5_COL) else ! dummy call h5_write_dataset_collect_hyperslab_in_group("num_elem_colors", num_elem_colors, (/myrank/), H5_COL) @@ -1037,11 +1074,14 @@ subroutine get_absorb_stacey_boundary_hdf5(iregion, num_abs_boundary_faces, & if (sum(offset_num_abs_boundary_faces) > 0) then call h5_create_dataset_gen_in_group("abs_boundary_ispec", (/sum(offset_num_abs_boundary_faces(:))/), 1, 1) call h5_create_dataset_gen_in_group("abs_boundary_npoin", (/sum(offset_num_abs_boundary_faces(:))/), 1, 1) - call h5_create_dataset_gen_in_group("abs_boundary_ijk", (/NDIM,NGLLSQUARE,sum(offset_num_abs_boundary_faces(:))/), 3, CUSTOM_REAL) - call h5_create_dataset_gen_in_group("abs_boundary_jacobian2Dw", (/NGLLSQUARE,sum(offset_num_abs_boundary_faces(:))/), 2, CUSTOM_REAL) + call h5_create_dataset_gen_in_group("abs_boundary_ijk", & + (/NDIM,NGLLSQUARE,sum(offset_num_abs_boundary_faces(:))/), 3, CUSTOM_REAL) + call h5_create_dataset_gen_in_group("abs_boundary_jacobian2Dw", & + (/NGLLSQUARE,sum(offset_num_abs_boundary_faces(:))/), 2, CUSTOM_REAL) if (iregion == IREGION_CRUST_MANTLE) then - call h5_create_dataset_gen_in_group("abs_boundary_normal", (/NDIM,NGLLSQUARE,sum(offset_num_abs_boundary_faces(:))/), 3, CUSTOM_REAL) + call h5_create_dataset_gen_in_group("abs_boundary_normal", & + (/NDIM,NGLLSQUARE,sum(offset_num_abs_boundary_faces(:))/), 3, CUSTOM_REAL) endif else ! dummy @@ -1066,15 +1106,21 @@ subroutine get_absorb_stacey_boundary_hdf5(iregion, num_abs_boundary_faces, & call h5_open_group(gname_region) ! write datasets - call h5_write_dataset_collect_hyperslab_in_group("num_abs_boundary_faces", (/offset_num_abs_boundary_faces(myrank)/), (/myrank/), .true.) + call h5_write_dataset_collect_hyperslab_in_group("num_abs_boundary_faces", & + (/offset_num_abs_boundary_faces(myrank)/), (/myrank/), .true.) if (sum(offset_num_abs_boundary_faces) > 0) then - call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_ispec", abs_boundary_ispec, (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_npoin", abs_boundary_npoin, (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_ijk", abs_boundary_ijk, (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_jacobian2Dw", abs_boundary_jacobian2Dw, (/0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_ispec", abs_boundary_ispec, & + (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_npoin", abs_boundary_npoin, & + (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_ijk", abs_boundary_ijk, & + (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_jacobian2Dw", abs_boundary_jacobian2Dw, & + (/0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) if (iregion == IREGION_CRUST_MANTLE) then - call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_normal", abs_boundary_normal, (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group("abs_boundary_normal", abs_boundary_normal, & + (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) endif else ! dummy diff --git a/src/specfem3D/read_arrays_solver_hdf5.F90 b/src/specfem3D/read_arrays_solver_hdf5.F90 index 1ea524a38..e33ac481e 100644 --- a/src/specfem3D/read_arrays_solver_hdf5.F90 +++ b/src/specfem3D/read_arrays_solver_hdf5.F90 @@ -221,11 +221,13 @@ subroutine read_arrays_solver_hdf5(iregion_code, & else if (TRANSVERSE_ISOTROPY_VAL) then ! kappahstore - call h5_read_dataset_collect_hyperslab_in_group("kappahstore", kappahstore, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("kappahstore", kappahstore, & + (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) ! muhstore call h5_read_dataset_collect_hyperslab_in_group("muhstore", muhstore, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) ! eta_anisostore - call h5_read_dataset_collect_hyperslab_in_group("eta_anisostore", eta_anisostore, (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("eta_anisostore", eta_anisostore, & + (/0,0,0,sum(offset_nelems(0:myrank-1))/), H5_COL) endif endif @@ -285,7 +287,8 @@ subroutine read_arrays_solver_hdf5(iregion_code, & ! read additional ocean load mass matrix if (OCEANS_VAL .and. iregion_code == IREGION_CRUST_MANTLE) then ! rmass_ocean_load - call h5_read_dataset_collect_hyperslab_in_group("rmass_ocean_load", rmass_ocean_load, (/sum(offset_nnodes_oceans(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("rmass_ocean_load", rmass_ocean_load, & + (/sum(offset_nnodes_oceans(0:myrank-1))/), H5_COL) endif ! close group @@ -737,43 +740,61 @@ subroutine read_mesh_databases_coupling_hdf5() call h5_read_dataset_collect_hyperslab_in_group("sub_nspec2D_bottom", offset_nspec2D_bottom, (/0/), H5_COL) ! ibelm_xmin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_crust_mantle, (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_crust_mantle, & + (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! ibelm_xmax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_crust_mantle, (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_crust_mantle, & + (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! ibelm_ymin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_crust_mantle, (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_crust_mantle, & + (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! ibelm_ymax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_crust_mantle, (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_crust_mantle, & + (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! ibelm_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_crust_mantle, (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_crust_mantle, & + (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! ibelm_bottom - call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_crust_mantle, (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_crust_mantle, & + (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! normal_xmin - call h5_read_dataset_collect_hyperslab_in_group("normal_xmin", normal_xmin_crust_mantle, (/0,0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_xmin", normal_xmin_crust_mantle, & + (/0,0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! normal_xmax - call h5_read_dataset_collect_hyperslab_in_group("normal_xmax", normal_xmax_crust_mantle, (/0,0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_xmax", normal_xmax_crust_mantle, & + (/0,0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! normal_ymin - call h5_read_dataset_collect_hyperslab_in_group("normal_ymin", normal_ymin_crust_mantle, (/0,0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_ymin", normal_ymin_crust_mantle, & + (/0,0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! normal_ymax - call h5_read_dataset_collect_hyperslab_in_group("normal_ymax", normal_ymax_crust_mantle, (/0,0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_ymax", normal_ymax_crust_mantle, & + (/0,0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! normal_top - call h5_read_dataset_collect_hyperslab_in_group("normal_top", normal_top_crust_mantle, (/0,0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_top", normal_top_crust_mantle, & + (/0,0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! normal_bottom - call h5_read_dataset_collect_hyperslab_in_group("normal_bottom", normal_bottom_crust_mantle, (/0,0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_bottom", normal_bottom_crust_mantle, & + (/0,0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! jacobian_xmin - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmin", jacobian2D_xmin_crust_mantle, (/0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmin", jacobian2D_xmin_crust_mantle, & + (/0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! jacobian_xmax - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmax", jacobian2D_xmax_crust_mantle, (/0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmax", jacobian2D_xmax_crust_mantle,& + (/0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! jacobian_ymin - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymin", jacobian2D_ymin_crust_mantle, (/0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymin", jacobian2D_ymin_crust_mantle, & + (/0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! jacobian_ymax - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymax", jacobian2D_ymax_crust_mantle, (/0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymax", jacobian2D_ymax_crust_mantle, & + (/0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! jacobian_top - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_top", jacobian2D_top_crust_mantle, (/0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_top", jacobian2D_top_crust_mantle, & + (/0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! jacobian_bottom - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_bottom", jacobian2D_bottom_crust_mantle, (/0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_bottom", jacobian2D_bottom_crust_mantle, & + (/0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! close group call h5_close_group() @@ -803,43 +824,61 @@ subroutine read_mesh_databases_coupling_hdf5() call h5_read_dataset_collect_hyperslab_in_group("sub_nspec2D_bottom", offset_nspec2D_bottom, (/0/), H5_COL) ! ibelm_xmin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_outer_core, (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_outer_core, & + (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! ibelm_xmax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_outer_core, (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_outer_core, & + (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! ibelm_ymin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_outer_core, (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_outer_core, & + (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! ibelm_ymax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_outer_core, (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_outer_core, & + (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! ibelm_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_outer_core, (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_outer_core, & + (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! ibelm_bottom - call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_outer_core, (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_outer_core, & + (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! normal_xmin - call h5_read_dataset_collect_hyperslab_in_group("normal_xmin", normal_xmin_outer_core, (/0,0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_xmin", normal_xmin_outer_core, & + (/0,0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! normal_xmax - call h5_read_dataset_collect_hyperslab_in_group("normal_xmax", normal_xmax_outer_core, (/0,0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_xmax", normal_xmax_outer_core, & + (/0,0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! normal_ymin - call h5_read_dataset_collect_hyperslab_in_group("normal_ymin", normal_ymin_outer_core, (/0,0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_ymin", normal_ymin_outer_core, & + (/0,0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! normal_ymax - call h5_read_dataset_collect_hyperslab_in_group("normal_ymax", normal_ymax_outer_core, (/0,0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_ymax", normal_ymax_outer_core, & + (/0,0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! normal_top - call h5_read_dataset_collect_hyperslab_in_group("normal_top", normal_top_outer_core, (/0,0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_top", normal_top_outer_core, & + (/0,0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! normal_bot - call h5_read_dataset_collect_hyperslab_in_group("normal_bottom", normal_bottom_outer_core, (/0,0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_bottom", normal_bottom_outer_core, & + (/0,0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! jacobian_xmin - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmin", jacobian2D_xmin_outer_core, (/0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmin", jacobian2D_xmin_outer_core, & + (/0,0,sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! jacobian_xmax - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmax", jacobian2D_xmax_outer_core, (/0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_xmax", jacobian2D_xmax_outer_core, & + (/0,0,sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! jacobian_ymin - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymin", jacobian2D_ymin_outer_core, (/0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymin", jacobian2D_ymin_outer_core, & + (/0,0,sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! jacobian_ymax - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymax", jacobian2D_ymax_outer_core, (/0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_ymax", jacobian2D_ymax_outer_core, & + (/0,0,sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! jacobian_top - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_top", jacobian2D_top_outer_core, (/0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_top", jacobian2D_top_outer_core, & + (/0,0,sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! jacobian_bottom - call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_bottom", jacobian2D_bottom_outer_core, (/0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("jacobian2D_bottom", jacobian2D_bottom_outer_core, & + (/0,0,sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! close group call h5_close_group() @@ -870,17 +909,23 @@ subroutine read_mesh_databases_coupling_hdf5() call h5_read_dataset_collect_hyperslab_in_group("sub_nspec2D_bottom", offset_nspec2D_bottom, (/0/), H5_COL) ! ibelm_xmin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_inner_core, (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_inner_core, & + (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! ibelm_xmax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_inner_core, (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_inner_core, & + (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! ibelm_ymin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_inner_core, (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_inner_core, & + (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! ibelm_ymax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_inner_core, (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_inner_core, & + (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! ibelm_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_inner_core, (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_inner_core, & + (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! ibelm_bottom - call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_inner_core, (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_inner_core, & + (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! close group call h5_close_group() @@ -912,17 +957,23 @@ subroutine read_mesh_databases_coupling_hdf5() call h5_read_dataset_collect_hyperslab_in_group("sub_nspec2D_bottom", offset_nspec2D_bottom, (/0/), H5_COL) ! ibelm_xmin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_trinfinite, (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_trinfinite, & + (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! ibelm_xmax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_trinfinite, (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_trinfinite, & + (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! ibelm_ymin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_trinfinite, (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_trinfinite, & + (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! ibelm_ymax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_trinfinite, (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_trinfinite, & + (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! ibelm_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_trinfinite, (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_trinfinite, & + (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! ibelm_bottom - call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_trinfinite, (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_trinfinite, & + (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! close group call h5_close_group() @@ -953,17 +1004,23 @@ subroutine read_mesh_databases_coupling_hdf5() call h5_read_dataset_collect_hyperslab_in_group("sub_nspec2D_bottom", offset_nspec2D_bottom, (/0/), H5_COL) ! ibelm_xmin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_infinite, (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmin", ibelm_xmin_infinite, & + (/sum(offset_nspec2D_xmin(0:myrank-1))/), H5_COL) ! ibelm_xmax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_infinite, (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_xmax", ibelm_xmax_infinite, & + (/sum(offset_nspec2D_xmax(0:myrank-1))/), H5_COL) ! ibelm_ymin - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_infinite, (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymin", ibelm_ymin_infinite, & + (/sum(offset_nspec2D_ymin(0:myrank-1))/), H5_COL) ! ibelm_ymax - call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_infinite, (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_ymax", ibelm_ymax_infinite, & + (/sum(offset_nspec2D_ymax(0:myrank-1))/), H5_COL) ! ibelm_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_infinite, (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_top", ibelm_top_infinite, & + (/sum(offset_nspec2D_top(0:myrank-1))/), H5_COL) ! ibelm_bottom - call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_infinite, (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_bottom", ibelm_bottom_infinite, & + (/sum(offset_nspec2D_bottom(0:myrank-1))/), H5_COL) ! close group call h5_close_group() @@ -992,7 +1049,8 @@ subroutine read_mesh_databases_coupling_hdf5() ! checks setup if (tmp_nspec2d_moho /= NSPEC2D_MOHO .or. tmp_nspec2d_400 /= NSPEC2D_400 .or. tmp_nspec2d_670 /= NSPEC2D_670) then - print *,'Error: invalid NSPEC2D values read in for solver: ',tmp_nspec2d_moho,tmp_nspec2d_400,tmp_nspec2d_670,'(boundary_disc.h5)' + print *,'Error: invalid NSPEC2D values read in for solver: ',& + tmp_nspec2d_moho,tmp_nspec2d_400,tmp_nspec2d_670,'(boundary_disc.h5)' print *,' should be MOHO/400/670 : ',NSPEC2D_MOHO,NSPEC2D_400,NSPEC2D_670,'(mesh_parameters.h5)' call exit_mpi(myrank, 'Error reading boundary_disc.h5 file') endif @@ -1012,23 +1070,32 @@ subroutine read_mesh_databases_coupling_hdf5() call h5_read_dataset_collect_hyperslab_in_group("sub_NSPEC2D_670_bot", offset_nspec2D_670_bottom, (/0/), H5_COL) ! ibelm_moho_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_moho_top", ibelm_moho_top, (/sum(offset_nspec2D_moho_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_moho_top", ibelm_moho_top, & + (/sum(offset_nspec2D_moho_top(0:myrank-1))/), H5_COL) ! ibelm_moho_bot - call h5_read_dataset_collect_hyperslab_in_group("ibelm_moho_bot", ibelm_moho_bot, (/sum(offset_nspec2D_moho_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_moho_bot", ibelm_moho_bot, & + (/sum(offset_nspec2D_moho_bottom(0:myrank-1))/), H5_COL) ! ibelm_400_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_400_top", ibelm_400_top, (/sum(offset_nspec2D_400_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_400_top", ibelm_400_top, & + (/sum(offset_nspec2D_400_top(0:myrank-1))/), H5_COL) ! ibelm_400_bot - call h5_read_dataset_collect_hyperslab_in_group("ibelm_400_bot", ibelm_400_bot, (/sum(offset_nspec2D_400_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_400_bot", ibelm_400_bot, & + (/sum(offset_nspec2D_400_bottom(0:myrank-1))/), H5_COL) ! ibelm_670_top - call h5_read_dataset_collect_hyperslab_in_group("ibelm_670_top", ibelm_670_top, (/sum(offset_nspec2D_670_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_670_top", ibelm_670_top, & + (/sum(offset_nspec2D_670_top(0:myrank-1))/), H5_COL) ! ibelm_670_bot - call h5_read_dataset_collect_hyperslab_in_group("ibelm_670_bot", ibelm_670_bot, (/sum(offset_nspec2D_670_bottom(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("ibelm_670_bot", ibelm_670_bot, & + (/sum(offset_nspec2D_670_bottom(0:myrank-1))/), H5_COL) ! normal_moho - call h5_read_dataset_collect_hyperslab_in_group("normal_moho", normal_moho, (/0,0,0,sum(offset_nspec2D_moho_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_moho", normal_moho, & + (/0,0,0,sum(offset_nspec2D_moho_top(0:myrank-1))/), H5_COL) ! normal_400 - call h5_read_dataset_collect_hyperslab_in_group("normal_400", normal_400, (/0,0,0,sum(offset_nspec2D_400_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_400", normal_400, & + (/0,0,0,sum(offset_nspec2D_400_top(0:myrank-1))/), H5_COL) ! normal_670 - call h5_read_dataset_collect_hyperslab_in_group("normal_670", normal_670, (/0,0,0,sum(offset_nspec2D_670_top(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("normal_670", normal_670, & + (/0,0,0,sum(offset_nspec2D_670_top(0:myrank-1))/), H5_COL) ! close group call h5_close_group() @@ -1111,15 +1178,20 @@ subroutine read_mesh_databases_stacey_hdf5 if (ier /= 0) stop 'Error allocating array abs_boundary_ispec etc.' ! abs_boundary_ispec - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ispec", abs_boundary_ispec_crust_mantle, (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ispec", abs_boundary_ispec_crust_mantle, & + (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_npoin - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_npoin", abs_boundary_npoin_crust_mantle, (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_npoin", abs_boundary_npoin_crust_mantle, & + (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_ijk - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ijk", abs_boundary_ijk_crust_mantle, (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ijk", abs_boundary_ijk_crust_mantle, & + (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_jacobian2Dw - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_jacobian2Dw", abs_boundary_jacobian2Dw_crust_mantle, (/0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_jacobian2Dw", abs_boundary_jacobian2Dw_crust_mantle, & + (/0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_normal - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_normal", abs_boundary_normal_crust_mantle, (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_normal", abs_boundary_normal_crust_mantle, & + (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) else ! dummy ! dummy arrays @@ -1168,15 +1240,20 @@ subroutine read_mesh_databases_stacey_hdf5 if (ier /= 0) stop 'Error allocating array abs_boundary_ispec etc.' ! abs_boundary_ispec - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ispec", abs_boundary_ispec_outer_core, (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ispec", abs_boundary_ispec_outer_core, & + (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_npoin - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_npoin", abs_boundary_npoin_outer_core, (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_npoin", abs_boundary_npoin_outer_core, & + (/sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_ijk - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ijk", abs_boundary_ijk_outer_core, (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_ijk", abs_boundary_ijk_outer_core, & + (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_jacobian2Dw - call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_jacobian2Dw", abs_boundary_jacobian2Dw_outer_core, (/0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_jacobian2Dw", abs_boundary_jacobian2Dw_outer_core, & + (/0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) ! abs_boundary_normal - !call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_normal", abs_boundary_normal_outer_core, (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) + !call h5_read_dataset_collect_hyperslab_in_group("abs_boundary_normal", abs_boundary_normal_outer_core, & + ! (/0,0,sum(offset_num_abs_boundary_faces(0:myrank-1))/), H5_COL) else ! dummy ! dummy arrays diff --git a/src/specfem3D/read_forward_arrays_hdf5.F90 b/src/specfem3D/read_forward_arrays_hdf5.F90 index e23c4c5de..1023a50c4 100644 --- a/src/specfem3D/read_forward_arrays_hdf5.F90 +++ b/src/specfem3D/read_forward_arrays_hdf5.F90 @@ -101,33 +101,55 @@ subroutine read_intermediate_forward_arrays_hdf5() call h5_read_dataset_collect_hyperslab('accel_crust_mantle', accel_crust_mantle, (/0,sum(offset_nglob_cm(0:myrank-1))/), H5_COL) call h5_read_dataset_collect_hyperslab('accel_outer_core', accel_outer_core, (/0,sum(offset_nglob_oc(0:myrank-1))/), H5_COL) call h5_read_dataset_collect_hyperslab('accel_inner_core', accel_inner_core, (/0,sum(offset_nglob_ic(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) if (ROTATION_VAL) then - call h5_read_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('A_array_rotation', B_array_rotation, (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, & + (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('A_array_rotation', B_array_rotation, & + (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) endif if (ATTENUATION_VAL) then - call h5_read_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) endif if (FULL_GRAVITY_VAL) then @@ -225,33 +247,55 @@ subroutine read_forward_arrays_hdf5() call h5_read_dataset_collect_hyperslab('accel_crust_mantle', b_accel_crust_mantle, (/0,sum(offset_nglob_cm(0:myrank-1))/), H5_COL) call h5_read_dataset_collect_hyperslab('accel_outer_core', b_accel_outer_core, (/sum(offset_nglob_oc(0:myrank-1))/), H5_COL) call h5_read_dataset_collect_hyperslab('accel_inner_core', b_accel_inner_core, (/0,sum(offset_nglob_ic(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', b_epsilondev_xx_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', b_epsilondev_yy_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', b_epsilondev_xy_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', b_epsilondev_xz_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', b_epsilondev_yz_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xx_inner_core', b_epsilondev_xx_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yy_inner_core', b_epsilondev_yy_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xy_inner_core', b_epsilondev_xy_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xz_inner_core', b_epsilondev_xz_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yz_inner_core', b_epsilondev_yz_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', b_epsilondev_xx_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', b_epsilondev_yy_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', b_epsilondev_xy_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', b_epsilondev_xz_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', b_epsilondev_yz_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xx_inner_core', b_epsilondev_xx_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yy_inner_core', b_epsilondev_yy_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xy_inner_core', b_epsilondev_xy_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xz_inner_core', b_epsilondev_xz_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yz_inner_core', b_epsilondev_yz_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) if (ROTATION_VAL) then - call h5_read_dataset_collect_hyperslab('A_array_rotation', b_A_array_rotation, (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('A_array_rotation', b_B_array_rotation, (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('A_array_rotation', b_A_array_rotation, & + (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('A_array_rotation', b_B_array_rotation, & + (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) endif if (ATTENUATION_VAL) then - call h5_read_dataset_collect_hyperslab('R_xx_crust_mantle', b_R_xx_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yy_crust_mantle', b_R_yy_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xy_crust_mantle', b_R_xy_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xz_crust_mantle', b_R_xz_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yz_crust_mantle', b_R_yz_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xx_inner_core', b_R_xx_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yy_inner_core', b_R_yy_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xy_inner_core', b_R_xy_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xz_inner_core', b_R_xz_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yz_inner_core', b_R_yz_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xx_crust_mantle', b_R_xx_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yy_crust_mantle', b_R_yy_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xy_crust_mantle', b_R_xy_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xz_crust_mantle', b_R_xz_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yz_crust_mantle', b_R_yz_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xx_inner_core', b_R_xx_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yy_inner_core', b_R_yy_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xy_inner_core', b_R_xy_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xz_inner_core', b_R_xz_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yz_inner_core', b_R_yz_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) endif if (FULL_GRAVITY_VAL) then @@ -364,33 +408,55 @@ subroutine read_forward_arrays_undoatt_hdf5(iteration_on_subset_tmp) call h5_read_dataset_collect_hyperslab('accel_crust_mantle', b_accel_crust_mantle, (/0,sum(offset_nglob_cm(0:myrank-1))/), H5_COL) call h5_read_dataset_collect_hyperslab('accel_outer_core', b_accel_outer_core, (/sum(offset_nglob_oc(0:myrank-1))/), H5_COL) call h5_read_dataset_collect_hyperslab('accel_inner_core', b_accel_inner_core, (/0,sum(offset_nglob_ic(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', b_epsilondev_xx_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', b_epsilondev_yy_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', b_epsilondev_xy_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', b_epsilondev_xz_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', b_epsilondev_yz_crust_mantle, (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xx_inner_core', b_epsilondev_xx_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yy_inner_core', b_epsilondev_yy_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xy_inner_core', b_epsilondev_xy_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_xz_inner_core', b_epsilondev_xz_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('epsilondev_yz_inner_core', b_epsilondev_yz_inner_core, (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', b_epsilondev_xx_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', b_epsilondev_yy_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', b_epsilondev_xy_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', b_epsilondev_xz_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', b_epsilondev_yz_crust_mantle, & + (/0,0,0,sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xx_inner_core', b_epsilondev_xx_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yy_inner_core', b_epsilondev_yy_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xy_inner_core', b_epsilondev_xy_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_xz_inner_core', b_epsilondev_xz_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('epsilondev_yz_inner_core', b_epsilondev_yz_inner_core, & + (/0,0,0,sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) if (ROTATION_VAL) then - call h5_read_dataset_collect_hyperslab('A_array_rotation', b_A_array_rotation, (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('A_array_rotation', b_B_array_rotation, (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('A_array_rotation', b_A_array_rotation, & + (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('A_array_rotation', b_B_array_rotation, & + (/0,0,0,sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) endif if (ATTENUATION_VAL) then - call h5_read_dataset_collect_hyperslab('R_xx_crust_mantle', b_R_xx_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yy_crust_mantle', b_R_yy_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xy_crust_mantle', b_R_xy_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xz_crust_mantle', b_R_xz_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yz_crust_mantle', b_R_yz_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xx_inner_core', b_R_xx_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yy_inner_core', b_R_yy_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xy_inner_core', b_R_xy_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_xz_inner_core', b_R_xz_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_read_dataset_collect_hyperslab('R_yz_inner_core', b_R_yz_inner_core, (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xx_crust_mantle', b_R_xx_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yy_crust_mantle', b_R_yy_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xy_crust_mantle', b_R_xy_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xz_crust_mantle', b_R_xz_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yz_crust_mantle', b_R_yz_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xx_inner_core', b_R_xx_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yy_inner_core', b_R_yy_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xy_inner_core', b_R_xy_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_xz_inner_core', b_R_xz_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_read_dataset_collect_hyperslab('R_yz_inner_core', b_R_yz_inner_core, & + (/0,0,0,0,sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) endif if (FULL_GRAVITY_VAL) then diff --git a/src/specfem3D/save_forward_arrays_hdf5.F90 b/src/specfem3D/save_forward_arrays_hdf5.F90 index 08b149946..8962127fc 100644 --- a/src/specfem3D/save_forward_arrays_hdf5.F90 +++ b/src/specfem3D/save_forward_arrays_hdf5.F90 @@ -101,11 +101,16 @@ subroutine save_intermediate_forward_arrays_hdf5() call h5_create_dataset_gen('displ_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) call h5_create_dataset_gen('veloc_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) call h5_create_dataset_gen('accel_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xx_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yy_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xy_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xz_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yz_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xx_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yy_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xy_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xz_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yz_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) call h5_create_dataset_gen('epsilondev_xx_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) call h5_create_dataset_gen('epsilondev_yy_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) call h5_create_dataset_gen('epsilondev_xy_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) @@ -156,33 +161,55 @@ subroutine save_intermediate_forward_arrays_hdf5() call h5_write_dataset_collect_hyperslab('displ_inner_core', displ_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab('veloc_inner_core', veloc_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab('accel_inner_core', accel_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) if (ROTATION_VAL) then - call h5_write_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('B_array_rotation', B_array_rotation, (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, & + (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('B_array_rotation', B_array_rotation, & + (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) endif if (ATTENUATION_VAL) then - call h5_write_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) endif ! ATTENUATION_VAL if (FULL_GRAVITY_VAL) then @@ -280,16 +307,26 @@ subroutine save_forward_arrays_hdf5() call h5_create_dataset_gen('displ_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) call h5_create_dataset_gen('veloc_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) call h5_create_dataset_gen('accel_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xx_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yy_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xy_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xz_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yz_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xx_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yy_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xy_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xz_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yz_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xx_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yy_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xy_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xz_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yz_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xx_inner_core', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yy_inner_core', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xy_inner_core', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xz_inner_core', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yz_inner_core', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) if (ROTATION_VAL) then call h5_create_dataset_gen('A_array_rotation', (/NGLLX, NGLLY, NGLLZ, sum(offset_nspec_oc_rot)/), 4, CUSTOM_REAL) @@ -336,31 +373,53 @@ subroutine save_forward_arrays_hdf5() call h5_write_dataset_collect_hyperslab('displ_inner_core', displ_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab('veloc_inner_core', veloc_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab('accel_inner_core', accel_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) if (ROTATION_VAL) then - call h5_write_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('B_array_rotation', B_array_rotation, (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, & + (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('B_array_rotation', B_array_rotation, & + (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) endif if (ATTENUATION_VAL) then - call h5_write_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) endif ! ATTENUATION_VAL if (FULL_GRAVITY_VAL) then @@ -461,11 +520,16 @@ subroutine save_forward_arrays_undoatt_hdf5() call h5_create_dataset_gen('displ_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) call h5_create_dataset_gen('veloc_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) call h5_create_dataset_gen('accel_inner_core', (/NDIM, sum(offset_nglob_ic)/), 2, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xx_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yy_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xy_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_xz_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) - call h5_create_dataset_gen('epsilondev_yz_crust_mantle', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xx_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yy_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xy_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_xz_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) + call h5_create_dataset_gen('epsilondev_yz_crust_mantle', & + (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_mc_str_or_att)/), 4, CUSTOM_REAL) call h5_create_dataset_gen('epsilondev_xx_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) call h5_create_dataset_gen('epsilondev_yy_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) call h5_create_dataset_gen('epsilondev_xy_inner_core', (/NGLLX, NGLLY, NGLLZ, sum(offset_nglob_ic_str_or_att)/), 4, CUSTOM_REAL) @@ -516,33 +580,55 @@ subroutine save_forward_arrays_undoatt_hdf5() call h5_write_dataset_collect_hyperslab('displ_inner_core', displ_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab('veloc_inner_core', veloc_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab('accel_inner_core', accel_inner_core, (/0, sum(offset_nglob_ic(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xx_crust_mantle', epsilondev_xx_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yy_crust_mantle', epsilondev_yy_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xy_crust_mantle', epsilondev_xy_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xz_crust_mantle', epsilondev_xz_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yz_crust_mantle', epsilondev_yz_crust_mantle, & + (/0, 0, 0, sum(offset_nglob_mc_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xx_inner_core', epsilondev_xx_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yy_inner_core', epsilondev_yy_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xy_inner_core', epsilondev_xy_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_xz_inner_core', epsilondev_xz_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('epsilondev_yz_inner_core', epsilondev_yz_inner_core, & + (/0, 0, 0, sum(offset_nglob_ic_str_or_att(0:myrank-1))/), H5_COL) if (ROTATION_VAL) then - call h5_write_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('B_array_rotation', B_array_rotation, (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('A_array_rotation', A_array_rotation, & + (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('B_array_rotation', B_array_rotation, & + (/0, 0, 0, sum(offset_nspec_oc_rot(0:myrank-1))/), H5_COL) endif if (ATTENUATION_VAL) then - call h5_write_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xx_crust_mantle', R_xx_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yy_crust_mantle', R_yy_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xy_crust_mantle', R_xy_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xz_crust_mantle', R_xz_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yz_crust_mantle', R_yz_crust_mantle, & + (/0, 0, 0, 0, sum(offset_nspec_cm_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xx_inner_core', R_xx_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yy_inner_core', R_yy_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xy_inner_core', R_xy_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_xz_inner_core', R_xz_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('R_yz_inner_core', R_yz_inner_core, & + (/0, 0, 0, 0, sum(offset_nspec_ic_att(0:myrank-1))/), H5_COL) endif ! ATTENUATION_VAL if (FULL_GRAVITY_VAL) then @@ -751,27 +837,33 @@ subroutine save_forward_model_at_shifted_frequency_hdf5(factor_scale_relaxed_cru temp_store(:,:,:,:) = sqrt((kappavstore_crust_mantle(:,:,:,:) & + FOUR_THIRDS * muv_shifted(:,:,:,:))/rhostore_crust_mantle(:,:,:,:)) & * scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vpv_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vpv_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! vph temp_store(:,:,:,:) = sqrt((kappahstore_crust_mantle(:,:,:,:) & + FOUR_THIRDS * muh_shifted(:,:,:,:))/rhostore_crust_mantle(:,:,:,:)) & * scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vph_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vph_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! vsv temp_store(:,:,:,:) = sqrt( muv_shifted(:,:,:,:)/rhostore_crust_mantle(:,:,:,:) )*scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vsv_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vsv_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! vsh temp_store(:,:,:,:) = sqrt( muh_shifted(:,:,:,:)/rhostore_crust_mantle(:,:,:,:) )*scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vsh_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vsh_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) else ! isotropic ! vp temp_store(:,:,:,:) = sqrt((kappavstore_crust_mantle(:,:,:,:) & + FOUR_THIRDS * muv_shifted(:,:,:,:))/rhostore_crust_mantle(:,:,:,:)) & * scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vp_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vp_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! vs temp_store(:,:,:,:) = sqrt( muv_shifted(:,:,:,:)/rhostore_crust_mantle(:,:,:,:) )*scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vs_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vs_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) endif @@ -825,10 +917,12 @@ subroutine save_forward_model_at_shifted_frequency_hdf5(factor_scale_relaxed_cru temp_store(:,:,:,:) = sqrt((kappavstore_inner_core(:,:,:,:) & + FOUR_THIRDS * muv_shifted(:,:,:,:))/rhostore_inner_core(:,:,:,:)) & * scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vp_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_ic(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vp_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_ic(0:myrank-1))/), H5_COL) ! vs temp_store(:,:,:,:) = sqrt( muv_shifted(:,:,:,:)/rhostore_inner_core(:,:,:,:) )*scaleval1 - call h5_write_dataset_collect_hyperslab_in_group('vs_shifted', temp_store, (/0, 0, 0, sum(offset_nspec_ic(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('vs_shifted', temp_store, & + (/0, 0, 0, sum(offset_nspec_ic(0:myrank-1))/), H5_COL) endif deallocate(temp_store,muv_shifted) @@ -857,13 +951,17 @@ subroutine save_forward_model_at_shifted_frequency_hdf5(factor_scale_relaxed_cru call h5_open_group(group_name) ! muv_relaxed - call h5_write_dataset_collect_hyperslab_in_group('muv_relaxed', muvstore_crust_mantle*scaleval1, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('muv_relaxed', muvstore_crust_mantle*scaleval1, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! muh_relaxed - call h5_write_dataset_collect_hyperslab_in_group('muh_relaxed', muhstore_crust_mantle*scaleval1, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('muh_relaxed', muhstore_crust_mantle*scaleval1, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! kappav_relaxed - call h5_write_dataset_collect_hyperslab_in_group('kappav_relaxed', kappavstore_crust_mantle*scaleval1, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('kappav_relaxed', kappavstore_crust_mantle*scaleval1, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! kappah_relaxed - call h5_write_dataset_collect_hyperslab_in_group('kappah_relaxed', kappahstore_crust_mantle*scaleval1, (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('kappah_relaxed', kappahstore_crust_mantle*scaleval1, & + (/0, 0, 0, sum(offset_nspec_cm(0:myrank-1))/), H5_COL) ! close group call h5_close_group() diff --git a/src/specfem3D/save_kernels_hdf5.F90 b/src/specfem3D/save_kernels_hdf5.F90 index 17dea71f9..8248ba1ac 100644 --- a/src/specfem3D/save_kernels_hdf5.F90 +++ b/src/specfem3D/save_kernels_hdf5.F90 @@ -71,7 +71,8 @@ subroutine write_kernels_strength_noise_hdf5() call h5_open_file_p_collect(file_name) ! write data - call h5_write_dataset_collect_hyperslab('sigma_kernel', sigma_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('sigma_kernel', sigma_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) ! close hdf5 call h5_close_file_p() @@ -220,42 +221,68 @@ subroutine write_kernels_cm_ani_hdf5(alphav_kl_crust_mantle,alphah_kl_crust_mant ! write data if (SAVE_TRANSVERSE_KL_ONLY) then - call h5_write_dataset_collect_hyperslab('alphav_kernel', alphav_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('alphah_kernel', alphah_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('betav_kernel', betav_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('betah_kernel', betah_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('eta_kernel', eta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('bulk_c_kernel', bulk_c_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_betav_kernel', bulk_betav_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_betah_kernel', bulk_betah_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_beta_kernel', bulk_beta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alphav_kernel', alphav_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alphah_kernel', alphah_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('betav_kernel', betav_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('betah_kernel', betah_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('eta_kernel', eta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('bulk_c_kernel', bulk_c_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_betav_kernel', bulk_betav_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_betah_kernel', bulk_betah_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_beta_kernel', bulk_beta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) else if (SAVE_AZIMUTHAL_ANISO_KL_ONLY) then - call h5_write_dataset_collect_hyperslab('alphav_kernel', alphav_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('alphah_kernel', alphah_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('betav_kernel', betav_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('betah_kernel', betah_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('bulk_c_kernel', bulk_c_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_betav_kernel', bulk_betav_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_betah_kernel', bulk_betah_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('eta_kernel', eta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('Gc_prime_kernel', Gc_prime_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('Gs_prime_kernel', Gs_prime_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alphav_kernel', alphav_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alphah_kernel', alphah_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('betav_kernel', betav_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('betah_kernel', betah_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('bulk_c_kernel', bulk_c_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_betav_kernel', bulk_betav_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_betah_kernel', bulk_betah_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('eta_kernel', eta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('Gc_prime_kernel', Gc_prime_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('Gs_prime_kernel', Gs_prime_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) ! check isotropic kernel if (.false.) then - call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_beta_kernel', bulk_beta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_beta_kernel', bulk_beta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) endif ! check anisotropic kernels @@ -279,8 +306,10 @@ subroutine write_kernels_cm_ani_hdf5(alphav_kl_crust_mantle,alphah_kl_crust_mant else ! fully anisotropic kernels - call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('cijkl_kernel', cijkl_kl_crust_mantle, (/0,0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('cijkl_kernel', cijkl_kl_crust_mantle, & + (/0,0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) endif @@ -362,16 +391,24 @@ subroutine write_kernels_cm_iso_hdf5(mu_kl_crust_mantle, kappa_kl_crust_mantle, call h5_open_file_p_collect(file_name) ! write data - call h5_write_dataset_collect_hyperslab('rhonotprime_kernel', rhonotprime_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('kappa_kernel', kappa_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('mu_kernel', mu_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - - call h5_write_dataset_collect_hyperslab('bulk_c_kernel', bulk_c_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('bulk_beta_kernel', bulk_beta_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('rhonotprime_kernel', rhonotprime_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('kappa_kernel', kappa_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('mu_kernel', mu_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + + call h5_write_dataset_collect_hyperslab('bulk_c_kernel', bulk_c_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('bulk_beta_kernel', bulk_beta_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) ! close hdf5 call h5_close_file_p() @@ -433,8 +470,10 @@ subroutine write_kernels_oc_hdf5() call h5_open_file_p_collect(file_name) ! write data - call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_outer_core, (/0,0,0,sum(offset_nspec_oc_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_outer_core, (/0,0,0,sum(offset_nspec_oc_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_outer_core, & + (/0,0,0,sum(offset_nspec_oc_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_outer_core, & + (/0,0,0,sum(offset_nspec_oc_adj(0:myrank-1))/), H5_COL) ! close hdf5 call h5_close_file_p() @@ -497,9 +536,12 @@ subroutine write_kernels_ic_hdf5() call h5_open_file_p_collect(file_name) ! write data - call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_inner_core, (/0,0,0,sum(offset_nspec_ic_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_inner_core, (/0,0,0,sum(offset_nspec_ic_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_inner_core, (/0,0,0,sum(offset_nspec_ic_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('rho_kernel', rho_kl_inner_core, & + (/0,0,0,sum(offset_nspec_ic_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('alpha_kernel', alpha_kl_inner_core, & + (/0,0,0,sum(offset_nspec_ic_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('beta_kernel', beta_kl_inner_core, & + (/0,0,0,sum(offset_nspec_ic_adj(0:myrank-1))/), H5_COL) ! close hdf5 call h5_close_file_p() @@ -649,10 +691,14 @@ subroutine write_kernels_Hessian_hdf5() call h5_open_file_p_collect(file_name) ! write data - call h5_write_dataset_collect_hyperslab('hess_kernel', hess_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('hess_rho_kernel', hess_rho_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('hess_kappa_kernel', hess_kappa_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab('hess_mu_kernel', hess_mu_kl_crust_mantle, (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('hess_kernel', hess_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('hess_rho_kernel', hess_rho_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('hess_kappa_kernel', hess_kappa_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab('hess_mu_kernel', hess_mu_kl_crust_mantle, & + (/0,0,0,sum(offset_nspec_cm_adj(0:myrank-1))/), H5_COL) ! close hdf5 call h5_close_file_p() diff --git a/src/specfem3D/write_movie_volume_hdf5.F90 b/src/specfem3D/write_movie_volume_hdf5.F90 index 7bade7083..e60f0242e 100644 --- a/src/specfem3D/write_movie_volume_hdf5.F90 +++ b/src/specfem3D/write_movie_volume_hdf5.F90 @@ -414,13 +414,17 @@ subroutine write_movie_volume_mesh_hdf5(nu_3dmovie,num_ibool_3dmovie,mask_3dmovi ! create elm_conn for movie ! for crust and mantle (strain and vector output) - if (output_sv) call get_conn_for_movie(elm_conn, sum(offset_poin_vol(0:myrank-1)), iNIT, nelems_3dmovie, npoints_3dmovie, NSPEC_CRUST_MANTLE, num_ibool_3dmovie, mask_ibool_3dmovie, ibool_crust_mantle) + if (output_sv) call get_conn_for_movie(elm_conn, sum(offset_poin_vol(0:myrank-1)), iNIT, nelems_3dmovie, & + npoints_3dmovie, NSPEC_CRUST_MANTLE, num_ibool_3dmovie, mask_ibool_3dmovie, ibool_crust_mantle) ! for crust and mantle (not strain or vector output) - if (output_cm) call get_conn_for_movie(elm_conn_cm, sum(offset_poin_vol_cm(0:myrank-1)), 1, nelems_3dmovie_cm, NGLOB_CRUST_MANTLE, NSPEC_CRUST_MANTLE, num_ibool_3dmovie_cm, mask_ibool_3dmovie_cm, ibool_crust_mantle) + if (output_cm) call get_conn_for_movie(elm_conn_cm, sum(offset_poin_vol_cm(0:myrank-1)), 1, nelems_3dmovie_cm, & + NGLOB_CRUST_MANTLE, NSPEC_CRUST_MANTLE, num_ibool_3dmovie_cm, mask_ibool_3dmovie_cm, ibool_crust_mantle) ! for outer core - if (output_oc) call get_conn_for_movie(elm_conn_oc, sum(offset_poin_vol_oc(0:myrank-1)), 1, nelems_3dmovie_oc, NGLOB_OUTER_CORE, NSPEC_OUTER_CORE, num_ibool_3dmovie_oc, mask_ibool_3dmovie_oc, ibool_outer_core) + if (output_oc) call get_conn_for_movie(elm_conn_oc, sum(offset_poin_vol_oc(0:myrank-1)), 1, nelems_3dmovie_oc, & + NGLOB_OUTER_CORE, NSPEC_OUTER_CORE, num_ibool_3dmovie_oc, mask_ibool_3dmovie_oc, ibool_outer_core) ! for inner core - if (output_ic) call get_conn_for_movie(elm_conn_ic, sum(offset_poin_vol_ic(0:myrank-1)), 1, nelems_3dmovie_ic, NGLOB_INNER_CORE, NSPEC_INNER_CORE, num_ibool_3dmovie_ic, mask_ibool_3dmovie_ic, ibool_inner_core) + if (output_ic) call get_conn_for_movie(elm_conn_ic, sum(offset_poin_vol_ic(0:myrank-1)), 1, nelems_3dmovie_ic, & + NGLOB_INNER_CORE, NSPEC_INNER_CORE, num_ibool_3dmovie_ic, mask_ibool_3dmovie_ic, ibool_inner_core) ! TODO ADD IOSERVER @@ -493,21 +497,24 @@ subroutine write_movie_volume_mesh_hdf5(nu_3dmovie,num_ibool_3dmovie,mask_3dmovi endif ! for crust and mantle (not strain or vector output) if (output_cm) then - call h5_write_dataset_collect_hyperslab_in_group('elm_conn_cm', elm_conn_cm, (/0, sum(offset_nspec_vol_cm_conn(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('elm_conn_cm', elm_conn_cm, & + (/0, sum(offset_nspec_vol_cm_conn(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('x_cm', store_val3D_x_cm, (/sum(offset_poin_vol_cm(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('y_cm', store_val3D_y_cm, (/sum(offset_poin_vol_cm(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('z_cm', store_val3D_z_cm, (/sum(offset_poin_vol_cm(0:myrank-1))/), H5_COL) endif ! for outer core if (output_oc) then - call h5_write_dataset_collect_hyperslab_in_group('elm_conn_oc', elm_conn_oc, (/0, sum(offset_nspec_vol_oc_conn(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('elm_conn_oc', elm_conn_oc, & + (/0, sum(offset_nspec_vol_oc_conn(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('x_oc', store_val3D_x_oc, (/sum(offset_poin_vol_oc(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('y_oc', store_val3D_y_oc, (/sum(offset_poin_vol_oc(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('z_oc', store_val3D_z_oc, (/sum(offset_poin_vol_oc(0:myrank-1))/), H5_COL) endif ! for inner core if (output_ic) then - call h5_write_dataset_collect_hyperslab_in_group('elm_conn_ic', elm_conn_ic, (/0, sum(offset_nspec_vol_ic_conn(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group('elm_conn_ic', elm_conn_ic, & + (/0, sum(offset_nspec_vol_ic_conn(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('x_ic', store_val3D_x_ic, (/sum(offset_poin_vol_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('y_ic', store_val3D_y_ic, (/sum(offset_poin_vol_ic(0:myrank-1))/), H5_COL) call h5_write_dataset_collect_hyperslab_in_group('z_ic', store_val3D_z_ic, (/sum(offset_poin_vol_ic(0:myrank-1))/), H5_COL) @@ -680,12 +687,18 @@ subroutine write_movie_volume_strains_hdf5(vnspec_eps_cm, & call h5_open_file_p_collect(file_name) call h5_open_group(group_name) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'NN', store_val3d_NN, (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'EE', store_val3d_EE, (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'ZZ', store_val3d_ZZ, (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'NE', store_val3d_NE, (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'NZ', store_val3d_NZ, (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'EZ', store_val3d_EZ, (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'NN', store_val3d_NN, & + (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'EE', store_val3d_EE, & + (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'ZZ', store_val3d_ZZ, & + (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'NE', store_val3d_NE, & + (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'NZ', store_val3d_NZ, & + (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'EZ', store_val3d_EZ, & + (/sum(offset_poin_vol(0:myrank-1))/), H5_COL) call h5_close_group() call h5_close_file_p() @@ -806,10 +819,12 @@ subroutine write_movie_volume_divcurl_hdf5(vnspec_eps_cm,eps_trace_over_3_crust_ call h5_open_group(group_name) if (MOVIE_OUTPUT_DIV) then - call write_array3dspec_as_1d_hdf5('reg1_div_displ', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), eps_trace_over_3_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('reg1_div_displ', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + eps_trace_over_3_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) if (NSPEC_OUTER_CORE_3DMOVIE > 1) then - call write_array3dspec_as_1d_hdf5('reg2_div_displ', offset_nspec_vol_oc(myrank), offset_poin_vol_oc(myrank), div_displ_outer_core, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) + call write_array3dspec_as_1d_hdf5('reg2_div_displ', offset_nspec_vol_oc(myrank), offset_poin_vol_oc(myrank), & + div_displ_outer_core, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) else allocate(div_s_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier) if (ier /= 0 ) call exit_MPI(myrank,'Error allocating temporary array div_s_outer_core') @@ -825,25 +840,37 @@ subroutine write_movie_volume_divcurl_hdf5(vnspec_eps_cm,eps_trace_over_3_crust_ enddo enddo enddo - call write_array3dspec_as_1d_hdf5('reg2_div_displ', offset_nspec_vol_oc(myrank), offset_poin_vol_oc(myrank), div_s_outer_core, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) + call write_array3dspec_as_1d_hdf5('reg2_div_displ', offset_nspec_vol_oc(myrank), offset_poin_vol_oc(myrank), & + div_s_outer_core, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) deallocate(div_s_outer_core) endif - call write_array3dspec_as_1d_hdf5('reg3_div_displ', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), eps_trace_over_3_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('reg3_div_displ', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + eps_trace_over_3_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) endif if (MOVIE_OUTPUT_CURL) then - call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_xx', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), epsilondev_xx_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) - call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_yy', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), epsilondev_yy_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) - call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_xy', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), epsilondev_xy_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) - call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_xz', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), epsilondev_xz_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) - call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_yz', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), epsilondev_yz_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) - - call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_xx', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), epsilondev_xx_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) - call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_yy', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), epsilondev_yy_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) - call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_xy', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), epsilondev_xy_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) - call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_xz', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), epsilondev_xz_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) - call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_yz', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), epsilondev_yz_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_xx', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + epsilondev_xx_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_yy', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + epsilondev_yy_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_xy', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + epsilondev_xy_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_xz', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + epsilondev_xz_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('crust_mantle_epsdev_displ_yz', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + epsilondev_yz_crust_mantle, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + + call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_xx', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + epsilondev_xx_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_yy', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + epsilondev_yy_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_xy', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + epsilondev_xy_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_xz', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + epsilondev_xz_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('inner_core_epsdev_displ_yz', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + epsilondev_yz_inner_core, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) endif if (MOVIE_OUTPUT_CURLNORM) then @@ -864,7 +891,8 @@ subroutine write_movie_volume_divcurl_hdf5(vnspec_eps_cm,eps_trace_over_3_crust_ enddo enddo enddo - call write_array3dspec_as_1d_hdf5('reg1_epsdev_displ_norm', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('reg1_epsdev_displ_norm', offset_nspec_vol_cm(myrank), offset_poin_vol_cm(myrank), & + tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) deallocate(tmp_data) ! Frobenius norm @@ -883,7 +911,8 @@ subroutine write_movie_volume_divcurl_hdf5(vnspec_eps_cm,eps_trace_over_3_crust_ enddo enddo enddo - call write_array3dspec_as_1d_hdf5('reg3_epsdev_displ_norm', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('reg3_epsdev_displ_norm', offset_nspec_vol_ic(myrank), offset_poin_vol_ic(myrank), & + tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) deallocate(tmp_data) endif @@ -1018,9 +1047,12 @@ subroutine write_movie_volume_vector_hdf5(npoints_3dmovie, & call h5_open_file_p_collect(file_name) call h5_open_group(group_name) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'N', store_val3d_N(1:npoints_3dmovie), (/offset_poin_vol(0:myrank-1)/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'E', store_val3d_E(1:npoints_3dmovie), (/offset_poin_vol(0:myrank-1)/), H5_COL) - call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'Z', store_val3d_Z(1:npoints_3dmovie), (/offset_poin_vol(0:myrank-1)/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'N', store_val3d_N(1:npoints_3dmovie), & + (/offset_poin_vol(0:myrank-1)/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'E', store_val3d_E(1:npoints_3dmovie), & + (/offset_poin_vol(0:myrank-1)/), H5_COL) + call h5_write_dataset_collect_hyperslab_in_group(trim(movie_prefix)//'Z', store_val3d_Z(1:npoints_3dmovie), & + (/offset_poin_vol(0:myrank-1)/), H5_COL) call h5_close_group() call h5_close_file() @@ -1123,7 +1155,8 @@ subroutine write_movie_volume_displnorm_hdf5(displ_crust_mantle,displ_inner_core enddo enddo - call write_array3dspec_as_1d_hdf5('reg1_displ', offset_nspec_vol_cm(myrank-1), offset_poin_vol_cm(myrank-1), tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('reg1_displ', offset_nspec_vol_cm(myrank-1), offset_poin_vol_cm(myrank-1), & + tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) deallocate(tmp_data) endif @@ -1147,7 +1180,8 @@ subroutine write_movie_volume_displnorm_hdf5(displ_crust_mantle,displ_inner_core enddo enddo - call write_array3dspec_as_1d_hdf5('reg2_displ', offset_nspec_vol_oc(myrank-1), offset_poin_vol_oc(myrank-1), tmp_data, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) + call write_array3dspec_as_1d_hdf5('reg2_displ', offset_nspec_vol_oc(myrank-1), offset_poin_vol_oc(myrank-1), & + tmp_data, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) deallocate(tmp_data) endif @@ -1171,7 +1205,8 @@ subroutine write_movie_volume_displnorm_hdf5(displ_crust_mantle,displ_inner_core enddo enddo - call write_array3dspec_as_1d_hdf5('reg3_displ', offset_nspec_vol_ic(myrank-1), offset_poin_vol_ic(myrank-1), tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('reg3_displ', offset_nspec_vol_ic(myrank-1), offset_poin_vol_ic(myrank-1), & + tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) deallocate(tmp_data) endif @@ -1275,7 +1310,8 @@ subroutine write_movie_volume_velnorm_hdf5(veloc_crust_mantle,veloc_inner_core,v enddo enddo - call write_array3dspec_as_1d_hdf5('reg1_veloc', offset_nspec_vol_cm(myrank-1), offset_poin_vol_cm(myrank-1), tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('reg1_veloc', offset_nspec_vol_cm(myrank-1), offset_poin_vol_cm(myrank-1), & + tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) deallocate(tmp_data) endif @@ -1299,7 +1335,8 @@ subroutine write_movie_volume_velnorm_hdf5(veloc_crust_mantle,veloc_inner_core,v enddo enddo - call write_array3dspec_as_1d_hdf5('reg2_veloc', offset_nspec_vol_oc(myrank-1), offset_poin_vol_oc(myrank-1), tmp_data, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) + call write_array3dspec_as_1d_hdf5('reg2_veloc', offset_nspec_vol_oc(myrank-1), offset_poin_vol_oc(myrank-1), & + tmp_data, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) deallocate(tmp_data) endif @@ -1323,7 +1360,8 @@ subroutine write_movie_volume_velnorm_hdf5(veloc_crust_mantle,veloc_inner_core,v enddo enddo - call write_array3dspec_as_1d_hdf5('reg3_veloc', offset_nspec_vol_ic(myrank-1), offset_poin_vol_ic(myrank-1), tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('reg3_veloc', offset_nspec_vol_ic(myrank-1), offset_poin_vol_ic(myrank-1), & + tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) deallocate(tmp_data) endif @@ -1430,7 +1468,8 @@ subroutine write_movie_volume_accelnorm_hdf5(accel_crust_mantle,accel_inner_core enddo enddo - call write_array3dspec_as_1d_hdf5('reg1_accel', offset_nspec_vol_cm(myrank-1), offset_poin_vol_cm(myrank-1), tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) + call write_array3dspec_as_1d_hdf5('reg1_accel', offset_nspec_vol_cm(myrank-1), offset_poin_vol_cm(myrank-1), & + tmp_data, sum(offset_poin_vol_cm(0:myrank-1)), ibool_crust_mantle) deallocate(tmp_data) endif @@ -1454,7 +1493,8 @@ subroutine write_movie_volume_accelnorm_hdf5(accel_crust_mantle,accel_inner_core enddo enddo - call write_array3dspec_as_1d_hdf5('reg2_accel', offset_nspec_vol_oc(myrank-1), offset_poin_vol_oc(myrank-1), tmp_data, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) + call write_array3dspec_as_1d_hdf5('reg2_accel', offset_nspec_vol_oc(myrank-1), offset_poin_vol_oc(myrank-1), & + tmp_data, sum(offset_poin_vol_oc(0:myrank-1)), ibool_outer_core) deallocate(tmp_data) endif @@ -1478,7 +1518,8 @@ subroutine write_movie_volume_accelnorm_hdf5(accel_crust_mantle,accel_inner_core enddo enddo - call write_array3dspec_as_1d_hdf5('reg3_accel', offset_nspec_vol_ic(myrank-1), offset_poin_vol_ic(myrank-1), tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) + call write_array3dspec_as_1d_hdf5('reg3_accel', offset_nspec_vol_ic(myrank-1), offset_poin_vol_ic(myrank-1), & + tmp_data, sum(offset_poin_vol_ic(0:myrank-1)), ibool_inner_core) deallocate(tmp_data) endif @@ -1498,8 +1539,9 @@ end subroutine write_movie_volume_accelnorm_hdf5 ! #ifdef USE_HDF5 - subroutine get_conn_for_movie(elm_conn,offset,iNIT,nelems_3dmovie,npoints_3dmovie, nelems_in_this_region, & - num_ibool_3dmovie,mask_ibool_3dmovie,ibool_of_the_section) + subroutine get_conn_for_movie(elm_conn,offset,iNIT,nelems_3dmovie,npoints_3dmovie, & + nelems_in_this_region, & + num_ibool_3dmovie,mask_ibool_3dmovie,ibool_of_the_section) use specfem_par !use specfem_par_crustmantle, only: ibool_crust_mantle @@ -1508,14 +1550,13 @@ subroutine get_conn_for_movie(elm_conn,offset,iNIT,nelems_3dmovie,npoints_3dmovi implicit none - integer, dimension(9,nelems_3dmovie), intent(out) :: elm_conn integer, intent(in) :: offset ! node id offset (starting global element id of each proc) integer, intent(in) :: iNIT integer, intent(in) :: nelems_3dmovie, npoints_3dmovie, nelems_in_this_region integer, dimension(npoints_3dmovie),intent(in) :: num_ibool_3dmovie logical, dimension(npoints_3dmovie),intent(in) :: mask_ibool_3dmovie integer, dimension(NGLLX,NGLLY,NGLLZ,nelems_in_this_region),intent(in) :: ibool_of_the_section - + integer, dimension(9,nelems_3dmovie), intent(out) :: elm_conn ! local parameters integer :: ispec,ii integer,parameter :: cell_type = 9 @@ -1605,10 +1646,10 @@ subroutine elm2node_base(array_3dspec, array_1dmovie, nelms, npoints, ibool_of_t implicit none - real(kind=CUSTOM_REAL), dimension(NGLLX,NGLLY,NGLLZ,nelms), intent(in) :: array_3dspec - real(kind=CUSTOM_REAL), dimension(npoints), intent(inout) :: array_1dmovie integer, intent(in) :: nelms, npoints integer, dimension(NGLLX,NGLLY,NGLLZ,nelms), intent(in) :: ibool_of_the_section + real(kind=CUSTOM_REAL), dimension(NGLLX,NGLLY,NGLLZ,nelms), intent(in) :: array_3dspec + real(kind=CUSTOM_REAL), dimension(npoints), intent(inout) :: array_1dmovie ! local parameters integer :: i,j,k,ispec,iglob @@ -1854,12 +1895,18 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & endif ! movie_prefix/NN,EE,ZZ,NE,NZ,EZ - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_NN', trim(movie_prefix)//'NN', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_EE', trim(movie_prefix)//'EE', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_ZZ', trim(movie_prefix)//'ZZ', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_NE', trim(movie_prefix)//'NE', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_NZ', trim(movie_prefix)//'NZ', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_EZ', trim(movie_prefix)//'EZ', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_NN', trim(movie_prefix)//'NN', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_EE', trim(movie_prefix)//'EE', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_ZZ', trim(movie_prefix)//'ZZ', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_NE', trim(movie_prefix)//'NE', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_NZ', trim(movie_prefix)//'NZ', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_EZ', trim(movie_prefix)//'EZ', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) ! volume vector else if (MOVIE_VOLUME_TYPE == 5 .or. MOVIE_VOLUME_TYPE == 6) then @@ -1870,9 +1917,12 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & endif ! movie_prefix/N,E,Z - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_N', trim(movie_prefix)//'N', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_E', trim(movie_prefix)//'E', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_Z', trim(movie_prefix)//'Z', npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_N', trim(movie_prefix)//'N', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_E', trim(movie_prefix)//'E', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, trim(movie_prefix)//'_Z', trim(movie_prefix)//'Z', & + npoints_vol_mov_all_proc, xdmf_vol, it_str, .true.) endif @@ -1898,7 +1948,8 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & ! open xdmf file open(unit=xdmf_vol, file=trim(fname_xdmf_vol), recl=256) - call write_xdmf_vol_hdf5_header(nspec_vol_mov_all_proc_cm_conn, npoints_vol_mov_all_proc_cm, fname_h5_data_vol_xdmf, xdmf_vol, 2) + call write_xdmf_vol_hdf5_header(nspec_vol_mov_all_proc_cm_conn, npoints_vol_mov_all_proc_cm, & + fname_h5_data_vol_xdmf, xdmf_vol, 2) do i = 1, int(NSTEP/NTSTEP_BETWEEN_FRAMES) @@ -1915,17 +1966,24 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & ! volume divcurl (div) if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_DIV) then ! reg1_div_displ - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg1_div_displ', 'reg1_div_displ', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg1_div_displ', 'reg1_div_displ', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element else if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_CURL) then ! curst_mantle_epsdev_disple_xx,yy,xy,xz,yz - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_xx', 'crust_mantle_epsdev_displ_xx', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_yy', 'crust_mantle_epsdev_displ_yy', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_xy', 'crust_mantle_epsdev_displ_xy', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_xz', 'crust_mantle_epsdev_displ_xz', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_yz', 'crust_mantle_epsdev_displ_yz', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_xx', 'crust_mantle_epsdev_displ_xx', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_yy', 'crust_mantle_epsdev_displ_yy', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_xy', 'crust_mantle_epsdev_displ_xy', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_xz', 'crust_mantle_epsdev_displ_xz', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'crust_mantle_epsdev_displ_yz', 'crust_mantle_epsdev_displ_yz', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element else if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_CURLNORM) then ! reg1_epsdev_displ_norm - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg1_epsdev_displ_norm', 'reg1_epsdev_displ_norm', npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg1_epsdev_displ_norm', 'reg1_epsdev_displ_norm', & + npoints_vol_mov_all_proc_cm, xdmf_vol, it_str, .true.) ! value on element endif write(xdmf_vol,*) '' @@ -1950,7 +2008,8 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & ! open xdmf file open(unit=xdmf_vol, file=trim(fname_xdmf_vol_oc), recl=256) - call write_xdmf_vol_hdf5_header(nspec_vol_mov_all_proc_oc_conn, npoints_vol_mov_all_proc_oc, fname_h5_data_vol_xdmf, xdmf_vol, 3) + call write_xdmf_vol_hdf5_header(nspec_vol_mov_all_proc_oc_conn, npoints_vol_mov_all_proc_oc, & + fname_h5_data_vol_xdmf, xdmf_vol, 3) do i = 1, int(NSTEP/NTSTEP_BETWEEN_FRAMES) @@ -1966,20 +2025,24 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & ! write headers for each dataset if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_DIV) then ! reg2_div_displ - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_div_displ', 'reg2_div_displ', npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_div_displ', 'reg2_div_displ', & + npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_CURL) then ! no output else if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_CURLNORM) then ! no output else if (MOVIE_VOLUME_TYPE == 7 .and. OUTPUT_OUTER_CORE) then ! reg2_displ - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_displ', 'reg2_displ', npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_displ', 'reg2_displ', & + npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 8 .and. OUTPUT_OUTER_CORE) then ! reg2_veloc - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_veloc', 'reg2_veloc', npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_veloc', 'reg2_veloc', & + npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 9 .and. OUTPUT_OUTER_CORE) then ! reg2_accel - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_accel', 'reg2_accel', npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg2_accel', 'reg2_accel', & + npoints_vol_mov_all_proc_oc, xdmf_vol, it_str, .true.) endif write(xdmf_vol,*) '' @@ -2004,7 +2067,8 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & ! open xdmf file open(unit=xdmf_vol, file=trim(fname_xdmf_vol_ic), recl=256) - call write_xdmf_vol_hdf5_header(nspec_vol_mov_all_proc_ic_conn, npoints_vol_mov_all_proc_ic, fname_h5_data_vol_xdmf, xdmf_vol, 4) + call write_xdmf_vol_hdf5_header(nspec_vol_mov_all_proc_ic_conn, npoints_vol_mov_all_proc_ic, & + fname_h5_data_vol_xdmf, xdmf_vol, 4) do i = 1, int(NSTEP/NTSTEP_BETWEEN_FRAMES) @@ -2020,26 +2084,36 @@ subroutine write_xdmf_vol_hdf5(npoints_3dmovie, nelems_3dmovie, & ! write headers for each dataset if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_DIV) then ! reg3_div_displ - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_div_displ', 'reg3_div_displ', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_div_displ', 'reg3_div_displ', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_CURL) then ! inner_core_epsdev_disple_xx,yy,xy,xz,yz - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_xx', 'inner_core_epsdev_displ_xx', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_yy', 'inner_core_epsdev_displ_yy', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_xy', 'inner_core_epsdev_displ_xy', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_xz', 'inner_core_epsdev_displ_xz', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_yz', 'inner_core_epsdev_displ_yz', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_xx', 'inner_core_epsdev_displ_xx', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_yy', 'inner_core_epsdev_displ_yy', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_xy', 'inner_core_epsdev_displ_xy', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_xz', 'inner_core_epsdev_displ_xz', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'inner_core_epsdev_displ_yz', 'inner_core_epsdev_displ_yz', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 4 .and. MOVIE_OUTPUT_CURLNORM) then ! reg3_epsdev_displ_norm - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_epsdev_displ_norm', 'reg3_epsdev_displ_norm', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_epsdev_displ_norm', 'reg3_epsdev_displ_norm', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 7 .and. OUTPUT_INNER_CORE) then ! reg3_displ - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_displ', 'reg3_displ', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_displ', 'reg3_displ', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 8 .and. OUTPUT_INNER_CORE) then ! reg3_veloc - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_veloc', 'reg3_veloc', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_veloc', 'reg3_veloc', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) else if (MOVIE_VOLUME_TYPE == 9 .and. OUTPUT_INNER_CORE) then ! reg3_accel - call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_accel', 'reg3_accel', npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) + call write_xdmf_vol_hdf5_one_data(fname_h5_data_vol_xdmf, 'reg3_accel', 'reg3_accel', & + npoints_vol_mov_all_proc_ic, xdmf_vol, it_str, .true.) endif write(xdmf_vol,*) '' diff --git a/src/specfem3D/write_output_HDF5.F90 b/src/specfem3D/write_output_HDF5.F90 index 28a13d978..c7ac9311c 100644 --- a/src/specfem3D/write_output_HDF5.F90 +++ b/src/specfem3D/write_output_HDF5.F90 @@ -176,7 +176,7 @@ subroutine write_output_hdf5(seismogram_tmp_in, irec_local, irec, chn, iorientat use specfem_par, only: & myrank, seismo_current, nrec, & ROTATE_SEISMOGRAMS_RT, NTSTEP_BETWEEN_OUTPUT_SAMPLE, & - WRITE_SEISMOGRAMS_BY_MAIN, hdf5_seismo_fname, & + WRITE_SEISMOGRAMS_BY_MAIN, hdf5_seismo_fname use shared_parameters, only: & NSTEP, OUTPUT_SEISMOS_HDF5 use manager_hdf5