@@ -32,7 +32,7 @@ def __init__(self, expt, name, config):
32
32
33
33
# We want people to be able to use payu during testing, which
34
34
# often means additions of new namelists due to new science
35
- # modules. I would like to set
35
+ # modules. I would like to set
36
36
# optional_config_files = glob.glob("*.nml")
37
37
# but this feels like a bit of an abuse of feature.
38
38
self .config_files = ['stage_config.yaml' ]
@@ -128,39 +128,6 @@ def _prepare_configuration(self):
128
128
# Finish handling of single step stage
129
129
return cable_stages
130
130
131
- def _get_further_restarts (self ):
132
- """Get the restarts from stages further in the past where necessary."""
133
-
134
- # Often we take restarts from runs which are not the most recent run as
135
- # inputs for particular science modules, which means we have to extend
136
- # the existing functionality around retrieving restarts.
137
-
138
- # We can't supercede the parent get_prior_restart_files, since the
139
- # files returned by said function are prepended by
140
- # self.prior_restart_path, which is not desirable in this instance.
141
-
142
- num_completed_stages = len (self .configuration_log ['completed_stages' ])
143
-
144
- for stage_number in reversed (range (num_completed_stages - 1 )):
145
- respath = os .path .join (
146
- self .expt .archive_path ,
147
- f'restart{ stage_number :03d} '
148
- )
149
- for f_name in os .listdir (respath ):
150
- if os .path .isfile (os .path .join (respath , f_name )):
151
- f_orig = os .path .join (respath , f_name )
152
- f_link = os .path .join (self .work_init_path_local , f_name )
153
- # Check whether a given link already exists in the
154
- # manifest, so we don't write over a newer version of a
155
- # restart
156
- if f_link not in self .expt .manifest .manifests ['restart' ]:
157
- self .expt .manifest .add_filepath (
158
- 'restart' ,
159
- f_link ,
160
- f_orig ,
161
- self .copy_restarts
162
- )
163
-
164
131
def set_model_pathnames (self ):
165
132
super (StagedCable , self ).set_model_pathnames ()
166
133
@@ -228,7 +195,7 @@ def _set_current_stage(self):
228
195
slot, then copy the configuration log to the working directory."""
229
196
230
197
self .configuration_log ['current_stage' ] = \
231
- self .configuration_log ['queued_stages' ].pop (0 )
198
+ self .configuration_log ['queued_stages' ].pop (0 )
232
199
233
200
self ._save_configuration_log ()
234
201
conf_log_p = os .path .join (self .control_path , 'configuration_log.yaml' )
@@ -277,8 +244,7 @@ def _collect_restarts(self):
277
244
for f in os .listdir (prior_restart_path ):
278
245
if f not in generated_restarts :
279
246
shutil .copy (os .path .join (prior_restart_path , f ),
280
- self .work_restart_path )
281
-
247
+ self .work_restart_path )
282
248
283
249
# Move the files in work_path/restart first
284
250
for f in os .listdir (self .work_restart_path ):
0 commit comments