@@ -283,11 +283,37 @@ def get_avail(
283283 len (self .avail ) > 0
284284 ), "Your search returned no results; try different search parameters"
285285
286- def _place_harmony_subset_order (
286+ def place_harmony_subset_order (
287287 self ,
288- request_params ,
288+ # TODO: remove `CMRparams` from this function. This should only take subset params.
289+ CMRparams ,
289290 subsetparams ,
291+ # TODO: support passing in a geometry filepath
292+ geom_filepath = None ,
290293 ) -> list [str ]:
294+ """
295+ Place a harmony subset order.
296+
297+ Parameters
298+ ----------
299+ CMRparams :
300+ Dictionary of properly formatted CMR search parameters.
301+ subsetparams : dictionary
302+ Dictionary of properly formatted subsetting parameters. An empty dictionary
303+ is passed as input here when subsetting is set to False in query methods.
304+ geom_filepath : string, default None
305+ String of the full filename and path when the spatial input is a file.
306+
307+ Notes
308+ -----
309+ This function is used by query.Query.order_granules(), which automatically
310+ feeds in the required parameters.
311+
312+ See Also
313+ --------
314+ query.Query.order_granules
315+ """
316+ request_params = apifmt .combine_params (CMRparams , subsetparams )
291317 concept_id = get_concept_id (
292318 product = request_params ["short_name" ],
293319 version = request_params ["version" ],
@@ -347,55 +373,20 @@ def _place_harmony_subset_order(
347373
348374 return self .orderIDs
349375
350- def _place_non_subset_order (
376+ def place_non_subset_order (
351377 self ,
352378 CMRparams : CMRParams ,
353- ):
354- # TODO: use e.g., `earthaccess` to download files un-processed by harmony.
355- raise NotImplementedError ("Support for non-subset orders is not implemented." )
356- self .get_avail (CMRparams )
357- request_params = apifmt .combine_params (CMRparams , {"agent" : "NO" })
358-
359- # DevNote: currently, default subsetting DOES NOT include variable subsetting,
360- # only spatial and temporal
361- # DevGoal: add kwargs to allow subsetting and more control over request options.
362- def place_order (
363- self ,
364- CMRparams : CMRParams ,
365- subsetparams ,
366- verbose ,
367- subset = True ,
368- geom_filepath = None ,
369379 ):
370380 """
371- Place an order for the available granules for the query object.
372- Adds the list of zipped files (orders) to the granules data object (which is
373- stored as the `granules` attribute of the query object).
374- You must be logged in to Earthdata to use this function.
381+ Place an order for data files with `earthaccess`.
375382
376383 Parameters
377384 ----------
378385 CMRparams :
379386 Dictionary of properly formatted CMR search parameters.
380- reqparams :
381- Dictionary of properly formatted parameters required for searching, ordering,
382- or downloading from NSASA (via harmony).
383387 subsetparams : dictionary
384388 Dictionary of properly formatted subsetting parameters. An empty dictionary
385389 is passed as input here when subsetting is set to False in query methods.
386- verbose : boolean, default False
387- Print out all feedback available from the order process.
388- Progress information is automatically printed regardless of the value of verbose.
389- subset : boolean, default True
390- Apply subsetting to the data order from the NSIDC, returning only data that meets the
391- subset parameters.
392- Spatial and temporal subsetting based on the input parameters happens
393- by default when subset=True, but additional subsetting options are available.
394- Spatial subsetting returns all data that are within the area of interest
395- (but not complete granules.
396- This eliminates false-positive granules returned by the metadata-level search)
397- geom_filepath : string, default None
398- String of the full filename and path when the spatial input is a file.
399390
400391 Notes
401392 -----
@@ -406,17 +397,10 @@ def place_order(
406397 --------
407398 query.Query.order_granules
408399 """
409- if subset is False :
410- self ._place_non_subset_order (CMRparams )
411- else :
412- # TODO: why are we combining these like this? We could just pass in
413- # these values separately. Eventually would like to collapse this
414- # down into just one `HarmonySubsetParams`.
415- request_params = apifmt .combine_params (CMRparams , subsetparams )
416- return self ._place_harmony_subset_order (
417- request_params ,
418- subsetparams ,
419- )
400+ # TODO: use e.g., `earthaccess` to download files un-processed by harmony.
401+ raise NotImplementedError ("Support for non-subset orders is not implemented." )
402+ self .get_avail (CMRparams )
403+ request_params = apifmt .combine_params (CMRparams , {"agent" : "NO" })
420404
421405 def download (self , verbose , path , restart = False ):
422406 """
0 commit comments