-
Notifications
You must be signed in to change notification settings - Fork 1
Updates for high resolution #46
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
base: main
Are you sure you want to change the base?
Conversation
|
After a few issues deploying CUDA, torch and then running poetry, I ran the I get the following error which seems to point to two problems
Regarding the dimension mismatch. This occurs because the checkpoint model is trained with input dimension idim = 551, but the 2015 data has input dimension = 491. The current model gets this value from the input of the 2015 data, which suggests that this data isn't the correct dimensionality (incorrect number of features) as was used for training. What do you think @TomMelt ? It's possible I'm missing something here.. |
|
I reproduce the same error as you. It looks like it might be related to hard-coded values in the nonlocal_gwfluxes/utils/dataloader_definition.py Lines 55 to 56 in 72a38f5
FWIW, I did try changing every instance of |
|
Just confirming that I ran Suggested improvements:
|
|
Now fixed #49 |
|
Sorry about that, going forward maybe we can replace these hard-coded values with something like 3nlev + 3 or 4nlevl +3. So, one would only need to specify the number of vertical levels for the training data. |
amangupta2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There is an easy way to remove these hard-coded values.
uvw and uvtheta configs use three variables. uvthetaw uses four. Accordingly,
- for three variables: np.arange(0, 369) --> np.arange(0, nlev*3 + 3)
- for three variables: np.arange(0, 491) --> np.arange(0, nlev*4 + 3)
- (np.arange(3, 247), np.arange(369, 491), axis=0) --> (np.arange(3, nlev2+3), np.arange(nlev3+3, nlev*4+3), axis=0)
Happy to add these changes to the code if we anticipate multiple retraining iterations.
- Somehow, I had to point to the "1x1_inputfeatures_u_v_theta_w_uw_vw_gcp_era5_training_data_hourly_2015_constant_mu_sigma_scaling01.nc" file, instead of the original "1x1_inputfeatures_u_v_theta_w_uw_vw_era5_training_data_hourly_2015_constant_mu_sigma_scaling01.nc
I am surprised the original file name worked for tracing, since its vertical dimension length might be different.
Fixes: #49
Modify coupling example for high resolution:
get-model-and-data.shinference.py,infer.f90andinfer.pyREADME.mdwith updated paths.torch.no_grad()during inference to reduce memory requirements.