/[ascend]/trunk/models/johnpye/datareader/testtmy.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/datareader/testtmy.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1353 - (show annotations) (download) (as text)
Sun Mar 18 01:48:40 2007 UTC (13 years, 7 months ago) by jpye
File MIME type: text/x-ascend
File size: 1311 byte(s)
Removed some redundant #include statments.
Added some explanation of testtmy.a4c (although currently broken with IDA).

1 REQUIRE "ivpsystem.a4l";
2 REQUIRE "atoms.a4l";
3
4 IMPORT "johnpye/datareader/datareader";
5
6 MODEL drconf;
7 filename IS_A symbol_constant;
8 format IS_A symbol_constant;
9 format :== 'TMY2';
10 END drconf;
11
12 MODEL testtmy;
13 t IS_A time;
14 G IS_A solver_var;
15 Gbn IS_A solver_var;
16 Gd IS_A solver_var;
17 T IS_A solver_var;
18 v_wind IS_A solver_var;
19 E IS_A solver_var; (* total radiation *)
20 Gb IS_A solver_var;
21
22 (*
23 You will need to download the following TMY (.tm2) file
24 which corresponds to a 'typical meteorological year' in
25 Daggett, California, site of the world's largest
26 solar thermal power station, which has been generating
27 354 MW electrical since the 1980s.
28
29 This file must me unzipped -- use 'gzip' on linux or '7-zip' on windows.
30
31 http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z
32 *)
33 tmydata IS_A drconf;
34 tmydata.filename :== 'johnpye/datareader/23161.tm2';
35
36 filereader:datareader(
37 t : INPUT;
38 G, Gbn, Gd, T, v_wind : OUTPUT;
39 tmydata : DATA
40 );
41
42 Gb = G - Gd;
43
44 METHODS
45
46 METHOD default_self;
47 END default_self;
48
49 METHOD on_load;
50 RUN default_self; RUN specify; RUN values;
51 END on_load;
52
53 METHOD specify;
54 E.ode_id := 1; E.ode_type := 1;
55 G.ode_id := 1; G.ode_type := 2;
56
57 t.ode_type :=-1;
58 FIX t;
59 END specify;
60
61 METHOD values;
62 t := 0 {s};
63 E := 0;
64 END values;
65
66 END testtmy;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22