File tree Expand file tree Collapse file tree 2 files changed +0
-14
lines changed
Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change 44.. automodule :: stagpy.parfile
55 :members:
66
7- .. data :: PAR_DFLT_FILE
8- :annotation: = config.CONFIG_DIR / 'par'
9-
10- Path of default par file used to fill missing entries by :func: `readpar `.
11-
127 .. data :: PAR_DEFAULT
138
149 Defaut value of all the StagYY input parameters used to fill missing
Original file line number Diff line number Diff line change 77
88import f90nml
99
10- from .config import CONFIG_DIR
1110from .error import NoParFileError
1211
1312if typing .TYPE_CHECKING :
1413 from pathlib import Path
1514
1615 from f90nml .namelist import Namelist
1716
18- PAR_DFLT_FILE = CONFIG_DIR / "par"
1917PAR_DEFAULT = f90nml .namelist .Namelist (
2018 {
2119 "switches" : {
@@ -629,7 +627,6 @@ def readpar(par_file: Path, root: Path) -> Namelist:
629627 The namelist is populated in chronological order with:
630628
631629 - :data:`PAR_DEFAULT`, an internal dictionary defining defaults;
632- - :data:`PAR_DFLT_FILE`, the global configuration par file;
633630 - ``par_name_defaultparameters`` if it is defined in ``par_file``;
634631 - ``par_file`` itself;
635632 - ``parameters.dat`` if it can be found in the StagYY output directories.
@@ -644,12 +641,6 @@ def readpar(par_file: Path, root: Path) -> Namelist:
644641 """
645642 par_nml = deepcopy (PAR_DEFAULT )
646643
647- if PAR_DFLT_FILE .is_file ():
648- _enrich_with_par (par_nml , PAR_DFLT_FILE )
649- else :
650- PAR_DFLT_FILE .parent .mkdir (exist_ok = True )
651- f90nml .write (par_nml , str (PAR_DFLT_FILE ))
652-
653644 if not par_file .is_file ():
654645 raise NoParFileError (par_file )
655646
You can’t perform that action at this time.
0 commit comments