Updates for high resolution - #46
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.
- 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.
Add variable parameterization by level so that we can more easily change the number of levels without changing multiple hardcoded values.
b4eeffb to
45ac007
Compare
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.