WRITE_NAMELIST(S, FILENAME) writes a namelist data structure S to a
 file FILENAME. S should follow the following structure:

                  |--VAR1
                  |--VAR2
     |-- NMLST_A--|...
     |            |--VARNa
     |
     |            |--VAR1
     |-- NMLST_B--|--VAR2
     |            |...
 S --|     ...    |--VARNb
     |
     |            |--VAR1
     |-- NMLST_M--|--VAR2
                  |...
                  |--VARNm
 
 Notes: Only supports variables of type:
 Scalars, vectors and 2D numeric arrays (integers and floating points)
 Scalars and 1D boolean arrays specified as '.true.' and '.false.' strings
 Single and 1D arrays of strings

 Example:
     NMLST = read_namelist ("OPTIONS.nam");
     NMLST.NAM_FRAC.XUNIF_NATURE = 0.1;
     write_namelist(NMlST, "MOD_OPTIONS.nam");

Package: io