Hi Boris,
how are rain0total-yearsum or daysum supposed to work if I do a hourly scheduled export for the last hour ?
If I use the template with http://ip/cgi-bin/template.cgi?template ... intest.exp vars like rain0total-daysum,rain0total-sum@Y0, rain0total-yearsum are returned correctly. But in case of an export it looks like that daysum and yearsum are starting with zero and rain0total-sum@Y0 is empty.
Is this working like intended ?
I'd appreciate to get the accumulated rain (for the year) in an csv export to get the data into wxsim.
Thanks,
Bernd
nano sd: rain0-total sums
Moderator: Mattk
-
- Senior Boarder
- Posts: 75
- Joined: Sun Mar 31, 2019 11:00 am
Re: nano sd: rain0-total sums
Export function does not support all kinds of requests the template mechanism can handle.
Apart from daysum, monthsum, yearsum ans allsum there is no option like the "@" feature in templates, which allow to depict data from a more distinctive point in time.
Apart from daysum, monthsum, yearsum ans allsum there is no option like the "@" feature in templates, which allow to depict data from a more distinctive point in time.
Re: nano sd: rain0-total sums
You might use a trick, like in the NOAA export definitions:
Example
Result:
How to understand what is going on here...
1) Lines starting with # are ignored a comments
2) Lines starting with $ are not used for reiteration on the data set, but are directly printed. As all output is subject of template replacement before delivering the results, you can bring in regular template variables here.
3) all other lines are reiterated with data sets from the time frame selected for evaluation with this export definition
I hope using this two pass approach, can solve your issue.
Example
Code: Select all
# Standard monthly NOAA template with data in metric units
#
$ MONTHLY CLIMATOLOGICAL SUMMARY FOR [YYYY]-[MM]
$
$Elevation: [mbsystem-altitude.0:]m
$Latitude: [mbsystem-latitude.3:]
$Longitude: [mbsystem-longitude.3:]
$
$Temperature in C, Rain in MM, Wind Speed in KM/H and Pressure in HPA
$
$ AVG AVG DOM
$DAY TEMP HIGH TIME LOW TIME RAIN WIND HIGH TIME DIR BAROM HUM
$----------------------------------------------------------------------------------
[DD] [th0temp-avg.000001: ] [th0temp-max.000001: ] [th0temp-maxts.ij: ]:[th0temp-maxts.kl: ] [th0temp-min.000001: ] [th0temp-mints.ij: ]:[th0temp-mints.kl: ] [rain0total-sum.000001: ] [wind0wind-avg=kmh.00001: ] [wind0wind-max=kmh.000001: ] [wind0wind-maxts.ij: ]:[wind0wind-maxts.kl: ] [wind0dir-avg.000: ] [thb0seapress-avg.0000001: ] [th0hum-avg.00: ]
$----------------------------------------------------------------------------------
$MONTH[th0temp-mavg.000001: ] [th0temp-mmax.000001: ] [th0temp-mmaxtime.gh: ] [th0temp-mmin.000001: ] [th0temp-mmintime.gh: ] [rain0total-monthsum.000001: ] [wind0wind-mavg=kmh.00001: ] [wind0wind-mmax=kmh.000001: ] [wind0wind-mmaxtime.gh: ] [wind0dir-mavg=endir.3: ] [thb0seapress-mavg.0000001: ] [th0hum-mavg.00: ]
$
Code: Select all
MONTHLY CLIMATOLOGICAL SUMMARY FOR 2019-08
Elevation: 27m
Latitude: 53.666
Longitude: 10.006
Temperature in C, Rain in MM, Wind Speed in KM/H and Pressure in HPA
AVG AVG DOM
DAY TEMP HIGH TIME LOW TIME RAIN WIND HIGH TIME DIR BAROM HUM
----------------------------------------------------------------------------------
01 18.9 24.4 17:28 13.6 05:45 1.2 0.0 6.5 10:45 085 1015.0 79
02 17.7 21.9 14:28 15.3 04:04 1.4 0.0 0.0 00:00 062 1013.6 90
03 18.0 24.2 17:04 13.3 06:45 0.6 0.1 8.0 18:30 062 1014.2 87
04 16.9 20.6 17:35 13.2 03:02 0.2 0.0 4.8 14:52 056 1014.4 88
05 18.8 23.1 13:26 13.6 04:42 0.2 0.0 3.2 23:36 088 1009.2 86
06 19.0 24.2 14:58 14.0 01:56 0.0 0.1 9.7 12:26 065 1007.0 81
07 17.9 23.7 15:04 12.6 04:10 0.0 0.3 11.3 15:32 071 1004.4 83
08 16.8 21.1 13:19 13.7 04:36 0.0 0.3 9.7 13:53 061 1007.2 90
09 17.0 21.2 16:18 12.1 06:20 0.0 0.0 1.6 04:14 121 1009.2 90
10 20.0 23.5 15:24 17.7 23:03 0.0 0.5 24.1 14:32 084 1006.0 83
11 19.2 23.1 17:03 15.6 06:21 0.0 0.9 17.7 02:04 068 1010.9 66
12 17.8 21.9 15:02 14.6 06:30 0.2 0.5 14.5 12:24 037 1011.3 80
13 15.1 19.6 17:21 11.7 23:51 0.0 1.3 20.9 12:24 331 1012.5 86
14 14.7 21.3 17:00 9.8 03:49 0.0 0.9 16.2 11:02 327 1014.3 79
15 15.7 18.3 17:37 13.2 07:47 0.0 0.5 16.2 20:00 352 1008.0 91
16 17.3 21.0 17:13 14.8 06:41 0.0 0.7 13.0 11:03 330 1012.0 85
17 17.2 19.7 18:13 14.8 06:13 0.0 0.4 14.5 11:45 026 1006.5 90
18 16.4 17.7 17:31 15.2 13:21 0.0 0.3 13.0 15:02 332 1004.1 97
19 16.8 21.0 15:25 13.9 01:26 0.0 1.1 17.7 10:48 332 1011.3 86
20 : : :
21 : : :
22 : : :
23 : : :
24 : : :
25 25.9 29.9 17:56 20.1 23:56 0.0 0.0 4.8 15:32 154 1019.2 67
26 23.6 30.7 17:15 18.3 07:19 0.2 0.0 3.2 12:57 152 1018.6 69
27 22.6 30.4 17:46 16.8 06:13 0.0 0.0 9.7 18:04 154 1016.1 79
28 24.2 32.9 17:40 18.9 23:44 0.0 0.2 16.2 21:00 344 1012.1 76
29 20.0 25.3 17:36 16.6 23:58 0.0 0.6 16.2 14:00 333 1015.7 88
30 18.8 26.3 17:29 13.8 06:50 0.0 0.1 9.7 11:41 330 1020.7 81
31 20.7 31.8 17:53 12.3 06:39 0.0 0.2 13.0 16:26 315 1013.5 78
----------------------------------------------------------------------------------
MONTH 18.6 32.9 28 9.8 14 7.2 0.3 24.1 10 NE 1011.4 83
1) Lines starting with # are ignored a comments
2) Lines starting with $ are not used for reiteration on the data set, but are directly printed. As all output is subject of template replacement before delivering the results, you can bring in regular template variables here.
3) all other lines are reiterated with data sets from the time frame selected for evaluation with this export definition
I hope using this two pass approach, can solve your issue.
-
- Senior Boarder
- Posts: 75
- Joined: Sun Mar 31, 2019 11:00 am
Re: nano sd: rain0-total sums
Maybe I'm missing something, but wouldn't that require processing the exported data, since the planned cumulus format would require the data in one row (along with the minute data).
E.g. storing yearsum temp variable and iterating from the last row and subtracting the current value from the previous calculation
(temprain = yearsum; loop { temprain -= currrain }
Or do you have something else in mind ?
E.g. storing yearsum temp variable and iterating from the last row and subtracting the current value from the previous calculation
(temprain = yearsum; loop { temprain -= currrain }
Or do you have something else in mind ?
Re: nano sd: rain0-total sums
I don't know how the export format you have in mind should look like. I just explained what can be done. As said it is limited and built for a purpose to efficiently dump out rows of data from the database, not having cumulus in mind at all. Isn't that EOL by the way?
-
- Senior Boarder
- Posts: 75
- Joined: Sun Mar 31, 2019 11:00 am
Re: nano sd: rain0-total sums
I'm trying to get the export for wxsim (viewtopic.php?f=61&t=13996&start=15#p29985) and according to Tom wxsim is using the accumulated rain-counter as input for the precipitation (see email thread with Tom going to info@meteobridge.com)
I really appreciate your work and I completely understand stat MB hasn't been designed for that. I just wanted to learn the limitations and help to get the wxsim support done.
Best,
Bernd
I really appreciate your work and I completely understand stat MB hasn't been designed for that. I just wanted to learn the limitations and help to get the wxsim support done.
Best,
Bernd