ARTS  1.0.222
m_hdf.cc
Go to the documentation of this file.
1 /* Copyright (C) 2000, 2001 Stefan Buehler <sbuehler@uni-bremen.de>
2  Patrick Eriksson <patrick@rss.chalmers.se>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License as published by the
6  Free Software Foundation; either version 2, or (at your option) any
7  later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17  USA. */
18 
19 
20 
22 // File description
24 
33 #if HAVE_CONFIG_H
34 #include "config.h"
35 #endif
36 
38 // External declarations
40 
41 #include <math.h>
42 #include "arts.h"
43 #include "atm_funcs.h"
44 #include "math_funcs.h"
45 #include "messages.h"
46 #include "auto_md.h"
47 #include "make_array.h"
48 
49 #ifdef HDF_SUPPORT
50 
51 #include <hdf.h>
52 
53 
54 
56 // Some help functions
58 
60 
71 void filename_bin(
72  String& filename,
73  const String& varname )
74 {
75  if ( "" == filename )
76  {
77  extern const String out_basename;
78  filename = out_basename+"."+varname+".ab";
79  }
80 }
81 
82 
83 
85 
95 void check_data_types()
96 {
97  if ( sizeof(Index) != 4 )
98  throw runtime_error("An Index is expected to be 4 bytes.");
99  if ( sizeof(float) != 4 )
100  throw runtime_error("A float is expected to be 4 bytes.");
101  if ( sizeof(double) != 8 )
102  throw runtime_error("A double is expected to be 8 bytes.");
103  if ( sizeof(char) != 1 )
104  throw runtime_error("A char is expected to be 1 byte.");
105 }
106 
107 
108 
110 
122 void binfile_open_out(
123  int& fid,
124  const String& filename )
125 {
126  // Open the file for writing (deleting an old file with same name)
127  fid = Hopen( filename.c_str(), DFACC_CREATE, 0 );
128  if ( fid < 0 )
129  {
130  ostringstream os;
131  os << "Cannot create output file: " << filename << '\n'
132  << "Maybe you don't have write access to the directory or the file?";
133  throw runtime_error(os.str());
134  }
135  out2 << " Opened file " << filename << " for writing.\n";
136 
137  // Initialize the VS interface
138  if ( Vstart( fid ) < 0 )
139  {
140  ostringstream os;
141  os << "Cannot initialize the VS interafce in file: " << filename;
142  throw runtime_error(os.str());
143  }
144 }
145 
146 
147 
149 
162 void binfile_open_in(
163  int& fid,
164  const String& filename )
165 {
166  // Check if the file is HDF
167  if ( Hishdf( filename.c_str() ) < 0 )
168  {
169  ostringstream os;
170  os << "The file " << filename << " is not a HDF file.\n";
171  throw runtime_error(os.str());
172  }
173 
174  // Open the file for reading
175  fid = Hopen( filename.c_str(), DFACC_READ, 0 );
176  if ( fid < 0 )
177  {
178  ostringstream os;
179  os << "Cannot open input file: " << filename << '\n'
180  << "Maybe you don't have read access to the directory or the file?";
181  throw runtime_error(os.str());
182  }
183  out2 << " Opened file " << filename << " for reading.\n";
184 
185  // Initialize the VS interface
186  if ( Vstart( fid ) < 0 )
187  {
188  ostringstream os;
189  os << "Cannot initialize the VS interafce in file: " << filename;
190  throw runtime_error(os.str());
191  }
192 }
193 
194 
195 
197 
209 void binfile_close(
210  int& fid,
211  const String& filename )
212 {
213  // Terminate access to the VS interface
214  if ( Vend( fid ) < 0 )
215  {
216  ostringstream os;
217  os << "Cannot terminate access to the VS interface in: " << filename;
218  throw runtime_error(os.str());
219  }
220 
221  // Close the file
222  if ( Hclose( fid ) < 0 )
223  {
224  ostringstream os;
225  os << "Cannot close file: " << filename;
226  throw runtime_error(os.str());
227  }
228 
229  out2 << " Closed file " << filename << "\n";
230 }
231 
232 
233 
235 
251 void binfile_write_size(
252  const String& filename,
253  const String& dataname,
254  const int& vdata_id,
255  const Index& nrows,
256  const Index& ncols )
257 {
258  Index v[2];
259  v[0] = nrows;
260  v[1] = ncols;
261 
262  if ( VSsetattr( vdata_id, _HDF_VDATA, "SIZE", DFNT_UINT32, 2, v ) < 0 )
263  {
264  ostringstream os;
265  os << "Cannot write size data for " << dataname << " in file " << filename;
266  throw runtime_error(os.str());
267  }
268 }
269 
270 
271 
273 
294 void binfile_read_init(
295  int& vdata_id,
296  Index& nrows,
297  Index& ncols,
298  const int& fid,
299  const String& filename,
300  const String& dataname,
301  const String& storagetype,
302  const Index& nrows0,
303  const Index& ncols0 )
304 {
305  // Find the Vdata in the file
306  int vdata_ref = VSfind( fid, dataname.c_str() );
307  if ( vdata_ref <= 0 )
308  {
309  ostringstream os;
310  os << "Cannot find the data " << dataname << " in file " <<filename<<"\n"
311  << "Maybe the file contains data of other type";
312  throw runtime_error(os.str());
313  }
314 
315  // Attach the Vdata
316  vdata_id = VSattach( fid, vdata_ref, "r" );
317  if ( vdata_id <= 0 )
318  {
319  ostringstream os;
320  os << "Cannot attach the data " << dataname << " in file " << filename;
321  throw runtime_error(os.str());
322  }
323 
324  // Get number of rows and columns
325  Index v[2];
326  if ( VSgetattr( vdata_id, _HDF_VDATA, 0, v ) < 0 )
327  {
328  ostringstream os;
329  os << "Cannot determine the size of " << dataname << "\n"
330  << "in file " << filename;
331  throw runtime_error(os.str());
332  }
333  nrows = v[0];
334  ncols = v[1];
335 
336  // Check if number of rows and columns are as expected
337  if ( (nrows0>0) && (nrows!=nrows0) )
338  {
339  ostringstream os;
340  os << nrows0 << " rows were expected, but the data have " <<nrows<<" rows";
341  throw runtime_error(os.str());
342  }
343  if ( (ncols0>0) && (ncols!=ncols0) )
344  {
345  ostringstream os;
346  os << ncols0 << " columns were expected, but the data have " << ncols
347  << " columns";
348  throw runtime_error(os.str());
349  }
350 
351  // Set fields to read
352  if ( (nrows>0) && (ncols>0) )
353  {
354  if ( VSsetfields( vdata_id, storagetype.c_str() ) < 0 )
355  {
356  cout << dataname << endl;
357  ostringstream os;
358  os << "Cannot find the field " << storagetype << " in file " << filename
359  << "\n" << "Maybe the file contains data of other type";
360  throw runtime_error(os.str());
361  }
362  }
363 }
364 
365 
366 
368 
380 void binfile_read_end(
381  int& vdata_id,
382  const String& filename,
383  const String& dataname )
384 {
385  if ( VSdetach( vdata_id ) < 0 )
386  {
387  ostringstream os;
388  os << "Cannot detach the field " << dataname << " in file " << filename;
389  throw runtime_error(os.str());
390  }
391 }
392 
393 
394 
396 
405 void binfile_get_datatype(
406  String& type_in_file,
407  const int& vdata_id )
408 {
409  char c[50];
410  VSgetclass( vdata_id, c );
411  type_in_file = c;
412 }
413 
414 
415 
417 // Core read and write functions for binary files
419 
421 
440 void binfile_write(
441  const int& fid,
442  const String& filename,
443  const String& dataname,
444  const String& storagetype,
445  const String& atomictype,
446  const Index& nrows,
447  const Index& ncols,
448  const uint8* dpointer )
449 {
450  // Check that data types have expected length
451  check_data_types();
452 
453  out3 << " Writing: " << dataname << "\n";
454 
455  // Create a new vdata
456  int vdata_id = VSattach( fid, -1, "w" );
457  if ( vdata_id < 0 )
458  {
459  ostringstream os;
460  os << "Cannot create a new vdata in file " << filename;
461  throw runtime_error(os.str());
462  }
463 
464  // Set name of the vdata
465  if ( VSsetname( vdata_id, dataname.c_str() ) < 0 )
466  {
467  ostringstream os;
468  os << "Cannot name the vdata " << dataname << " in file " << filename;
469  throw runtime_error(os.str());
470  }
471 
472  // Write data size
473  binfile_write_size( filename, dataname, vdata_id, nrows, ncols );
474 
475  // Create the field
476  int status1, status2;
477  //
478  if ( atomictype == "INDEX" )
479  {
480  status1 = VSsetclass( vdata_id, "UINT" );
481  status2 = VSfdefine( vdata_id, storagetype.c_str(), DFNT_UINT32, 1);
482  }
483  else if ( atomictype == "NUMERIC" )
484  {
485  if ( sizeof(Numeric) == 4 )
486  {
487  status1 = VSsetclass( vdata_id, "FLOAT" );
488  status2 = VSfdefine( vdata_id, storagetype.c_str(), DFNT_FLOAT32, 1);
489  }
490  else
491  {
492  status1 = VSsetclass( vdata_id, "DOUBLE" );
493  status2 = VSfdefine( vdata_id, storagetype.c_str(), DFNT_FLOAT64, 1);
494  }
495  }
496 
497  else if ( atomictype == "CHAR" )
498  {
499  status1 = VSsetclass( vdata_id, "CHAR" );
500  status2 = VSfdefine( vdata_id, storagetype.c_str(), DFNT_CHAR, 1);
501  }
502  else
503  {
504  ostringstream os;
505  os << "The atomic data type " << atomictype << " is not handled";
506  throw runtime_error(os.str());
507  }
508 
509  // Handle error
510  if ( status1 < 0 )
511  {
512  ostringstream os;
513  os << "Cannot set class on " << dataname << " in file "<<filename;
514  throw runtime_error(os.str());
515  }
516  if ( status2 < 0 )
517  {
518  ostringstream os;
519  os << "Cannot create the field " << storagetype << " in file "<<filename;
520  throw runtime_error(os.str());
521  }
522 
523  // Finalize the definition of the field
524  if ( VSsetfields( vdata_id, storagetype.c_str() ) < 0 )
525  {
526  ostringstream os;
527  os << "Cannot set the field " << storagetype << " in file " << filename;
528  throw runtime_error(os.str());
529  }
530 
531  // Write data (if not empty)
532  if ( (nrows>0) && (ncols>0) )
533  {
534  // Do actual writing
535  const Index nout = nrows*ncols;
536  Index ndone = VSwrite( vdata_id, dpointer, nout, FULL_INTERLACE );
537  if ( ndone != nout )
538  {
539  ostringstream os;
540  os << "Could not write all data to field " << storagetype << "in file "
541  << filename << "\nOut of memory?";
542  throw runtime_error(os.str());
543  }
544  }
545 
546  // Detach the vdata
547  if ( VSdetach( vdata_id ) < 0 )
548  {
549  ostringstream os;
550  os << "Cannot detach the vdata " << dataname << " in file " << filename;
551  throw runtime_error(os.str());
552  }
553 }
554 
555 
556 
558 
576 void binfile_read1(
577  ArrayOfIndex& x,
578  const int& vdata_id,
579  const Index& n,
580  const String& /* filename */,
581  const String& dataname )
582 {
583  // Check that data types have expected length
584  check_data_types();
585 
586  out3 << " Reading: " << dataname << "\n";
587 
588  // Get the data type of the data to read
589  String type_in_file;
590  binfile_get_datatype( type_in_file, vdata_id );
591 
592  // Reallocate x
593  x.resize(n);
594 
595  if ( n > 0 )
596  {
597  // Do reading and copy data
598  if ( type_in_file == "UINT" )
599  //
600  VSread( vdata_id, (uint8*)&x[0], n, FULL_INTERLACE );
601  /*
602  {
603  Index a[n];
604  VSread( vdata_id, (uint8*)a, n, FULL_INTERLACE );
605  for ( Index i=0; i<n; i++ )
606  x[i] = a[i];
607  }
608  */
609 
610  else
611  {
612  ostringstream os;
613  os << "Files with data type " << type_in_file << " are not handled";
614  throw runtime_error(os.str());
615  }
616  }
617 }
618 
619 
620 
622 
645 void binfile_read2(
646  Matrix& x,
647  const int& vdata_id,
648  const Index& nrows,
649  const Index& ncols,
650  const String& /* filename */,
651  const String& dataname )
652 {
653  // Check that data types have expected length
654  check_data_types();
655 
656  out3 << " Reading: " << dataname << "\n";
657 
658  // Get the data type of the data to read
659  String type_in_file;
660  binfile_get_datatype( type_in_file, vdata_id );
661 
662  // Reallocate x
663  x.resize(nrows,ncols);
664 
665  if ( (nrows > 0) && (ncols > 0) )
666  {
667  // Do reading and copy data
668  if ( type_in_file == "FLOAT" )
669 
670  if ( sizeof(Numeric) == 4 )
671  //
672  VSread( vdata_id, (uint8*)&x(0,0), nrows*ncols, FULL_INTERLACE );
673 
674  else
675  {
676  float *a = new float[nrows*ncols];
677  Index i,j,j0;
678  VSread( vdata_id, (uint8*)a, nrows*ncols, FULL_INTERLACE );
679  for ( i=0; i<nrows; i++ )
680  {
681  j0 = i*ncols;
682  for ( j=0; j<ncols; j++ )
683  x(i,j) = a[j0+j];
684  }
685  delete[] a;
686  }
687 
688  else if ( type_in_file == "DOUBLE" )
689 
690  if ( sizeof(Numeric) == 8 )
691  //
692  VSread( vdata_id, (uint8*)&x(0,0), nrows*ncols, FULL_INTERLACE );
693 
694  else
695  {
696  double *a = new double[nrows*ncols];
697  Index i,j,j0;
698  VSread( vdata_id, (uint8*)a, nrows*ncols, FULL_INTERLACE );
699  for ( i=0; i<nrows; i++ )
700  {
701  j0 = i*ncols;
702  for ( j=0; j<ncols; j++ )
703  x(i,j) = a[j0+j];
704  }
705  delete[] a;
706  }
707 
708  else
709  {
710  ostringstream os;
711  os << "Files with data type " << type_in_file << " are not handled";
712  throw runtime_error(os.str());
713  }
714  }
715 }
716 
717 
718 
720 
738 void binfile_read3(
739  String& x,
740  const int& vdata_id,
741  const Index& n,
742  const String& /* filename */,
743  const String& dataname )
744 {
745  // Check that data types have expected length
746  check_data_types();
747 
748  out3 << " Reading: " << dataname << "\n";
749 
750  // Get the data type of the data to read
751  String type_in_file;
752  binfile_get_datatype( type_in_file, vdata_id );
753 
754  // Reallocate x
755  x.resize(n);
756 
757  if ( n > 0 )
758  {
759  // Do reading and copy data
760  if ( type_in_file == "CHAR" )
761  //
762  VSread( vdata_id, (uint8*)&x[0], n, FULL_INTERLACE );
763 
764  /*
765  {
766  char a[n];
767  VSread( vdata_id, (uint8*)a, n, FULL_INTERLACE );
768  for ( Index i=0; i<n; i++ )
769  x[i] = a[i];
770  }
771  */
772  else
773  {
774  ostringstream os;
775  os << "Files with data type " << type_in_file << " are not handled";
776  throw runtime_error(os.str());
777  }
778  }
779 }
780 
781 
782 
784 // Functions to read and write binary data for ARTS data types
786 
788 
800  const String& filename,
801  const int& fid,
802  const Index& x,
803  const String& dataname )
804 {
805  /*
806  Index a[1];
807  a[0] = x;
808  binfile_write( fid, filename, dataname, "SCALAR", "INDEX", 1, 1,
809  (uint8*)a );
810  */
811  binfile_write( fid, filename, dataname, "SCALAR", "INDEX", 1, 1,
812  (uint8*)&x );
813 }
814 
815 
816 
818 
829 void binfile_read_index(
830  Index& x,
831  const String& filename,
832  const int& fid,
833  const String& dataname )
834 {
835  int vdata_id;
836  Index nrows, ncols;
837  ArrayOfIndex a;
838 
839  binfile_read_init( vdata_id, nrows, ncols, fid, filename, dataname,
840  "SCALAR", 1, 1 );
841  binfile_read1( a, vdata_id, nrows, filename, dataname );
842  x = a[0];
843  binfile_read_end( vdata_id, filename, dataname );
844 }
845 
846 
847 
849 
861  const String& filename,
862  const int& fid,
863  const Numeric& x,
864  const String& dataname )
865 {
866  //Numeric a[1];
867  //a[0] = x;
868  binfile_write( fid, filename, dataname, "SCALAR", "NUMERIC", 1, 1,
869  (uint8*)&x );
870 }
871 
872 
873 
875 
887  Numeric& x,
888  const String& filename,
889  const int& fid,
890  const String& dataname )
891 {
892  int vdata_id;
893  Index nrows, ncols;
894  Matrix a;
895 
896  binfile_read_init( vdata_id, nrows, ncols, fid, filename, dataname,
897  "SCALAR", 1, 1 );
898  binfile_read2( a, vdata_id, nrows, ncols, filename, dataname );
899  x = a(0,0);
900  binfile_read_end( vdata_id, filename, dataname );
901 }
902 
903 
904 
906 
918  const String& filename,
919  const int& fid,
920  const Vector& x,
921  const String& dataname )
922 {
923  const Index n = x.nelem();
924 
925  Numeric *a = new Numeric[n];
926  for ( Index i=0; i<n; i++ )
927  a[i] = x[i];
928 
929  binfile_write( fid, filename, dataname, "VECTOR", "NUMERIC", n, 1,
930  (uint8*)a );
931 
932  delete a;
933 }
934 
935 
936 
938 
950  Vector& x,
951  const String& filename,
952  const int& fid,
953  const String& dataname )
954 {
955  int vdata_id;
956  Index nrows, ncols;
957  Matrix a;
958 
959  binfile_read_init( vdata_id, nrows, ncols, fid, filename, dataname,
960  "VECTOR", 0, 1 );
961  binfile_read2( a, vdata_id, nrows, ncols, filename, dataname );
962  x.resize(nrows);
963  for ( Index i=0; i<nrows; i++ )
964  x[i] = a(i,0);
965  binfile_read_end( vdata_id, filename, dataname );
966 }
967 
968 
969 
971 
987  const String& filename,
988  const int& fid,
989  const Matrix& x,
990  const String& dataname )
991 {
992  const Index nrows = x.nrows();
993  const Index ncols = x.ncols();
994 
995  Numeric *a = new Numeric[nrows*ncols];
996  for ( Index r=0; r<nrows; r++ )
997  for ( Index c=0; c<ncols; c++ )
998  a[r*ncols+c] = x(r,c);
999 
1000  binfile_write( fid, filename, dataname, "MATRIX", "NUMERIC", nrows, ncols,
1001  (uint8*)a );
1002  delete a;
1003 }
1004 
1005 
1006 
1008 
1019 void binfile_read_matrix(
1020  Matrix& x,
1021  const String& filename,
1022  const int& fid,
1023  const String& dataname )
1024 {
1025  int vdata_id;
1026  Index nrows, ncols;
1027 
1028  binfile_read_init( vdata_id, nrows, ncols, fid, filename, dataname,
1029  "MATRIX", 0, 0 );
1030  binfile_read2( x, vdata_id, nrows, ncols, filename, dataname );
1031  binfile_read_end( vdata_id, filename, dataname );
1032 }
1033 
1034 
1035 
1037 
1049  const String& filename,
1050  const int& fid,
1051  const ArrayOfIndex& x,
1052  const String& dataname )
1053 {
1054  const Index n = x.nelem();
1055 
1056  /*
1057  Index a[n];
1058  for ( Index i=0; i<n; i++ )
1059  a[i] = x[i];
1060  binfile_write( fid, filename, dataname, "ARRAY", "INDEX", n, 1,
1061  (uint8*)a );
1062  */
1063  binfile_write( fid, filename, dataname, "ARRAY", "INDEX", n, 1,
1064  (uint8*)&x[0] );
1065 }
1066 
1067 
1068 
1070 
1082  ArrayOfIndex& x,
1083  const String& filename,
1084  const int& fid,
1085  const String& dataname )
1086 {
1087  int vdata_id;
1088  Index nrows, ncols;
1089 
1090  binfile_read_init( vdata_id, nrows, ncols, fid, filename, dataname,
1091  "ARRAY", 0, 1 );
1092  binfile_read1( x, vdata_id, nrows, filename, dataname );
1093  binfile_read_end( vdata_id, filename, dataname );
1094 }
1095 
1096 
1097 
1099 
1111  const String& filename,
1112  const int& fid,
1113  const ArrayOfVector& x,
1114  const String& dataname )
1115 {
1116  const Index n = x.nelem();
1117 
1118  // Write number of vectors
1119  binfile_write_index( filename, fid, n, "N_"+dataname );
1120 
1121  // Write each matrix seperately
1122  for (Index i=0; i<n; i++ )
1123  {
1124  ostringstream os;
1125  os << dataname << i;
1126  binfile_write_vector( filename, fid, x[i], os.str() );
1127  }
1128 }
1129 
1130 
1131 
1133 
1145  ArrayOfVector& x,
1146  const String& filename,
1147  const int& fid,
1148  const String& dataname )
1149 {
1150  // Read the number of vectors
1151  Index n;
1152  binfile_read_index( n, filename, fid, "N_"+dataname );
1153 
1154  // Reallocate x and read vectors
1155  x.resize(n);
1156  for (Index i=0; i<n; i++ )
1157  {
1158  ostringstream os;
1159  os << dataname << i;
1160  binfile_read_vector( x[i], filename, fid, os.str() );
1161  }
1162 }
1163 
1164 
1165 
1167 
1179  const String& filename,
1180  const int& fid,
1181  const ArrayOfMatrix& x,
1182  const String& dataname )
1183 {
1184  const Index n = x.nelem();
1185 
1186  // Write number of matrices
1187  binfile_write_index( filename, fid, n, "N_"+dataname );
1188 
1189  // Write each matrix seperately
1190  for ( Index i=0; i<n; i++ )
1191  {
1192  ostringstream os;
1193  os << dataname << i;
1194  binfile_write_matrix( filename, fid, x[i], os.str() );
1195  }
1196 }
1197 
1198 
1199 
1201 
1213  ArrayOfMatrix& x,
1214  const String& filename,
1215  const int& fid,
1216  const String& dataname )
1217 {
1218  // Read the number of matrices
1219  Index n;
1220  binfile_read_index( n, filename, fid, "N_"+dataname );
1221 
1222  // Reallocate x and read matrices
1223  x.resize(n);
1224  for (Index i=0; i<n; i++ )
1225  {
1226  ostringstream os;
1227  os << dataname << i;
1228  binfile_read_matrix( x[i], filename, fid, os.str() );
1229  }
1230 }
1231 
1232 
1233 
1235 
1247  const String& filename,
1248  const int& fid,
1249  const String& s,
1250  const String& dataname )
1251 {
1252  const Index n = (Index)s.length();
1253 
1254  binfile_write( fid, filename, dataname, "STRING", "CHAR", n, 1,
1255  (uint8*)s.c_str() );
1256 }
1257 
1258 
1259 
1261 
1272 void binfile_read_String(
1273  String& x,
1274  const String& filename,
1275  const int& fid,
1276  const String& dataname )
1277 {
1278  int vdata_id;
1279  Index nrows, ncols;
1280 
1281  binfile_read_init( vdata_id, nrows, ncols, fid, filename, dataname,
1282  "STRING", 0, 1 );
1283  binfile_read3( x, vdata_id, nrows, filename, dataname );
1284  binfile_read_end( vdata_id, filename, dataname );
1285 }
1286 
1287 
1288 
1290 
1302  const String& filename,
1303  const int& fid,
1304  const ArrayOfString& x,
1305  const String& dataname )
1306 {
1307  const Index n = x.nelem();
1308 
1309  // Write number of matrices
1310  binfile_write_index( filename, fid, n, "N_"+dataname );
1311 
1312  // Write each String seperately
1313  for ( Index i=0; i<n; i++ )
1314  {
1315  ostringstream os;
1316  os << dataname << i;
1317  binfile_write_String( filename, fid, x[i], os.str() );
1318  }
1319 }
1320 
1321 
1322 
1324 
1336  ArrayOfString& x,
1337  const String& filename,
1338  const int& fid,
1339  const String& dataname )
1340 {
1341  // Read the number of matrices
1342  Index n;
1343  binfile_read_index( n, filename, fid, "N_"+dataname );
1344 
1345  // Reallocate x and read matrices
1346  x.resize(n);
1347  for (Index i=0; i<n; i++ )
1348  {
1349  ostringstream os;
1350  os << dataname << i;
1351  binfile_read_String( x[i], filename, fid, os.str() );
1352  }
1353 }
1354 
1355 #endif // HDF_SUPPORT
1356 
1357 
1358 
1360 // The workspace methods (sorted after workspace variable)
1362 
1363 //=== Index ============================================================
1364 
1371 // This function shall be modified to handle Index
1372 #ifdef HDF_SUPPORT
1373 void IndexWriteBinary(
1374  const Index& v,
1375  const String& var_name,
1376  const String& f )
1377 {
1378  int fid;
1379  String filename = f;
1380  filename_bin( filename, var_name );
1381  binfile_open_out( fid, filename );
1382  binfile_write_index( filename, fid, v, "Index" );
1383  binfile_close( fid, filename );
1384 }
1385 #else
1387  const Index& /* v */,
1388  const String& /* var_name */,
1389  const String& /* f */ )
1390 {
1391  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1392 }
1393 #endif // HDF_SUPPORT
1394 
1395 
1396 
1403 // This function shall be modified to handle Index
1404 #ifdef HDF_SUPPORT
1405 void IndexReadBinary(
1406  Index& v,
1407  const String& var_name,
1408  const String& f )
1409 {
1410  Index vtemp; //To be removed
1411  int fid;
1412  String filename = f;
1413  filename_bin( filename, var_name );
1414  binfile_open_in( fid, filename );
1415  binfile_read_index( vtemp, filename, fid, "Index" );
1416  v = (int) vtemp;
1417  binfile_close( fid, filename );
1418 }
1419 #else
1421  Index& /* v */,
1422  const String& /* var_name */,
1423  const String& /* f */ )
1424 {
1425  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1426 }
1427 #endif // HDF_SUPPORT
1428 
1429 
1430 //=== NUMERIC ==========================================================
1431 
1438 #ifdef HDF_SUPPORT
1439 void NumericWriteBinary(
1440  const Numeric& v,
1441  const String& var_name,
1442  const String& f )
1443 {
1444  int fid;
1445  String filename = f;
1446  filename_bin( filename, var_name );
1447  binfile_open_out( fid, filename );
1448  binfile_write_numeric( filename, fid, v, "NUMERIC" );
1449  binfile_close( fid, filename );
1450 }
1451 #else
1453  const Numeric& /* v */,
1454  const String& /* var_name */,
1455  const String& /* f */ )
1456 {
1457  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1458 }
1459 #endif // HDF_SUPPORT
1460 
1461 
1462 
1463 
1470 #ifdef HDF_SUPPORT
1471 void NumericReadBinary(
1472  Numeric& v,
1473  const String& var_name,
1474  const String& f )
1475 {
1476  int fid;
1477  String filename = f;
1478  filename_bin( filename, var_name );
1479  binfile_open_in( fid, filename );
1480  binfile_read_numeric( v, filename, fid, "NUMERIC" );
1481  binfile_close( fid, filename );
1482 }
1483 #else
1485  Numeric& /* v */,
1486  const String& /* var_name */,
1487  const String& /* f */ )
1488 {
1489  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1490 }
1491 #endif // HDF_SUPPORT
1492 
1493 
1494 
1495 
1496 //=== Vector ==========================================================
1497 
1504 #ifdef HDF_SUPPORT
1505 void VectorWriteBinary(
1506  const Vector& v,
1507  const String& var_name,
1508  const String& f )
1509 {
1510  int fid;
1511  String filename = f;
1512  filename_bin( filename, var_name );
1513  binfile_open_out( fid, filename );
1514  binfile_write_vector( filename, fid, v, "VECTOR" );
1515  binfile_close( fid, filename );
1516 }
1517 #else
1519  const Vector& /* v */,
1520  const String& /* var_name */,
1521  const String& /* f */ )
1522 {
1523  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1524 }
1525 #endif // HDF_SUPPORT
1526 
1527 
1528 
1529 
1536 #ifdef HDF_SUPPORT
1537 void VectorReadBinary(
1538  Vector& v,
1539  const String& var_name,
1540  const String& f )
1541 {
1542  int fid;
1543  String filename = f;
1544  filename_bin( filename, var_name );
1545  binfile_open_in( fid, filename );
1546  binfile_read_vector( v, filename, fid, "VECTOR" );
1547  binfile_close( fid, filename );
1548 }
1549 #else
1551  Vector& /* v */,
1552  const String& /* var_name */,
1553  const String& /* f */ )
1554 {
1555  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1556 }
1557 #endif // HDF_SUPPORT
1558 
1559 
1560 
1561 
1562 //=== Matrix ==========================================================
1563 
1570 #ifdef HDF_SUPPORT
1571 void MatrixWriteBinary(
1572  const Matrix& v,
1573  const String& var_name,
1574  const String& f )
1575 {
1576  int fid;
1577  String filename = f;
1578  filename_bin( filename, var_name );
1579  binfile_open_out( fid, filename );
1580  binfile_write_matrix( filename, fid, v, "MATRIX" );
1581  binfile_close( fid, filename );
1582 }
1583 #else
1585  const Matrix& /* v */,
1586  const String& /* var_name */,
1587  const String& /* f */ )
1588 {
1589  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1590 }
1591 #endif // HDF_SUPPORT
1592 
1593 
1594 
1595 
1602 #ifdef HDF_SUPPORT
1603 void MatrixReadBinary(
1604  Matrix& v,
1605  const String& var_name,
1606  const String& f )
1607 {
1608  int fid;
1609  String filename = f;
1610  filename_bin( filename, var_name );
1611  binfile_open_in( fid, filename );
1612  binfile_read_matrix( v, filename, fid, "MATRIX" );
1613  binfile_close( fid, filename );
1614 }
1615 #else
1617  Matrix& /* v */,
1618  const String& /* var_name */,
1619  const String& /* f */ )
1620 {
1621  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1622 }
1623 #endif // HDF_SUPPORT
1624 
1625 
1626 
1627 
1628 //=== ArrayOfIndex =====================================================
1629 
1636 #ifdef HDF_SUPPORT
1638  const ArrayOfIndex& v,
1639  const String& var_name,
1640  const String& f )
1641 {
1642  int fid;
1643  String filename = f;
1644  filename_bin( filename, var_name );
1645  binfile_open_out( fid, filename );
1646  binfile_write_indexarray( filename, fid, v, "INDEXARRAY" );
1647  binfile_close( fid, filename );
1648 }
1649 #else
1651  const ArrayOfIndex& /* v */,
1652  const String& /* var_name */,
1653  const String& /* f */ )
1654 {
1655  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1656 }
1657 #endif // HDF_SUPPORT
1658 
1659 
1660 
1661 
1668 #ifdef HDF_SUPPORT
1670  ArrayOfIndex& v,
1671  const String& var_name,
1672  const String& f )
1673 {
1674  int fid;
1675  String filename = f;
1676  filename_bin( filename, var_name );
1677  binfile_open_in( fid, filename );
1678  binfile_read_indexarray( v, filename, fid, "INDEXARRAY" );
1679  binfile_close( fid, filename );
1680 }
1681 #else
1683  ArrayOfIndex& /* v */,
1684  const String& /* var_name */,
1685  const String& /* f */ )
1686 {
1687  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1688 }
1689 #endif // HDF_SUPPORT
1690 
1691 
1692 
1693 
1694 //=== ArrayOfVector ====================================================
1695 
1702 #ifdef HDF_SUPPORT
1704  const ArrayOfVector& v,
1705  const String& var_name,
1706  const String& f )
1707 {
1708  int fid;
1709  String filename = f;
1710  filename_bin( filename, var_name );
1711  binfile_open_out( fid, filename );
1712  binfile_write_vectorarray( filename, fid, v, "VECTOR" );
1713  binfile_close( fid, filename );
1714 }
1715 #else
1717  const ArrayOfVector& /* v */,
1718  const String& /* var_name */,
1719  const String& /* f */ )
1720 {
1721  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1722 }
1723 #endif // HDF_SUPPORT
1724 
1725 
1726 
1727 
1734 #ifdef HDF_SUPPORT
1736  ArrayOfVector& v,
1737  const String& var_name,
1738  const String& f )
1739 {
1740  int fid;
1741  String filename = f;
1742  filename_bin( filename, var_name );
1743  binfile_open_in( fid, filename );
1744  binfile_read_vectorarray( v, filename, fid, "VECTOR" );
1745  binfile_close( fid, filename );
1746 }
1747 #else
1749  ArrayOfVector& /* v */,
1750  const String& /* var_name */,
1751  const String& /* f */ )
1752 {
1753  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1754 }
1755 #endif // HDF_SUPPORT
1756 
1757 
1758 
1759 
1760 //=== ArrayOfMatrix ====================================================
1761 
1768 #ifdef HDF_SUPPORT
1770  const ArrayOfMatrix& v,
1771  const String& var_name,
1772  const String& f )
1773 {
1774  int fid;
1775  String filename = f;
1776  filename_bin( filename, var_name );
1777  binfile_open_out( fid, filename );
1778  binfile_write_matrixarray( filename, fid, v, "MATRIX" );
1779  binfile_close( fid, filename );
1780 }
1781 #else
1783  const ArrayOfMatrix& /* v */,
1784  const String& /* var_name */,
1785  const String& /* f */ )
1786 {
1787  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1788 }
1789 #endif // HDF_SUPPORT
1790 
1791 
1792 
1793 
1800 #ifdef HDF_SUPPORT
1802  ArrayOfMatrix& v,
1803  const String& var_name,
1804  const String& f )
1805 {
1806  int fid;
1807  String filename = f;
1808  filename_bin( filename, var_name );
1809  binfile_open_in( fid, filename );
1810  binfile_read_matrixarray( v, filename, fid, "MATRIX" );
1811  binfile_close( fid, filename );
1812 }
1813 #else
1815  ArrayOfMatrix& /* v */,
1816  const String& /* var_name */,
1817  const String& /* f */ )
1818 {
1819  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1820 }
1821 #endif // HDF_SUPPORT
1822 
1823 
1824 
1825 
1826 //=== STRING ===============================================================
1827 
1834 #ifdef HDF_SUPPORT
1835 void StringWriteBinary(
1836  const String& v,
1837  const String& var_name,
1838  const String& f )
1839 {
1840  int fid;
1841  String filename = f;
1842  filename_bin( filename, var_name );
1843  binfile_open_out( fid, filename );
1844  binfile_write_String( filename, fid, v, "STRING" );
1845  binfile_close( fid, filename );
1846 }
1847 #else
1849  const String& /* v */,
1850  const String& /* var_name */,
1851  const String& /* f */ )
1852 {
1853  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1854 }
1855 #endif // HDF_SUPPORT
1856 
1857 
1858 
1859 
1866 #ifdef HDF_SUPPORT
1867 void StringReadBinary(
1868  String& v,
1869  const String& var_name,
1870  const String& f )
1871 {
1872  int fid;
1873  String filename = f;
1874  filename_bin( filename, var_name );
1875  binfile_open_in( fid, filename );
1876  binfile_read_String( v, filename, fid, "STRING" );
1877  binfile_close( fid, filename );
1878 }
1879 #else
1881  String& /* v */,
1882  const String& /* var_name */,
1883  const String& /* f */ )
1884 {
1885  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1886 }
1887 #endif // HDF_SUPPORT
1888 
1889 
1890 
1891 
1892 //=== ArrayOfString ====================================================
1893 
1900 #ifdef HDF_SUPPORT
1902  const ArrayOfString& v,
1903  const String& var_name,
1904  const String& f )
1905 {
1906  int fid;
1907  String filename = f;
1908  filename_bin( filename, var_name );
1909  binfile_open_out( fid, filename );
1910  binfile_write_Stringarray( filename, fid, v, "STRING" );
1911  binfile_close( fid, filename );
1912 }
1913 #else
1915  const ArrayOfString& /* v */,
1916  const String& /* var_name */,
1917  const String& /* f */ )
1918 {
1919  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1920 }
1921 #endif // HDF_SUPPORT
1922 
1923 
1924 
1925 
1932 #ifdef HDF_SUPPORT
1934  ArrayOfString& v,
1935  const String& var_name,
1936  const String& f )
1937 {
1938  int fid;
1939  String filename = f;
1940  filename_bin( filename, var_name );
1941  binfile_open_in( fid, filename );
1942  binfile_read_Stringarray( v, filename, fid, "STRING" );
1943  binfile_close( fid, filename );
1944 }
1945 #else
1947  ArrayOfString& /* v */,
1948  const String& /* var_name */,
1949  const String& /* f */ )
1950 {
1951  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1952 }
1953 #endif // HDF_SUPPORT
1954 
1955 
1956 
1957 
1958 //=== LOS ==================================================================
1959 
1966 #ifdef HDF_SUPPORT
1967 void LosWriteBinary(
1968  const Los& los,
1969  const String& var_name,
1970  const String& f )
1971 {
1972  int fid;
1973  String filename = f;
1974  filename_bin( filename, var_name );
1975 
1976  binfile_open_out( fid, filename );
1977  binfile_write_vectorarray( filename, fid, los.p, "LOS.P" );
1978  binfile_write_vectorarray( filename, fid, los.psi, "LOS.PSI" );
1979  binfile_write_vectorarray( filename, fid, los.z, "LOS.Z" );
1980  binfile_write_vector( filename, fid, los.l_step, "LOS.L_STEP" );
1981  binfile_write_indexarray( filename, fid, los.ground, "LOS.GROUND" );
1982  binfile_write_indexarray( filename, fid, los.start, "LOS.START" );
1983  binfile_write_indexarray( filename, fid, los.stop, "LOS.STOP" );
1984  binfile_close( fid, filename );
1985 }
1986 #else
1988  const Los& /* v */,
1989  const String& /* var_name */,
1990  const String& /* f */ )
1991 {
1992  throw runtime_error("This method is only available when arts is compiled with HDF support.");
1993 }
1994 #endif // HDF_SUPPORT
1995 
1996 
1997 
1998 
2005 #ifdef HDF_SUPPORT
2006 void LosReadBinary(
2007  Los& los,
2008  const String& var_name,
2009  const String& f )
2010 {
2011  int fid;
2012  String filename = f;
2013  filename_bin( filename, var_name );
2014 
2015  binfile_open_in( fid, filename );
2016  binfile_read_vectorarray( los.p, filename, fid, "LOS.P" );
2017  binfile_read_vectorarray( los.psi, filename, fid, "LOS.PSI" );
2018  binfile_read_vectorarray( los.z, filename, fid, "LOS.Z" );
2019  binfile_read_vector( los.l_step, filename, fid, "LOS.L_STEP" );
2020  binfile_read_indexarray( los.ground, filename, fid, "LOS.GROUND" );
2021  binfile_read_indexarray( los.start, filename, fid, "LOS.START" );
2022  binfile_read_indexarray( los.stop, filename, fid, "LOS.STOP" );
2023  binfile_close( fid, filename );
2024 }
2025 #else
2027  Los& /* v */,
2028  const String& /* var_name */,
2029  const String& /* f */ )
2030 {
2031  throw runtime_error("This method is only available when arts is compiled with HDF support.");
2032 }
2033 #endif // HDF_SUPPORT
2034 
Matrix
The Matrix class.
Definition: matpackI.h:544
Los::psi
ArrayOfVector psi
Definition: los.h:105
binfile_write_vector
void binfile_write_vector(const String &filename, const int &fid, const Vector &x, const String &dataname)
out2
Out2 out2
Level 2 output stream.
Definition: messages.cc:54
ArrayOfMatrixReadBinary
void ArrayOfMatrixReadBinary(ArrayOfMatrix &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1814
Los::z
ArrayOfVector z
Definition: los.h:106
StringReadBinary
void StringReadBinary(String &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1880
auto_md.h
LosReadBinary
void LosReadBinary(Los &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:2026
NumericWriteBinary
void NumericWriteBinary(const Numeric &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1452
binfile_write_Stringarray
void binfile_write_Stringarray(const String &filename, const int &fid, const ArrayOfString &x, const String &dataname)
atm_funcs.h
This file contains declerations of functions releated to atmospheric physics or geometry.
ArrayOfMatrixWriteBinary
void ArrayOfMatrixWriteBinary(const ArrayOfMatrix &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1782
ArrayOfStringReadBinary
void ArrayOfStringReadBinary(ArrayOfString &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1946
Vector::resize
void resize(Index n)
Resize function.
Definition: matpackI.h:1467
MatrixReadBinary
void MatrixReadBinary(Matrix &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1616
binfile_write_vectorarray
void binfile_write_vectorarray(const String &filename, const int &fid, const ArrayOfVector &x, const String &dataname)
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.h:1491
binfile_write_indexarray
void binfile_write_indexarray(const String &filename, const int &fid, const ArrayOfIndex &x, const String &dataname)
binfile_write_matrixarray
void binfile_write_matrixarray(const String &filename, const int &fid, const ArrayOfMatrix &x, const String &dataname)
StringWriteBinary
void StringWriteBinary(const String &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1848
ArrayOfVectorWriteBinary
void ArrayOfVectorWriteBinary(const ArrayOfVector &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1716
binfile_close
void binfile_close(int &fid, const String &filename)
Array
This can be used to make arrays out of anything.
Definition: array.h:48
binfile_read_matrixarray
void binfile_read_matrixarray(ArrayOfMatrix &x, const String &filename, const int &fid, const String &dataname)
binfile_read_String
void binfile_read_String(String &x, const String &filename, const int &fid, const String &dataname)
binfile_read_index
void binfile_read_index(Index &x, const String &filename, const int &fid, const String &dataname)
binfile_read_matrix
void binfile_read_matrix(Matrix &x, const String &filename, const int &fid, const String &dataname)
filename_bin
void filename_bin(String &filename, const String &varname)
LosWriteBinary
void LosWriteBinary(const Los &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1987
VectorReadBinary
void VectorReadBinary(Vector &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1550
messages.h
Declarations having to do with the four output streams.
IndexReadBinary
void IndexReadBinary(Index &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1420
binfile_write_numeric
void binfile_write_numeric(const String &filename, const int &fid, const Numeric &x, const String &dataname)
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.h:1497
my_basic_string< char >
binfile_read_Stringarray
void binfile_read_Stringarray(ArrayOfString &x, const String &filename, const int &fid, const String &dataname)
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: arts.h:147
binfile_write_matrix
void binfile_write_matrix(const String &filename, const int &fid, const Matrix &x, const String &dataname)
binfile_read_numeric
void binfile_read_numeric(Numeric &x, const String &filename, const int &fid, const String &dataname)
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.h:937
Los::p
ArrayOfVector p
Definition: los.h:104
binfile_write_index
void binfile_write_index(const String &filename, const int &fid, const Index &x, const String &dataname)
make_array.h
Implements the class MakeArray, which is a derived class of Array, allowing explicit initialization.
math_funcs.h
Contains declerations of basic mathematical and vector/matrix functions.
ArrayOfVectorReadBinary
void ArrayOfVectorReadBinary(ArrayOfVector &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1748
Matrix::resize
void resize(Index r, Index c)
Resize function.
Definition: matpackI.h:2237
Los::stop
ArrayOfIndex stop
Definition: los.h:110
out_basename
String out_basename
The basename for the report file and for all other output files.
Definition: messages.cc:38
binfile_read_vector
void binfile_read_vector(Vector &x, const String &filename, const int &fid, const String &dataname)
binfile_open_in
void binfile_open_in(int &fid, const String &filename)
binfile_write_String
void binfile_write_String(const String &filename, const int &fid, const String &s, const String &dataname)
out3
Out3 out3
Level 3 output stream.
Definition: messages.cc:56
VectorWriteBinary
void VectorWriteBinary(const Vector &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1518
binfile_read_vectorarray
void binfile_read_vectorarray(ArrayOfVector &x, const String &filename, const int &fid, const String &dataname)
ArrayOfIndexWriteBinary
void ArrayOfIndexWriteBinary(const ArrayOfIndex &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1650
Los::start
ArrayOfIndex start
Definition: los.h:109
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: arts.h:153
NumericReadBinary
void NumericReadBinary(Numeric &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1484
binfile_read_indexarray
void binfile_read_indexarray(ArrayOfIndex &x, const String &filename, const int &fid, const String &dataname)
IndexWriteBinary
void IndexWriteBinary(const Index &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1386
Los::l_step
Vector l_step
Definition: los.h:107
ArrayOfIndexReadBinary
void ArrayOfIndexReadBinary(ArrayOfIndex &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1682
Vector
The Vector class.
Definition: matpackI.h:389
ArrayOfStringWriteBinary
void ArrayOfStringWriteBinary(const ArrayOfString &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1914
Los::ground
ArrayOfIndex ground
Definition: los.h:108
Los
The line of sight (LOS).
Definition: los.h:103
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:115
MatrixWriteBinary
void MatrixWriteBinary(const Matrix &, const String &, const String &)
See the the online help (arts -d FUNCTION_NAME)
Definition: m_hdf.cc:1584
binfile_open_out
void binfile_open_out(int &fid, const String &filename)
arts.h
The global header file for ARTS.