CESR-lab / ucla-roms

GNU General Public License v3.0
5 stars 11 forks source link

Unable to run with >37 tracers #2

Closed dafyddstephenson closed 9 months ago

dafyddstephenson commented 9 months ago

Hi team, I am currently implementing the ability to run MARBL in different configurations in ROMS. These configurations range from 2 abiotic tracers only to nearly 60 BGC tracers. However, I am coming up against a runtime issue when the total number of tracers in ROMS exceeds 37:

 ### ERROR: read_inp :: A total of  1 configuration errors discovered.
 ### ERROR: read_inp :: Cannot read entry 'vertical_mixing'.

It's possible to quickly recreate this error using Daniel's simple BEC configuration with an additional 10 passive tracers. It runs fine with 9 (37 total), but produces the same error when this is increased to 10 (38 total). This error occurs on both my laptop (arm64) and Expanse (intel) and across configurations of ROMS.

Attached is a tracers.opt file corresponding to this config with 10 additional passive tracers (the only other change is ntrc_pas=10 in param.opt).

I can't find anything obvious in the code explaining this limit or how to overcome it. Thanks for any help!

nmolem commented 9 months ago

If you check read_inp.F, you'll find the bit of code responsible. It tries to read background values for tracers from the input file. Not sure why it would fail at that exact number, but maybe you have supplied 37 values in your .in file. The code only reads these vertical mixing values when lmd_mixing is unfdefined, which is what we typically use, so you could also just turn that back on.

dafyddstephenson commented 9 months ago

I didn't notice that there were 37 0.s in roms.in under tracer_diff2 and vertical_mixing, increasing the number seems to have fixed the issue. Thanks Jeroen!