@@ -51,7 +51,7 @@ def create_random_generator(value=None):
51
51
raise ValueError ('Seed value must be non-negative.' )
52
52
return Generator (PCG64 (value ))
53
53
54
- def get_rid_of_timeseries (ff ):
54
+ def remove_timeseries (ff ):
55
55
"""
56
56
Remove any timeseries from a fields file.
57
57
@@ -62,7 +62,8 @@ def get_rid_of_timeseries(ff):
62
62
63
63
Returns
64
64
----------
65
- ff/ff_out : Returns a mule fields object with no timeseries
65
+ ff_out : mule.dump.DumpFile
66
+ The mule DumpFile with no timeseries.
66
67
"""
67
68
ff_out = ff .copy ()
68
69
num_ts = 0
@@ -211,9 +212,11 @@ def transform(self, source_field, new_field):
211
212
return data + self .perturbation
212
213
213
214
214
- def void (* args , ** kwargs ):
215
- print ('skipping validation' )
216
- pass
215
+ def void_validation (* args , ** kwargs ):
216
+ """
217
+ Don't perform the validation, but print a message to inform that validation has been skipped.
218
+ """
219
+ print ('Skipping mule validation. To enable the validation, run using the "--validate" option.' )
217
220
218
221
219
222
def set_validation (validate ):
@@ -239,17 +242,16 @@ def main():
239
242
"""
240
243
241
244
# Define all the variables
242
- data_limit = - 99
243
- surface_temp_stash = 4
245
+ STASH_THETA = 4
244
246
245
247
# Parse the command line arguments
246
248
args = parse_args ()
247
249
248
250
# Create the output filename
249
251
output_file = create_default_outname (args .ifile )
250
252
251
- # Set the seed if one is given else proced without one .
252
- random_obj = set_seed (args )
253
+ # Create the random generator .
254
+ random_generator = create_random_generator (args . seed )
253
255
254
256
# Skips the validation entirely for use on ESM15 due to river fields error
255
257
# Creates the mule field object
@@ -261,7 +263,7 @@ def main():
261
263
nlat = 145
262
264
263
265
# Remove the time series from the data to ensure mule will work
264
- ff = get_rid_of_timeseries (ff_raw )
266
+ ff = remove_timeseries (ff_raw )
265
267
266
268
# Creates a random perturbation array
267
269
perturbation = create_perturbation (args , random_obj , nlon , nlat )
0 commit comments