nansencenter / DAPPER

Data Assimilation with Python: a Package for Experimental Research
https://nansencenter.github.io/DAPPER
MIT License
341 stars 119 forks source link

QG: illustrate sensitivity to initial conditions #97

Open cgrudz opened 2 years ago

patnr commented 2 years ago

What is this? Purpose (compared to the other one)? Do you want me to look at it now?

patnr commented 2 years ago

I used the __name__ = __main__ guard to prevent the script from running during the documentation build, since it crashes on the GH servers (no fortran compiled, no sample available, etc). Sorry about the resulting conflicts.

cgrudz commented 2 years ago

Ah, sorry, I forgot that the most recent commit would enter the pull request. The main item with the pull request was just to consolidate the import statements. On the other hand, the new script that I'm working on is to make a demonstration of the divergence of solutions with respect to small perturbations of initial conditions. This is also intended to give a means to generate a free run ensemble for some post-processing, offline analysis. I think I understood the utilities correctly for this, but let me know if the approach is not sensible. Generating an ensemble of two perturbed solutions seemed to take quite a bit of computation time, so I was going to look back to see if there was any way I constructed this inefficiently.

patnr commented 2 years ago

the new script that I'm working on is to make a demonstration of the divergence of solutions with respect to small perturbations of initial conditions.

That'd be nice. Most of the other mods' demo.py animate a few different ICs so that one can see their divergence & chaos. Not sure how to best do that for QG, since its plots are 2D, and reducing them to a single var is kinda boring. Can you rename this PR for its now actual purpose?

Generating an ensemble of two perturbed solutions seemed to take quite a bit of computation time, so I was going to look back to see if there was any way I constructed this inefficiently.

I haven't looked at the new code yet. But remember that merely importing dapper.mods.QG will cause the initial QG_samples.npz file to be generated, for the purposes of the demo and for sampling ICs. Not sure if that helps. Also note that the step integration function already supports multiprocessing over the ensemble. I don't think there's much to be done to speed it up.

patnr commented 2 years ago

I see you're on Mac now? DS_store files???

cgrudz commented 2 years ago

Ahahaha I thought this was something to do with the docs... XD. I'm begrudgingly on Mac, the new work device came in, but I spend most of my time on SSH, just thought I'd wrap up the merge locally. Will remove this.

patnr commented 2 years ago

BTW, you may once again want to pull master, and (since I updated the linting system) re-install your virtual env. And please make sure to read this

cgrudz commented 2 years ago

Ah OK, I've been getting error messages with the pre-commit system when making a push about issues with authentication so I was neglecting this -- has this been fixed in the new version?

patnr commented 2 years ago

Ah OK, I've been getting error messages with the pre-commit system when making a push about issues with authentication so I was neglecting this -- has this been fixed in the new version?

I think it might. Please give it a try (full re-install of venv).