Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
if target_grid[XVAR].ndim == 1:
f.createDimension('lon', len(target_grid[XVAR]))
f.createDimension('lat', len(target_grid[YVAR]))
dims2 = ('lat', 'lon', )
coordinates = None
v = f.createVariable('lat', NC_DOUBLE, ('lat',))