<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <p style="margin-bottom: 0in; line-height: 100%">Hello, </p>
    <p style="margin-bottom: 0in; line-height: 100%">I am trying to
      generate WMS services from layers in a NetCDF file. WCS services
      already work well...While a WMS call does return an image (ex.
      PNG), it is all white or transparent, whereas a WCS call to the
      same layer
      returns an image with a range of pixel values. I have run gdalinfo
      on
      the layer to get the data range, and have tried using the data
      range
      to set the PROCESSING DIRECTIVE to scale the output (e.g.
      PROCESSING
      "SCALE=311.76470947266
      ,423.52941894531
      "
      ). I have also
      used the SCALE=AUTO directive, but both just return a white image.
      When I try using WMS on this layer in QGIS, it is correctly
      projected, but invisible (zoom to extents on the imported WMS
      layer
      is correct). Below is the output from gdalinfo to get the original
      data range, and then the mapfile entry for the layer to see how I
      have set this up....</p>
    <p style="margin-bottom: 0in; line-height: 100%">gdalinfo
      NETCDF:"flat_sample.nc":I_lw</p>
    <p style="margin-bottom: 0in; line-height: 100%">Band 1 Block=170x1
      Type=Float32, ColorInterp=Undefined
    </p>
    Min=311.765
    Max=423.529<br>
    Minimum=311.765,
    Maximum=423.529, Mean=344.247, StdDev=16.599<br>
    NoData
    Value=9.96920996838686905e+36<br>
    Metadata:<br>
    ipw_desc=incoming thermal (long-wave) radiation<br>
    NETCDF_DIM_time=14<br>
    NETCDF_VARNAME=I_lw<br>
    standard_name=downwelling_longwave_flux_in_air<br>
    STATISTICS_MAXIMUM=423.52941894531<br>
    STATISTICS_MEAN=344.24709697293<br>
    STATISTICS_MINIMUM=311.76470947266<br>
    STATISTICS_STDDEV=16.598777681661<br>
    units=W m-2
    <p style="margin-bottom: 0in; line-height: 100%">********************************************************************************</p>
    <p style="margin-bottom: 0in; line-height: 100%">LAYER
    </p>
    DATA
'NETCDF:"/geodata/watershed-data/8c/8c18e10f-44b0-4462-bf4f-1c27c984aece/flat_sample.nc":I_lw'<br>
    EXTENT
    -116.142905556 43.7294055556 -116.137583333 43.7326972222<br>
    METADATA<br>
    "wcs_label" "downwelling_longwave_flux_in_air"<br>
    "layer_title" "downwelling_longwave_flux_in_air"<br>
    "raster_selected" "yes"<br>
    "wms_metadataurl_type" "FGDC-STD-001-1998"<br>
    "ows_keywordlist" ""<br>
    "wcs_formats" "GEOTIFF_16"<br>
    "background" "no"<br>
    "wcs_bands_description" "ISNoBal Timesteps 1-16"<br>
    "ows_abstract" "incoming thermal (long-wave) radiation"<br>
    "wcs_rangeset_name" "Timesteps"<br>
    "wms_metadataurl_href"
<a class="moz-txt-link-rfc2396E" href="http://129.24.63.85//apps/vwp/datasets/05e73f4f-51d3-417c-9757-e376b5969a9c/metadata/FGDC-STD-001-1998.xml">"http://129.24.63.85//apps/vwp/datasets/05e73f4f-51d3-417c-9757-e376b5969a9c/metadata/FGDC-STD-001-1998.xml"</a><br>
    "wcs_bands_values" "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16"<br>
    "legend_display" "yes"<br>
    "queryable" "no"<br>
    "wcs_rangeset_label" "netCDF flat_sample.nc"<br>
    "time_sensitive" "no"<br>
    "ows_srs"
    "epsg:26911"<br>
    "wcs_bands_name" "Timestep"<br>
    "wcs_bands_rangeitem" "_bands"<br>
    "ows_title" "incoming thermal (long-wave) radiation""static" "no"<br>
    "wms_metadataurl_format" "text/xml"<br>
    "wcs_bands_label" "Timestep Number"<br>
    "wcs_rangeset_axes" "bands"<br>
    "wms_encoding" "UTF-8"<br>
    "wcs_enable_request" "*"<br>
    "layer_data_units" "W m-2"<br>
    "annotation_name" "downwelling_longwave_flux_in_air:
    2015-06-19 20:30:29.202558"<br>
    END # METADATANAME
    "downwelling_longwave_flux_in_air"<br>
    PROCESSING
    "CLOSE_CONNECTION=DEFER"<br>
    PROCESSING
    "SCALE=311.76470947266
    ,423.52941894531
    "<br>
    #PROCESSING
    “SCALE=AUTO”<br>
    PROJECTION<br>
    "init=epsg:26911"<br>
    END #
    PROJECTION<br>
    STATUS ON<br>
    TILEITEM
    "location"<br>
    TYPE RASTER<br>
    UNITS METERS<br>
    END # LAYER
    <p style="margin-bottom: 0in; line-height: 100%">********************************************************************************</p>
    <p style="margin-bottom: 0in; line-height: 100%">It seems I am
      missing something here....would appreciate any insight into how to
      return a valid image in WMS....<br>
    </p>
    <p style="margin-bottom: 0in; line-height: 100%">Thanks, Bill<br>
    </p>
    <p style="margin-bottom: 0in; line-height: 100%"><br>
    </p>
  </body>
</html>