Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new spatially dependent lorenz-forcing calibration comparison between methods #417

Merged
merged 15 commits into from
Jan 16, 2025

Conversation

odunbar
Copy link
Collaborator

@odunbar odunbar commented Oct 16, 2024

Purpose

Close #424

To-do

  • Note: results might be different than @rgjini python results because EKI and ETKI don't have the prior included as regularization within the cost function yet

Content

  • Included spin-up period in the statistics function: (i) Look at some trajectories of x(t) from prior, how long is the time-to-steady-state (make the spin up for each ensemble > 2*max of this) (ii) optional create a heatmap of these
  • Initialized approach (for initial state condition) - (may want to change the method later).
  • Included RMSE calculation within the iteration loop: get_error(ekiobj) , apply sqrt and /sqrt(length(y))
  • introduced break/continue in loop when RMSE < 1.
  • Add outer for loop to run different ensemble sizes for the problem
  • Add testing different random seeds for each of the algorithms

  • I have read and checked the items on the review checklist.

@odunbar odunbar changed the title Add new spatially dependent lorenz-forcing calibration [WIP] Add new spatially dependent lorenz-forcing calibration Oct 16, 2024
@rgjini
Copy link
Collaborator

rgjini commented Oct 17, 2024

Work in progress (WIP)

@rgjini rgjini force-pushed the orad/gnki-examples branch from 6ef08f2 to b6ad1f0 Compare November 22, 2024 18:49
@odunbar odunbar changed the title [WIP] Add new spatially dependent lorenz-forcing calibration [WIP] Add new spatially dependent lorenz-forcing calibration comparison between methods Nov 23, 2024
@rgjini
Copy link
Collaborator

rgjini commented Dec 6, 2024

The spin-up period in the statistics function is working properly:

  • I checked the trajectory of x(t) and it seems like the initial spinup is a little less than 2 total time steps. Multiplied by 2, gives 4 time units for spinup
  • I looked at heat maps in python, attached is an example of a trajectory
    spinup_trajectory

@rgjini
Copy link
Collaborator

rgjini commented Jan 6, 2025

I finished up the example and everything seems to be working! I fixed the random seed and ensemble size for loops, so those are both working. I kept the amount of different ensemble sizes and random seeds low for now, the code does take a while to run (maybe 10 minutes). I also have a few plots I made at the end. Two plots are of the final optimized solution compared to the true parameters for different ensemble sizes and the last one is supposed to be how many iterations each algorithm took for each ensemble size. For some reason, the last plot isn't looking how I would expect, but it might be related to an issue I ran into that I will describe in another comment. Here are some of the plots I made!:
Screenshot 2025-01-06 at 3 00 15 PM
Screenshot 2025-01-06 at 2 59 03 PM
Screenshot 2025-01-06 at 2 58 26 PM

@rgjini
Copy link
Collaborator

rgjini commented Jan 15, 2025

I finished including all the changes we talked about into the example script and I believe everything is ready to go! Attached are some new plots with the parameter estimates, the model output from the ensemble means compared with the data (and associated errors), and a plot showing how many forward runs each of the algorithms take to converge:

@odunbar odunbar changed the title [WIP] Add new spatially dependent lorenz-forcing calibration comparison between methods Add new spatially dependent lorenz-forcing calibration comparison between methods Jan 15, 2025
@odunbar odunbar force-pushed the orad/gnki-examples branch from 97db76a to 4039a68 Compare January 15, 2025 16:12
@odunbar
Copy link
Collaborator Author

odunbar commented Jan 15, 2025

Hi @rgjini These look awesome, I have rerun the simulations, and got the results below! I have also rebased to main so merging is possible again!

If you are pleased with this then I am happy to merge

PS: I think it is still worth discussing the exact observations (i.e. the form of "G") at a later date, as I think this experiment does very long averages to eliminate an observational noise that EKP methods don't need to avoid and then we add artificial noise back on to the observations. In particular, the current setup way we have G and the noise I think only works with T~500, but really we could do maybe have good learning with something as small as T~10.

@odunbar
Copy link
Collaborator Author

odunbar commented Jan 15, 2025

@rgjini
Copy link
Collaborator

rgjini commented Jan 16, 2025

@odunbar Thank you! The plots look great to me, so I'll go ahead and merge :)

I agree, I think it's worth discussing more. If you are still free at 10:30 before we meet with Matti and Tapio, maybe we can discuss the observations more then? I'm also happy to cancel that meeting, and we can either discuss it during our meeting at 11 or in a couple of weeks?

@rgjini rgjini merged commit 1906619 into main Jan 16, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IEKF as a comparison into at least one example
2 participants