Regridding Restarts for Fortuna 2.4: Difference between revisions
No edit summary |
|||
Line 222: | Line 222: | ||
print file | print file | ||
# the concept is to match ??????.something_rst.??????? OR something_rst.???????? | # the concept is to match ??????.something_rst.??????? OR something_rst.???????? | ||
# and extract "something_rst" | |||
newfile = re.sub(r'(^.+\.|^)([a-z_]+rst)\..+$',r'\2',file) | newfile = re.sub(r'(^.+\.|^)([a-z_]+rst)\..+$',r'\2',file) | ||
print newfile | print newfile | ||
Line 229: | Line 230: | ||
It will grab anything in the current working directory resembling the common forms of restart filename generated by the regridding scripts and other utilities and create symbolic links to them in the same directory with the superfluous parts of the filenames stripped. In an experiment directory the links will be overwritten by the model with "fresh" restart files at the end of a run segment. Alternatively, you can easily copy the restart files with <code>cp *rst</code> | It will grab anything in the current working directory resembling the common forms of restart filename generated by the regridding scripts and other utilities and create symbolic links to them in the same directory with the superfluous parts of the filenames stripped. In an experiment directory the links will be overwritten by the model with "fresh" restart files at the end of a run segment. Alternatively, you can easily copy the restart files with <code>cp *rst</code> | ||
== Bootstrapping for a Complete Set of Restarts == | == Bootstrapping for a Complete Set of Restarts == |