Matlab CO2SYS uses a lot of global variables. When processing everything in arrays this has relatively minimal impact, but when processing iteratively (such as for models) this can take up to 60% of the processing time.
Forgot to tag the issue in previous commits:
9b86b563fdd8876fc6de0adfa6c48829fe089409 to 841cc3e305ce8a0f39391473ccc0fd7833a37127 on the remove-global-variables branch
Matlab CO2SYS uses a lot of global variables. When processing everything in arrays this has relatively minimal impact, but when processing iteratively (such as for models) this can take up to 60% of the processing time.