Skip to content

Commit

Permalink
Update netcdf_cache.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Pperezhogin authored Oct 22, 2023
1 parent fc8f9e0 commit 1840f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Figure-plotting/helpers/netcdf_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __get__(self, instance, owner):
funcname = self.function.__name__
#filename = os.path.join(instance.folder, funcname+'_'+instance.key+'.nc')
#filename = os.path.join('/scratch/pp2681/mom6/cache', funcname+'_'+instance.key+'.nc')
filename = os.path.join('/scratch/pp2681/mom6/cache', '-'.join(instance.folder.split('/')[4:-2])+'-'+instance.key+'-'+funcname+'.nc')
filename = os.path.join('cache', '-'.join(instance.folder.split('/')[4:-2])+'-'+instance.key+'-'+funcname+'.nc')
#print(filename)
if instance.recompute:
try:
Expand Down Expand Up @@ -92,4 +92,4 @@ def free_of_NaNs_and_zeros(value):
if value.notnull().sum() > value.size/2: # 50% of values are not nan
return True
else:
False
False

0 comments on commit 1840f56

Please sign in to comment.