S = READ_NAMELIST (FILENAME) returns the struct S containing namelists and variables in the file FILENAME organised in hierachical way: |--VAR1 |--VAR2 |-- NMLST_A--|... | |--VARNa | | |--VAR1 |-- NMLST_B--|--VAR2 | |... S --| ... |--VARNb | | |--VAR1 |-- NMLST_M--|--VAR2 |... |--VARNm Note: The function can read multidimensional variables as well. The function assumes that there is no more than one namelist section per line. At this time there is no syntax checking functionality so the function will crash in case of errors. Example: NMLST = read_namelist ("OPTIONS.nam"); NMLST.NAM_FRAC.XUNIF_NATURE = 0.1; write_namelist(NMlST, "MOD_OPTIONS.nam");
Package: io