Skip to content

Commit 96b75c7

Browse files
committed
Change file_name to mesh_name
1 parent 783bf64 commit 96b75c7

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

ocean/coupling_files_E3SM/create_E3SM_MPAS_coupling_files.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[main]
22
date_string = 181031
3-
input_file = oUSDEQU300cr3.nc
4-
MPAS_Tools = /turquoise/usr/projects/climate/kehoch/repos/tools
5-
mesh_name = mesh12345
6-
3+
mesh_name = oUSDEQU300cr3
4+
MPAS_Tools = /usr/projects/climate/mpeterse/repos/tools/master/
75

86
[initial_condition_ocean]
97
enable = true

ocean/coupling_files_E3SM/create_E3SM_MPAS_coupling_files.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ def initial_condition_ocean(config):
3030
os.chdir(section)
3131

3232
# obtain configuration settings
33-
input_file = config.get('main', 'input_file')
33+
mesh_name = config.get('main', 'mesh_name')
3434

3535
# create links
36-
make_link('../' + input_file, input_file)
36+
make_link('../' + mesh_name+'.nc', mesh_name+'.nc')
3737

3838
# command line execution
3939
args = ['ncks', '-x', '-v', 'xtime',
4040
'-O', # overwrite file if it exists
41-
input_file,
42-
input_file + '_no_xtime.nc'
41+
mesh_name+'.nc',
42+
mesh_name + '_no_xtime.nc'
4343
]
4444

4545
run_command(args)
@@ -87,10 +87,10 @@ def initial_condition_seaice(config):
8787
os.chdir(section)
8888

8989
# obtain configuration settings
90-
input_file = config.get('main', 'input_file')
90+
mesh_name = config.get('main', 'mesh_name')
9191

9292
# create links
93-
make_link('../' + input_file, input_file)
93+
make_link('../' + mesh_name+'.nc', mesh_name+'.nc')
9494

9595
# command line execution
9696
args = ['ncks', '-x', '-v',
@@ -101,8 +101,8 @@ def initial_condition_seaice(config):
101101
vertCoordMovementWeights,boundaryLayerDepth,seaIcePressure,\
102102
atmosphericPressure,filteredSSHGradientZonal,filteredSSHGradientMeridional',
103103
'-O', #Overwrite existing file
104-
input_file,
105-
'seaice.' + input_file
104+
mesh_name+'.nc',
105+
'seaice.' + mesh_name+'.nc'
106106
]
107107

108108
run_command(args)
@@ -116,23 +116,23 @@ def scrip(config):
116116
os.chdir(section)
117117

118118
# obtain configuration settings
119-
input_file = config.get('main', 'input_file')
119+
mesh_name = config.get('main', 'mesh_name')
120120

121121
# create links
122-
make_link('../' + input_file, input_file)
122+
make_link('../' + mesh_name+'.nc', mesh_name+'.nc')
123123

124124
# link to MPAS Tools directory
125125
MPAS_Tools = config.get('main', 'MPAS_Tools')
126126
make_link(MPAS_Tools +
127-
'/mesh_tools/create_SCRIP_files/create_SCRIP_file_from_MPAS_mesh.py',
127+
'/mesh_tools/create_SCRIP_files/create_SCRIP_file_from_MPAS_mesh.py',
128128
'create_SCRIP_file_from_MPAS_mesh.py')
129129

130130
# get date and mesh name
131131
date_string = config.get('main', 'date_string')
132132
mesh_name = config.get('main', 'mesh_name')
133133

134134
# name scrip files
135-
scrip_file = (mesh_name + '.' + date_string + '.nc')
135+
scrip_file = (mesh_name + '.nc')
136136
ocean_scrip_file = ('ocean.' + mesh_name + '.scrip.' + date_string +'.nc')
137137

138138
# command line execution
@@ -154,7 +154,7 @@ def transects_and_regions(config):
154154
make_link(MPAS_Tools +
155155
'/compiled_mesh_conversion_tools/mesh_tools/mesh_conversion_tools/bin/gr/gnu/MpasMaskCreator.x',
156156
'MpasMaskCreator.x')
157-
make_link('../scrips/' + mesh_name + '.' + date + '.nc', mesh_name + '.' + date + '.nc')
157+
make_link('../scrips/' + mesh_name + '.nc', mesh_name + '.' + date + '.nc')
158158
make_link(
159159
'/usr/projects/climate/mpeterse/analysis_input_files/geojson_files/SingleRegionAtlanticWTransportTransects.geojson',
160160
'SingleRegionAtlanticWTransportTransects.geojson')

0 commit comments

Comments
 (0)