A while ago, Alan mentioned a bug in the trapping code. This line handles the difference in the objective between global trapping and local trapping, adding the final term of equations 39 and 41. However, it currently adds the term from equation 39 twice. It should add the penalty for nonlinearity in enstrophy, nonlin_ens_loss and the penalty in specifically cubic enstrophy growth, cubic_ens_loss.
Sorry for the long delay in getting to this - hopefully this can serve as a useful example for the mentored sprint at PyData Seattle 2025
A while ago, Alan mentioned a bug in the trapping code. This line handles the difference in the objective between global trapping and local trapping, adding the final term of equations 39 and 41. However, it currently adds the term from equation 39 twice. It should add the penalty for nonlinearity in enstrophy,
nonlin_ens_lossand the penalty in specifically cubic enstrophy growth,cubic_ens_loss.Sorry for the long delay in getting to this - hopefully this can serve as a useful example for the mentored sprint at PyData Seattle 2025