-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
There are some bugs in fix_ocean_restarts.py:
output_filesare based ontemplate_files, notold_files, and then filled in with data fromold_filesonly for fields of shape (1, 75, 2700, 3600), so there are many fields it should fix but doesn't, e.g.- eta_t with shape (1, 2700, 3600)
- t_surf with shape (1, 2700, 3600)
- advectionu with shape (2, 75, 2700, 3600)
- dswt with shape (1, 76, 2700, 3600)
- etc
Sinceoutput_filesare based ontemplate_filesthese variables would then contain values fromtemplate_files, notold_files, and so would be inconsistent with fields with shape (1, 75, 2700, 3600) that were replaced with values fromold_files.
- something like
out_fp.variables[var][..., level, :, :] = out_dataneeds to be added to actually write the changes to the file.
I've made a variant of this script called fix_ocean_restarts_cpumask.py which could be used as a starting point, but is designed for cpu mask changes rather than topography changes. fix_ocean_restarts_cpumask.py has different logic:
output_filesis based onold_files, nottemplate_files- all >1-d fields are processed
- replaces
output_filescpu mask with that fromtemplate_files - replaces newly-unmasked values with values from
template_files(this should be fine, since we assume the topography has not changed so the newly-unmasked values will still be in the land mask) - leaves
old_filesdata intact everywhere else inoutput_files
Something different will be needed for fix_ocean_restarts.py, since this is for topography changes rather than cpu mask changes. I think what we want here is to locate the points that are wet with the new bathymetry but were dry with the old one, and replace their values with a nearest-neighbour horizontal extrapolation from old_files, like what we do with initial conditions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels