Skip to content

Commit 386cb2a

Browse files
committed
fix some runtime errors in UFS_forcing_ensemble_generator for the ij indices
1 parent 2d2dfd4 commit 386cb2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scm/etc/scripts/UFS_forcing_ensemble_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ def main():
174174
# Call UFS_case_gen.py
175175
case_name = args.case_name +"_n" + str(pt).zfill(3)
176176
file_scminput = "../../data/processed_case_input/"+case_name+"_SCM_driver.nc"
177-
if(lons and lats):
177+
if('lons' in locals() and 'lats' in locals()):
178178
loc_string = "-l " +str(lons[pt]) + " " + str(lats[pt])
179179
else:
180-
loc_string = "-ij " + str(i_indices[pt]) + " " + str(j_indices[pt]) + "-t " + str(args.tile)
180+
loc_string = "-ij " + str(i_indices[pt]) + " " + str(j_indices[pt]) + " -t " + str(args.tile)
181181
com = "./UFS_case_gen.py " + loc_string + \
182182
" -i " + args.dir_ic + " -g " + args.dir_grid + " -f " + args.dir_forcing + " -n " + case_name + com_config
183183
print(com)

0 commit comments

Comments
 (0)