sunfluidh:sunfluidh_matlab
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
sunfluidh:sunfluidh_matlab [2019/01/22 14:37] – [Reading output files with Matlab (examples)] witko | sunfluidh:sunfluidh_matlab [2020/08/31 15:29] (Version actuelle) – witko | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
- | Three different matlab functions can read sunfluidh output files. [[https:// | + | Three different matlab functions can read sunfluidh output files. [[https:// |
+ | //export MATLABPATH=' | ||
- | - **read_sunfluidh_data** reads res* or rst* files | + | - **read_sunfluidh_data** reads res* or rst* files |
- **read_sunfluidh_probes** | - **read_sunfluidh_probes** | ||
- **read-sunfluidh-namelist** reads check_namelist_data.dat | - **read-sunfluidh-namelist** reads check_namelist_data.dat | ||
Ligne 11: | Ligne 12: | ||
- | <note important> | + | <note important> |
</ | </ | ||
Ligne 21: | Ligne 22: | ||
Visualisation of U velocity component. | Visualisation of U velocity component. | ||
<file txt> | <file txt> | ||
- | f = read_sunfluidh_data(7) % read res_00000_0000007.d. If you omit (7), the function tries to read the last generated file. | + | f = read_sunfluidh_data(7) % read res_00000_0000007.d. If you omit (7), the function tries to read the lastest |
pcolor(f.xu, | pcolor(f.xu, | ||
axis image | axis image | ||
Ligne 83: | Ligne 84: | ||
===== Temporal series ===== | ===== Temporal series ===== | ||
- | The *ins* files or more generally temporal series are ascci files in which the first column is time and the first line is a header. There is no special needs to have a script for these files. You can use directly builtin matlab functions that you can taylor to your needs. | + | The *ins* files or more generally temporal series are ascii files in which the first column is time and the first line is a header. There is no special needs to have a script for these files. You can use directly builtin matlab functions that you can taylor to your needs. |
- | Conversely, you can use **read_sunfluid_probes.m** that attempts to read in the current directory all the *ins* files and build a structure with the variable names. It is quite fragile and may fail. | ||
Reading the file resid_L2_Li.d with builtin matlab function | Reading the file resid_L2_Li.d with builtin matlab function | ||
Ligne 95: | Ligne 95: | ||
semilogy(time, | semilogy(time, | ||
grid on | grid on | ||
- | xlabel(' | + | xlabel(' |
+ | set(gca,' | ||
</ | </ | ||
Ligne 108: | Ligne 109: | ||
</ | </ | ||
- | Using read_sunfluidh_probes.m makes the same job a bit easier. | + | You can use **read_sunfluid_probes.m** that attempts to read in the current directory all the *ins* files and build a structure with the variable names. It intends to make life a bit easier |
+ | |||
+ | Exemple: | ||
<file txt> | <file txt> | ||
s = read_sunfluidh_probes; | s = read_sunfluidh_probes; | ||
- | plot(s.time, | + | plot(s.time, |
</ | </ | ||
sunfluidh/sunfluidh_matlab.txt · Dernière modification : 2020/08/31 15:29 de witko