classmodel / class-web

Web version of CLASS
https://classmodel.github.io/class-web
GNU General Public License v3.0
0 stars 0 forks source link

Bug(s?) with small temperature jump experiment. #86

Open Peter9192 opened 1 day ago

Peter9192 commented 1 day ago

To reproduce:

  1. Start with default config
  2. Add permutation, set initial temperature jump to 0.1 --> this produces a weird/buggy result, perhaps due to too large time step?
  3. Set time step to 0.1 --> Vertical profile plot has NaNs; timeseries plots nothing; diff view shows only time step, temp jump has been reset?
  4. Set time step to 1 --> Everything works okay again, except that the temp jump is still back to default
Peter9192 commented 1 day ago

It seems that modifying any experiment (reference or configuration) always only saves the latest modifications

Peter9192 commented 1 day ago

shouldDirty={true} means only modified values are returned.

https://github.com/classmodel/class-web/blob/ec463bbd18a8a15d7e72c08b7ec44563c714cfd4/apps/class-solid/src/components/ExperimentConfigForm.tsx#L45

Now, we're simply overwriting the old config with latest updates:

https://github.com/classmodel/class-web/blob/ec463bbd18a8a15d7e72c08b7ec44563c714cfd4/apps/class-solid/src/components/Experiment.tsx#L114

We should either update instead of replace the config or set shouldDirty to false and prune the defaults after submission.

Peter9192 commented 1 day ago

88 fixes the issue of multiple config modifications, so now we're left with buggy behaviour of class for the settings discussed above.