/[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 814 - (show annotations) (download) (as text)
Fri Aug 11 04:38:10 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-ascend
File size: 919 byte(s)
Added comment about data source.
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 G2 IS_A solver_var;
17 E IS_A solver_var; (* total radiation *)
18
19 (* source data: http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z *)
20 tmydata IS_A drconf;
21 tmydata.filename :== '/home/john/src/ascend/models/johnpye/datareader/23161.tm2';
22
23 filereader:datareader(
24 t : INPUT;
25 G, Gbn : OUTPUT;
26 tmydata : DATA
27 );
28
29 G2 = G + Gbn;
30
31 METHODS
32
33 METHOD default_self;
34 END default_self;
35
36 METHOD on_load;
37 RUN default_self; RUN specify; RUN values;
38 END on_load;
39
40 METHOD specify;
41 E.ode_id := 1; E.ode_type := 1;
42 G.ode_id := 1; G.ode_type := 2;
43
44 t.ode_type :=-1;
45 FIX t;
46 END specify;
47
48 METHOD values;
49 t := 0 {s};
50 END values;
51
52 END testtmy;

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