Nutrient components added to the tests and main code. Main changes to framework code are in component and model.py. Changes made are documented in issues #14 and #93.
Let's see if the tests pass...
[x] Missing dummy data file dummy_subsurface_parameter_d_pt5deg.nc in tests/data
This file shouldn't exist, it should have been dummy_nutrientsubsurface_parameter_d_pt5deg.nc instead.
[x] Forgot to add in dummy C and Fortran components. ]
[x] The dummynutrient??????_{diff,same}_t_substitute_data_{2,4,,}daily\{pt25,pt5,1}deg.nc data files don't exist in tests/data. Need to work out which should and make them.
[x] np.int has been deprecated and no longer exists, need to replace occurences with np.int64, np.int32 or int
[x] nutrientsurfacelayer state_a is not correct in the DiffTimeDiffSpace and DiffTimeSameSpace test that loads the config from yaml, according to what is in test_records.py. The test gets a final state_a of 16, not 8. So either the dummy component is calculating 16 nutrientsurfacelayer timesteps with increments of 1 each timestep, or 8 timesteps with increments of 2, when it should be 8 timesteps with increments of 1. The diff_t_diff_s and diff_t_same_s yml configuration files had the timedelta for nutrientsurfacelayer and nutrientopenwater swapped.
[x] The test_clock_iteration test is failing because the expbool? lists are not correct, there needs to be one for each component, not one for each possible time (daily, 2daily, 4daily)
[x] The records dictionary in test_component.py was wrong - the wrong timestep for the diff_t records for each component. These should match the timestep of the components themselves for the point/instantaneous records
[x] exp_records_raw in test_record.py had a 'state_b' in diff_t, nutrientopenwater which should not have been there
[ ] The 3.1 tests fail as this python version is no longer available on the standard anaconda channels, so should remove these given we don't support below python 3.6 anyway.
No idea why these tests are even running given it's not specified in the yml file... It's because it's interpreting 3.10 as 3.1. Should be fixable...
Nutrient components added to the tests and main code. Main changes to framework code are in component and model.py. Changes made are documented in issues #14 and #93. Let's see if the tests pass...