61 #define MHDPATH "/mhd/MHD_STAT_XXXXXXXXXX/"
66 f, qid, __FILE__, __LINE__) ) {
return 1;}
68 f, qid, __FILE__, __LINE__) ) {
return 1;}
70 f, qid, __FILE__, __LINE__) ) {
return 1;}
72 f, qid, __FILE__, __LINE__) ) {
return 1;}
74 int* moden = (
int*) malloc( nmode *
sizeof(
int) );
75 int* modem = (
int*) malloc( nmode *
sizeof(
int) );
78 real* amplitude_nm = (
real*)malloc( nmode *
sizeof(
real) );
80 f, qid, __FILE__, __LINE__) ) {
return 1;}
82 f, qid, __FILE__, __LINE__) ) {
return 1;}
84 f, qid, __FILE__, __LINE__) ) {
return 1;}
86 f, qid, __FILE__, __LINE__) ) {
return 1;}
88 f, qid, __FILE__, __LINE__) ) {
return 1;}
91 real* phi = (
real*) malloc( nrho * nmode *
sizeof(
real) );
92 real* alpha = (
real*) malloc( nrho * nmode *
sizeof(
real) );
94 f, qid, __FILE__, __LINE__) ) {
return 1;}
96 f, qid, __FILE__, __LINE__) ) {
return 1;}
98 int err =
mhd_stat_init(data, nmode, nrho, rhomin, rhomax, moden, modem,
99 amplitude_nm, omega_nm, phase_nm, alpha, phi);
114 #define MHDPATH "/mhd/MHD_NONSTAT_XXXXXXXXXX/"
116 int nmode, nrho, ntime;
117 real rhomin, rhomax, tmin, tmax;
119 f, qid, __FILE__, __LINE__) ) {
return 1;}
121 f, qid, __FILE__, __LINE__) ) {
return 1;}
123 f, qid, __FILE__, __LINE__) ) {
return 1;}
125 f, qid, __FILE__, __LINE__) ) {
return 1;}
127 f, qid, __FILE__, __LINE__) ) {
return 1;}
129 f, qid, __FILE__, __LINE__) ) {
return 1;}
131 f, qid, __FILE__, __LINE__) ) {
return 1;}
133 int* moden = (
int*) malloc( nmode *
sizeof(
int) );
134 int* modem = (
int*) malloc( nmode *
sizeof(
int) );
135 real* omega_nm = (
real*) malloc( nmode *
sizeof(
real) );
136 real* phase_nm = (
real*) malloc( nmode *
sizeof(
real) );
137 real* amplitude_nm = (
real*)malloc( nmode *
sizeof(
real) );
139 f, qid, __FILE__, __LINE__) ) {
return 1;}
141 f, qid, __FILE__, __LINE__) ) {
return 1;}
143 f, qid, __FILE__, __LINE__) ) {
return 1;}
145 f, qid, __FILE__, __LINE__) ) {
return 1;}
147 f, qid, __FILE__, __LINE__) ) {
return 1;}
150 real* phi = (
real*) malloc( nrho * ntime * nmode *
sizeof(
real) );
151 real* alpha = (
real*) malloc( nrho * ntime * nmode *
sizeof(
real) );
153 f, qid, __FILE__, __LINE__) ) {
return 1;}
155 f, qid, __FILE__, __LINE__) ) {
return 1;}
158 tmin, tmax, moden, modem, amplitude_nm,
159 omega_nm, phase_nm, alpha, phi);
int hdf5_read_double(const char *var, real *ptr, hid_t file, char *qid, const char *errfile, int errline)
Read double-valued data from ASCOT5 HDF5 file.
int hdf5_read_int(const char *var, int *ptr, hid_t file, char *qid, const char *errfile, int errline)
Read int-valued data from ASCOT5 HDF5 file.
int mhd_nonstat_init(mhd_nonstat_data *data, int nmode, int nrho, int ntime, real rhomin, real rhomax, real tmin, real tmax, int *moden, int *modem, real *amplitude_nm, real *omega_nm, real *phase_nm, real *alpha, real *phi)
Load MHD data.
int mhd_stat_init(mhd_stat_data *data, int nmode, int nrho, real rhomin, real rhomax, int *moden, int *modem, real *amplitude_nm, real *omega_nm, real *phase_nm, real *alpha, real *phi)
Load MHD data.