An R parser of Fortran namelist files.
You can install nml from github with:
# install.packages("devtools")
devtools::install_github("jsta/nml")
library(nml)
read_nml("tests/testthat/sample.nml")
#> $config_nml
#> $config_nml$input
#> [1] "wind.nc"
#>
#> $config_nml$steps
#> [1] 864
#>
#> $config_nml$layout
#> [1] 8 16
#>
#> $config_nml$visc
#> [1] 1e-04
#>
#> $config_nml$use_biharmonic
#> [1] FALSE
#>
#>
#> attr(,"class")
#> [1] "nml"
library(reticulate)
use_python("/home/jose/anaconda3/bin/python")
f90nml <- import("f90nml")
pd <- import("pandas")
nml <- f90nml$read("tests/testthat/sample.nml")
pd$DataFrame$from_dict(nml)
#> config_nml
#> input wind.nc
#> layout 8, 16
#> steps 864
#> use_biharmonic FALSE
#> visc 1e-04