GPLIB++
ReadWriteImpedances.h
Go to the documentation of this file.
1 //============================================================================
2 // Name : ReadWriteImpedances.h
3 // Author : Jul 13, 2009
4 // Version :
5 // Copyright : 2009, mmoorkamp
6 //============================================================================
7 
8 
9 #ifndef READWRITEIMPEDANCES_H_
10 #define READWRITEIMPEDANCES_H_
11 
12 #include "../Global/VecMat.h"
13 
14 namespace gplib
15  {
16  /** \addtogroup mtmodelling Forward modelling of magnetotelluric data */
17  /* @{ */
18  //! Write magnetotelluric impedances to a netcdf file
19  /*! We can save MT impedances for several stations in a netcdf file for storage
20  * and analysis with external programs.
21  * @param filename The name for the netcdf file
22  * @param Frequencies The vector of frequencies in Hz for the impedances in the vector Impedances
23  * @param StatXCoord The x-coordinates (North) of the measurement stations for the impedances in m
24  * @param StatYCoord The y-coordinates (East) of the measurement stations for the impedances in m
25  * @param StatZCoord The z-coordinates (Down) of the measurement stations for the impedances in m
26  * @param Impedances The impedances as a vector of real numbers. 8 consecutive elements form the impedance matrix for one frequency and site, all impedances for one frequency and all stations form a contiguous block, the frequencies vary slowest.
27  */
28  void WriteImpedancesToNetCDF(const std::string &filename,
29  const std::vector<double> &Frequencies,
30  const std::vector<double> &StatXCoord,
31  const std::vector<double> &StatYCoord,
32  const std::vector<double> &StatZCoord, const gplib::rvec &Impedances);
33 
34  //! Read magnetotelluric impedances from a netcdf file
35  /*! Read MT impedances for several stations from a netcdf file.
36  * @param filename The name for the netcdf file
37  * @param Frequencies The vector of frequencies in Hz for the impedances in the vector Impedances
38  * @param StatXCoord The x-coordinates (North) of the measurement stations for the impedances in m
39  * @param StatYCoord The y-coordinates (East) of the measurement stations for the impedances in m
40  * @param StatZCoord The z-coordinates (Down) of the measurement stations for the impedances in m
41  * @param Impedances The impedances as a vector of real numbers. 8 consecutive elements form the impedance matrix for one frequency and site, all impedances for one frequency and all stations form a contiguous block, the frequencies vary slowest.
42  */
43  void ReadImpedancesFromNetCDF(const std::string &filename, std::vector<
44  double> &Frequencies, std::vector<double> &StatXCoord, std::vector<
45  double> &StatYCoord, std::vector<double> &StatZCoord,
46  gplib::rvec &Impedances);
47  /* @} */
48  }
49 
50 #endif /* READWRITEIMPEDANCES_H_ */
void ReadImpedancesFromNetCDF(const std::string &filename, std::vector< double > &Frequencies, std::vector< double > &StatXCoord, std::vector< double > &StatYCoord, std::vector< double > &StatZCoord, gplib::rvec &Impedances)
Read magnetotelluric impedances from a netcdf file.
void WriteImpedancesToNetCDF(const std::string &filename, const std::vector< double > &Frequencies, const std::vector< double > &StatXCoord, const std::vector< double > &StatYCoord, const std::vector< double > &StatZCoord, const gplib::rvec &Impedances)
Write magnetotelluric impedances to a netcdf file.