1
1
#!/usr/bin/env python3
2
2
#
3
3
# remap_restarts package:
4
- # remap_lake_landice_saltwater.py remaps lake, landice, and (data) ocean restarts
4
+ # remap_lake_landice_saltwater.py remaps lake, landice, and (data) ocean restarts
5
5
# using config inputs from `remap_params.yaml`
6
6
#
7
7
# to run, must first load modules (incl. python3) as follows:
@@ -40,7 +40,7 @@ def remap(self):
40
40
print ("\n Remapping land, landice, saltwater.....\n " )
41
41
config = self .config
42
42
cwdir = os .getcwd ()
43
- bindir = os .path .dirname (os .path .realpath (__file__ ))
43
+ bindir = os .path .dirname (os .path .realpath (__file__ ))
44
44
45
45
in_bc_base = config ['input' ]['shared' ]['bc_base' ]
46
46
in_bc_version = config ['input' ]['shared' ]['bc_version' ]
@@ -72,7 +72,7 @@ def remap(self):
72
72
types = '.nc4'
73
73
yyyymmddhh_ = str (config ['input' ]['shared' ]['yyyymmddhh' ])
74
74
75
- label = get_label (config )
75
+ label = get_label (config )
76
76
suffix = yyyymmddhh_ [0 :8 ]+ '_' + yyyymmddhh_ [8 :10 ] + 'z' + types + label
77
77
78
78
out_dir = config ['output' ]['shared' ]['out_dir' ]
@@ -142,13 +142,11 @@ def remap(self):
142
142
if (saltwater_internal ):
143
143
cmd = exe + out_til + ' ' + in_til + ' InData/' + saltwater_internal + ' 0 ' + str (zoom )
144
144
self .run_and_log (cmd , log_name )
145
-
146
- # split Saltwater Internal
147
- # NOTE: split_saltwater==True means that the input restarts are already split.
148
- # So we do not split them again.
149
- if not config ['output' ]['surface' ]['split_saltwater' ]:
150
- print ("\n Splitting Saltwater Internal...\n " )
151
- cmd = bindir + '/SaltIntSplitter.x ' + out_til + ' ' + 'OutData/' + saltwater_internal
145
+
146
+ # split Saltwater
147
+ if config ['output' ]['surface' ]['split_saltwater' ]:
148
+ print ("\n Splitting Saltwater...\n " )
149
+ cmd = bindir + '/SaltIntSplitter.x ' + out_til + ' ' + 'OutData/' + saltwater
152
150
# subprocess.call(shlex.split(cmd))
153
151
openwater = ''
154
152
seaice = ''
@@ -158,17 +156,6 @@ def remap(self):
158
156
cmd = exe + out_til + ' ' + in_til + ' InData/' + saltwater_import + ' 0 ' + str (zoom )
159
157
self .run_and_log (cmd , log_name )
160
158
161
- # split Saltwater Import
162
- # NOTE: split_saltwater==True means that the input restarts are already split.
163
- # So we do not split them again.
164
- if not config ['output' ]['surface' ]['split_saltwater' ]:
165
- print ("\n Splitting Saltwater Import...\n " )
166
- cmd = bindir + '/SaltIntSplitter.x ' + out_til + ' ' + 'OutData/' + saltwater_import
167
- # subprocess.call(shlex.split(cmd))
168
- openwater = ''
169
- seaice = ''
170
- self .run_and_log (cmd , log_name )
171
-
172
159
if (openwater ):
173
160
cmd = exe + out_til + ' ' + in_til + ' InData/' + openwater + ' 0 ' + str (zoom )
174
161
self .run_and_log (cmd , log_name )
0 commit comments