diff --git a/ocw/data_source/podaac_datasource.py b/ocw/data_source/podaac_datasource.py index 252b1990..1efbd2ce 100644 --- a/ocw/data_source/podaac_datasource.py +++ b/ocw/data_source/podaac_datasource.py @@ -46,17 +46,18 @@ def convert_times_to_datetime(time): return [parsed_time.num2date(x) for x in time[:]] -def list_available_extract_granule_dataset_ids(): +def list_available_level4_extract_granule_dataset_ids(): '''Convenience function which returns an up-to-date \ - list of available granule dataset id's which can be \ + list of available level4 blended granule dataset id's which can be \ used in the granule extraction service. :returns: a comma-seperated list of granule dataset id's. ''' podaac_utils = PodaacUtils() - return podaac_utils.list_all_available_extract_granule_dataset_ids() + return podaac_utils.list_level4_dataset_ids() -def subset_granule(variable, dataset_id='', name='', path='/tmp', input_file_path=''): + +def subset_granule(variable, name='', path='/tmp', input_file_path=''): '''Subset Granule service allows users to Submit subset jobs. \ Use of this service should be preceded by a Granule Search in \ order to identify and generate a list of granules to be subsetted. @@ -64,11 +65,6 @@ def subset_granule(variable, dataset_id='', name='', path='/tmp', input_file_pat :param variable: The name of the variable to read from the dataset. :type variable: :mod:`string` - :param dataset_id: dataset persistent ID. datasetId or \ - shortName is required for a granule search. Example: \ - PODAAC-ASOP2-25X01 - :type dataset_id: :mod:`string` - :param name: (Optional) A name for the loaded dataset. :type name: :mod:`string` @@ -95,9 +91,9 @@ def extract_l4_granule(variable, dataset_id='', name='', path='/tmp'): :param variable: The name of the variable to read from the dataset. :type variable: :mod:`string` - :param dataset_id: dataset persistent ID. datasetId or \ - shortName is required for a granule search. Example: \ - PODAAC-ASOP2-25X01 + :param dataset_id: dataset persistent ID. datasetId \ + is required for a granule search. Example: \ + PODAAC-CCF35-01AD5 :type dataset_id: :mod:`string` :param name: (Optional) A name for the loaded dataset. @@ -147,8 +143,8 @@ def read_dataset(name='', granule_name ='', variable=None, path='/tmp'): lons = np.array(d.variables[lon][:]) values = np.array(dataset[:]) origin = { - 'source': 'PO.DAAC', - 'url': 'podaac.jpl.nasa.gov' + 'source': 'NASA JPL PO.DAAC', + 'url': 'https://podaac.jpl.nasa.gov' } # Removing the downloaded temporary granule before creating the OCW diff --git a/ocw/tests/test_podaac.py b/ocw/tests/test_podaac.py index 09b69018..6c600ab3 100644 --- a/ocw/tests/test_podaac.py +++ b/ocw/tests/test_podaac.py @@ -74,8 +74,8 @@ def test_valid_date_conversion(self): def test_dataset_origin(self): print('in test_dataset_origin') - self.assertEquals(self.dataset.origin['source'], 'PO.DAAC') - self.assertEquals(self.dataset.origin['url'], 'podaac.jpl.nasa.gov') + self.assertEquals(self.dataset.origin['source'], 'NASA JPL PO.DAAC') + self.assertEquals(self.dataset.origin['url'], 'https://podaac.jpl.nasa.gov') def test_custom_name(self): print('in test_custom_name')