From 8cbfbfba65dad28e9cd50de2c1ec2a70838475d4 Mon Sep 17 00:00:00 2001 From: shimwell Date: Mon, 12 Aug 2019 20:16:57 +0100 Subject: [PATCH] fixed filenames to account for odd 800k zip file --- convert_jeff32.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/convert_jeff32.py b/convert_jeff32.py index 4b97aaf..8893255 100755 --- a/convert_jeff32.py +++ b/convert_jeff32.py @@ -64,8 +64,8 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, release_details = { '3.2':{ 'base_url': 'https://www.oecd-nea.org/dbforms/data/eva/evatapes/jeff_32/Processed/', - 'files': [f'JEFF32-ACE-{temperature}K.tar.gz' for temperature in args.temperatures] - +['TSLs.tar.gz'], + 'files': [f'JEFF32-ACE-{t}K.zip' if t=='800' else f'JEFF32-ACE-{t}K.tar.gz' for t in args.temperatures] + +['TSLs.tar.gz'], 'neutron_files':ace_files_dir.rglob('*.ACE'), 'metastables': ace_files_dir.rglob('*M.ACE'), 'sab_files': ace_files_dir.glob('ANNEX_6_3_STLs/*/*.ace'), @@ -78,17 +78,16 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, download_warning = """ WARNING: This script will download up to {} GB of data. Extracting and processing the data may require as much as {} GB of additional free disk -space. Note that if you don't need all 11 temperatures, you can modify the -'files' list in the script to download only the data you want. +space. Note that if you don't need all 11 temperatures, you can used the +--temperature argument to download only the temperatures you want. """.format(release_details[args.release]['compressed_file_size'], release_details[args.release]['uncompressed_file_size']) -print(download_warning) - # ============================================================================== # DOWNLOAD FILES FROM OECD SITE if args.download: + print(download_warning) for f in release_details[args.release]['files']: download(urljoin(release_details[args.release]['base_url'], f))