Skip to content

Commit d88ebc0

Browse files
committed
Rm PAR_DFLT_FILE
1 parent 750d8d5 commit d88ebc0

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

docs/sources/apiref/parfile.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ parfile
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

stagpy/parfile.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77

88
import f90nml
99

10-
from .config import CONFIG_DIR
1110
from .error import NoParFileError
1211

1312
if typing.TYPE_CHECKING:
1413
from pathlib import Path
1514

1615
from f90nml.namelist import Namelist
1716

18-
PAR_DFLT_FILE = CONFIG_DIR / "par"
1917
PAR_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

0 commit comments

Comments
 (0)