<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to How_To_Import_New_Map_Data</title><link>https://sourceforge.net/p/carbones/wiki/How_To_Import_New_Map_Data/</link><description>Recent changes to How_To_Import_New_Map_Data</description><atom:link href="https://sourceforge.net/p/carbones/wiki/How_To_Import_New_Map_Data/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 20 Mar 2015 14:20:04 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/carbones/wiki/How_To_Import_New_Map_Data/feed" rel="self" type="application/rss+xml"/><item><title>How_To_Import_New_Map_Data modified by Anonymous</title><link>https://sourceforge.net/p/carbones/wiki/How_To_Import_New_Map_Data/</link><description>&lt;div class="markdown_content"&gt;&lt;hr /&gt;
&lt;p&gt;Check Data &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;- Check you have all expected .nc files. &lt;/p&gt;
&lt;p&gt;- You may also have some kind of minimum/maximum files, ideally seperated by variable and in .dat format (which can be simply changed to .csv). &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Create Local ncWMS &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;You must have an Apache Tomcat server available on the desired testing machine. &lt;/p&gt;
&lt;p&gt;Download ncWMS here: &lt;a href="http://en.sourceforge.jp/projects/sfnet_ncwms/downloads/ncwms/1.0RC2/ncWMS-1.0RC2-src.zip" rel="nofollow"&gt;http://en.sourceforge.jp/projects/sfnet_ncwms/downloads/ncwms/1.0RC2/ncWMS-1.0RC2-src.zip/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Place the ncWMS .war file within you Tomcat's WebApps directory, and then restart the tomcat so that it should unpack and build the .war application. &lt;/p&gt;
&lt;p&gt;You can test whether it has worked usually by going to localhost:8080/ncWMS-1.0RC2/ The default login details are User: admin Pass: ncWMS &lt;/p&gt;
&lt;p&gt;The password can only be changed via the config.xml with details on changing this later. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;*UPDATE&lt;/em&gt;&lt;/strong&gt;* Carbones now uses a patched version of the latest release candidate 1.0RC3, referred to as ncWMSrc3_patch. You can download this from the ftp, /home/carbones/ncWMSrc3_patch rather than the old build at sourceforge. &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Create NCML Files &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;ncWMS uses a system known as NCML which essentially allows you to change the structure of your .nc files to remain compliant with the WMS standards (with which ncWMS can read and automate map image creation). &lt;/p&gt;
&lt;p&gt;The data will first of all need to be checked for inconsistencies with the existing .nc files. To do this you can use the tool toolsUI-4.2.jar &lt;/p&gt;
&lt;p&gt;When you have found the differences the ncml creation tool can start being modified. Such examples may be redundnacy in one the ncml tool's outputs (in v.0.5 for example, the units filed and ogname filed became redundant because they had been placed into the nc). &lt;/p&gt;
&lt;p&gt;The ncml files should be within the same folder as the nc files. &lt;/p&gt;
&lt;p&gt;The ncml generator tool is available from the carbones repository. &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Linking to the .ncml &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Under the ncWMS manager &lt;a href="http://carbones.eu:8083/ncWMSrc3_patch" rel="nofollow"&gt;http://carbones.eu:8083/ncWMSrc3_patch/&lt;/a&gt; , go to the admin page and enter the new data path for your nc &amp;amp; ncml files (both should be under the same directory). End the path with &lt;strong&gt;.ncml &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You will have to enter a unique ID, which will be needed in the web app configuration later. CERC have been using names in the format "nc_date" for example "nc_20111130" and "nc_20130305". &lt;/p&gt;
&lt;p&gt;Also ensure the map image size is configured for 4096 instead of the default 1024. &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Create updated configuration files &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;A simple C# tool has been created which will automatially create the necessary text which should be copied and pasted into carbones_local.properties and the ncWMS config.xml. &lt;/p&gt;
&lt;p&gt;Some modifications will need to be made per use such as file paths, and an updated list of averaging periods etc. If the min/max files are not seperated by variable, then this will have to be modified too (presumably by adding a new array of variables and enclosing for-loop). &lt;/p&gt;
&lt;p&gt;The tool can be found at Q:\CRs\Utilities\CARBONES_F862\Website\CR0023 Generating Min &amp;amp; Max Numbers with C# Program\FetchMinMax or from the Carbones repository. &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Config.xml &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The config.xml file is necesary to produce the desired map colour scales. It does this by using fifth and ninety-fifth percentiles, which are taken from the min/max files. &lt;/p&gt;
&lt;p&gt;The config.xml can be edited via ftp, the current ncWMS build (ncWMSrc3_patch) writes to /home/carbones/ncWMSrc3Config. This location is set in the ncWMS ncwmsContext bean in the WMS-servlet.xml, see &lt;a class="" href="http://www.resc.rdg.ac.uk/trac/ncWMS/wiki/DownloadPage" rel="nofollow"&gt;the ncWMS documentation&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The config.xml file should be edited by deleting any existing data realted to variables, and replacing them with the output from the above step. &lt;/p&gt;
&lt;p&gt;After doing this, the ncwms tomcat should be restarted, and the data will take a good while to reload 9so double check everything you have done for accuracy before doing it). The commands are: &lt;/p&gt;
&lt;p&gt;{{{{ bash /var/lib/apache-tomcat-6.0.32-ncWMS/bin/shutdown.sh bash /var/lib/apache-tomcat-6.0.32-ncWMS/bin/startup.sh }}}} &lt;/p&gt;
&lt;p&gt;The map images should then once again be rechecked, this should be done through the Carbones web application, however ncWMS has a built in map viewer called Godiva2 accessible from the admin panel &lt;a href="http://carbones.eu:8083/ncWMSrc3_patch" rel="nofollow"&gt;http://carbones.eu:8083/ncWMSrc3_patch/&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Configuring the web app to use the new ncWMS build &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Edit the dataset names in these two configuration files. If you know the old dataset name and the new dataset name, it's simplest just to do a search and replace. CERC have been using names in the format "nc_date" for example "nc_20111130" and "nc_20130305". &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="https://code.google.com/p/carbones/source/browse/trunk/Carbones/WebContent/MapVariable.xml" rel="nofollow"&gt;MapVariable.xml&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="https://code.google.com/p/carbones/source/browse/trunk/Carbones/WebContent/WEB-INF/lib/external_configuration/CarbonesConfig_NCWMS.xml" rel="nofollow"&gt;WEB-INF/lib/external_configuration/CarbonesConfig_NCWMS.xml&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 20 Mar 2015 14:20:04 -0000</pubDate><guid>https://sourceforge.netdd972237f986133dcf9776601c6db03d2a6fbe5e</guid></item></channel></rss>