Skip to content

Commit

Permalink
Doi Bug Fix (#659)
Browse files Browse the repository at this point in the history
* ENH: AirNow API must have updating some algorithms.  What it's displaying now is what I would have assumed would be the closed reported station.

* ENH: Adding feature for users to be able to get the citation for a datastream.  Also adds text after data are done downloading from ARM to please reference the citation of the datastream

* ENH: Changing doi.org to just doi

* ENH: Moving into if loop for successful file generation
  • Loading branch information
AdamTheisen authored Apr 12, 2023
1 parent 1ca86cd commit c6a769a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions act/discovery/get_armfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ def download_data(username, token, datastream, startdate, enddate, time=None, ou
print(f'[DOWNLOADING] {fname}')
open_bytes_file.write(data)
file_names.append(output_file)
# Get ARM DOI and print it out
print(datastream, start_datetime, end_datetime)
doi = get_arm_doi(datastream, start_datetime.strftime('%Y-%m-%d'), end_datetime.strftime('%Y-%m-%d'))
print('\nIf you use these data to prepare a publication, please cite:\n')
print(textwrap.fill(doi, width=80))
print('')
else:
print(
'No files returned or url status error.\n' 'Check datastream name, start, and end date.'
Expand Down

0 comments on commit c6a769a

Please sign in to comment.