<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>One advantage of having mapserver run as a cgi, is it is relatively easy to have a cgi script wrapper to enable such variable substitution by generating a modified mapfile then invoking mapserver to use this.<br><br>Not necessarily the most efficient way, but very effective.<br><br>A simple example would read the appropriate substring from the URL querystring,<br>create a new mapfile with something like:<br>cat &lt;mapfile template&gt; | sed 's/&lt;variable_name&gt;/&lt;new_string&gt;/' &gt; &lt;new_mapfile&gt;<br>&amp; fire off mapserver with the new mapfile<br><br>Maybe not ideal for lots of concurrent users, but adequate for some circumstances, &amp; may work for you?<br><br><br>Cheers,<br><br>&nbsp;&nbsp; Brent Wood<br><br>--- On <b>Mon, 3/5/12, teknocreator <i>&lt;teknocreator@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px
 solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: teknocreator &lt;teknocreator@gmail.com&gt;<br>Subject: [mapserver-users] RE: WMS for netcdf [SEC=UNCLASSIFIED]<br>To: mapserver-users@lists.osgeo.org<br>Date: Monday, March 5, 2012, 4:19 AM<br><br><div class="plainMail">Kathleen,<br><br>I've searched through the lists and on the web for an answer to your issue<br>as I have it too only with GRIB data.&nbsp; The MapServer docs seem to indicate<br>that variable substitution won't work for the PROCESSING directive. <br>Therefore I tried several variations "Changing map file parameters via a<br>form or a URL".&nbsp; What should've worked here considering that part of the<br>documentation is to add this to the GetMap request string:<br><br>map[layer].processing[0]="BANDS=01" <br><br>because it was the first PROCESSING directive for my layer and it needs a<br>string for the directive.&nbsp; But, I received an msloadLayer error.&nbsp; I
 tried a<br>few variations but all ended up with the same error.&nbsp; I've seen folks have a<br>similar issue with this in the MS Users list with no solution at present.<br><br>While what Puneet wrote may be a solution for you and possibly our GRIB data<br>as well, it seems like a much more complicated way just to get at a<br>particular band in the file.&nbsp; I do see why this has been done as NetCDF does<br>come in many flavors and there's the possibility of 4 dimensions in the<br>file.&nbsp; There are many links on using WCS with NetCDF, a good number coming<br>from UCAR.<br><br>Still, this looks like a possible code problem where the ability to change<br>map file parameter via a URL does not work in this case or else the ability<br>to change BANDS needs to be added to variable substitution.&nbsp; <br><br>Hopefully, someone from MapServer can help here.&nbsp; Looks like I'm going to be<br>investigating WCS, though.&nbsp; I'll definitely be checking
 back on this one.<br><br>--<br>View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/WMS-for-netcdf-SEC-UNCLASSIFIED-tp4519496p4545262.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/WMS-for-netcdf-SEC-UNCLASSIFIED-tp4519496p4545262.html</a><br>Sent from the Mapserver - User mailing list archive at Nabble.com.<br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></td></tr></table>