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 a conversion back to CAM variables before calling the net. #21

Open
wants to merge 2 commits into
base: CAM-ML
Choose a base branch
from

Conversation

jatkinson1000
Copy link
Member

Add a conversion back to CAM variables before calling the net in order to reduce numerical error in calculation of deltas.

As discussed in #16 this will reduce numerical inaccuracies that could result from the variable conversion schemes and propagate into the tendency calculation.

Closes #16

@jatkinson1000
Copy link
Member Author

There remains a question of what tabs we wish to use as an input to the neural net - the value interpolated from the CAM tabs, or the value after a conversion from SAM-variable-space back to CAM-variable-space?

@jatkinson1000 jatkinson1000 marked this pull request as draft July 7, 2024 10:12
@jatkinson1000 jatkinson1000 marked this pull request as ready for review September 5, 2024 09:35
@jatkinson1000
Copy link
Member Author

As per my comment above the code here works as is, but I think could be clarified/simplified.

We currently pass tabs0_sam (tabs from conversion of interpolated variables in SAM space (t, q) back to CAM space) and tabs_sam (tabs interpolated from CAM) to the nn_convection_flux subroutine.

I think we only need one now that there is no subcycling inside the parameterisation.

  • tabs_sam would be consistent with the other inputs to the net being directly as interpolated from CAM.
  • tabs0_sam is the value we are actually taking the $\Delta$ in comparison to.

Currently we use the tabs0 as the input to the net, are you happy with this @paogorman or would you prefer to use tabs?

The most recent commit 3a7eb8c reduces to a single temperature input to the scheme.

@jatkinson1000
Copy link
Member Author

jatkinson1000 commented Sep 11, 2024

@paogorman notes that this choice seems correct, but actually we could consider removing the second conversion as it could in-fact hurt performance* compared to some field campaigns, so consider removing?

Paul will confirm this and we will then either merge this, or remove the second conversion.

*because we are forcing the CAM thermodynamics towards the SAM thermodynamic setup.

@paogorman
Copy link

paogorman commented Sep 11, 2024 via email

@jatkinson1000
Copy link
Member Author

I have just rebased this back on top of CAL-ML which contains the new NN and moist-dry conversion.

Next step will be to run a comparison to see if it has any effect on the Toga II case.

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.

Remove CAM-SAM inconcistencies in qsat
2 participants