You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jweyn - Great paper and code package. I am trying to use your code for my case using ocean model output (EnKF). I have gone through steps 1 (preprocessing netCDF files) and 2 (remapping to cubed sphere). On step 3 (training), I don't have solar as part of my dataset. Therefore, I have set add_solar=False, but get errors from having a zero dimension. train_array,input_ind,output_ind,sol = prepare_data_array(train_data,input_sel=io_selection,output_sel=io_selection,add_insolation=False)
sol = None
In the generator.generate code:
The remove_nan step, reduces the dimensions of p and t from (1,82944) to (0,82944). Then, it gets caught on the following step
Here is the error message: Traceback (most recent call last): File "training_DLWP_EnKFmodel.py", line 194, in <module> tf_train_data = tf_data_generator(generator,batch_size=batch_size,input_names=input_names) File "/home/ablowe/DLWP-CS/DLWP/model/generators.py", line 1069, in tf_data_generator p, t = generator.generate([0]) File "/home/ablowe/DLWP-CS/DLWP/model/generators.py", line 961, in generate p = p.reshape((n_sample,) + self.convolution_shape) ValueError: cannot reshape array of size 0 into shape (1,6,6,48,48) Exception ignored in: <function CachingFileManager.__del__ at 0x2b977e8ef680> Traceback (most recent call last): File "/home/ablowe/miniconda3/envs/dlwp/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 244, in __del__ File "/home/ablowe/miniconda3/envs/dlwp/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 218, in close File "/home/ablowe/miniconda3/envs/dlwp/lib/python3.7/contextlib.py", line 239, in helper TypeError: 'NoneType' object is not callable
How do you recommend I fix this?
The text was updated successfully, but these errors were encountered:
@jweyn - Great paper and code package. I am trying to use your code for my case using ocean model output (EnKF). I have gone through steps 1 (preprocessing netCDF files) and 2 (remapping to cubed sphere). On step 3 (training), I don't have solar as part of my dataset. Therefore, I have set add_solar=False, but get errors from having a zero dimension.
train_array,input_ind,output_ind,sol = prepare_data_array(train_data,input_sel=io_selection,output_sel=io_selection,add_insolation=False)
sol = None
generator = ArrayDataGenerator(dlwp,train_array,rank=3,input_slice=input_ind, output_slice=output_ind,input_time_steps=io_time_steps, output_time_steps=io_time_steps,sequence=integration_steps, interval=data_interval,insolation_array=sol, batch_size=batch_size,shuffle=shuffle,channels_last=True, drop_remainder=True)
In the generator.generate code:
The remove_nan step, reduces the dimensions of p and t from (1,82944) to (0,82944). Then, it gets caught on the following step
Here is the error message:
Traceback (most recent call last): File "training_DLWP_EnKFmodel.py", line 194, in <module> tf_train_data = tf_data_generator(generator,batch_size=batch_size,input_names=input_names) File "/home/ablowe/DLWP-CS/DLWP/model/generators.py", line 1069, in tf_data_generator p, t = generator.generate([0]) File "/home/ablowe/DLWP-CS/DLWP/model/generators.py", line 961, in generate p = p.reshape((n_sample,) + self.convolution_shape) ValueError: cannot reshape array of size 0 into shape (1,6,6,48,48) Exception ignored in: <function CachingFileManager.__del__ at 0x2b977e8ef680> Traceback (most recent call last): File "/home/ablowe/miniconda3/envs/dlwp/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 244, in __del__ File "/home/ablowe/miniconda3/envs/dlwp/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 218, in close File "/home/ablowe/miniconda3/envs/dlwp/lib/python3.7/contextlib.py", line 239, in helper TypeError: 'NoneType' object is not callable
How do you recommend I fix this?
The text was updated successfully, but these errors were encountered: