/[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 2071 - (hide annotations) (download) (as text)
Fri Aug 28 02:42:47 2009 UTC (11 years, 2 months ago) by jose
File MIME type: text/x-ascend
File size: 1589 byte(s)
MERGE Jose's branch [2274]:[2584] into trunk
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 jose 2071 parameters IS_A symbol_constant;
11     parameters :== '2:linear,2:cubic,2:default';
12 johnpye 812 END drconf;
13    
14 johnpye 811 MODEL testtmy;
15     t IS_A time;
16 johnpye 812 G IS_A solver_var;
17 jose 2071 Gbnl,Gbnc,Gbns IS_A solver_var;
18 johnpye 819 Gd IS_A solver_var;
19 jose 2071 T IS_A temperature;
20 johnpye 819 v_wind IS_A solver_var;
21 johnpye 813 E IS_A solver_var; (* total radiation *)
22 johnpye 819 Gb IS_A solver_var;
23 johnpye 814
24 jpye 1353 (*
25     You will need to download the following TMY (.tm2) file
26     which corresponds to a 'typical meteorological year' in
27     Daggett, California, site of the world's largest
28     solar thermal power station, which has been generating
29     354 MW electrical since the 1980s.
30    
31     This file must me unzipped -- use 'gzip' on linux or '7-zip' on windows.
32    
33     http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z
34     *)
35 johnpye 812 tmydata IS_A drconf;
36 johnpye 842 tmydata.filename :== 'johnpye/datareader/23161.tm2';
37 johnpye 811
38     filereader:datareader(
39     t : INPUT;
40 jose 2071 (*G,Gbn,Gd,T,v_wind: OUTPUT;*)
41     Gbnl,Gbnc,Gbns :OUTPUT;
42 johnpye 812 tmydata : DATA
43 johnpye 811 );
44    
45 jpye 1766 Gb_expr:Gb = G - Gd;
46 johnpye 811
47 jpye 1766 E1 IS_A solver_var;
48     E1_expr:E1 = E + 1;
49    
50 johnpye 812 METHODS
51 jose 2071 (*
52 johnpye 812 METHOD default_self;
53     END default_self;
54 jose 2071 *)
55 johnpye 812 METHOD on_load;
56     RUN default_self; RUN specify; RUN values;
57 jose 2071 RUN ode_init;
58 johnpye 812 END on_load;
59    
60 jose 2071 METHOD ode_init;
61 johnpye 813 E.ode_id := 1; E.ode_type := 1;
62     G.ode_id := 1; G.ode_type := 2;
63    
64 jose 2071 Gbnl.obs_id := 1;
65     Gbnc.obs_id := 2;
66     Gbns.obs_id := 3;
67    
68 johnpye 813 t.ode_type :=-1;
69 jose 2071 END ode_init;
70    
71     METHOD specify;
72 johnpye 812 FIX t;
73     END specify;
74    
75     METHOD values;
76 jose 2071 t := 8 {h};
77 johnpye 819 E := 0;
78 johnpye 812 END values;
79    
80 johnpye 811 END testtmy;

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