[ https://issues.apache.org/jira/browse/CLIMATE-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362907#comment-15362907 ]
ASF GitHub Bot commented on CLIMATE-818: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/climate/pull/366 > local.load_dataset_from_multiple_netcdf_files() does not accept user entered > lon_name and lat_name fields. > ---------------------------------------------------------------------------------------------------------- > > Key: CLIMATE-818 > URL: https://issues.apache.org/jira/browse/CLIMATE-818 > Project: Apache Open Climate Workbench > Issue Type: Bug > Components: data sources > Affects Versions: 1.1 > Reporter: Alex Goodman > Assignee: Alex Goodman > Fix For: 1.1 > > > For netcdf files in which the lon and lat variable names which are not listed > in the defaults and must be entered by the user, > {{load_dataset_from_multiple_netcdf_files()}} fails: > {code:title=python|borderStyle=solid} > ----> 1 local.load_dataset_from_multiple_netcdf_files('T2M', lat_name='YDim', > lon_name='XDim', file_path='/home/goodman/data/MERRA', > filename_pattern=['/MERRA*.nc']) > /home/goodman/climate/ocw/data_source/local.py in > load_dataset_from_multiple_netcdf_files(variable_name, lat_name, lon_name, > time_name, name, file_list, file_path, filename_pattern, mask_file, > mask_variable, mask_value) > 497 for ifile, file in enumerate(nc_files): > 498 print 'NC file '+str(ifile+1)+'/'+str(nfile), file > --> 499 file_object0= load_file(file, variable_name) > 500 values0= file_object0.values > 501 times.extend(file_object0.times) > /home/goodman/climate/ocw/data_source/local.py in load_file(file_path, > variable_name, variable_unit, elevation_index, name, lat_name, lon_name, > time_name) > 242 > 243 if lat_name is None: > --> 244 lat_name = _get_netcdf_variable_name(LAT_NAMES, netcdf, > variable_name) > 245 if lon_name is None: > 246 lon_name = _get_netcdf_variable_name(LON_NAMES, netcdf, > variable_name) > /home/goodman/climate/ocw/data_source/local.py in > _get_netcdf_variable_name(valid_var_names, netcdf, netcdf_var) > 112 "supplied list of valid variable names. " > 113 ) > --> 114 raise ValueError(error) > 115 > 116 def load_WRF_2d_files(file_path=None, > ValueError: Unable to locate a single matching variable name from the > supplied list of valid variable names. {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)