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

Running main_restart.py on DINO outputs #24

Open
ma595 opened this issue Nov 14, 2024 · 2 comments
Open

Running main_restart.py on DINO outputs #24

ma595 opened this issue Nov 14, 2024 · 2 comments
Assignees

Comments

@ma595
Copy link
Member

ma595 commented Nov 14, 2024

@isaacaka, please add to this.

@isaacaka
Copy link
Collaborator

I ran the main restart file:

python main_restart.py --restart_path /home/ia/iccs_data/nemo_data/ --radical DINO_00576000_restart --mask_file /home/ia/iccs_data/nemo_data/mesh_mask.nc --prediction_path /home/ia/iccs_data/nemo_data/simus_predicted

Restart File: DINO_00576000_restart.nc

Traceback (most recent call last):
File "/home/ia/iccs_repos/Spinup-NEMO/main_restart.py", line 70, in
restart=propagate_pred(restart,mask)
File "/home/ia/iccs_repos/Spinup-NEMO/lib/restart.py", line 225, in propagate_pred
e3t_new = update_e3t(restart,mask)
File "/home/ia/iccs_repos/Spinup-NEMO/lib/restart.py", line 257, in update_e3t
e3t_ini = restart.e3t_ini # initial z axis cell's thickness on grid T - (t,z,y,x)
File "/home/ia/anaconda3/envs/nemo1/lib/python3.9/site-packages/xarray/core/common.py", line 286, in getattr
raise AttributeError(
AttributeError: 'Dataset' object has no attribute 'e3t_ini'

I printed the data variables in the DINO restart file and found the variable 'e3t_ini' is missing amoungst them.

Screenshot from 2024-11-15 16-16-27

@isaacaka isaacaka self-assigned this Nov 15, 2024
@GuillaumeGACHON
Copy link

It’s in the mesh_mask.nc though ! The name is not exactly the same, but it’s the same variable : e3t_0 . We can simply replace the line
e3t_ini = restart.e3t_ini
by
e3t_ini = mask.e3t_0
in the update_e3t function.

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

No branches or pull requests

3 participants