title: THREDDS Server NetCDF file via WMS
body: <p>I have setup TomCat and THREDDS server (loaded war file) and attempted to serve up some *.nc files using via WMS protocol.</p>
  
  <p>I can request the file but all I seem to get back is a black image. </p>
  
  <p><a href="https://i.stack.imgur.com/j81A7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j81A7.png" alt="enter image description here"></a></p>
  
  <p>I had something similar in geoserver but I was able to update the styles layer and setup ranges so that various colours were applied.</p>
  
  <p>I have tried editing the 'wmsConfig.xml'and alter options such as the 'defaultColorScaleRange' but it doesn't seem to have the desired effect.</p>
  
  <p>I have read the documentation a few times but I may be missing something , has anyone overcome this problem ? Any help would be great.</p>
  
  <p>Cheers</p>
  
  <h2>Update 1</h2>
  
  <p>So as suggest below using the built in viewer I can see the image and this is what I would like to get by requesting via WMS.</p>
  
  <p>Using built in viewer</p>
  
  <p>address : <a href="http://10.19.38.63:8080/thredds/godiva2/godiva2.html?server=http://10.19.38.63:8080/thredds/wms/testAll/testData.nc#" rel="nofollow noreferrer">http://10.19.38.63:8080/thredds/godiva2/godiva2.html?server=http://10.19.38.63:8080/thredds/wms/testAll/testData.nc#</a></p>
  
  <p><a href="https://i.stack.imgur.com/qio5o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qio5o.png" alt="enter image description here"></a></p>
  
  <p>Requesting initial attempt</p>
  
  <p><a href="http://10.19.38.63:8080/thredds/wms/testAll/testData.nc?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;CRS=EPSG:4326&amp;width=150&amp;height=150&amp;bbox=-10097025.688358642,-12875664.540581377,20037508.342789244,313086.06785608194&amp;LAYERS=precipitation&amp;format=image/png&amp;STYLES=boxfill/red" rel="nofollow noreferrer">http://10.19.38.63:8080/thredds/wms/testAll/testData.nc?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;CRS=EPSG:4326&amp;width=150&amp;height=150&amp;bbox=-10097025.688358642,-12875664.540581377,20037508.342789244,313086.06785608194&amp;LAYERS=precipitation&amp;format=image/png&amp;STYLES=boxfill/red</a></p>
  
  <p>Which returns just the black square :(</p>
  
  <p>I will carry on and look at the WMS url used by th eopenlayers example, maybe thats the key... ill continue to update my questions as my journey begins :).</p>
  
  <h2>Update 2</h2>
  
  <p>Managed to work out that the SRS being passed in was incorrect and needed altering.</p>
  
  <p>now next stage is to work out how to request a time series over a batch of NCDF files.....</p>
  
  <h2>Update 3</h2>
  
  <p>Managed to work out a way to automate requesting WMS services and with the aid of this great plugin for leaflet maps I have the desired output.</p>
  
  <p><a href="https://github.com/socib/Leaflet.TimeDimension" rel="nofollow noreferrer">https://github.com/socib/Leaflet.TimeDimension</a></p>
  
  <p>Basically call the WMS endpoint with getmap that I require building up the url relevant for the file I need to request.</p>
  
  <p>The next step for me is looking at styled for the returned raster at this point seems like some Java code modification, but at least my initial problems have gone. phew!</p>
  
  <h2>Update 4</h2>
  
  <p>Gone away and tried to rebuild the Java on a project ncWMS which I found was standalone but now incorporated into THREDDS. Still having no joy with transparency raster created from NETCDF.</p>
  
  <p>Looking at THREDDS code a bit more after I also tried changing palletes that didnt seem to work , issue raised </p>
  
  <p><a href="https://github.com/Unidata/thredds/issues/631" rel="nofollow noreferrer">https://github.com/Unidata/thredds/issues/631</a></p>