Earthshine blog

Earthshine blog

"Earthshine blog"

A blog about a system to determine terrestrial albedo by earthshine observations. Feasible thanks to sheer determination.

Weather conditions

Met sensorPosted by Peter Thejll May 16, 2014 09:50AM
At the MLO, weather is monitored by automatic instruments. The data are available here

For our observing times we extract all available met data and inspect them:
Left: (top) Vertical temperature gradient (T2m - Ttop) in degrees C against fraction of Julian Day (fJD). fJD=0 at midnight, so each night's observing starts at 0.8 or so and proceeds to the right, wrapping around at midnight. T2m and Ttop are temperatures measured on the MLO met tower at 2 m above ground level and at tower top (much more than 10 m up!). (middle) Relative Humidity in % against fJD. Ignore bottom panel.
Right: (top) Histogram of vertical temperature gradient for all observing times (black) and for every hour of 2012 (red). (bottom) Histogram for RH.

We note that the vertical temperature gradient for our observing times almost always are negative - that it is warmer higher up than near the ground - this implies vertical stability. The opposite condition certainly occurs during 2012 but does not correspond to observing times - probably because conditions were bad (convectively unstable or cloudy?). We also see that the gradient becomes less negative through the night implying cooling and equilibration of temperatures. Changes in RH are small. RH during observations show a skewed distribution relative to what was available - so something about observing picks out not the driest nights.

We shall see if the few nights with large RH (say, above 40%) tend to correspond to particularly bad conditions, by inspecting observed images and checking for 'drifting wiggles' and plain old 'large halo'.

  • Comments(0)//

Aurora works.

Met sensorPosted by Daddy-o Aug 08, 2013 09:36AM
We have mounted the Aurora weather sensor on the roof of DMI and found out how to run it from Linux. A plot is generated automatically and updated each minute. The link is here:

Top frame shows sensor temperature (i.e. how hot the sensor itself is) and the radiance temperature of the sky measured inside a wide cone looking up.
Next frame shows the difference between the two - when it is large the sky is probably clear - i.e. no clouds and no humidity.
Third frame shows the amount of light reaching the sensor - so you see day and night and clouds passing in front of the Sun.
Bottom panel shows rain falling on the sensor.

Future work will now be directed towards producing and statistically validating a warning signal ('Close The Dome!') on the basis of these readings.

We might mount a webcam also.

  • Comments(2)//

Meteorological conditions and Good Seeing

Met sensorPosted by Daddy-o Jul 04, 2013 09:06AM
On JD2455945 conditions were such that the BS halo in the B and V images cancelled almost perfectly, giving us the possibility of seeing the DS colour itself. We have a link to material discussing scintillations here.

Is it possible to understand which meteorological conditions led to this unusual situation? At the MLO there is a meteorology tower and data are taken and stored for every minute. A link to the data is here.

A plot of selected parametrs for the night in question is here:

The plot shows 3 days on either side of the observation moment. A more legible pdf version is here


a) The rising pressure. The daily cycle is due to heating of the atmosphere,

b) that the observation occured towards the end of the night - temperature at ground level was dropping,

c) the vertical temperature gradient was positive (it was indeed almost the maximum seen that night) - the air was warmer higher up,

d) wind speed was relatively low,

e) relative humidity was relatively low.

We next plot 'alfa' (the parameter that sets the width of the PSF in our model images, found by fitting), against four of the above parameters:

There seems to be no strong pattern. Slightly, there may be an indication that low vertical T gradients allow for larger alfas, and that low relative_humidity allows for larger alfas. Ignoring the outliers at low alfa (a sign of a very poor fit or night) we look closely at the dependence on relative_humidity:

It would seem that for RH between 10 and 20% a large value of alfa is obtainable. Large lafa implies a narrow PSF. However, fo rthe nighjt JD2455945 (where the halos cancelled) we have unremarkable conditions: alfa is small (1.54), pressure is medium (680 hPa), relative humidity is medium (42%) - only wind speed is lower (3 m/s) than most other data points. Th ethree values of alfa always determined from the same image are very stable, however, differieng by 0.001 only.

Speculating wildly: Is it because alfa is small that we get halo cancellation? With a small alfa the halos widen and perhaps their 'tails' cancel better?


Here are some papers that discuss meteorological conditions and 'good seeing' conditions:

  • Comments(0)//

Met data

Met sensorPosted by Peter Thejll Jun 21, 2012 09:42PM
In order to maintain a record of the observing conditions, I now make daily automatic downloads of the VYSOS graphic of the weather at MLO:
With these images stored it should be possible to later go back and see whether it was a clear night, etc.

  • Comments(0)//

Pressure sensor

Met sensorPosted by Peter Thejll Jun 07, 2012 05:53PM
Arduino code for the BMP085 pressure sensor - it also reads temperature - output is T (in deegrees C) and p (in HPa). Note that this is for Arduino 1.0 only.

//Arduino 1.0+ Only
//Arduino 1.0+ Only

/*Inspired by

Get pressure and temperature from the BMP085.
Serial.print it out at 9600 baud to serial monitor.

#include <Wire.h>

#define BMP085_ADDRESS 0x77 // I2C address of BMP085

const unsigned char OSS = 0; // Oversampling Setting

// Calibration values
int ac1;
int ac2;
int ac3;
unsigned int ac4;
unsigned int ac5;
unsigned int ac6;
int b1;
int b2;
int mb;
int mc;
int md;

// b5 is calculated in bmp085GetTemperature(...), this variable is also used in bmp085GetPressure(...)
// so ...Temperature(...) must be called before ...Pressure(...).
long b5;

void setup(){


void loop()
float temperature = bmp085GetTemperature(bmp085ReadUT()); //MUST be called first
float pressure = bmp085GetPressure(bmp085ReadUP());
float atm = pressure / 101325; // "standard atmosphere"
float altitude = calcAltitude(pressure); //Uncompensated caculation - in Meters

Serial.print(" ");

Serial.println();//line break

delay(1000); //wait a second and get values again.

// Stores all of the bmp085's calibration values into global variables
// Calibration values are required to calculate temp and pressure
// This function should be called at the beginning of the program
void bmp085Calibration()
ac1 = bmp085ReadInt(0xAA);
ac2 = bmp085ReadInt(0xAC);
ac3 = bmp085ReadInt(0xAE);
ac4 = bmp085ReadInt(0xB0);
ac5 = bmp085ReadInt(0xB2);
ac6 = bmp085ReadInt(0xB4);
b1 = bmp085ReadInt(0xB6);
b2 = bmp085ReadInt(0xB8);
mb = bmp085ReadInt(0xBA);
mc = bmp085ReadInt(0xBC);
md = bmp085ReadInt(0xBE);

// Calculate temperature in deg C
float bmp085GetTemperature(unsigned int ut){
long x1, x2;

x1 = (((long)ut - (long)ac6)*(long)ac5) >> 15;
x2 = ((long)mc << 11)/(x1 + md);
b5 = x1 + x2;

float temp = ((b5 + 8)>>4);
temp = temp /10;

return temp;

// Calculate pressure given up
// calibration values must be known
// b5 is also required so bmp085GetTemperature(...) must be called first.
// Value returned will be pressure in units of Pa.
long bmp085GetPressure(unsigned long up){
long x1, x2, x3, b3, b6, p;
unsigned long b4, b7;

b6 = b5 - 4000;
// Calculate B3
x1 = (b2 * (b6 * b6)>>12)>>11;
x2 = (ac2 * b6)>>11;
x3 = x1 + x2;
b3 = (((((long)ac1)*4 + x3)<<OSS) + 2)>>2;

// Calculate B4
x1 = (ac3 * b6)>>13;
x2 = (b1 * ((b6 * b6)>>12))>>16;
x3 = ((x1 + x2) + 2)>>2;
b4 = (ac4 * (unsigned long)(x3 + 32768))>>15;

b7 = ((unsigned long)(up - b3) * (50000>>OSS));
if (b7 < 0x80000000)
p = (b7<<1)/b4;
p = (b7/b4)<<1;

x1 = (p>>8) * (p>>8);
x1 = (x1 * 3038)>>16;
x2 = (-7357 * p)>>16;
p += (x1 + x2 + 3791)>>4;

long temp = p;
return temp;

// Read 1 byte from the BMP085 at 'address'
char bmp085Read(unsigned char address)
unsigned char data;


Wire.requestFrom(BMP085_ADDRESS, 1);


// Read 2 bytes from the BMP085
// First byte will be from 'address'
// Second byte will be from 'address'+1
int bmp085ReadInt(unsigned char address)
unsigned char msb, lsb;


Wire.requestFrom(BMP085_ADDRESS, 2);
msb =;
lsb =;

return (int) msb<<8 | lsb;

// Read the uncompensated temperature value
unsigned int bmp085ReadUT(){
unsigned int ut;

// Write 0x2E into Register 0xF4
// This requests a temperature reading

// Wait at least 4.5ms

// Read two bytes from registers 0xF6 and 0xF7
ut = bmp085ReadInt(0xF6);
return ut;

// Read the uncompensated pressure value
unsigned long bmp085ReadUP(){

unsigned char msb, lsb, xlsb;
unsigned long up = 0;

// Write 0x34+(OSS<<6) into register 0xF4
// Request a pressure reading w/ oversampling setting
Wire.write(0x34 + (OSS<<6));

// Wait for conversion, delay time dependent on OSS
delay(2 + (3<<OSS));

// Read register 0xF6 (MSB), 0xF7 (LSB), and 0xF8 (XLSB)
msb = bmp085Read(0xF6);
lsb = bmp085Read(0xF7);
xlsb = bmp085Read(0xF8);

up = (((unsigned long) msb << 16) | ((unsigned long) lsb << 8) | (unsigned long) xlsb) >> (8-OSS);

return up;

void writeRegister(int deviceAddress, byte address, byte val) {
Wire.beginTransmission(deviceAddress); // start transmission to device
Wire.write(address); // send register address
Wire.write(val); // send value to write
Wire.endTransmission(); // end transmission

int readRegister(int deviceAddress, byte address){

int v;
Wire.write(address); // register to read

Wire.requestFrom(deviceAddress, 1); // read a byte

while(!Wire.available()) {
// waiting

v =;
return v;

float calcAltitude(float pressure){

float A = pressure/101325;
float B = 1/5.25588;
float C = pow(A,B);
C = 1 - C;
C = C /0.0000225577;

return C;

  • Comments(0)//