From 05a49779a01a1e288ae7ff4e4ded8dba13da5974 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 27 Jan 2026 11:26:32 +0100 Subject: [PATCH 1/2] Cleanup tools folder There where files that were broken for at least 15 years. It is better to no tools, then broken tools. Grids can be generated with hypnotoad, for example, which is actively maintained. --- tools/README.md | 18 +- tools/archiving/README | 8 - tools/archiving/dumpsample/Makefile | 29 - tools/archiving/dumpsample/README | 7 - tools/archiving/dumpsample/dumpsample | 51 - tools/archiving/dumpsample/pdbsample.cxx | 232 -- .../data/bout_mds_model.characteristics | Bin 2982 -> 0 bytes .../mdsplus/data/bout_mds_model.datafile | Bin 36 -> 0 bytes .../mdsplus/data/bout_mds_model.tree | Bin 3072 -> 0 bytes tools/archiving/mdsplus/idl/mds2inp.pro | 177 -- tools/archiving/mdsplus/manual/Makefile | 8 - .../archiving/mdsplus/manual/bout_mdsplus.tex | 50 - tools/archiving/pdb2cdf/Makefile | 14 - tools/archiving/pdb2cdf/README | 25 - tools/archiving/pdb2cdf/pdb2cdf.cxx | 382 --- tools/archiving/sdctools/LICENSE | 18 - tools/archiving/sdctools/Makefile | 35 - tools/archiving/sdctools/README | 207 -- tools/archiving/sdctools/compress.c | 216 -- tools/archiving/sdctools/sdc2idl.c | 171 -- tools/archiving/sdctools/sdc2idl.pro | 101 - tools/archiving/sdctools/sdclib/Makefile | 23 - tools/archiving/sdctools/sdclib/sdc_test.c | 57 - tools/archiving/sdctools/sdclib/sdclib.c | 900 ------ tools/archiving/sdctools/sdclib/sdclib.h | 123 - .../create_hlmk_grids.pro | 12 - tools/cyl_and_helimak_grids/generate.pro | 14 - tools/cyl_and_helimak_grids/hlmk_grids.pro | 136 - tools/cyl_and_helimak_grids/probedata.pro | 7 - .../read_csv_helimak.pro | 73 - tools/cyl_and_helimak_grids/read_ken.pro | 75 - tools/cyl_and_helimak_grids/set_mesh_cyl.pro | 634 ---- tools/cyl_and_helimak_grids/show_prof.pro | 40 - tools/eigensolver/GLF_ITG/README | 16 - tools/eigensolver/GLF_ITG/eigensolver_ITG.m | 293 -- tools/eigensolver/GLF_ITG/eigensolver_ITG.pdf | Bin 2709462 -> 0 bytes tools/eigensolver/GLF_ITG/eigensolver_init.m | 543 ---- tools/eigensolver/GLF_ITG/plot_eigenmode.m | 38 - tools/eigensolver/GLF_ITG/plot_eigenvalue.m | 20 - tools/idllib/README | 45 - tools/idllib/README.write_polslice | 86 - tools/idllib/add.pro | 40 - tools/idllib/b06_to_bpp.pro | 150 - tools/idllib/basic_info.pro | 210 -- tools/idllib/bout3dvar.pro | 72 - tools/idllib/collect.pro | 632 ---- tools/idllib/contour2.pro | 111 - tools/idllib/core_mesh.pro | 103 - tools/idllib/elm_size.pro | 77 - tools/idllib/elm_size_yind.pro | 117 - tools/idllib/expand_restarts.pro | 113 - tools/idllib/fft_deriv.pro | 38 - tools/idllib/fft_filter.pro | 31 - tools/idllib/fft_integrate.pro | 55 - tools/idllib/fft_interp.pro | 88 - tools/idllib/fft_irreg.pro | 55 - tools/idllib/fftrot.pro | 211 -- tools/idllib/file_close.pro | 9 - tools/idllib/file_export.pro | 31 - tools/idllib/file_import.pro | 34 - tools/idllib/file_list.pro | 32 - tools/idllib/file_ndims.pro | 33 - tools/idllib/file_open.pro | 84 - tools/idllib/file_read.pro | 89 - tools/idllib/file_size.pro | 49 - tools/idllib/file_write.pro | 193 -- tools/idllib/file_write_attribute.pro | 38 - tools/idllib/file_write_string.pro | 36 - tools/idllib/find_phase.pro | 41 - tools/idllib/find_phase_2D.pro | 461 --- tools/idllib/find_phase_ND.pro | 344 --- tools/idllib/gen_surface.pro | 100 - tools/idllib/gen_vertices.pro | 416 --- tools/idllib/get_float.pro | 8 - tools/idllib/get_integer.pro | 8 - tools/idllib/get_pol_slice.pro | 82 - tools/idllib/get_yesno.pro | 19 - tools/idllib/gmres.pro | 210 -- tools/idllib/grid_contour.pro | 207 -- tools/idllib/in_list.pro | 18 - tools/idllib/in_struct.pro | 7 - tools/idllib/int_func.pro | 46 - tools/idllib/int_trapezoid.pro | 11 - tools/idllib/is_pow2.pro | 9 - tools/idllib/is_prime.pro | 17 - tools/idllib/mode_structure.pro | 369 --- tools/idllib/moment_xyzt.pro | 64 - tools/idllib/new2old.pro | 53 - tools/idllib/next_double.pro | 45 - tools/idllib/next_prime.pro | 10 - tools/idllib/pdb2idl.pro | 463 --- tools/idllib/phi2xi.pro | 107 - tools/idllib/plotpolslice.pro | 242 -- tools/idllib/polslice.pro | 248 -- tools/idllib/post_bout.pro | 862 ------ tools/idllib/range.pro | 10 - tools/idllib/read_1d.pro | 11 - tools/idllib/read_2d.pro | 9 - tools/idllib/read_aeqdsk.pro | 216 -- tools/idllib/read_equ.pro | 82 - tools/idllib/read_neqdsk.pro | 142 - tools/idllib/regex_extract.pro | 34 - tools/idllib/resize_bgrid.pro | 76 - tools/idllib/resize_bgrid_var.pro | 51 - tools/idllib/reverse_inds.pro | 64 - tools/idllib/reverse_struct.pro | 20 - tools/idllib/safe_colors.pro | 51 - tools/idllib/scale_restarts.pro | 49 - tools/idllib/showdata.pro | 286 -- tools/idllib/sign.pro | 4 - tools/idllib/spectrum.pro | 28 - tools/idllib/spline_mono.pro | 83 - tools/idllib/split_restarts.pro | 237 -- tools/idllib/str.pro | 11 - tools/idllib/str_set.pro | 11 - tools/idllib/surface_average.pro | 77 - tools/idllib/tag_test.pro | 20 - tools/idllib/testfftrot2.pro | 202 -- tools/idllib/total_p.pro | 35 - tools/idllib/volume_integral.pro | 70 - tools/idllib/volumeint.pro | 52 - tools/idllib/write_polslice.pro | 191 -- tools/idllib/zfamp.pro | 40 - tools/idllib/zfilter.pro | 66 - tools/idllib/zshift.pro | 115 - tools/line_tracing/README | 36 - tools/line_tracing/apar_bicube_fft.pro | 116 - tools/line_tracing/apar_bilin_cube.pro | 80 - tools/line_tracing/apar_bilin_fft.pro | 110 - tools/line_tracing/apar_model.pro | 30 - tools/line_tracing/apar_trilin.pro | 86 - tools/line_tracing/boutapar.pro | 120 - tools/line_tracing/cp_bicube_fft.pro | 48 - tools/line_tracing/cp_bilin_cube.pro | 48 - tools/line_tracing/cp_bilin_fft.pro | 41 - tools/line_tracing/cp_tricube.pro | 55 - tools/line_tracing/cp_trilin.pro | 47 - tools/line_tracing/cubederiv.pro | 30 - tools/line_tracing/derivzapar.pro | 15 - tools/line_tracing/differential.pro | 23 - tools/line_tracing/doc/BOUT_Line_Tracing.pdf | Bin 193543 -> 0 bytes tools/line_tracing/fft_back.pro | 43 - tools/line_tracing/fft_real.pro | 54 - tools/line_tracing/fieldtrace.pro | 57 - tools/line_tracing/fmodulo.pro | 16 - tools/line_tracing/fun_c12.pro | 60 - tools/line_tracing/integrationstep.pro | 26 - tools/line_tracing/interp_bicube.pro | 53 - tools/line_tracing/interp_cube.pro | 11 - tools/line_tracing/interpzapar.pro | 14 - tools/line_tracing/island_evol.pro | 58 - tools/line_tracing/mc_bicube.pro | 119 - tools/line_tracing/mc_bilin.pro | 88 - tools/line_tracing/mc_close.pro | 28 - .../line_tracing/misc/HOPPER_MT_Poincare.pbs | 10 - tools/line_tracing/misc/MT_README | 15 - tools/line_tracing/misc/Sample_IDL_STARTUP | 5 - tools/line_tracing/misc/mt_poincare.pro | 43 - tools/line_tracing/modelapar.pro | 35 - tools/line_tracing/modelapar2.pro | 37 - tools/line_tracing/poincare.pro | 177 -- tools/line_tracing/poincare_main.pro | 63 - tools/line_tracing/pressure_plot.pro | 34 - tools/line_tracing/safetyfactor.pro | 15 - tools/line_tracing/show_qprofile.pro | 49 - tools/line_tracing/twistshift.pro | 24 - .../MISC/HOPPER_MT_Poincare.pbs | 10 - tools/line_tracing_v2/MISC/MT_README | 15 - tools/line_tracing_v2/MISC/Sample_IDL_STARTUP | 5 - tools/line_tracing_v2/MISC/mt_poincare.pro | 43 - tools/line_tracing_v2/README | 36 - tools/line_tracing_v2/apar_bicube_fft.pro | 124 - tools/line_tracing_v2/apar_model.pro | 41 - tools/line_tracing_v2/apar_tricube.pro | 145 - tools/line_tracing_v2/cp_bicube_fft.pro | 48 - tools/line_tracing_v2/differential.pro | 23 - .../line_tracing_v2/doc/BOUT_Line_Tracing.pdf | Bin 193543 -> 0 bytes tools/line_tracing_v2/fft_real.pro | 54 - tools/line_tracing_v2/fieldtrace.pro | 61 - tools/line_tracing_v2/fmodulo.pro | 16 - tools/line_tracing_v2/fun_c12.pro | 74 - tools/line_tracing_v2/interp_bicube.pro | 53 - tools/line_tracing_v2/interp_tricube.pro | 60 - tools/line_tracing_v2/interp_tricube.pro.old | 168 - tools/line_tracing_v2/island_evol.pro | 60 - tools/line_tracing_v2/make_tricube_mat.pro | 91 - tools/line_tracing_v2/make_tricube_vec.pro | 159 - tools/line_tracing_v2/mc_bicube.pro | 134 - tools/line_tracing_v2/newtfunc.pro | 20 - tools/line_tracing_v2/num_int_cn.pro | 42 - tools/line_tracing_v2/num_int_rk4.pro | 27 - tools/line_tracing_v2/poincare.pro | 187 -- tools/line_tracing_v2/poincare_main.pro | 62 - tools/line_tracing_v2/pressure_plot.pro | 34 - tools/line_tracing_v2/safetyfactor.pro | 15 - tools/line_tracing_v2/show_qprofile.pro | 49 - tools/line_tracing_v2/twistshift.pro | 24 - tools/mathematicalib/BoutCollect.m | 148 - tools/matlablib/README.txt | 32 - tools/matlablib/growth_rate.m | 67 - tools/matlablib/import_data_netcdf.m | 171 -- tools/matlablib/import_dmp.m | 155 - tools/matlablib/info_file.m | 71 - tools/matlablib/modify_pressure.m | 86 - tools/matlablib/moment.m | 79 - tools/matlablib/plot_pol_slice.m | 173 -- tools/matlablib/showdata.m | 105 - tools/matlablib/zinterp.m | 31 - tools/numlib/acdc.pro | 144 - tools/numlib/chop.pro | 33 - tools/numlib/cycdiag.pro | 126 - tools/numlib/dctfilter.pro | 20 - tools/numlib/ddtheta.pro | 28 - tools/numlib/ddx.pro | 65 - tools/numlib/ddy.pro | 59 - tools/numlib/ddz.pro | 52 - tools/numlib/deriv_fct1d.pro | 30 - tools/numlib/deriv_fft1d.pro | 31 - tools/numlib/factor.pro | 73 - tools/numlib/filter_dct2d.pro | 46 - tools/numlib/filter_fct1d.pro | 47 - tools/numlib/filter_fft1d.pro | 49 - tools/numlib/gcd.pro | 69 - tools/numlib/growth_rms.pro | 101 - tools/numlib/growth_spec.pro | 89 - tools/numlib/intx.pro | 68 - tools/numlib/inty.pro | 66 - tools/numlib/intz.pro | 50 - tools/numlib/nproc.pro | 128 - tools/numlib/prime.pro | 81 - tools/numlib/sinc.pro | 15 - tools/numlib/splder.pro | 41 - tools/numlib/splgen.pro | 121 - tools/numlib/splint.pro | 95 - tools/numlib/tridiag.pro | 137 - tools/octave/bcollect.m | 56 - tools/octave/bread.m | 133 - tools/octave/bsettrange.m | 44 - tools/octave/bsetxrange.m | 42 - tools/octave/bsetyrange.m | 42 - tools/octave/bsetzrange.m | 42 - tools/pdb2idl/Makefile | 24 - tools/pdb2idl/README | 49 - tools/pdb2idl/compile.pro | 26 - tools/pdb2idl/configure | 2728 ----------------- tools/pdb2idl/configure.ac | 140 - tools/pdb2idl/make.config.in | 19 - tools/pdb2idl/pdb2idl.c | 851 ----- tools/pdb2idl/utils.c | 104 - tools/pdb2idl/utils.h | 21 - tools/plasmalib/collisions.pro | 64 - tools/plasmalib/physical_constants.pro | 40 - tools/plasmalib/set_plasma.pro | 265 -- tools/slab/slab.pro | 262 -- tools/tokamak_grids/README | 75 - tools/tokamak_grids/all/bout_output.pro | 1248 -------- tools/tokamak_grids/all/check_curv.pro | 54 - tools/tokamak_grids/all/curvature.pro | 176 -- tools/tokamak_grids/all/deriv_weno.pro | 41 - tools/tokamak_grids/all/fft_interp.pro | 83 - tools/tokamak_grids/all/gen_orthog.pro | 74 - tools/tokamak_grids/all/gen_orthog2.pro | 100 - tools/tokamak_grids/all/grid2bout.py | 59 - tools/tokamak_grids/all/pdb2bout.pro | 1176 ------- tools/tokamak_grids/all/refine_x.pro | 160 - tools/tokamak_grids/all/uedge2bout.pro | 109 - tools/tokamak_grids/all/uedge_correct.pro | 632 ---- tools/tokamak_grids/all/vacuum.pro | 376 --- tools/tokamak_grids/all/xinterp.pro | 28 - tools/tokamak_grids/coils/README | 6 - tools/tokamak_grids/coils/coils.cxx | 242 -- tools/tokamak_grids/coils/coils.h | 45 - tools/tokamak_grids/coils/coils.pro | 380 --- tools/tokamak_grids/coils/ergos_plot.pro | 200 -- .../coils/surface/surface_coil.pro | 616 ---- tools/tokamak_grids/cyclone/cyclone.pro | 246 -- tools/tokamak_grids/cyclone/cyclone.py | 222 -- tools/tokamak_grids/elite/Makefile | 22 - tools/tokamak_grids/elite/elite2nc | 226 -- tools/tokamak_grids/elite/elite2pdb.c | 351 --- tools/tokamak_grids/gato/Makefile | 22 - tools/tokamak_grids/gato/gato2nc | 248 -- tools/tokamak_grids/gato/gato2pdb.c | 134 - tools/tokamak_grids/gato/read_gato.c | 341 --- tools/tokamak_grids/gato/read_gato.h | 43 - tools/tokamak_grids/shifted_circle/README | 15 - .../shifted_circle/gen_series.pro | 11 - .../tokamak_grids/shifted_circle/generate.pro | 24 - .../shifted_circle/get_delta.pro | 372 --- .../tokamak_grids/shifted_circle/in_list.pro | 18 - .../shifted_circle/read_uedge.pro | 120 - .../shifted_circle/set_mesh_shcir.pro | 257 -- .../shifted_circle/set_params.pro | 72 - tools/vagrant/README.md | 12 - tools/vagrant/Vagrantfile | 9 - tools/vagrant/bootstrap.sh | 31 - 296 files changed, 2 insertions(+), 34932 deletions(-) delete mode 100644 tools/archiving/README delete mode 100644 tools/archiving/dumpsample/Makefile delete mode 100644 tools/archiving/dumpsample/README delete mode 100755 tools/archiving/dumpsample/dumpsample delete mode 100644 tools/archiving/dumpsample/pdbsample.cxx delete mode 100644 tools/archiving/mdsplus/data/bout_mds_model.characteristics delete mode 100644 tools/archiving/mdsplus/data/bout_mds_model.datafile delete mode 100644 tools/archiving/mdsplus/data/bout_mds_model.tree delete mode 100644 tools/archiving/mdsplus/idl/mds2inp.pro delete mode 100644 tools/archiving/mdsplus/manual/Makefile delete mode 100644 tools/archiving/mdsplus/manual/bout_mdsplus.tex delete mode 100644 tools/archiving/pdb2cdf/Makefile delete mode 100644 tools/archiving/pdb2cdf/README delete mode 100644 tools/archiving/pdb2cdf/pdb2cdf.cxx delete mode 100644 tools/archiving/sdctools/LICENSE delete mode 100644 tools/archiving/sdctools/Makefile delete mode 100644 tools/archiving/sdctools/README delete mode 100644 tools/archiving/sdctools/compress.c delete mode 100644 tools/archiving/sdctools/sdc2idl.c delete mode 100644 tools/archiving/sdctools/sdc2idl.pro delete mode 100644 tools/archiving/sdctools/sdclib/Makefile delete mode 100644 tools/archiving/sdctools/sdclib/sdc_test.c delete mode 100644 tools/archiving/sdctools/sdclib/sdclib.c delete mode 100644 tools/archiving/sdctools/sdclib/sdclib.h delete mode 100644 tools/cyl_and_helimak_grids/create_hlmk_grids.pro delete mode 100644 tools/cyl_and_helimak_grids/generate.pro delete mode 100644 tools/cyl_and_helimak_grids/hlmk_grids.pro delete mode 100644 tools/cyl_and_helimak_grids/probedata.pro delete mode 100644 tools/cyl_and_helimak_grids/read_csv_helimak.pro delete mode 100644 tools/cyl_and_helimak_grids/read_ken.pro delete mode 100644 tools/cyl_and_helimak_grids/set_mesh_cyl.pro delete mode 100644 tools/cyl_and_helimak_grids/show_prof.pro delete mode 100644 tools/eigensolver/GLF_ITG/README delete mode 100644 tools/eigensolver/GLF_ITG/eigensolver_ITG.m delete mode 100644 tools/eigensolver/GLF_ITG/eigensolver_ITG.pdf delete mode 100644 tools/eigensolver/GLF_ITG/eigensolver_init.m delete mode 100644 tools/eigensolver/GLF_ITG/plot_eigenmode.m delete mode 100644 tools/eigensolver/GLF_ITG/plot_eigenvalue.m delete mode 100644 tools/idllib/README delete mode 100644 tools/idllib/README.write_polslice delete mode 100644 tools/idllib/add.pro delete mode 100644 tools/idllib/b06_to_bpp.pro delete mode 100644 tools/idllib/basic_info.pro delete mode 100644 tools/idllib/bout3dvar.pro delete mode 100644 tools/idllib/collect.pro delete mode 100644 tools/idllib/contour2.pro delete mode 100644 tools/idllib/core_mesh.pro delete mode 100644 tools/idllib/elm_size.pro delete mode 100755 tools/idllib/elm_size_yind.pro delete mode 100644 tools/idllib/expand_restarts.pro delete mode 100644 tools/idllib/fft_deriv.pro delete mode 100644 tools/idllib/fft_filter.pro delete mode 100644 tools/idllib/fft_integrate.pro delete mode 100644 tools/idllib/fft_interp.pro delete mode 100644 tools/idllib/fft_irreg.pro delete mode 100644 tools/idllib/fftrot.pro delete mode 100644 tools/idllib/file_close.pro delete mode 100644 tools/idllib/file_export.pro delete mode 100644 tools/idllib/file_import.pro delete mode 100644 tools/idllib/file_list.pro delete mode 100644 tools/idllib/file_ndims.pro delete mode 100644 tools/idllib/file_open.pro delete mode 100644 tools/idllib/file_read.pro delete mode 100644 tools/idllib/file_size.pro delete mode 100644 tools/idllib/file_write.pro delete mode 100644 tools/idllib/file_write_attribute.pro delete mode 100644 tools/idllib/file_write_string.pro delete mode 100644 tools/idllib/find_phase.pro delete mode 100644 tools/idllib/find_phase_2D.pro delete mode 100644 tools/idllib/find_phase_ND.pro delete mode 100644 tools/idllib/gen_surface.pro delete mode 100644 tools/idllib/gen_vertices.pro delete mode 100644 tools/idllib/get_float.pro delete mode 100644 tools/idllib/get_integer.pro delete mode 100644 tools/idllib/get_pol_slice.pro delete mode 100644 tools/idllib/get_yesno.pro delete mode 100644 tools/idllib/gmres.pro delete mode 100644 tools/idllib/grid_contour.pro delete mode 100644 tools/idllib/in_list.pro delete mode 100644 tools/idllib/in_struct.pro delete mode 100644 tools/idllib/int_func.pro delete mode 100644 tools/idllib/int_trapezoid.pro delete mode 100644 tools/idllib/is_pow2.pro delete mode 100644 tools/idllib/is_prime.pro delete mode 100644 tools/idllib/mode_structure.pro delete mode 100644 tools/idllib/moment_xyzt.pro delete mode 100644 tools/idllib/new2old.pro delete mode 100644 tools/idllib/next_double.pro delete mode 100644 tools/idllib/next_prime.pro delete mode 100644 tools/idllib/pdb2idl.pro delete mode 100644 tools/idllib/phi2xi.pro delete mode 100644 tools/idllib/plotpolslice.pro delete mode 100644 tools/idllib/polslice.pro delete mode 100644 tools/idllib/post_bout.pro delete mode 100644 tools/idllib/range.pro delete mode 100644 tools/idllib/read_1d.pro delete mode 100644 tools/idllib/read_2d.pro delete mode 100644 tools/idllib/read_aeqdsk.pro delete mode 100644 tools/idllib/read_equ.pro delete mode 100644 tools/idllib/read_neqdsk.pro delete mode 100644 tools/idllib/regex_extract.pro delete mode 100644 tools/idllib/resize_bgrid.pro delete mode 100644 tools/idllib/resize_bgrid_var.pro delete mode 100644 tools/idllib/reverse_inds.pro delete mode 100644 tools/idllib/reverse_struct.pro delete mode 100644 tools/idllib/safe_colors.pro delete mode 100644 tools/idllib/scale_restarts.pro delete mode 100644 tools/idllib/showdata.pro delete mode 100644 tools/idllib/sign.pro delete mode 100644 tools/idllib/spectrum.pro delete mode 100644 tools/idllib/spline_mono.pro delete mode 100644 tools/idllib/split_restarts.pro delete mode 100644 tools/idllib/str.pro delete mode 100644 tools/idllib/str_set.pro delete mode 100644 tools/idllib/surface_average.pro delete mode 100644 tools/idllib/tag_test.pro delete mode 100644 tools/idllib/testfftrot2.pro delete mode 100644 tools/idllib/total_p.pro delete mode 100644 tools/idllib/volume_integral.pro delete mode 100644 tools/idllib/volumeint.pro delete mode 100644 tools/idllib/write_polslice.pro delete mode 100644 tools/idllib/zfamp.pro delete mode 100644 tools/idllib/zfilter.pro delete mode 100644 tools/idllib/zshift.pro delete mode 100644 tools/line_tracing/README delete mode 100644 tools/line_tracing/apar_bicube_fft.pro delete mode 100644 tools/line_tracing/apar_bilin_cube.pro delete mode 100644 tools/line_tracing/apar_bilin_fft.pro delete mode 100644 tools/line_tracing/apar_model.pro delete mode 100644 tools/line_tracing/apar_trilin.pro delete mode 100644 tools/line_tracing/boutapar.pro delete mode 100644 tools/line_tracing/cp_bicube_fft.pro delete mode 100644 tools/line_tracing/cp_bilin_cube.pro delete mode 100644 tools/line_tracing/cp_bilin_fft.pro delete mode 100644 tools/line_tracing/cp_tricube.pro delete mode 100644 tools/line_tracing/cp_trilin.pro delete mode 100644 tools/line_tracing/cubederiv.pro delete mode 100644 tools/line_tracing/derivzapar.pro delete mode 100644 tools/line_tracing/differential.pro delete mode 100644 tools/line_tracing/doc/BOUT_Line_Tracing.pdf delete mode 100644 tools/line_tracing/fft_back.pro delete mode 100644 tools/line_tracing/fft_real.pro delete mode 100644 tools/line_tracing/fieldtrace.pro delete mode 100644 tools/line_tracing/fmodulo.pro delete mode 100644 tools/line_tracing/fun_c12.pro delete mode 100644 tools/line_tracing/integrationstep.pro delete mode 100644 tools/line_tracing/interp_bicube.pro delete mode 100644 tools/line_tracing/interp_cube.pro delete mode 100644 tools/line_tracing/interpzapar.pro delete mode 100644 tools/line_tracing/island_evol.pro delete mode 100644 tools/line_tracing/mc_bicube.pro delete mode 100644 tools/line_tracing/mc_bilin.pro delete mode 100644 tools/line_tracing/mc_close.pro delete mode 100644 tools/line_tracing/misc/HOPPER_MT_Poincare.pbs delete mode 100644 tools/line_tracing/misc/MT_README delete mode 100644 tools/line_tracing/misc/Sample_IDL_STARTUP delete mode 100644 tools/line_tracing/misc/mt_poincare.pro delete mode 100644 tools/line_tracing/modelapar.pro delete mode 100644 tools/line_tracing/modelapar2.pro delete mode 100644 tools/line_tracing/poincare.pro delete mode 100644 tools/line_tracing/poincare_main.pro delete mode 100644 tools/line_tracing/pressure_plot.pro delete mode 100644 tools/line_tracing/safetyfactor.pro delete mode 100644 tools/line_tracing/show_qprofile.pro delete mode 100644 tools/line_tracing/twistshift.pro delete mode 100644 tools/line_tracing_v2/MISC/HOPPER_MT_Poincare.pbs delete mode 100644 tools/line_tracing_v2/MISC/MT_README delete mode 100644 tools/line_tracing_v2/MISC/Sample_IDL_STARTUP delete mode 100644 tools/line_tracing_v2/MISC/mt_poincare.pro delete mode 100644 tools/line_tracing_v2/README delete mode 100644 tools/line_tracing_v2/apar_bicube_fft.pro delete mode 100644 tools/line_tracing_v2/apar_model.pro delete mode 100644 tools/line_tracing_v2/apar_tricube.pro delete mode 100644 tools/line_tracing_v2/cp_bicube_fft.pro delete mode 100644 tools/line_tracing_v2/differential.pro delete mode 100644 tools/line_tracing_v2/doc/BOUT_Line_Tracing.pdf delete mode 100644 tools/line_tracing_v2/fft_real.pro delete mode 100644 tools/line_tracing_v2/fieldtrace.pro delete mode 100644 tools/line_tracing_v2/fmodulo.pro delete mode 100644 tools/line_tracing_v2/fun_c12.pro delete mode 100644 tools/line_tracing_v2/interp_bicube.pro delete mode 100644 tools/line_tracing_v2/interp_tricube.pro delete mode 100644 tools/line_tracing_v2/interp_tricube.pro.old delete mode 100644 tools/line_tracing_v2/island_evol.pro delete mode 100644 tools/line_tracing_v2/make_tricube_mat.pro delete mode 100644 tools/line_tracing_v2/make_tricube_vec.pro delete mode 100644 tools/line_tracing_v2/mc_bicube.pro delete mode 100644 tools/line_tracing_v2/newtfunc.pro delete mode 100644 tools/line_tracing_v2/num_int_cn.pro delete mode 100644 tools/line_tracing_v2/num_int_rk4.pro delete mode 100644 tools/line_tracing_v2/poincare.pro delete mode 100644 tools/line_tracing_v2/poincare_main.pro delete mode 100644 tools/line_tracing_v2/pressure_plot.pro delete mode 100644 tools/line_tracing_v2/safetyfactor.pro delete mode 100644 tools/line_tracing_v2/show_qprofile.pro delete mode 100644 tools/line_tracing_v2/twistshift.pro delete mode 100644 tools/mathematicalib/BoutCollect.m delete mode 100644 tools/matlablib/README.txt delete mode 100644 tools/matlablib/growth_rate.m delete mode 100644 tools/matlablib/import_data_netcdf.m delete mode 100644 tools/matlablib/import_dmp.m delete mode 100644 tools/matlablib/info_file.m delete mode 100755 tools/matlablib/modify_pressure.m delete mode 100644 tools/matlablib/moment.m delete mode 100644 tools/matlablib/plot_pol_slice.m delete mode 100644 tools/matlablib/showdata.m delete mode 100644 tools/matlablib/zinterp.m delete mode 100644 tools/numlib/acdc.pro delete mode 100644 tools/numlib/chop.pro delete mode 100644 tools/numlib/cycdiag.pro delete mode 100644 tools/numlib/dctfilter.pro delete mode 100644 tools/numlib/ddtheta.pro delete mode 100644 tools/numlib/ddx.pro delete mode 100644 tools/numlib/ddy.pro delete mode 100644 tools/numlib/ddz.pro delete mode 100644 tools/numlib/deriv_fct1d.pro delete mode 100644 tools/numlib/deriv_fft1d.pro delete mode 100644 tools/numlib/factor.pro delete mode 100644 tools/numlib/filter_dct2d.pro delete mode 100644 tools/numlib/filter_fct1d.pro delete mode 100644 tools/numlib/filter_fft1d.pro delete mode 100644 tools/numlib/gcd.pro delete mode 100644 tools/numlib/growth_rms.pro delete mode 100644 tools/numlib/growth_spec.pro delete mode 100644 tools/numlib/intx.pro delete mode 100644 tools/numlib/inty.pro delete mode 100644 tools/numlib/intz.pro delete mode 100644 tools/numlib/nproc.pro delete mode 100644 tools/numlib/prime.pro delete mode 100644 tools/numlib/sinc.pro delete mode 100644 tools/numlib/splder.pro delete mode 100644 tools/numlib/splgen.pro delete mode 100644 tools/numlib/splint.pro delete mode 100644 tools/numlib/tridiag.pro delete mode 100644 tools/octave/bcollect.m delete mode 100644 tools/octave/bread.m delete mode 100644 tools/octave/bsettrange.m delete mode 100644 tools/octave/bsetxrange.m delete mode 100644 tools/octave/bsetyrange.m delete mode 100644 tools/octave/bsetzrange.m delete mode 100644 tools/pdb2idl/Makefile delete mode 100644 tools/pdb2idl/README delete mode 100644 tools/pdb2idl/compile.pro delete mode 100755 tools/pdb2idl/configure delete mode 100644 tools/pdb2idl/configure.ac delete mode 100644 tools/pdb2idl/make.config.in delete mode 100644 tools/pdb2idl/pdb2idl.c delete mode 100644 tools/pdb2idl/utils.c delete mode 100644 tools/pdb2idl/utils.h delete mode 100644 tools/plasmalib/collisions.pro delete mode 100644 tools/plasmalib/physical_constants.pro delete mode 100644 tools/plasmalib/set_plasma.pro delete mode 100644 tools/slab/slab.pro delete mode 100644 tools/tokamak_grids/README delete mode 100644 tools/tokamak_grids/all/bout_output.pro delete mode 100644 tools/tokamak_grids/all/check_curv.pro delete mode 100644 tools/tokamak_grids/all/curvature.pro delete mode 100644 tools/tokamak_grids/all/deriv_weno.pro delete mode 100644 tools/tokamak_grids/all/fft_interp.pro delete mode 100644 tools/tokamak_grids/all/gen_orthog.pro delete mode 100644 tools/tokamak_grids/all/gen_orthog2.pro delete mode 100644 tools/tokamak_grids/all/grid2bout.py delete mode 100644 tools/tokamak_grids/all/pdb2bout.pro delete mode 100644 tools/tokamak_grids/all/refine_x.pro delete mode 100644 tools/tokamak_grids/all/uedge2bout.pro delete mode 100644 tools/tokamak_grids/all/uedge_correct.pro delete mode 100644 tools/tokamak_grids/all/vacuum.pro delete mode 100644 tools/tokamak_grids/all/xinterp.pro delete mode 100644 tools/tokamak_grids/coils/README delete mode 100644 tools/tokamak_grids/coils/coils.cxx delete mode 100644 tools/tokamak_grids/coils/coils.h delete mode 100644 tools/tokamak_grids/coils/coils.pro delete mode 100644 tools/tokamak_grids/coils/ergos_plot.pro delete mode 100644 tools/tokamak_grids/coils/surface/surface_coil.pro delete mode 100644 tools/tokamak_grids/cyclone/cyclone.pro delete mode 100755 tools/tokamak_grids/cyclone/cyclone.py delete mode 100644 tools/tokamak_grids/elite/Makefile delete mode 100755 tools/tokamak_grids/elite/elite2nc delete mode 100644 tools/tokamak_grids/elite/elite2pdb.c delete mode 100644 tools/tokamak_grids/gato/Makefile delete mode 100755 tools/tokamak_grids/gato/gato2nc delete mode 100644 tools/tokamak_grids/gato/gato2pdb.c delete mode 100644 tools/tokamak_grids/gato/read_gato.c delete mode 100644 tools/tokamak_grids/gato/read_gato.h delete mode 100644 tools/tokamak_grids/shifted_circle/README delete mode 100644 tools/tokamak_grids/shifted_circle/gen_series.pro delete mode 100644 tools/tokamak_grids/shifted_circle/generate.pro delete mode 100644 tools/tokamak_grids/shifted_circle/get_delta.pro delete mode 100644 tools/tokamak_grids/shifted_circle/in_list.pro delete mode 100644 tools/tokamak_grids/shifted_circle/read_uedge.pro delete mode 100644 tools/tokamak_grids/shifted_circle/set_mesh_shcir.pro delete mode 100644 tools/tokamak_grids/shifted_circle/set_params.pro delete mode 100644 tools/vagrant/README.md delete mode 100644 tools/vagrant/Vagrantfile delete mode 100644 tools/vagrant/bootstrap.sh diff --git a/tools/README.md b/tools/README.md index da8ff6c037..3cb109ad99 100644 --- a/tools/README.md +++ b/tools/README.md @@ -2,19 +2,5 @@ pylib -- Library of Python tools. This is the mainly used interface for post-processing. -idllib --- -Library of IDL tools - -matlablib --- -Library of Matlab tools. - -eigensolver --- -Eigenvalue solver for ITG test case - -pdb2idl --- -Library for reading PDB files into IDL - +Other tools where removed with v5.3.0, as they where unmaintained. +You can find them in older versions, e.g. in [5.2.0](https://github.com/boutproject/BOUT-dev/releases/tag/v5.2.0) diff --git a/tools/archiving/README b/tools/archiving/README deleted file mode 100644 index 3ccdb594b3..0000000000 --- a/tools/archiving/README +++ /dev/null @@ -1,8 +0,0 @@ -Tools or scripts to help manage & archive BOUT++ data output - -mdsplus Tools to manage BOUT++ runs using MDSplus - -pdb2cdf Convert PDB files to netCDF - -sdctools Simulation Data Compression library - diff --git a/tools/archiving/dumpsample/Makefile b/tools/archiving/dumpsample/Makefile deleted file mode 100644 index a9f3bebd90..0000000000 --- a/tools/archiving/dumpsample/Makefile +++ /dev/null @@ -1,29 +0,0 @@ - -CC = c++ -LD = c++ - -CFLAGS = -Wall -g - -PDB_PATH=/hwdisks/home/bd512/local/ - -INCLUDE = -I$(PDB_PATH)/include -LIBS = -lm -L$(PDB_PATH)/lib -lpdb -lpml -lscore - -TARGET = pdbsample -OBJ = pdbsample.o - -.PHONY:all -all: $(TARGET) - -$(TARGET): $(OBJ) Makefile - $(LD) -o $(TARGET) $(OBJ) $(LIBS) - -$(OBJ): %.o: %.cpp Makefile - $(CC) $(CFLAGS) -c $< -o $@ $(INCLUDE) - -.PHONY:clean -clean: - rm -f $(OBJ) $(TARGET) - -.PHONY:force -force: clean all diff --git a/tools/archiving/dumpsample/README b/tools/archiving/dumpsample/README deleted file mode 100644 index 70b4b64da5..0000000000 --- a/tools/archiving/dumpsample/README +++ /dev/null @@ -1,7 +0,0 @@ - -Codes: - -pdbsample Samples a single PDB file -ncsample Sample a netCDF file - -dumpsample Perl script to sample BOUT++ outputs diff --git a/tools/archiving/dumpsample/dumpsample b/tools/archiving/dumpsample/dumpsample deleted file mode 100755 index 942fd9731e..0000000000 --- a/tools/archiving/dumpsample/dumpsample +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/perl -# -# Reduce the time-resolution of BOUT++ output. -# - -use File::Basename; - -# Check command-line arguments -$numArgs = $#ARGV + 1; - -if( $numArgs != 3 ) { - print "Useage: \n"; - exit; -} - -$inputdir = $ARGV[0]; -$outputdir = $ARGV[1]; -$ts = $ARGV[2]; - -if ($inputdir eq $outputdir) { - # Input and output directories are the same - print "Input and output directories must be different\n"; - exit; -} - -# Check 3rd argument is an integer -if($ARGV[2] =~ /^\d+$/) { - print "Reducing time resolution by a factor of $ARGV[2]\n"; -}else { - print "3rd argument must be an integer\n"; - exit; -} - -@infiles = <$inputdir/BOUT.dmp.*>; - -foreach $file (@infiles) { - $f = $outputdir . "/" . basename($file); - - if($file =~ m/.pdb$/) { - # PDB file - print "PDB file: $file -> $f\n"; - system("pdbsample $file $f $ts") == 0 - or die "Could not execute pdbsample\n"; - }elsif( $file =~ m/(.nc|.cdl|.cdf|.ncdf)$/ ) { - # NetCDF file - print "NetCDF file\n"; - }else { - print $file . " has unknown file format\n"; - } - -} diff --git a/tools/archiving/dumpsample/pdbsample.cxx b/tools/archiving/dumpsample/pdbsample.cxx deleted file mode 100644 index 90ea69adb2..0000000000 --- a/tools/archiving/dumpsample/pdbsample.cxx +++ /dev/null @@ -1,232 +0,0 @@ -/******************************************************* - * PDB Sample - * - * - * Ben Dudson, University of York, July 2009 - *******************************************************/ - -#include -#include - -// The PDB library (C) -#include "pdb.h" - -int main(int argc, char** argv) { - if (argc < 4) { - fprintf(stderr, "Useage: %s \n", argv[0]); - return 1; - } - - int tstride; - if (sscanf(argv[3], "%d", &tstride) != 1) { - fprintf(stderr, "\tERROR: t stride must be an integer\n"); - return 1; - } - - // Open input file - PDBfile* in; - if ((in = PD_open(argv[1], "r")) == NULL) { - fprintf(stderr, "\tERROR: Could not open input file '%s'\n", argv[1]); - return 1; - } - - // Open output file - PDBfile* out; - if ((out = PD_open(argv[2], "w")) == NULL) { - fprintf(stderr, "\tERROR: Could not open output file '%s'\n", argv[2]); - return 1; - } - - // Get list of variables - - int nvars; - char** var_names = PD_ls(in, NULL, NULL, &nvars); - if ((var_names == (char**)NULL) || (nvars < 1)) { - fprintf(stderr, "\tERROR: No variables\n"); - return 1; - } - - // Go through the variables - char* varname; - for (int var = 0; var < nvars; var++) { - varname = var_names[var]; - - syment* ep; // PDB query types - dimdes* dims; - - // Query size of the variable - if ((ep = PD_query_entry(in, varname, NULL)) == (syment*)NULL) { - fprintf(stderr, "\tError querying variable %s\n", varname); - return 1; - } - dims = PD_entry_dimensions(ep); - int nd = 0; // Count number of dimensions - int varsize = 1; // Number of elements - long inds[12]; - while (dims != (dimdes*)NULL) { - long min, max; - min = dims->index_min; - max = dims->index_max; - - if (nd > 3) { - fprintf(stderr, "\tERROR: Can't handle variable '%s': more than 4D\n", varname); - return 2; - } - - inds[3 * nd] = min; - inds[3 * nd + 1] = max; - inds[3 * nd + 2] = 1L; - - varsize *= max - min + 1; - - nd++; - dims = dims->next; - } - - // Get variable type - char* typ; - typ = PD_entry_type(ep); - - if ((strcmp(varname, "t_array") == 0) && (nd == 1)) { - float* fdata = new float[varsize]; - - // Read the data from the PDB file - - inds[2] = tstride; - int nread; - if ((nread = PD_read_as_alt(in, varname, "float", fdata, inds)) == 0) { - fprintf(stderr, "\tWARNING: Could not read t_array. Ignoring\n"); - delete[] fdata; - continue; - } - - inds[0] = 0L; - inds[1] = nread - 1; - inds[2] = 1L; - - if (PD_write_alt(out, varname, "float", fdata, 1, inds) == FALSE) { - fprintf(stderr, "\tWARNING: Could not write '%s'. Ignoring\n", varname); - } - - delete[] fdata; - - } else if (nd == 4) { - // Reducing time resolution - - if (strcasecmp(typ, "integer") == 0) { - int* idata = new int[varsize]; - - // Read the data from the PDB file - inds[2] = tstride; - int nread; - if ((nread = PD_read_as_alt(in, varname, "integer", idata, inds)) == 0) { - fprintf(stderr, "\tWARNING: Could not read '%s'. Ignoring\n", varname); - delete[] idata; - continue; - } - - if (nread % (varsize / (inds[1] - inds[0] + 1)) != 0) { - fprintf(stderr, "ERROR: Accounting error: (%ld, %ld), %d, %d\n", inds[0], - inds[1], varsize, nread); - delete[] idata; - continue; - } - - nread = nread / (varsize / (inds[1] - inds[0] + 1)); - - inds[0] = 0L; - inds[1] = nread - 1; - inds[2] = 1L; - - if (PD_write_alt(out, varname, "integer", idata, 4, inds) == FALSE) { - fprintf(stderr, "\tWARNING: Could not write '%s'. Ignoring\n", varname); - } - - delete[] idata; - - } else if ((strcasecmp(typ, "float") == 0) || (strcasecmp(typ, "double") == 0)) { - // Convert doubles to floats - - float* fdata = new float[varsize]; - - // Read the data from the PDB file - inds[2] = tstride; - int nread; - if ((nread = PD_read_as_alt(in, varname, "float", fdata, inds)) == 0) { - fprintf(stderr, "\tWARNING: Could not read '%s'. Ignoring\n", varname); - delete[] fdata; - continue; - } - - if (nread % (varsize / (inds[1] - inds[0] + 1)) != 0) { - fprintf(stderr, "ERROR: Accounting error: (%ld, %ld), %d, %d\n", inds[0], - inds[1], varsize, nread); - delete[] fdata; - continue; - } - - nread = nread / (varsize / (inds[1] - inds[0] + 1)); - - inds[0] = 0L; - inds[1] = nread - 1; - inds[2] = 1L; - - if (PD_write_alt(out, varname, "float", fdata, 4, inds) == FALSE) { - fprintf(stderr, "\tWARNING: Could not write '%s'. Ignoring\n", varname); - } - - delete[] fdata; - - } else { - fprintf(stderr, "\tWARNING: '%s' has unrecognised type '%s'. Ignoring\n", varname, - typ); - } - } else { - // Just copy the data across - - if (strcasecmp(typ, "integer") == 0) { - - int* idata = new int[varsize]; - - // Read the data from the PDB file - if (PD_read_as(in, varname, "integer", idata) == 0) { - fprintf(stderr, "\t\tWARNING: Could not read variable. Ignoring\n"); - delete[] idata; - continue; - } - - if (PD_write_alt(out, varname, "integer", idata, nd, inds) == FALSE) { - fprintf(stderr, "\tWARNING: Could not write variable '%s'\n", varname); - } - - delete[] idata; - - } else if ((strcasecmp(typ, "float") == 0) || (strcasecmp(typ, "double") == 0)) { - // Convert doubles to floats - - float* fdata = new float[varsize]; - - // Read the data from the PDB file - if (PD_read_as(in, varname, "float", fdata) == 0) { - fprintf(stderr, "\tWARNING: Could not read variable '%s'. Ignoring\n", varname); - delete[] fdata; - continue; - } - - if (PD_write_alt(out, varname, "float", fdata, nd, inds) == FALSE) { - fprintf(stderr, "\tWARNING: Could not write variable '%s'\n", varname); - } - - delete[] fdata; - } else { - fprintf(stderr, "WARNING: '%s' has unrecognised type '%s'. Ignoring\n", varname, - typ); - } - } - } - - PD_close(in); - PD_close(out); - - return 0; -} diff --git a/tools/archiving/mdsplus/data/bout_mds_model.characteristics b/tools/archiving/mdsplus/data/bout_mds_model.characteristics deleted file mode 100644 index b3a5920b849a6e9b171df5c9d1e3cb6b0f77d8bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2982 zcmZQ*V899%po=y*urM&NFz8%f=&!1~f}!|u@nJ?j1%xU_FjE3Vf>bgx@ZG++2cc2` zt}-JtJtHZ#BoQnCR7oTtS|!BxG}mc7GxebE=_?B zRF#VgEF|D6!MOu7lpwZmyRb)vIF(CQ@-Y#ovTI&>5m71`E(L7Sg15nNX>2Jxw*|`e|cX2ySs2EYR1ZiFw_6Aef^pJX<3Rp>0Fw#ZB%T3<<)rcH6YxsSi5 zQ;Ov+`$Fz6GhJP5DWd&8f?%EJ9fQgt}}ypzzkPcXVB6drmG)lW5f;-Pgg(a7kq&k zivney^^44qEik#$vv}}5v;pQ$F1QnMOgf}>>`551NMgqg8Osw%CC zi}!lI&{Jm0LRdFX8~I4r10$M40op))U`O~^0YMwsuV8Fujkc<32(*fRambMx)8?t0 zw!L9J;|u~b6lvNB-uL7MGpG}MQOs0hYTH9*pf%W$TBKqa8e1~c@0)LEsfxNeJ#PG& zq2o2a#0>O^c-%-2%B+xdF1-8}`nAmWI+${z9hfJ~T=^bYFl$y88<|a%G4WkyZuS_v zo(B>7)NV0@ykJMlcEc}whBQd`2@S|-pbLjX9Qi=2u;WycS-uURi9S>16AcD&1W)bx zBV~I?J^ebJ(msbB#3N;Uh;K3Tj`IW4jT!Oa{6Wm8VY+!i$9+4eVY<2F-s$Il8b*{E zuI~7i&z)?bKFF)+FjPbMp&3ljbI?4Pz8#ZI>Qto-M0KX``%L9joy*Yp+jD%;)$KP= zb6;L%2K`4o&AwRo+d_}s!RO%X2hU*qxlvbE53(YScX;iv$86u*-Fp<@f3US3$B32U S?v8m3v`y^aV!Cnm '" + path + "' - '"+name+"'" - - IF nvars EQ 0 THEN BEGIN - paths = [path] - names = [name] - nids = [setting_nid[i]] - ENDIF ELSE BEGIN - paths = [paths, path] - names = [names, name] - nids = [nids, setting_nid[i]] - ENDELSE - nvars = nvars + 1 - - ENDIF - - ENDFOR - - ; get the settings without section - - IF STRLEN(prefix) GT 0 THEN PRINTF, fd, '['+prefix+']' - - w = WHERE(paths EQ '', count) - IF count GT 0 THEN BEGIN - FOR i=0, count-1 DO BEGIN - ; get the value - p = MDSVALUE('GETNCI($, "PATH")', nids[i]) - - v = MDSVALUE(p, status=status, /quiet) - - IF status AND 1 THEN BEGIN - ; success - PRINTF, fd, names[i]+" = " + STRING(v) - ENDIF ELSE BEGIN - ; failed - no data - - PRINTF, fd, '# '+names[i]+ ' = ' - ENDELSE - ENDFOR - - w = WHERE(paths NE '', count) - IF count GT 0 THEN BEGIN - paths = paths[w] - names = names[w] - nids = nids[w] - ENDIF - nvars = count - ENDIF - - WHILE nvars GT 0 DO BEGIN - IF STRLEN(prefix) GT 0 THEN PRINTF, fd, '['+prefix+'/'+paths[0]+']' ELSE PRINTF, fd, '['+paths[0]+']' - - w = WHERE(paths EQ paths[0], count) - - FOR i=0, count-1 DO BEGIN - ; get the value - p = MDSVALUE('GETNCI($, "PATH")', nids[w[i]]) - v = MDSVALUE(p, status=status, /quiet) - - IF status AND 1 THEN BEGIN - ; success - PRINTF, fd, names[i]+" = " + STRING(v) - ENDIF ELSE BEGIN - ; failed - no data - - PRINTF, fd, '# '+names[i]+ ' = ' - ENDELSE - ENDFOR - - w = WHERE(paths NE paths[0], count) - IF count GT 0 THEN BEGIN - paths = paths[w] - names = names[w] - nids = nids[w] - ENDIF - nvars = count - ENDWHILE -END - -PRO mds2inp, server=server, tree=tree, shot=shot - - IF NOT KEYWORD_SET(server) THEN server = "localhost" - IF NOT KEYWORD_SET(tree) THEN tree = "bout_mds" - - mdsconnect, server, status = status - - IF NOT (status AND 1) THEN BEGIN - PRINT, "Could not connect" - RETURN - ENDIF - - IF NOT KEYWORD_SET(shot) THEN BEGIN - ; get the latest shot - shot = MDSVALUE('current_shot("'+tree+'")') - PRINT, "Latest shot = ", shot - ENDIF - - mdsopen, tree, shot, status=status - IF NOT (status AND 1) THEN BEGIN - PRINT, "Could not open tree" - mdsdisconnect - RETURN - ENDIF - - ; get the description and model - - desc = MDSVALUE(':DESC', status=status) - IF NOT (status AND 1) THEN desc = 'No description' - model = MDSVALUE(':MODEL', status=status) - IF NOT (status AND 1) THEN model = 'NO MODEL' - - ; NOTE: This method could be replaced with calls for CHILDREN_NIDS - ; but that doesn't seem to work (says no data for node) - - fd = -1 - - PRINTF, fd, "# BOUT++ input file. Generated from MDSplus data" - PRINTF, fd, "# Date: " + SYSTIME() - PRINTF, fd, "# Shot: " + STRTRIM(STRING(shot),2) - PRINTF, fd, "# Description: " + desc - PRINTF, fd, "# Model: " + model - PRINTF, fd, "" - - settings_path = "\\TOP.SETTINGS***" - print_settings, settings_path, 10, '', fd - - print_settings, "\\TOP."+model+".SETTINGS***", 10+STRLEN(model), model, fd - - - mdsclose - mdsdisconnect - -END - - diff --git a/tools/archiving/mdsplus/manual/Makefile b/tools/archiving/mdsplus/manual/Makefile deleted file mode 100644 index df1e184ecc..0000000000 --- a/tools/archiving/mdsplus/manual/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -TARGET = bout_mdsplus - -$(TARGET).pdf: $(TARGET).tex - latexmk -pdf $(TARGET).tex -interaction=batchmode - -clean: - latexmk -C diff --git a/tools/archiving/mdsplus/manual/bout_mdsplus.tex b/tools/archiving/mdsplus/manual/bout_mdsplus.tex deleted file mode 100644 index 17852e30f2..0000000000 --- a/tools/archiving/mdsplus/manual/bout_mdsplus.tex +++ /dev/null @@ -1,50 +0,0 @@ -% Manual describing the MDSplus interface to BOUT++ - -\documentclass[12pt]{article} -\usepackage[nofoot]{geometry} -\usepackage{graphicx} -\usepackage{fancyhdr} - -%% Modify margins -\addtolength{\oddsidemargin}{-.25in} -\addtolength{\evensidemargin}{-.25in} -\addtolength{\textwidth}{0.5in} -\addtolength{\textheight}{0.25in} -%% SET HEADERS AND FOOTERS - -\pagestyle{fancy} -\fancyfoot{} -\renewcommand{\sectionmark}[1]{ % Lower case Section marker style - \markright{\thesection.\ #1}} -\fancyhead[LE,RO]{\bfseries\thepage} % Page number (boldface) in left on even - % pages and right on odd pages -\renewcommand{\headrulewidth}{0.3pt} - -\newcommand{\code}[1]{\texttt{#1}} -\newcommand{\file}[1]{\texttt{\bf #1}} - -%% commands for boxes with important notes -\newlength{\notewidth} -\addtolength{\notewidth}{\textwidth} -\addtolength{\notewidth}{-3.\parindent} -\newcommand{\note}[1]{ -\fbox{ -\begin{minipage}{\notewidth} -{\bf NOTE}: #1 -\end{minipage} -}} - -\begin{document} - -\title{MDSplus interface for BOUT++} -\author{B.Dudson, University of York} - -\maketitle - -\tableofcontents - -\section{Introduction} - - - -\end{document} diff --git a/tools/archiving/pdb2cdf/Makefile b/tools/archiving/pdb2cdf/Makefile deleted file mode 100644 index d08edc127c..0000000000 --- a/tools/archiving/pdb2cdf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -BOUT_TOP = ../../.. -include $(BOUT_TOP)/make.config - -TARGET = pdb2cdf -OBJ = pdb2cdf.o - -.PHONY:all -all: $(TARGET) - -$(TARGET): $(OBJ) Makefile - $(LD) -o $(TARGET) $(OBJ) $(EXTRA_LIBS) - -$(OBJ): %.o: %.cxx Makefile - $(CC) $(CFLAGS) -c $< -o $@ $(EXTRA_INCS) diff --git a/tools/archiving/pdb2cdf/README b/tools/archiving/pdb2cdf/README deleted file mode 100644 index a8ce636d6a..0000000000 --- a/tools/archiving/pdb2cdf/README +++ /dev/null @@ -1,25 +0,0 @@ -PDB2CDF -======= - -Convert Portable Data Binary (PDB) files to netCDF format - -PDB: https://wci.llnl.gov/codes/pact/ -netCDF: http://www.unidata.ucar.edu/software/netcdf/ - -Handles up to 4-D integers, floats and doubles. Tries to assign the correct -dimensions to the variables using the following procedure: - -1. Find the variable with the largest number of dimensions -2. Labels the dimensions of this variable 'X', 'Y', 'Z', 'T' - (always in that order), and records the index ranges -3. For each variable, match index ranges to get the dimension, - using the first one which matches. Dimensions are assumed - to always be in the same order: XZ, YT, XY etc. but NOT ZX, TZ etc. -4. Variables which cannot be matched to dimensions will currently - cause the code to fall over. Should be improved later. - -The ordering of dimensions was chosen for BOUT++ files, but -apart from this, the code is not specific to BOUT++. - -B.Dudson, April 2009 -University of York diff --git a/tools/archiving/pdb2cdf/pdb2cdf.cxx b/tools/archiving/pdb2cdf/pdb2cdf.cxx deleted file mode 100644 index ac8bc85de6..0000000000 --- a/tools/archiving/pdb2cdf/pdb2cdf.cxx +++ /dev/null @@ -1,382 +0,0 @@ -/******************************************************* - * PDB2CDF - * - * Convert PDB files to netCDF - *******************************************************/ - -#include -#include - -// The PDB library (C) -#include "pdb.h" - -// netCDF C++ library -#include - -// Dimension -struct TDim { - char* label; // Label for the dimension - int size; - int min, max; // Minimum, maximum index - NcDim* nDim; // netCDF dimension -}; - -// List of dimensions. Handles up to 3 -static TDim dimlist3d[] = {{"x", 0}, {"y", 0}, {"z", 0}}; - -// Special case for 4D -static TDim dimlist4d[] = {{"t", 0}, {"x", 0}, {"y", 0}, {"z", 0}}; - -int main(int argc, char** argv) { - TDim* dimlist; - - if (argc < 2) { - fprintf(stderr, "Useage: %s file1 file2 ...\n", argv[0]); - return 1; - } - - for (int i = 1; i < argc; i++) { // Go through each PDB file - char* inname = argv[i]; - PDBfile* in; - - // Open input file - - if ((in = PD_open(inname, "r")) == NULL) { - fprintf(stderr, "ERROR: Could not open input file '%s'\n", inname); - return 1; - } - - // Get list of variables - - int nvars; - char** var_names = PD_ls(in, NULL, NULL, &nvars); - if ((var_names == (char**)NULL) || (nvars < 1)) { - fprintf(stderr, "ERROR: No variables\n"); - return 1; - } - - // Create a filename for the output - char* outname; - int len = strlen(inname); - if (len < 5) { - // Not long enough - just append .cdl - outname = new char[len + 5]; - snprintf(outname, len + 5, "%s%s", inname, ".cdl"); - } else { - // Replace '.pdb' by '.cdl' - outname = new char[len + 1]; - strncpy(outname, inname, len + 1); - strncpy(outname + len - 3, "cdl", 3); - } - - // Open output file, overwriting if it exists - NcFile dataFile(outname, NcFile::Replace); - - if (!dataFile.is_valid()) { - fprintf(stderr, "ERROR: Could not open output file '%s'\n", outname); - return 1; - } - - printf("Converting %s -> %s\n", inname, outname); - - // Find the variable with the largest number of dimensions - printf("\tAnalysing dimensions..."); - int maxdims = -1; // maximum number of variables - int maxdimvar = 0; // variable with the most dimensions - - syment* ep; // PDB query types - dimdes* dims; - - char* varname; - for (int var = 0; var < nvars; var++) { - varname = var_names[var]; - // Query size of the variable - - if ((ep = PD_query_entry(in, varname, NULL)) == (syment*)NULL) { - fprintf(stderr, "Error querying variable %s\n", varname); - return 1; - } - dims = PD_entry_dimensions(ep); - int nd = 0; /* Count number of dimensions */ - while (dims != (dimdes*)NULL) { - nd++; - dims = dims->next; - } - if (nd > maxdims) { - maxdims = nd; - maxdimvar = var; - } - } - - printf("%d dimensions\n", maxdims); - - if (maxdims < 4) { - dimlist = dimlist3d; - } else { - dimlist = dimlist4d; - } - - if (maxdims > 4) { - fprintf(stderr, "ERROR: Can only handle up to 4D variables\n"); - return 1; - } - - // Get the size of each dimension - varname = var_names[maxdimvar]; - if ((ep = PD_query_entry(in, varname, NULL)) == (syment*)NULL) { - fprintf(stderr, "Error querying variable %s\n", varname); - return 1; - } - dims = PD_entry_dimensions(ep); - - for (int d = 0; d < maxdims; d++) { - dimlist[d].min = dims->index_min; - dimlist[d].max = dims->index_max; - dimlist[d].size = dims->index_max - dims->index_min + 1; - - // Create a netCDF dimension - dimlist[d].nDim = dataFile.add_dim(dimlist[d].label, dimlist[d].size); - - printf("\t\t%s: %d -> %d (%d)\n", dimlist[d].label, dimlist[d].min, dimlist[d].max, - dimlist[d].size); - - dims = dims->next; - } - - // Go through each variable - for (int var = 0; var < nvars; var++) { - varname = var_names[var]; - if ((ep = PD_query_entry(in, varname, NULL)) == (syment*)NULL) { - fprintf(stderr, "Error querying variable %s\n", varname); - return 1; - } - - printf("\t%s", varname); - - // Get dimensions - int nd = 0; // Number of dimensions - int vardim[4]; // Indices in the dimlist array - int lastdim = -1; // Always assume indices have the same order - int varsize = 1; // Number of elements - - bool gotdims = true; - - dims = PD_entry_dimensions(ep); - while (dims != (dimdes*)NULL) { - int min, max; - min = dims->index_min; - max = dims->index_max; - - varsize *= max - min + 1; - - vardim[nd] = -1; - // Find which dimension this corresponds to - for (int d = lastdim + 1; d < maxdims; d++) { - if ((dimlist[d].min == min) && (dimlist[d].max == max)) { - if (lastdim == -1) { - printf("[%s", dimlist[d].label); - } else { - printf(",%s", dimlist[d].label); - } - vardim[nd] = d; - lastdim = d; - break; - } - } - if (vardim[nd] == -1) { - // Not an existing dimension. Should create a new dimension - fprintf(stderr, "ERROR: %s has an unrecognised %d dimension [%d -> %d]\n", - varname, nd + 1, min, max); - gotdims = false; - break; - } - - nd++; - dims = dims->next; - } - - if (!gotdims) { - continue; // Skip this variable - } - - if (lastdim != -1) { - printf("] (%d elements) ", varsize); - } - - // Now know number of dimensions nd, and a list of dimension indices vardim - - // Get variable type - char* typ; - typ = PD_entry_type(ep); - - printf(" Type: %s ", typ); - fflush(stdout); - - if (strcasecmp(typ, "integer") == 0) { - - int* idata = new int[varsize]; - - // Read the data from the PDB file - if (PD_read_as(in, varname, "integer", idata) == FALSE) { - fprintf(stderr, "\t\tWARNING: Could not read variable. Ignoring\n"); - continue; - } - switch (nd) { - case 0: { - // Add a 0-D variable to the netCDF file - NcVar* ncdata = dataFile.add_var(varname, ncInt); - - // Write data - ncdata->put(idata); - break; - } - case 1: { - NcVar* ncdata = dataFile.add_var(varname, ncInt, dimlist[vardim[0]].nDim); - ncdata->put(idata, varsize); - break; - } - case 2: { - NcVar* ncdata = dataFile.add_var(varname, ncInt, dimlist[vardim[0]].nDim, - dimlist[vardim[1]].nDim); - ncdata->put(idata, dimlist[vardim[0]].size, dimlist[vardim[1]].size); - break; - } - case 3: { - NcVar* ncdata = - dataFile.add_var(varname, ncInt, dimlist[vardim[0]].nDim, - dimlist[vardim[1]].nDim, dimlist[vardim[2]].nDim); - ncdata->put(idata, dimlist[vardim[0]].size, dimlist[vardim[1]].size, - dimlist[vardim[2]].size); - break; - } - case 4: { - NcVar* ncdata = dataFile.add_var( - varname, ncInt, dimlist[vardim[0]].nDim, dimlist[vardim[1]].nDim, - dimlist[vardim[2]].nDim, dimlist[vardim[3]].nDim); - ncdata->put(idata, dimlist[vardim[0]].size, dimlist[vardim[1]].size, - dimlist[vardim[2]].size, dimlist[vardim[3]].size); - break; - } - default: { - fprintf(stderr, "\t\tWARNING: Cannot yet handle %d-D integers. Ignoring\n", nd); - } - } - delete[] idata; - - ////////////////////////////////////////////////////////////////// - - } else if (strcasecmp(typ, "float") == 0) { - - float* fdata = new float[varsize]; - - // Read the data from the PDB file - if (PD_read_as(in, varname, "float", fdata) == FALSE) { - fprintf(stderr, "\t\tWARNING: Could not read variable. Ignoring\n"); - continue; - } - switch (nd) { - case 0: { - NcVar* ncdata = dataFile.add_var(varname, ncFloat); - - // Write data - ncdata->put(fdata); - break; - } - case 1: { - NcVar* ncdata = dataFile.add_var(varname, ncFloat, dimlist[vardim[0]].nDim); - ncdata->put(fdata, varsize); - break; - } - case 2: { - NcVar* ncdata = dataFile.add_var(varname, ncFloat, dimlist[vardim[0]].nDim, - dimlist[vardim[1]].nDim); - ncdata->put(fdata, dimlist[vardim[0]].size, dimlist[vardim[1]].size); - break; - } - case 3: { - NcVar* ncdata = - dataFile.add_var(varname, ncFloat, dimlist[vardim[0]].nDim, - dimlist[vardim[1]].nDim, dimlist[vardim[2]].nDim); - ncdata->put(fdata, dimlist[vardim[0]].size, dimlist[vardim[1]].size, - dimlist[vardim[2]].size); - break; - } - case 4: { - NcVar* ncdata = dataFile.add_var( - varname, ncFloat, dimlist[vardim[0]].nDim, dimlist[vardim[1]].nDim, - dimlist[vardim[2]].nDim, dimlist[vardim[3]].nDim); - ncdata->put(fdata, dimlist[vardim[0]].size, dimlist[vardim[1]].size, - dimlist[vardim[2]].size, dimlist[vardim[3]].size); - break; - } - default: { - fprintf(stderr, "\t\tWARNING: Cannot yet handle %d-D floats. Ignoring\n", nd); - } - } - delete[] fdata; - - ////////////////////////////////////////////////////////////////// - - } else if (strcasecmp(typ, "double") == 0) { - - double* ddata = new double[varsize]; - - // Read the data from the PDB file - if (PD_read_as(in, varname, "double", ddata) == FALSE) { - fprintf(stderr, "\t\tWARNING: Could not read variable. Ignoring\n"); - continue; - } - switch (nd) { - case 0: { - NcVar* ncdata = dataFile.add_var(varname, ncDouble); - - // Write data - ncdata->put(ddata); - break; - } - case 1: { - NcVar* ncdata = dataFile.add_var(varname, ncDouble, dimlist[vardim[0]].nDim); - ncdata->put(ddata, varsize); - break; - } - case 2: { - NcVar* ncdata = dataFile.add_var(varname, ncDouble, dimlist[vardim[0]].nDim, - dimlist[vardim[1]].nDim); - ncdata->put(ddata, dimlist[vardim[0]].size, dimlist[vardim[1]].size); - break; - } - case 3: { - NcVar* ncdata = - dataFile.add_var(varname, ncDouble, dimlist[vardim[0]].nDim, - dimlist[vardim[1]].nDim, dimlist[vardim[2]].nDim); - ncdata->put(ddata, dimlist[vardim[0]].size, dimlist[vardim[1]].size, - dimlist[vardim[2]].size); - break; - } - case 4: { - NcVar* ncdata = dataFile.add_var( - varname, ncDouble, dimlist[vardim[0]].nDim, dimlist[vardim[1]].nDim, - dimlist[vardim[2]].nDim, dimlist[vardim[3]].nDim); - ncdata->put(ddata, dimlist[vardim[0]].size, dimlist[vardim[1]].size, - dimlist[vardim[2]].size, dimlist[vardim[3]].size); - break; - } - default: { - fprintf(stderr, "\t\tWARNING: Cannot yet handle %d-D doubles. Ignoring\n", nd); - } - } - delete[] ddata; - } else { - fprintf(stderr, "\tWARNING: '%s' has unrecognised type '%s'. Ignoring\n", varname, - typ); - } - printf("\n"); - } - - delete[] outname; - - dataFile.close(); // Close the output file. Probably optional. - } - - return 0; -} diff --git a/tools/archiving/sdctools/LICENSE b/tools/archiving/sdctools/LICENSE deleted file mode 100644 index a44189fdca..0000000000 --- a/tools/archiving/sdctools/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2007 B.Dudson, University of York - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/archiving/sdctools/Makefile b/tools/archiving/sdctools/Makefile deleted file mode 100644 index d501067023..0000000000 --- a/tools/archiving/sdctools/Makefile +++ /dev/null @@ -1,35 +0,0 @@ - -SDC = ./sdclib/ -PACT = /hwdisks/home/bd512/local/ -IDL_DIR = /hwdisks/sfw/idl/idl6.3/idl/ - -CC = gcc -LD = gcc - -CFLAGS = -Wall -O - -INCLUDES = -I$(SDC) -I$(PACT)/include -LIBS = $(SDC)/sdclib.o -L$(PACT)/lib -lpdb -lpml -lscore -lm - - -.PHONY: all - -all: compress sdc2idl.so - -compress: compress.o - $(LD) -o compress compress.o $(LIBS) - -compress.o: compress.c - $(CC) $(CFLAGS) -c compress.c $(INCLUDES) - - -sdc2idl.so: sdc2idl.o - $(LD) -o sdc2idl.so sdc2idl.o $(SDC)/sdclib.so -shared -lm - -sdc2idl.o: sdc2idl.c - $(CC) -c $(CFLAGS) -fPIC -c sdc2idl.c -I$(SDC) -I$(IDL_DIR)/external - - -.PHONY: clean -clean: - rm *.o compress sdc2idl.so diff --git a/tools/archiving/sdctools/README b/tools/archiving/sdctools/README deleted file mode 100644 index af4c37dbb2..0000000000 --- a/tools/archiving/sdctools/README +++ /dev/null @@ -1,207 +0,0 @@ - - -Scientific Data Compression Library (SDCLib) Version 1.0 -Ben Dudson, University of York, August 2007 - -Introduction -============ - -This is a simple compression library, intended for the relatively -smoothly varying output from simulations such as BOUT++. -Uses polynomial interpolation in time to reduce number of stored -time-points - If the input is a polynomial in time, then the minimum -number of points needed will be stored, for example to store a -quadratic 3 points will be stored. -Compression is lossy - some accuracy is sacrificed in order to -reduce the size of the data, although the level of accuracy can -be specified and changed mid-way through the data. -This accuracy is guaranteed - the reconstruction is guaranteed -to be within the absolute and relative error bounds specified. - -NOTES: -1. This library is currently under development and probably still has some bugs. - Please don't use it to store anything you cannot replace. - -2. Currently doesn't take account of different integer/float sizes - (e.g. 32 vs 64-bit machines) apart from checking that variables - are the correct size for the archive. - If you attempt to read using 64-bit code an archive created by 32-bit code, - an error will be thrown. - -3. Archives cannot be altered once created. Appending data to files may happen - eventually, but modifying files is just too much of a pain. - -Any comments/suggestions/flames to Ben Dudson, bd512@york.ac.uk - - -Operation -========= - -Because this is a compressed format, searching for a given time-point would be difficult -unless the entire dataset were periodically output in one block. -As with a video file, these are called i-frames, and a table of their locations is stored -at the end of the file (like AVI). - -In between these i-frames, different parts of the domain will (probably) change at -different rates, and so the domain is split into several regions - when creating an -archive the number of regions must be specified. - -Creating an SDC archive ------------------------ - -SDC stores data in blocks. The idea is that a file format would be customised for a -given application, with it's own header describing the data. -After this would come the SDC header and then the data. - -First you must open a file - -FILE *fp -fp = fopen("somefile.sdc", "wb"); - -Write whatever header you want to this file, then call - -SDCfile* sdc_newfile(FILE *fp, int N, int order, int reset, int nregions); - -which returns NULL if an error occurs. -N is the number of data points in each time-slice -order is the maximum order of the interpolation (1 - linear, 2 - quadratic etc) -reset is the number of time-points between i-frames where all data is output (like a video, for faster searching) -nregions is the number of regions to split the data into. This doesn't have to be a divisor of N. - -This will write the SDC header to the file, allocate memory and prepare to write data. - -To specify the accuracy to be used, call - -void sdc_set_tol(SDCfile *f, float abstol, float reltol, float eta); - -which sets the absolute tolerance abstol, the relative tolerance reltol, -and a small quantity used in the relative tolerance eta. -The criterion for writing a block of data is to make sure the error e never satisfies: - -( |e| > reltol ) or ( |e| / (|data| + eta) > reltol ) - -Hence values below eta are ignored for the relative tolerance calculation. -These tolerances can be changed whilst writing the file to adapt the accuracy if needed. -Currently the default values for these are abstol = 1.0e-3, reltol = 1.0e-2, -and eta = 1.0e-10 which seem to give pretty decent results. - -To write a time-slice of the data, call - -int sdc_write(SDCfile *f, float *data); - -where data is a pointer to an array of N elements. This will return non-zero -if an error occurs. When all the data has been written, YOU MUST call: - -int sdc_close(SDCfile *f); - -which will write a final i-frame and generally tidy up. If you fail to do this, -terrible things will happen, and your data may be corrupted too. -After this, you can do what you want to the file, then close it - -fclose(fp); - -Reading an archive ------------------- - -First open the file, read whatever headers you wrote and then call - -SDCfile* sdc_open(FILE *fp); - -which will read the SDC data header. To read a time-slice, call - -int sdc_read(SDCfile *f, int t, float *data); - -where t is the time-index (counted from zero at the start of the file), -and data is a pointer to a block of memory. This function will return -non-zero if an error occurs. Reading is most efficient in order from -first to last time-point; reading in reverse order is the least efficient. - -Thats it! When finished reading, you can call - -int sdc_close(SDCfile *f); - -to free memory etc. As with the writing, you have to close the file itself separately. - -Tricks / Examples -================= - -Interleaved data ----------------- - -Several SDC data sets can be interleaved in a single file, for example with two sets - -FILE *fp -fp = fopen("somefile.sdc", "wb"); - -/* Create headers */ -SDCfile *f1, *f2; -f1 = sdc_newfile(fp, N1, order1, reset1, nregions1); -f2 = sdc_newfile(fp, N2, order2, reset2, nregions2); - -Can now write data to f1 or f2 in any order and then close both of them. -To read the data, you must read headers in the same order: - -f1 = sdc_open(fp); -f2 = sdc_open(fp); - -but data can then be read in any order from f1 or f2. - -Compress utility ----------------- - -The imaginatively named "compress" code takes a set of PDB files, selects a single variable -and concatenates all the data into a single output SDC file called "output.sdc". -The data can be any floating-point variable of 1,2,3 or 4 dimensions. The final index of the variable -is assumed to be time. The variable in each file needs to be the same size in each spatial dimension, but -not necessarily the same number of time-points. - -For example, to take all the collected BOUT data, and compress the density to an output file, - -compress ni_xyzt data*.pdb - -You will then be asked for the following parameters (decent values for full 4D 50x64x64x