Closed bpatel2107 closed 7 months ago
GENE v3.0 input can have an issue with setting FCVERSION
in the parameters_XXXX
files and that can have brackets i.e. FCVERSION = GNU Fortran (Spack GCC) 9.4.0\
which breaks f90nml in a bad way. Brackets are reserved for lists in fortran namelists so I don't think changing f90nml is going to happen.
Hacky fix is to convert the file to a str, read in, remove brackets and then use the _read_str
method. Not ideal but a functional placeholder until fixed in GENE.
Fixes issue #255
Not sure if this is the best solution but it does let you read in GENE inputs with geometry set to
tracer_efit
assuming $q$ and $\hat{s}$ are defined in the input file. If not then when you load in eigenfunctions the mapping from flux tube to ballooning space won't work, seehttps://github.com/pyro-kinetics/pyrokinetics/blob/enhancements/gene_tracer_efit/src/pyrokinetics/gk_code/gene.py#L1169-L1183
@dake0795 @joeyschmidt FYI
Ideally I'd want to have all the things in a
LocalGeometry
object (R
,Z
, plus derivatives w.r.ttheta
andr
) but this is fine. Note you can't convert to CGYRO units as we don't know the value ofBunit/B0
without those derivatives mentioned above.EDIT: This should also work for
slab
ands_alpha
. Note this only works with reading in data. Writing out new files will fail