/[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 819 - (hide annotations) (download) (as text)
Wed Aug 16 15:36:12 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-ascend
File size: 968 byte(s)
Moved the location of the PATHENVIRONMENTVAR to config.h.in so that
it can be shared with other places that want to use that variable.
Did some bug fixing of the simple TMY reader.
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 johnpye 819 Gd IS_A solver_var;
17     T IS_A solver_var;
18     v_wind IS_A solver_var;
19 johnpye 813 E IS_A solver_var; (* total radiation *)
20 johnpye 819 Gb IS_A solver_var;
21 johnpye 814
22     (* source data: http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z *)
23 johnpye 812 tmydata IS_A drconf;
24 johnpye 819 tmydata.filename :== 'johnpye/23161.tm2';
25 johnpye 811
26     filereader:datareader(
27     t : INPUT;
28 johnpye 819 G, Gbn, Gd, T, v_wind : OUTPUT;
29 johnpye 812 tmydata : DATA
30 johnpye 811 );
31    
32 johnpye 819 Gb = G - Gd;
33 johnpye 811
34 johnpye 812 METHODS
35    
36     METHOD default_self;
37     END default_self;
38    
39     METHOD on_load;
40     RUN default_self; RUN specify; RUN values;
41     END on_load;
42    
43     METHOD specify;
44 johnpye 813 E.ode_id := 1; E.ode_type := 1;
45     G.ode_id := 1; G.ode_type := 2;
46    
47     t.ode_type :=-1;
48 johnpye 812 FIX t;
49     END specify;
50    
51     METHOD values;
52     t := 0 {s};
53 johnpye 819 E := 0;
54 johnpye 812 END values;
55    
56 johnpye 811 END testtmy;

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