ITAS Automatic Weather Stations

From gfi
Revision as of 12:22, 13 January 2020 by Hso039 (talk | contribs)
Jump to: navigation, search

GFI has a set of 6 automatic weather stations composed of robust standard instrumentation. Measured parameters include pressure, air temperature, relative humidity, wind speed and direction, precipitation and global radiation.

Itas forde.png

In detail, the AWS includes the following instruments:

Instrument name Function
Campbell Scientific CR1000 datalogger
RM Young 61302V trykksensor
S+S Regeltechnik HTF 100 Pt100 temperatursensor
Vaisala HMP155 temperatur- og fuktighetssensor
RM Young 5106-45 Alpine vindhastighets- og vindretningssensor
Pessl IM523 nedbørssensor
Apogee SP110 strålingssensor


The weather station configuration is fully documented in the attached manual:

File:ITAS_GFI_Manual_20160518.pdf (in Norwegian)

The weather stations are configured to acquire 10 min measurements, and transfer the logger files to GFI via mobile network once per day at 11:00 UTC.

Routines are available at GFI to convert from the ASCII format files to netCDF files will full metadata information.

Matlab routines

% read_AWS.m
%--------------------------------
% Description
% read AWS data
% station: Station serial number, e.g. 1432
% startdate: datenum of first day
% enddate: optional: datenum of last day
%--------------------------------
% HS, Thu Feb 28 16:30:27 CET 2019 
%--------------------------------

function data=read_AWS(station,startdate,varargin)

  if nargin==2,
    enddate=startdate;
  elseif nargin==3,
    enddate=varargin{1};
  else
    error('Wrong number of arguments in read_AWS.m');
  end

  for dat=startdate:enddate,

    % open file and read variables
    fname=sprintf('AWS_%4d/CR1000_%4d_Minutt_%s.nc',station,station,datestr(dat,'yyyymmdd'));
    ncid=netcdf.open(fname,'NOWRITE');
    % check that file exists
    if ncid<0,
      error('File %s not found.',fname);
    end
    % get all variable IDs
    varids=netcdf.inqVarIDs(ncid);
    % loop through all variables
    for i=varids,
      [varname,xtype,dimids,natts] = netcdf.inqVar(ncid,i);
      if dat==startdate,
	data.(varname)=netcdf.getVar(ncid,i,'double');
      else
	data.(varname)=[data.(varname); netcdf.getVar(ncid,i,'double')];
      end
    end
    netcdf.close(ncid);

  end

  % set missing data if T<-98
  midx=find(data.T<-98);
  fnames=fields(data);
  for f=1:length(fnames),
    data.(fnames{f})(midx)=NaN;
  end

end

% fin

plotting AWS data from netcdf files

% plot_AWS.m
%--------------------------------
% Description
% read and plot AWS data
% set station serial numbers and 
% dates
%--------------------------------
% HS, Thu Feb 28 16:30:27 CET 2019 
%--------------------------------

% set station names
station1=1432;
station2=1436;

% set date
dat1=datenum('2019-02-22');
dat2=datenum('2019-02-27');

% get data
data1=read_AWS(station1,dat1,dat2);
data2=read_AWS(station2,dat1,dat2);

% print out available variables
data1

% plot met overview
width=20;
height=30;
handle=figure(1);
set(handle,'color','w')
set(handle,'PaperUnits', 'centimeters');
set(handle,'PaperSize', [width height]);
set(handle,'PaperPosition', [0.5 0.5 width-0.5 height-0.5]);
 
clf
subplot(4,1,1);
plot(data1.time,data1.T,'r-');
datetick('x');
set(gca,'TickDir','out');
hold on
plot(data2.time,data2.T,'k-');
datetick('x');
set(gca,'TickDir','out');
ylabel('Air temperature / deg C');
subplot(4,1,2);
plot(data1.time,data1.FF,'r-');
datetick('x');
set(gca,'TickDir','out');
hold on
plot(data2.time,data2.FF,'k-');
ylabel('Wind speed / m s-1');
datetick('x');
set(gca,'TickDir','out');
subplot(4,1,3);
plot(data1.time,data1.DD,'r.');
datetick('x');
set(gca,'TickDir','out');
hold on
plot(data2.time,data2.DD,'k.');
datetick('x');
set(gca,'TickDir','out','YLim',[0 360]);
ylabel('Wind direction / deg');
subplot(4,1,4);
plot(data1.time,data1.RH,'r-');
datetick('x');
set(gca,'TickDir','out');
hold on
plot(data2.time,data2.RH,'k-');
datetick('x');
set(gca,'TickDir','out');
ylabel('Relative humidity / %');

% save as figure in png format
print('-dpng','-r150',sprintf('AWS_%s-%s.png',datestr(dat1,'yyyymmdd'),datestr(dat2,'yyyymmdd')));

% fin