Skip to content

Commit 1453925

Browse files
authored
Merge branch 'main' into feature/mathomp4/remove-sles15-detection
2 parents a417217 + 69587cf commit 1453925

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- Remapping seaicetherom_import_rst and saltwater_import_rst if they are in the restart directory
15+
1416
### Fixed
1517

1618
### Removed

pre/remap_restart/remap_lake_landice_saltwater.py

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ def remap(self):
9696
os.makedirs(OutData_dir)
9797

9898

99-
saltwater = ''
100-
seaice = ''
99+
saltwater_internal = ''
100+
saltwater_import = ''
101+
seaicethermo_internal = ''
102+
seaicethermo_import = ''
101103
landice = ''
102104
lake = ''
103105
route = ''
@@ -108,12 +110,14 @@ def remap(self):
108110
if os.path.exists(dest) : shutil.remove(dest)
109111
print('\nCopy ' + rst + ' to ' +dest)
110112
shutil.copy(rst,dest)
111-
if 'saltwater' in f : saltwater = f
112-
if 'seaice' in f : seaice = f
113-
if 'landice' in f : landice = f
114-
if 'lake' in f : lake = f
115-
if 'roue' in f : route = f
116-
if 'openwater' in f : openwater = f
113+
if 'saltwater_internal' in f : saltwater_internal = f
114+
if 'saltwater_import' in f : saltwater_import = f
115+
if 'seaicethermo_internal' in f : seaicethermo_internal = f
116+
if 'seaicethermo_import' in f : seaicethermo_import = f
117+
if 'landice' in f : landice = f
118+
if 'lake' in f : lake = f
119+
if 'roue' in f : route = f
120+
if 'openwater' in f : openwater = f
117121

118122
in_til = InData_dir+'/' + os.path.basename(in_tile_file)
119123
out_til = OutData_dir+'/'+ os.path.basename(out_tile_file)
@@ -131,8 +135,8 @@ def remap(self):
131135
if os.path.exists(log_name):
132136
os.remove(log_name)
133137

134-
if (saltwater):
135-
cmd = exe + out_til + ' ' + in_til + ' InData/'+ saltwater + ' 0 ' + str(zoom)
138+
if (saltwater_internal):
139+
cmd = exe + out_til + ' ' + in_til + ' InData/'+ saltwater_internal + ' 0 ' + str(zoom)
136140
self.run_and_log(cmd, log_name)
137141

138142
# split Saltwater
@@ -144,12 +148,21 @@ def remap(self):
144148
seaice = ''
145149
self.run_and_log(cmd, log_name)
146150

151+
if (saltwater_import):
152+
cmd = exe + out_til + ' ' + in_til + ' InData/'+ saltwater_import + ' 0 ' + str(zoom)
153+
self.run_and_log(cmd, log_name)
154+
147155
if (openwater):
148156
cmd = exe + out_til + ' ' + in_til + ' InData/' + openwater + ' 0 ' + str(zoom)
149157
self.run_and_log(cmd, log_name)
150158

151-
if (seaice):
152-
cmd = exe + out_til + ' ' + in_til + ' InData/' + seaice + ' 0 ' + str(zoom)
159+
if (seaicethermo_internal):
160+
cmd = exe + out_til + ' ' + in_til + ' InData/' + seaicethermo_internal + ' 0 ' + str(zoom)
161+
print('\n'+cmd)
162+
self.run_and_log(cmd, log_name)
163+
164+
if (seaicethermo_import):
165+
cmd = exe + out_til + ' ' + in_til + ' InData/' + seaicethermo_import + ' 0 ' + str(zoom)
153166
print('\n'+cmd)
154167
self.run_and_log(cmd, log_name)
155168

@@ -197,7 +210,9 @@ def find_rst(self):
197210
"landice_internal_rst" ,
198211
"openwater_internal_rst" ,
199212
"saltwater_internal_rst" ,
200-
"seaicethermo_internal_rst"]
213+
"saltwater_import_rst" ,
214+
"seaicethermo_internal_rst",
215+
"seaicethermo_import_rst"]
201216

202217
rst_dir = self.config['input']['shared']['rst_dir']
203218
yyyymmddhh_ = str(self.config['input']['shared']['yyyymmddhh'])

0 commit comments

Comments
 (0)