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

fix_ocean_restarts.py #4

Open
julia-neme opened this issue May 7, 2022 · 5 comments
Open

fix_ocean_restarts.py #4

julia-neme opened this issue May 7, 2022 · 5 comments

Comments

@julia-neme
Copy link

Hi!

I tried to adapt this to the 0.25 deg, simply changing the dimensions in the copy_data function to the 0.25 dimensions. I ran it like this:

./fix_ocean_restarts.py template_dir original_dir new_dir

where template has a very short run with new bathymetry, original_dir has the original restarts with the old bathymetry, and new_dir is where I want to store it.

The script runs with no errors, but when I verify the new restarts in new_dir, they are just the same as the template, like it hasn't filled them in with the original data. Not sure what I'm missing!

Thanks

@aekiss
Copy link
Contributor

aekiss commented May 9, 2022

Hi Julia, did you change 75 to 50 in both places?

@aekiss
Copy link
Contributor

aekiss commented May 9, 2022

what was the output to the terminal? Did you get anything saying "Processing var"?

@julia-neme
Copy link
Author

I changed it in both places! And the output said "Processing file.." and then "Processing var..", and went through every file with no errors, overwriting them as well. But after its done, when I open the files they remain as the template!

Thanks Andrew!

@aekiss
Copy link
Contributor

aekiss commented May 9, 2022

can you show example screenshots?

@julia-neme
Copy link
Author

Sorry for the late response Andrew, I was on leave. This is the output to the terminal:

[jn8053@gadi-login-05 topogtools]$ ./fix_ocean_restarts.py /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/restart320/ocean/ .
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_age.res.nc to ./ocean_age.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_barotropic.res.nc to ./ocean_barotropic.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_bih_friction.res.nc to ./ocean_bih_friction.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_density.res.nc to ./ocean_density.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_frazil.res.nc to ./ocean_frazil.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_neutral.res.nc to ./ocean_neutral.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_pot_temp.res.nc to ./ocean_pot_temp.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_sbc.res.nc to ./ocean_sbc.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_temp_salt.res.nc to ./ocean_temp_salt.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_thickness.res.nc to ./ocean_thickness.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_velocity.res.nc to ./ocean_velocity.res.nc
Copying /scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/template-restart000/ocean/ocean_velocity_advection.res.nc to ./ocean_velocity_advection.res.nc
/scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/restart320/ocean/ocean_age.res.nc
./ocean_age.res.nc
Processing file ./ocean_age.res.nc
Processing var age_global
/scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/restart320/ocean/ocean_barotropic.res.nc
./ocean_barotropic.res.nc
Processing file ./ocean_barotropic.res.nc
/scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/restart320/ocean/ocean_bih_friction.res.nc
./ocean_bih_friction.res.nc
Processing file ./ocean_bih_friction.res.nc
/scratch/e14/jn8053/access-om2/archive/025deg_jra55_ryf_nogap/restart320/ocean/ocean_density.res.nc
./ocean_density.res.nc
Processing file ./ocean_density.res.nc
Processing var rho

Continues doing all files and exits without error.

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

2 participants