diff --git a/modules/deeplearning/amv_raob.py b/modules/deeplearning/amv_raob.py index 634f258bdb7c20e7a21f52a4fa360c4b87f5291a..6317bdcb2d666cd4dd5ac9d4e49832cef4ecd87d 100644 --- a/modules/deeplearning/amv_raob.py +++ b/modules/deeplearning/amv_raob.py @@ -27,12 +27,15 @@ gfs_date_format = '%y%m%d' h4_to_h5_path = home_dir + '/h4toh5convert' -data_dir = '/home/rink/data' +data_dir = '/scratch/long/rink' converted_file_dir = data_dir + '/gfs_h5' CACHE_GFS = True goes_cache_dir = data_dir + '/goes16' CACHE_GOES = True +COPY_GOES = True +if not COPY_GOES: + CACHE_GOES = False fmt = '%Y%j%H' @@ -737,10 +740,11 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa return None, None, None, None # copy from archive to local drive - local_path = goes_cache_dir + '/' + os.path.split(fC)[1] - if not os.path.exists(local_path): - subprocess.call(['cp', fC, goes_cache_dir]) - subprocess.call(['chmod', 'u+w', local_path]) + if COPY_GOES: + local_path = goes_cache_dir + '/' + os.path.split(fC)[1] + if not os.path.exists(local_path): + subprocess.call(['cp', fC, goes_cache_dir]) + subprocess.call(['chmod', 'u+w', local_path]) # Navigation, convert to BT/REFL try: @@ -757,10 +761,11 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa if TRIPLET or CONV3D: # copy from archive to local drive - local_path_l = goes_cache_dir + '/' + os.path.split(fL)[1] - if not os.path.exists(local_path_l): - subprocess.call(['cp', fL, goes_cache_dir]) - subprocess.call(['chmod', 'u+w', local_path_l]) + if COPY_GOES: + local_path_l = goes_cache_dir + '/' + os.path.split(fL)[1] + if not os.path.exists(local_path_l): + subprocess.call(['cp', fL, goes_cache_dir]) + subprocess.call(['chmod', 'u+w', local_path_l]) # Navigation, convert to BT/REFL try: @@ -775,9 +780,10 @@ def get_images(lons, lats, timestamp, channel_list, half_width, step, do_norm=Fa bt_or_refl_l = pug_l1b_l.refl # copy from archive to local drive - local_path_r = goes_cache_dir + '/' + os.path.split(fR)[1] - if not os.path.exists(local_path_r): - subprocess.call(['cp', fR, goes_cache_dir]) + if COPY_GOES: + local_path_r = goes_cache_dir + '/' + os.path.split(fR)[1] + if not os.path.exists(local_path_r): + subprocess.call(['cp', fR, goes_cache_dir]) subprocess.call(['chmod', 'u+w', local_path_r]) # Navigation, convert to BT/REFL