Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
f = Dataset(myfile, 'w', format='NETCDF4')
# write attributes for netcdf
f.description = 'VIC parameter file'
f.history = 'Created: {0}\n'.format(tm.ctime(tm.time()))
f.history += ' '.join(sys.argv) + '\n'
f.source = sys.argv[0] # prints the name of script used
f.username = getuser()
f.host = socket.gethostname()
if lake_grid:
lakes = True
else:
lakes = False
unit = Units(organic_fract=organic_fract, spatial_frost=spatial_frost,
spatial_snow=spatial_snow,
july_tavg_supplied=july_tavg_supplied,
veglib_fcan=veglib_fcan, veglib_photo=veglib_photo,
blowing_snow=blowing_snow,
vegparam_lai=vegparam_lai, vegparam_fcan=vegparam_fcan,
vegparam_albedo=vegparam_albedo, lakes=lakes)
desc = Desc(organic_fract=organic_fract, spatial_frost=spatial_frost,
spatial_snow=spatial_snow,
july_tavg_supplied=july_tavg_supplied,
veglib_fcan=veglib_fcan, veglib_photo=veglib_photo,
blowing_snow=blowing_snow,
vegparam_lai=vegparam_lai, vegparam_fcan=vegparam_fcan,
vegparam_albedo=vegparam_albedo, lakes=lakes)
# target grid
# coordinates