<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_with_scipy(file, data_name):
 import scipy.io """ Loads data from a netcdf file. Parameters file : string or file-like The name of the netcdf file to open. data_name : string The name of the data to extract from the netcdf file. Returns ------- data : ndarray The desired data from the netcdf file as ndarray with nan for missing values. """


    logger.debug('Loading data {} of netcdf file {} with scipy.io.'.format(data_name, file))

    f = scipy.io.netcdf.netcdf_file(file, 'r')
    data_netcdf = f.variables[data_name]
    data = np.array(data_netcdf.data, copy = True)
    data[data == data_netcdf.missing_value] = np.nan
    f.close()

    return data