diff --git a/compass/ocean/tests/global_ocean/init/initial_state.py b/compass/ocean/tests/global_ocean/init/initial_state.py index 5b6e511bd7..b48bf5d848 100644 --- a/compass/ocean/tests/global_ocean/init/initial_state.py +++ b/compass/ocean/tests/global_ocean/init/initial_state.py @@ -122,7 +122,7 @@ def __init__(self, test_case, mesh, initial_condition, if initial_condition == 'WOA23': self.add_input_file( filename='woa23.nc', - target='woa23_decav_0.25_extrap.20230416.nc', + target='woa23_decav_0.25_jan_extrap.20230416.nc', database='initial_condition_database') elif initial_condition == 'PHC': self.add_input_file( diff --git a/compass/ocean/tests/utility/extrap_woa/extrap_step.py b/compass/ocean/tests/utility/extrap_woa/extrap_step.py index 9e07db0ac1..38b14f951f 100644 --- a/compass/ocean/tests/utility/extrap_woa/extrap_step.py +++ b/compass/ocean/tests/utility/extrap_woa/extrap_step.py @@ -1,4 +1,5 @@ import os +from datetime import datetime from functools import partial from multiprocessing import Pool @@ -48,7 +49,9 @@ def setup(self): """ Determine the output filename """ - self.woa_filename = 'woa23_decav_0.25_extrap.nc' + now = datetime.now() + datestring = now.strftime("%Y%m%d") + self.woa_filename = f'woa23_decav_0.25_jan_extrap.{datestring}.nc' self.add_output_file(self.woa_filename) def run(self): @@ -162,7 +165,7 @@ def _extrap_vert(self, use_ocean_mask): out_filename = 'extrap_ocean/woa_extrap.nc' else: in_filename = 'extrap_land/woa_extrap_horiz.nc' - out_filename = 'woa23_decav_0.25_extrap.nc' + out_filename = self.woa_filename ds = xr.open_dataset(in_filename)