Nowak 22 add support for FESOM files#52
Open
kacpnowak wants to merge 9 commits intonowak-22-add-support-for-fesom-files-origfrom
Open
Nowak 22 add support for FESOM files#52kacpnowak wants to merge 9 commits intonowak-22-add-support-for-fesom-files-origfrom
kacpnowak wants to merge 9 commits intonowak-22-add-support-for-fesom-files-origfrom
Conversation
…x path to results
clessig
reviewed
Oct 23, 2024
|
|
||
| filler_value = 0.0 | ||
| months_per_file = 12 | ||
| spatial_resolution = np.array([1., 1.]) # Degre |
Owner
There was a problem hiding this comment.
The parameters related to the resolutions should come from the zarr input file as it is already the case for ERA5.
| number_of_steps_per_degree = 1 | ||
| # Number of mesh elements | ||
| lat_range = 170 | ||
| long_range = 360 |
Owner
There was a problem hiding this comment.
lat_range and lon_range (not long_range) should also come from the data zarr file
| trainer.model.net.decoder_to_tail = trainer.decoder_to_tail | ||
|
|
||
| str = 'Loaded model id = {}{}.'.format( model_id, f' at epoch = {epoch}' if epoch> -2 else '') | ||
| str = 'Do chuja wafla Loaded model id = {}{}.'.format( model_id, f' at epoch = {epoch}' if epoch> -2 else '') |
Owner
There was a problem hiding this comment.
There seems to be some erronous string here
| cf = self.cf | ||
| devs = self.devices | ||
|
|
||
| # print(f"prepare batch xin {xin}") |
| def log_validate_forecast( self, epoch, batch_idx, log_sources, log_preds) : | ||
| '''Logging for BERT_strategy=forecast.''' | ||
|
|
||
| print("validating forecast") |
| self.lats = np.array( self.ds['lats']) | ||
| self.lons = np.array( self.ds['lons']) | ||
|
|
||
| if self.lons[0] < 0: |
| # handle periodicity of lon | ||
| assert not ((idx[1]-ns_2[2]) < 0. and (idx[1]+ns_2[2]) > 360.) | ||
| il, ir = (idx[1]-ns_2[2]-res[1]/2., idx[1]+ns_2[2]) | ||
| il, ir = (idx[1]-ns_2[2], idx[1]+ns_2[2]) |
Owner
There was a problem hiding this comment.
Has this change been verified with the 0.25 deg and 1.0 deg ERA5 data?
| # try path used for logging training results and checkpoints | ||
| try : | ||
| fname = Path( config.path_results, '/models/id{}/model_id{}.json'.format(wandb_id,wandb_id)) | ||
| print(config.path_results) |
Owner
There was a problem hiding this comment.
This is probably a debug message? Otherwise it should use the logger.
| def tokenize( data, token_size = [-1,-1,-1]) : | ||
|
|
||
| data_tokenized = data | ||
| # print(f'before: {data.shape} token shapee {token_size}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement support for FESOM files, fix bugs occurring for data with resolution of 1 degree