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

Reimplement model #27

Closed
wants to merge 11 commits into from
Closed

Reimplement model #27

wants to merge 11 commits into from

Conversation

nbren12
Copy link
Owner

@nbren12 nbren12 commented Oct 9, 2018

No description provided.

The parametrized source is nowhere near smooth enough. On the mean, this leads
to large bias. And the bias is not smooth at all. This could possibly result
from under training.
call_with_xr wraps a call to a PyTorch Module which takes in and spits out
dictionaries.
Having trained a momentum parametrization, I now need to plug it into the
module.

The path to the trained momentum variable should be loaded in
  UWNET_MOMENTUM_MODEL
environmental variable.
This allows SAM to use the velocity field adjusted by the neural network.
SAM + NN with khyp=1e16 goes unstable after 300 time steps (10 hrs) of model
time. The previous results I had were with khyp=5e16.
This run blew up for some reason. This notebooks shows that the problem is
isolated to the boundaries.
Because the momentum source appears unstable near the boundaries, I will mask
the neural network there.
I used masked boundary conditions. Unforunately, this did not improve the
longer-term biases in the simulation
CAM radiation expects 4 bytes reals, but the zenith angle was computed
with type "real". Then SAM is compiled in double precision this caused
the model to crash after 1 time step.

This bug is now fixed
This commit makes it much easier to pass input to the torch model. Now it can
accept inputs with a size (*, z, y, x) whereas before it needed (*,z, x*y).
Moving the reshaping into the bottom level method MLP.rhs makes it much easier
to deal with.
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.

1 participant