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);
121 #define MHDPATH "/mhd/MHD_NONSTAT_XXXXXXXXXX/"
123 int nmode, nrho, ntime;
124 real rhomin, rhomax, tmin, tmax;
126 f, qid, __FILE__, __LINE__) ) {
return 1;}
128 f, qid, __FILE__, __LINE__) ) {
return 1;}
130 f, qid, __FILE__, __LINE__) ) {
return 1;}
132 f, qid, __FILE__, __LINE__) ) {
return 1;}
134 f, qid, __FILE__, __LINE__) ) {
return 1;}
136 f, qid, __FILE__, __LINE__) ) {
return 1;}
138 f, qid, __FILE__, __LINE__) ) {
return 1;}
140 int* moden = (
int*) malloc( nmode *
sizeof(
int) );
141 int* modem = (
int*) malloc( nmode *
sizeof(
int) );
142 real* omega_nm = (
real*) malloc( nmode *
sizeof(
real) );
143 real* phase_nm = (
real*) malloc( nmode *
sizeof(
real) );
144 real* amplitude_nm = (
real*)malloc( nmode *
sizeof(
real) );
146 f, qid, __FILE__, __LINE__) ) {
return 1;}
148 f, qid, __FILE__, __LINE__) ) {
return 1;}
150 f, qid, __FILE__, __LINE__) ) {
return 1;}
152 f, qid, __FILE__, __LINE__) ) {
return 1;}
154 f, qid, __FILE__, __LINE__) ) {
return 1;}
157 real* phi = (
real*) malloc( nrho * ntime * nmode *
sizeof(
real) );
158 real* alpha = (
real*) malloc( nrho * ntime * nmode *
sizeof(
real) );
160 f, qid, __FILE__, __LINE__) ) {
return 1;}
162 f, qid, __FILE__, __LINE__) ) {
return 1;}
165 tmin, tmax, moden, modem, amplitude_nm,
166 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.