Skip to content

Commit 82c1d6b

Browse files
committed
tpl parnames short
1 parent 8163384 commit 82c1d6b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
41 Bytes
Binary file not shown.

lumpyrem/lumprem.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,13 @@ def write_file(file, obj, template=False):
319319
tmp = copy.deepcopy(self)
320320

321321
for p in params:
322-
tmp.__dict__[p] = ("$"+p+"_"+name).ljust(13)+'$'
322+
predux = p[:2]
323+
nameredux = name[:6]
324+
tmp.__dict__[p] = ("$"+predux+"_"+nameredux).ljust(13)+'$'
323325
if p =='vegfile':
324-
tmp.__dict__[p] = (("$cropfac_"+name).ljust(13)+'$', ("$gamma_"+name).ljust(13)+'$')
326+
tmp.__dict__[p] = (("$cf_"+nameredux).ljust(13)+'$', ("$gm_"+nameredux).ljust(13)+'$')
325327
if p =='irrigfile':
326-
tmp.__dict__[p] = (1, ("$gwirigfrac_"+name).ljust(13)+'$')
328+
tmp.__dict__[p] = (1, ("$if_"+nameredux).ljust(13)+'$')
327329
write_file(tpl, tmp, template=True)
328330
if print_output==True:
329331
print('PEST template file written to: \n'+tpl+'\n')

0 commit comments

Comments
 (0)