Open julia-neme opened 2 years ago
Hi Julia, did you change 75 to 50 in both places?
what was the output to the terminal? Did you get anything saying "Processing var"?
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!
can you show example screenshots?
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.
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