We usually have a weather station connected to pcfsyg. However, if it is unavailable or broken, there is another weather sensor (used for the SLR) and it is possible to extract the data and merge it with the PCFS logs before they are submitted. Below is the procedure for doing this (a detailed description as well as a summary). Note that the external logs are updated every 30 minutes, so the Yg logs can only be processed 30 mins or more after the experiment finishes.
On ops2 in /home/observer/ask/yglogs
lives a script called yg_wx_logs.py
which can be used to merge the logs with the weather data. To run the script type in
python yg_wx_logs.py
The script will prompt the user for
With the given information, the script will
_original2.log
,Once all that is done you can run the flogit script to transfer that log to the IVS servers. As usual please eyeball the log to make sure the script has done the right thing.
It's probably best to modify the PCFS log on pcfsyg, then follow the usual end-of-experiment procedure. This way the log file will be the same on pcfsyg, ops2, and on the IVS servers. The procedure below uses the experiment r4750 as an example:
cd /usr2/log/wx2
mets_<yyyy>_<mm>_<dd>.dat
so we want mets_2016_07_28.dat
and mets_2016_07_29.dat
sftp -oPort=26 observer@59.167.111.242 cd metdata dir get mets_2016_07_28.dat get mets_2016_07_29.dat quit
metdat_format.sh
. By default it writes the output log to the screen, so send it to a temporary file. e.g. metdat_format.sh mets_2016_07_28.dat mets_2016_07_29.dat > wx_tmp.log
Specify the input data files in chronological order.
metdat_startstop.sh
. Usage is metdat_startstop.sh <input_file_name> <start_time> <end_time> Where the time format is ddd.hh:mm. The output from this should be ready to be merged into the original log file, so give it a sensible output name and put it in the log directory (''/usr2/log'').
For example for R4750:
metdat_startstop.sh wx_tmp.log 210.18:30 211.18:30 > /usr2/log/wx_r4750yg.log
cd /usr2/log
head -5 wx_r4750yg.log
Show the last 5 lines
tail -5 wx_r4750yg.log
If something is amiss, you may need to go back to the start and work out what happened. You can also plot the weather data quite easily:
metdat_plot_weather.sh wx_r4750yg.log
cp r4750yg.log r4750yg_original.log
grep -v /wx/ r4750yg.log > r4750yg_no_wx.log
sort -s -m -k 1,1.20 -o r4750yg.log r4750yg_no_wx.log wx_r4750yg.log
This assumes R4750 is being processed.
cd /usr2/log/wx2 sftp -oPort=26 observer@59.167.111.242 cd metdata dir get mets_2016_07_28.dat get mets_2016_07_29.dat quit metdat_format.sh mets_2016_07_28.dat mets_2016_07_29.dat > wx_tmp.log metdat_startstop.sh wx_tmp.log 210.18:30 211.18:30 > /usr2/log/wx_r4750yg.log cd /usr2/log head -5 wx_r4750yg.log tail -5 wx_r4750yg.log metdat_plot_weather.sh wx_r4750yg.log cp r4750yg.log r4750yg_original.log grep -v /wx/ r4750yg.log > r4750yg_no_wx.log sort -s -m -k 1,1.20 -o r4750yg.log r4750yg_no_wx.log wx_r4750yg.log