ImportCumulusFile: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
2,286 bytes added ,  09:08, 4 May 2020
m (Text replacement - "cumuluswiki.wxforum.net" to "cumuluswiki.org")
(→‎Schema: new)
Line 18: Line 18:


You could of course run 1.x and 2.x in parallel whilst you made the switch over gradually. Just alter the table names in v2 of the script slightly to avoid name collisions.
You could of course run 1.x and 2.x in parallel whilst you made the switch over gradually. Just alter the table names in v2 of the script slightly to avoid name collisions.
= Schema for version 3.0 and higher =
== dayfile table ==
The database table that mirrors dayfile.txt (as at version 1.9.4) has the following schema (column names and their format):
<pre>
'LogDate',        'date NOT NULL'
'HighWindGust',  'decimal(4,1) NOT NULL'
'HWindGBear',    'smallint(3) unsigned zerofill NOT NULL'
'THWindG',        'varchar(5) NOT NULL'
'MinTemp',        'decimal(5,1) NOT NULL'
'TMinTemp',      'varchar(5) NOT NULL'
'MaxTemp',        'decimal(5,1) NOT NULL'
'TMaxTemp',      'varchar(5) NOT NULL'
'MinPress',      'decimal(6,2) NOT NULL'),                  // 8
'TMinPress',      'varchar(5) NOT NULL'
'MaxPress',      'decimal(6,2) NOT NULL'
'TMaxPress',      'varchar(5) NOT NULL'
'MaxRainRate',    "decimal(4,$rainDec) NOT NULL"  /* Note the number of decimal places is a variable, set to what suits you */
'TMaxRR',        'varchar(5) NOT NULL'
'TotRainFall',    "decimal(6,$rainDec) NOT NULL"  /* Note the number of decimal places is a variable, set to what suits you */
'AvgTemp',        'decimal(4,2) NOT NULL'
'TotWindRun',    'decimal(5,1) NOT NULL'
'HighAvgWSpeed',  'decimal(3,1)'
'THAvgWSpeed',    'varchar(5)'
'LowHum',        'decimal(4,1)'
'TLowHum',        'varchar(5)'
'HighHum',        'decimal(4,1)'
'THighHum',      'varchar(5)'
'TotalEvap',      "decimal(5,$rainDec)" /* Note the number of decimal places is a variable, set to what suits you */
'HoursSun',      'decimal(3,1)'
'HighHeatInd',    'decimal(4,1)'
'THighHeatInd',  'varchar(5)'
'HighAppTemp',    'decimal(4,1)'
'THighAppTemp',  'varchar(5)'
'LowAppTemp',    'decimal(4,1)'
'TLowAppTemp',    'varchar(5)'
'HighHourRain',  "decimal(4,$rainDec)" /* Note the number of decimal places is a variable, set to what suits you */
'THighHourRain',  'varchar(5)'
'LowWindChill',  'decimal(4,1)'
'TLowWindChill',  'varchar(5)'
'HighDewPoint',  'decimal(4,1)'
'THighDewPoint',  'varchar(5)'
'LowDewPoint',    'decimal(4,1)'
'TLowDewPoint',  'varchar(5)'
'DomWindDir',    'smallint(3) unsigned zerofill'
'HeatDegDays',    'decimal(4,1)'
'CoolDegDays',    'decimal(4,1)'
'HighSolarRad',  'decimal(5,1)'
'THighSolarRad',  'varchar(5)'
'HighUV',        'decimal(3,1)'
'THighUV',        'varchar(5)'
'HWindGBearSym',  'varchar(3)'
'DomWindDirSym',  'varchar(3)'
</pre>


=Installation=
=Installation=
*Download the PHP script ... [https://cumuluswiki.org/files/ImportCumulusFile_v3-2.txt (right click, Save as)] and then rename the .txt to .php
*Download the PHP script ... [https://cumuluswiki.org/files/ImportCumulusFile_v3-2.txt (right click, Save as)] and then rename the .txt to .php
*Save the file and edit it using a text editor --  there are five entries to be edited
*Save the file and edit it using a text editor --  there are five entries to be edited
5,838

edits

Navigation menu