#NEWLINE# def variableGroup( args ) : #NEWLINE# #INDENT# 'Returns new list of variables by expanding variable that corresponds to group name.' #NEWLINE# groupvars = { #NEWLINE# #INDENT# 'snow' : [ 'swe' , 'salbedo' , 'snow_cover' , 'snow_depth' ] , #NEWLINE# 'drought' : [ 'severity' , 'spi1' , 'spi3' , 'spi6' , 'spi12' ] , #NEWLINE# 'soil' : [ 'soil_moist' , 'soil_temp' ] , #NEWLINE# 'eb' : [ 'net_short' , 'net_long' , 'latent' , 'sensible' , 'grnd_flux' ] , #NEWLINE# 'wb' : [ 'rainf' , 'snowf' , 'evap' , 'runoff' , 'baseflow' ] , #NEWLINE# #UNINDENT# } #NEWLINE# for v in args : #NEWLINE# #INDENT# if ( v in groupvars ) : #NEWLINE# #INDENT# args . remove ( v ) #NEWLINE# for gv in groupvars [ v ] : #NEWLINE# #INDENT# if ( gv not in args ) : #NEWLINE# #INDENT# args . append ( gv ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return args