nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

NH 25km integration test #713

Closed timspainNERSC closed 3 weeks ago

timspainNERSC commented 1 month ago

Changes have been merged into develop that immediately destroy the ice in the so-called June '23 configuration that was originally used for demos during the 2023 project meeting in Bergen. This would have been caught by a proper integration test. My suggestion is that we create one, based on this configuration. The run length would be 3 hours, so the forcing files can be only one sample long (using the standard ERA5 period). This should be long enough to catch any egregious changes to the model, but also short enough to run as part of the CI.

TomMelt commented 1 month ago

Have you already found the cause of the issue? or do you need help finding that?

I definitely agree we should have some longer running tests. We can run them periodically on develop branch.

timspainNERSC commented 1 month ago

I definitely agree we should have some longer running tests. We can run them periodically on develop branch.

I think that if we are sufficiently clever, we can have them run (in parallel) as part of the CI without taking ridiculously long. I'm envisioning a test with very loose constraints, along the lines of 'is there any ice at all at the end of the run'

TomMelt commented 1 month ago

what do you mean by

run length would be 3 hours

It takes 3 wall-clock hours on your laptop?

timspainNERSC commented 1 month ago

As an example of a minimal constraint, the solar constant is around 1 kW / m2. Given the latent heat of fusion of water is 333x103 J kg-1, and taking the density to be 1000 kg m-3a reasonable maximum rate of change of sea ice thickness would be 1000 / (1000 x 333x103) ≈ 3x10-6 m s-1, or about 1 cm per hour. Any more than that needs to be checked.

timspainNERSC commented 1 month ago

what do you mean by

run length would be 3 hours

It takes 3 wall-clock hours on your laptop?

Model time! A few minutes of laptop wall time.

TomMelt commented 1 month ago

what do you mean by

run length would be 3 hours

It takes 3 wall-clock hours on your laptop?

Model time! A few minutes of laptop wall time.

phew :sweat_smile:

timspainNERSC commented 1 month ago

what do you mean by

run length would be 3 hours

It takes 3 wall-clock hours on your laptop?

Model time! A few minutes of laptop wall time.

phew 😅

Here's the output of time for the set-up I am thinking of:

real    2m15.317s
user    2m13.667s
sys 0m0.398s
stephanieleroux commented 1 month ago

hi @timspainNERSC , good idea to run such a test! How do you want to handle the input data? Do you know if wget command works in a github action? If so, the input data for the test could be downloaded via wget from our SASIP storage (which is reachable through openDAP and wget). Let us know if we can help with this ( @auraoupa and i)

timspainNERSC commented 1 month ago

hi @timspainNERSC , good idea to run such a test! How do you want to handle the input data? Do you know if wget command works in a github action? If so, the input data for the test could be downloaded via wget from our SASIP storage (which is reachable through openDAP and wget). Let us know if we can help with this ( @auraoupa and i)

My intention is to include a minimum amount of data: the restart file and one sample each for the atmosphere and ocean forcing files. The constraints on the data are that it should be accessible to all, wherever the test is to be run and also that we should not add binary files to the repository.

Therefore, I am creating some python scripts which will write the necessary files when run. The data is stored as text inside the script file itself. This does make for some big script files, but nothing too enormous.

So we shouldn't need to set up any extra data on the file store or to make sure that the github CI can see the right parts of the internet. But thank you for the offer of help.