Commit 6d32968e authored by GROUAZEL's avatar GROUAZEL

logging warning too noisy

parent 7664682f
......@@ -44,7 +44,7 @@ def init_spectrum_style_default():
spectrumStyle={'nrow':1,'ncolumn':1,'xsize':9,'ysize':6,
'titlecolor':"black", 'titlesize':12,'legendsize':10,'markersize':10,
'colormap':my_cmap, 'circleradius':[50,100,200,400],# 'legend_style':None,
'vmin':None,'vmax':None, 'colorbarTitle':'Spectral energy',
'vmin':None,'vmax':None, 'colorbarTitle':'Spectral energy [$m^4$]',
'hs':1}
return spectrumStyle
......@@ -199,14 +199,17 @@ class Spectrum:
plt.close(myFig)
def write(self,outputfile,showresult=False,style=None,
overwrite=False):
overwrite=False,dpi=100):
if not(overwrite) and (os.path.isfile(outputfile)):
pass
print('file:'+outputfile+' already exist!')
else:
myFig = self.generate(style=style)
myFig.savefig(outputfile)
if 'eps' in outputfile:
myFig.savefig(outputfile,format='eps', dpi=dpi)
else:
myFig.savefig(outputfile,format='png', dpi=dpi)
if showresult:
plt.show()
plt.close(myFig)
......
......@@ -57,6 +57,10 @@ class SpectrumReaderWw3(AbstractSpectrumReader):
return wsys
@staticmethod
def read_wind(ncf):
"""
since Mickael Accensi wind in colocated WW3 spectra a in FROM convention 'example: +90° mean coming from east'
#which is the meteorological convention also used in the new IPF2.90 since 13march2018
"""
wind={}
wind['U'] = ncf.variables['wind_speed_model_u'][:]
wind['U'] = wind['U'][0]
......
......@@ -437,7 +437,7 @@ def add_spectrum_to_plot(fig,myspectrum,vmin,vmax,colormap,cb_label,nrow,ncolumn
if isinstance(part_u,np.float):# or isinstance(part_u,np.float):
part_u = np.array([part_u])
if len(part_u)==1:
logging.warning('only one value of partitionning: %s',part_u)
logging.debug('only one value of partitionning: %s',part_u)
#draw each coutour
for cpt in part_u:
ppart=myspectrum.spec_data.part*0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment