PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
202 stars 234 forks source link

ED2IN tags not in template aren't added from pecan.xml #3034

Closed Aariq closed 2 years ago

Aariq commented 2 years ago

Bug Description

According to the documentation, ED2IN tags that aren't in the template ED2IN file can still be added by supplying them to the <ed2in_tags> tag in pecan.xml. The new tags are succesfully added to a list by modify_ed2in(), but write_ed2in() fails to add the new values here:

https://github.com/PecanProject/pecan/blob/d293486b6cd732ea59f2a1ecde877dba12d65644/models/ed/R/write_ed2in.R#L30

When there are new ED2IN tags, these vectors are of different lengths and the new vectors aren't added.

To Reproduce

Steps to reproduce the behavior: Add an arbitrary <ed2in_tags> to pecan.xml, read in settings, run run.write.configs(settings), inspect ED2IN in run folder

Expected behavior

New tags should be added at the bottom of the ED2IN file.