f90nml icon indicating copy to clipboard operation
f90nml copied to clipboard

patching of fortran types only works for first occurence

Open rainbowsend opened this issue 2 years ago • 0 comments

Given the namelist file setup.nml

&setup
 test%var1 = 1
 test%var2 = 2
/

and the patch

patch={'setup': {'test':{'var2': 3}}}

the call

f90nml.patch('setup.nml', patch, 'patched_setup.nml')

does not patch anything.

However, patching the first occurrence of test% in setup.nml works

patch={'setup': {'test':{'var1': 3}}}

rainbowsend avatar Oct 12 '22 11:10 rainbowsend