@@ -11,14 +11,13 @@ def __init__(
1111 self ,
1212 component ,
1313 package ,
14+ mesh_name ,
15+ mesh_id ,
1416 name = 'forward' ,
1517 indir = None ,
1618 subdir = None ,
1719 update_eos = False ,
1820 yaml_filename = 'forward.yaml' ,
19- mesh_filename = 'mesh.nc' ,
20- init_filename = 'init.nc' ,
21- graph_filename = 'culled_graph.info' ,
2221 output_filename = 'output.nc' ,
2322 ntasks = None ,
2423 min_tasks = None ,
@@ -52,18 +51,15 @@ def __init__(
5251 min_tasks = min_tasks ,
5352 update_eos = update_eos ,
5453 openmp_threads = 1 ,
55- graph_target = graph_filename ,
54+ graph_target = 'graph.info' ,
5655 )
57- self .mesh_filename = mesh_filename
58- self .init_filename = init_filename
59- self .graph_filename = graph_filename
56+ self .mesh_filename = f'{ mesh_name } .{ mesh_id } '
57+ self .graph_filename = f'graph.info.{ mesh_id } '
6058 self .resolution = resolution_for_cell_count
59+
6160 # make sure output is double precision
6261 self .add_yaml_file ('polaris.ocean.config' , 'output.yaml' )
6362
64- # this is set in the yaml file
65- # self.add_yaml_file('polaris.ocean.eos', 'teos10.yaml')
66-
6763 self .add_yaml_file (
6864 package ,
6965 yaml_filename ,
@@ -91,16 +87,20 @@ def setup(self):
9187 config = self .config
9288 model = config .get ('ocean' , 'model' )
9389 # TODO: remove as soon as Omega no longer hard-codes this file
90+ input_filename = f'ocean.{ self .mesh_filename } '
9491 if model == 'omega' :
92+ # TODO eos_type = self.config.get('ocean', 'eos_type')
93+ eos_type = 'teos10'
94+ input_filename = f'{ input_filename } .{ eos_type } .nc'
9595 self .add_input_file (
96- target = self . mesh_filename ,
96+ target = input_filename ,
9797 filename = 'OmegaMesh.nc' ,
98- database = 'realistic_global' ,
98+ database = f 'realistic_global/ { model } ' ,
9999 )
100100 self .add_input_file (
101- target = self . init_filename ,
101+ target = input_filename ,
102102 filename = 'init.nc' ,
103- database = 'realistic_global' ,
103+ database = f 'realistic_global/ { model } ' ,
104104 )
105105 # TODO we need to add this file to input database if we want to
106106 # reconstruct zonal, meridional components before Omega has those
@@ -112,9 +112,9 @@ def setup(self):
112112 # )
113113 else :
114114 self .add_input_file (
115- target = 'culled_graph.info' ,
116- filename = self . graph_filename ,
117- database = 'realistic_global' ,
115+ target = self . graph_filename ,
116+ filename = 'graph.info' ,
117+ database = f 'realistic_global/ { model } ' ,
118118 )
119119
120120 def compute_cell_count (self ):
0 commit comments