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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 814 - (hide 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 johnpye 813 REQUIRE "ivpsystem.a4l";
2 johnpye 811 REQUIRE "atoms.a4l";
3    
4 johnpye 813 IMPORT "johnpye/datareader/datareader";
5    
6 johnpye 812 MODEL drconf;
7     filename IS_A symbol_constant;
8     format IS_A symbol_constant;
9     format :== 'TMY2';
10     END drconf;
11    
12 johnpye 811 MODEL testtmy;
13     t IS_A time;
14 johnpye 812 G IS_A solver_var;
15     Gbn IS_A solver_var;
16     G2 IS_A solver_var;
17 johnpye 813 E IS_A solver_var; (* total radiation *)
18 johnpye 814
19     (* source data: http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z *)
20 johnpye 812 tmydata IS_A drconf;
21     tmydata.filename :== '/home/john/src/ascend/models/johnpye/datareader/23161.tm2';
22 johnpye 811
23     filereader:datareader(
24     t : INPUT;
25     G, Gbn : OUTPUT;
26 johnpye 812 tmydata : DATA
27 johnpye 811 );
28    
29 johnpye 812 G2 = G + Gbn;
30 johnpye 811
31 johnpye 812 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 johnpye 813 E.ode_id := 1; E.ode_type := 1;
42     G.ode_id := 1; G.ode_type := 2;
43    
44     t.ode_type :=-1;
45 johnpye 812 FIX t;
46     END specify;
47    
48     METHOD values;
49     t := 0 {s};
50     END values;
51    
52 johnpye 811 END testtmy;

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