Skip to content

Commit

Permalink
edited comments and clean exit message (remap_catchANDcn.py)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmao-rreichle committed Jun 16, 2023
1 parent 963a2b6 commit 5f23741
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pre/remap_restart/remap_catchANDcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ def remap(self):
surflay = config['output']['surface']['surflay']
in_tilefile = config['input']['surface']['catch_tilefile']

# determine NPE based on *approximate* number of input and output tiles

if not in_tilefile :
if not in_bcsdir:
exit("You need to provide either input tile file or the input bcs directory")
exit("Must provide either input tile file or input bcs directory")
in_tilefile = glob.glob(in_bcsdir+ '/*.til')[0]

out_tilefile = config['output']['surface']['catch_tilefile']
Expand All @@ -77,11 +79,11 @@ def remap(self):
out_tilenum = int(next(f))
max_tilenum = max(in_tilenum, out_tilenum)
NPE = 0
if (max_tilenum <= 112573): #M36
if (max_tilenum <= 112573) : # no more than EASEv2_M36
NPE = 40
elif (max_tilenum <= 1684725) : #M09
elif (max_tilenum <= 1684725) : # no more than EASEv2_M09
NPE = 80
elif (max_tilenum <= 2496756) : #C720
elif (max_tilenum <= 2496756) : # no more than C720
NPE = 120
else:
NPE = 160
Expand Down

0 comments on commit 5f23741

Please sign in to comment.