• Keine Ergebnisse gefunden

User's Guide for the Post-Processor of Message II

N/A
N/A
Protected

Academic year: 2022

Aktie "User's Guide for the Post-Processor of Message II"

Copied!
85
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

NOT FOR QUOTATION WITHOUT PERMISSlON OF THE AUTHOR

USER'S GUIDE

FDR THE

POET- PROCESSOR

OF

bESSAGE

II

M. Strubegger

September 1984 WP-B4-72

Working Papers a r e interim reports on work of the International Institute for Applied Systems Analysis and have received only limited review. Views or opinions expressed herein do not necessarily represent those of the Institute or of its National Member Organizations.

INTERNATlONAL INSTITUTE FOR APPLIED SYSTEMS ANALYSIS 2361 Laxenburg, Austria

(2)

Preface

This report presents t h e post-processor t o t h e MESSAGE-I1 energy model (WP-84-71a and WP-84-71b). The processor is a convenient tool for t h e rnanipula- tion of input data and output results, for t h e generation of tables a n d graphs a n d t h e organization of data flows between a number of models.

Hans-Holger Rogner Leader

International Gas Study

(3)

CONTENTS

Page

1 INTRODUrnON

1.1 Introduction t o the Application of CAP 2 DESCRIPTJON OF INPUT PILES

2.1 Control Variable file (Unit 3) 2.1.1 Content of blocks

2.2 Calculating Instructions (Unit 5) 2.2.1 Content of blocks

2 . 2 . 2 Format of m a t h e m a t i c a l operations 2.2.3 Control c h a r a c t e r s

3 DESCRIPTION OF DATA FlLES

3.1 MESSAGE I1 Technology Name File (Unit 2) 3.2 MEDEE2 Dump File (Unit 8)

3.3 LP Solution Flle (Unit 4)

3.4 MESSAGE I1 Dump Files (Units 10. 14 and 1.7) 3.5 Supplementary File (unit 13)

3.6 Variable Lacation in the MEDEE2 Dump File (Unit 16) 4 DESCRIPTION OF OUTPUT FILES

4.1 Tabular Output (Unit 1) 4.2 Graphic Output

5 DESCRTPTION OF INTERMEDIATE FILES

5.1 InterpolaLed Time Series Storage (Unit 1 1) 5.2 Input Format Conversion (Unit 15)

6 DESCRTPTION OF VARIABLES

6.1 Variables Read from the MEDEE2 Dump File 6.2 Variables Read from the MESSAGE I1 Dump N e s 6 . 2 . 1 Technology variables

6.2.2 User defined c o n s t r a i n t s 6 . 2 . 3 Demands

6.2.4 Other. variables

6.3 Variables Read from the LP Solution File

6.4 Variables Read from the Supplementary lnput file 6.5 Use of Internally Stored Values

6.6 Operators

7 SUPPORTING PROGRAMS

7.1 The Dimensioning Program CHDIM 7.2 Program RDSOL

7.3 Program CPLOT

7.4 Program SPLXYT 7.5 Program NBF

(4)

8 HOW TO GET STAR'IXD

8.1 Complete Sets of Input Files to CAP

8 . 1 . 1 Calculations processing MEDEE-2 results

8.1.2 Calculations processing a MESSAGE 11 dump and a LP solution file 8.2 SAMPLES FDR MATHEXATICAL EXPHESSlONS USED IN CAP

8.3 Using CAP to Produce Tables 8.4 Using CAP in Interactive Mode

9

THE IM

PIZMENTATION ON THE COMPUTER 9.1 Description of MlRTRAN PROGRAMS 9 . 1 . 1 List of common block names

9.2 Running the post-processing programs

(5)

The post processor of MESSAGE 11, CAP, is a Calculator Program designed to handle data extracted from various data files and/or the flow of information between several computer models. A l l data processed by CAP can be documented in generalized tabulated forms. Moreover, CAP can be used to generate graphic output, however, this feature is dependent on the software available on the com- puter used and the code has to be adapted accordingly.

One of the most important features of CAP--when used to handle a set of models-is, that it does not only allow to transfer data between the single moduls, but can also handle the results of all moduls and/or more scenarios a t one time.

Thus this program is especially useful for checking the consistency of scenarios described by a s e t of models.

In order to make such checks as effective as possible CAP can also be used as

an

interactive program. In this way all data of interest can be extracted from the according input and output files. For documentation of data, however, CAP will usually be used in batch mode, as in most cases a great number of mathematical expressions will be evaluated to produce a sufficient documentation.

The calculating instructions used by CAP follow standard mathematical nota- tion. In addition, some extensions have been made to account for certain model specific requirements. They include the calculation of growth rates or of normal- ized t h e series, for example. Besides, two interpolation routines (natural cubic s p b e and linear interpolation) are available, permitting the use of files with time periods of different length.

Besides the detailled description of CAP, this user's guide contains also the description of other supporting programs useful for the evaluation of results obtained with MESSAGE 11.

The last of the attached appendices containes a complete example for input and output fles t h a t is consistent with the example used in the "User's Guide for the Matrix Generator of MESSAGE 11" (S. Messner, IlASA 1984).

(6)

1.1 Introduction to the Application of CAP

Cap requires two input Nes for controlling the data handling. The first of those files, called Control Variable File thereafter, is used t o indicate to the pro- gram whch of the data files are t o be used for a certain application. The second one, called Calculating Instruction File, contains information on how to process the data extracted from one of the data files assigned t o CAP. For this purpose a variable name identification scheme was developed t h a t enables the program to identify on w h c h of the data files the indicated data can be found. That scheme is described in detail in Section 6 of t h s user guide. As CAP was especially designed towards the handling of time series, each of the variable names used in the data handling instructions represents actually a time series. The data handling instructions are described in subsection 3.2.2, but the format can best be seen from the examples given in chapter 8.

The following table serves as a quick guide to the files and units (i.e. the numbers of logical files used in CAP). A detailed description of the file contents and formats is given below.

I n p u t F i l e s

unit 3: Control variable file (formatted, sequential)

unit 5: Calculating instructions file (formatted, sequential) Data f i l e s

unit 2:

unit 4:

unit 0:

unit 9:

unit 10:

unit 13:

unit 14:

unit 16:

unit 17:

unit 18:

MESSAGE 11 technology name file (only if CAP is used in interac- tive mode) (formatted, sequential)

Preprocessed LP soluhon fYe (unformatted, direct access) MEDEE-2 dump file (unformatted, sequential)

Information on the LP solution file (unformatted, sequential) MESSAGE 11 technology dump f l e (unformatted, sequential) Supplementary file 111th time series (formatted, sequential) MESSAGE 11 time series dump file (unformatted, sequential) Variable location in MEDEE-2 dump file (formatted, sequential)

MESSAGE 11 user defined constraints dump file (unformatted, direct access)

(upwards) additional preprocessed LP solution files (unformat- ted, direct access)

Output f i l e s

unit 1 : tabular output unit 6: error messages

unit 7: intermediate file for plotter program;

unit 12: tabular output for interactive mode I n t e r m e d i a r y f i l e s

unit 1 1 : interpolated time series unit 15: input format conversion

(7)

2 DESCRIPTlON OF INPUT FILES

2.1 Control Variable K l e ( U n i t 3)

T h s file contains some general information such as switches t o be set for plotting, interpolation or extrapolation of time series and ones indicating the input files to be used. The file gives also one line of the header written t o an out- p u t We, which can be used t o indicate e.g. the name of the region or country for which tables a n d / o r plots a r e t o b e produced. Usually one of these files can be be

used together with several calculating instruction files.

The file is divided into t h r e e information blocks, each beginning with a new line. Within those blocks free format c a n be used, i.e.,

-- Numbers and strings a r e separated by a t least one blank, and can be writ- t e n in an optional number of lines;

-- comma (,) indicates repetition of the previous string;

--

semicolon (;) indicates t h a t any information written behind i t is ignored;

-- blank lines a r e ignored.

The first block contains 16 integer numbers. The first 11 yield information on t h e files to be processed and outputs t o be produced. The remaining 5 integers comprise the number of time periods required in the output me, a switch for the output format required, and 3 control integers for plotted outputs. The second block gives labels and lengths of time periods t o be considered. The t h r d block contains, if required, t h e output format statement. and the first line of the title of t h e output file.

Throughout this guide all entries described a r e identified by E(x,y,z) with

x

number of the logical file containing the entry;

y number of the block in a file;

z number of the entry in a block.

(8)

2.1.1 Content of blocks

Block 1

E(3,1,1) plotter control;

s e e also comments on entry E(5,2,2), and 3 DESCRIPTION OF OUTPUT FILES, for possible table formats;

0 for generation of tables only;

1 for generation of tables and a n intermediate file containing information t o be transfered to t h e plottlng program CPLOT ( s e e section 7 for a description of t h a t program);

-1 a s 1, b u t labeling of plots will be suppressed.

E(3,1,2) output record length control;

0 record length s e t t o a maximum of 132 columns;

n record length s e t t o a maximum of n columns.

E(3,1,3) e r r o r message control;

0 messages a r e written t o unit 6 only;

1 messages a r e also written t o unit 1 (tabular output); messages concerning errors which result in program termination a r e written t o both files in any case.

interpolation control;

if t h e period lengths of the time series read from the d a t a files differ from those given in block 2 of this f l e , they a r e interpo- lated before being used further;

0 no interpolation allowed;

1 for spline interpolation;

2 for linear interpolation.

extrapolation control;

if the t ~ m e horizon of time series r e a d from the d a t a files is s h o r t e r than t h e time horizon required for t h e output (as indi- cated in block 2 of t h s file), they a r e extrapolated before being used further;

0 no extrapolation allowed;

1 for simple repetition of the last value;

2 to invoke linear extrapolation routine.

E(3,1,6) MEDEE-2 dump file control;

0 if no d a t a are required from t h e MEDEE-2 dump file;

n to open unit 8 for a file containing n MEDEE-2 dump files E(3,1,7) MESSAGE dump file control;

0 if no d a t a a r e required from a MESSAGE dump file;

1 unused;

2 t o open units 10, 14 and 17 for MESSAGE I1 matrix g e n e r a t o r dump files;

(9)

unused unused

LP solution file control;

if no data required from a LP solution file;

to open n direct access files obtained through t h e LP solution and read the number and labels of periods from a file on unit 9;

supplementary file control;

if no supplementary file used;

to open unit 14 for a preprocessed supplementary file;

to open umt 1 4 for a preprocessed supplementary file if avail- able, otherwise to open unit 13 for a new supplementary We;

to open unit 13 for a new supplementary file;

number of time periods in t h e output m e , t h e maximum number of time steps possible, is to be set prior to compilation of t h e program (see section 7.1).

output formatting control;

this switch is only active if E(5,2,2) is set to 3 or -3;

tables a r e produced using the format (';',10al,/,B(f10.3)) or, if t h e name of a time series is left blank, with (B(f10.3));

if t h e format required is t o be read from the first n lines of block 3 of this input file; the format statement can be up to five lines long.

plot labeling control;

the number given is used to divide the total time horizon, the result gives t h e number of years between the labels on the time axes of plots.

tick mark control;

t h e number given is used to divide the total tlme horizon, the result gives t h e number of years between tlck marks on the time axes of plots.

time step control;

if the time steps required in the tabular output are equidis- t a n t , t h e base year and the step width are to be given in block 2 of t h s f l e ;

if t h e time steps required are of variable length, the labels for all time steps (i.e t h e first year of each period) plus the the last year of the total time horizon have to be given in block 2 of this input We.

(10)

B l o c k 2 E(3,2,1)

B l o c k 3

E(3,3,1)

labels of t ~ r n e periods;

if e n t r y E(3,1,16) is s e t t o zero two entries a r e r e a d , t h e first one being the label of the base y e a r , and t h e second one t h e length of t h e t i m e s t e p s ; if s e t to one, t h e n E(3,1,11)+1 e n t r ~ e s , representing t h e labels of all periods plus the l a s t y e a r of t h e t o t a l t i m e horizon, a r e required as input.

formatting;

if e n t r y E(3,1,13) is s e t t o zero, then no entry is required h e r e and t h e s t a n d a r d o u t p u t format will be used;

if e n t r y E(3,1,13) is s e t t o one, the required f o r m a t s t a t e m e n t with u p t o 400 c h a r a c t e r s in up to 5 Lines is r e a d ; t h e f o r m a t s t a t e m e n t is t o be written i n the usual FORTRAN FORMAT nota- tion a n d h a s t o be able t o process the n a m e of t h e time s e r i e s ( 1 0 a l ) and E ( 3 , l , l l ) re a l variables.

two h e a d e r lines;

i.e. t h e first line, r e s t r i c t e d to 60 c h a r a c t e r s , is u s e d a s a h e a d e r line on printed tables, the second one , which m a y con- tain a maximum of 40 c h a r a c t e r s , is used a s t h e Erst line of a three-line h e a d e r for tables and plots. The complete title is split i n t o two p a r t s so t h a t one common line c a n be used for several t a b l e s and plots. For example, if t h e s a m e kinds of cal- culations a r e t o be carried out f o r different scenarios only t h a t line h a s t o be changed for each scenario, and this input file c a n b e used t o g e t h e r with a number of calculating instruction files a s described below.

2.2 C a l c u l a t i n g Instructions ( U n i t 5 )

T h s file contains switches more closely related to a given s e t of calculating instructions t h a n those described under 3.1 a s well as the actual instructions. The file c o n t e n t s a r e again divided into t h r e e blocks.

The first input block in t h s file contains the second and t h r d lines of t h e three-line h e a d e r . (The first is contained in the control variable on file unit 3 . ) The second block contains switches, information on the units in which t a b l e s a n d / o r plots a r e t o be labeled, a s well a s scaling factors. T h s block has t o be ended by a commercial add (8) written to a n e x t r a Ilne, separating in t h s way t h e second and t h e t h r d input blocks f r o m e a c h other. The t h r d block contains t h e a c t u a l calculating instructions.

(11)

2.2.1 Content of blocks

B l o c k I

T h s block contains two lines serving as second and third lines of t h e header writ- t e n on tables and plots t h a t a r e produced from t h s input file. Each h e a d e r line is restricted to 40 c h a r a c t e r s .

B l o c k 2

plotted output control;

the file (on unit 7) containing the information for t h e plotter software is produced only when entry E(3,1,1) is not s e t to zero and entry E(5,2,2) is s e t t o an absolute value of 1 o r 2; t h e values transferred to the plotter software a r e also printed as third table in the tabular output on unit 1 (even if one or both of the plotter control switches a r e s e t t o zero);

for normal plotting 1.e. all Y-values a r e plotted relative to the base line;

for cumulative plotting;

for plotting t h e shares of t h e sum of Y-values;

output quantity and format control;

if the absolute value of this entry is less t h a n 3 , t h e n e n t r y E(3,1,1) is in control if plots a r e to be produced o r not; in all other cases e n t r y E(3,1,1) has no influence as no plots c a n be produced; in t h s context, see also t h e comments on entry E(3,1,1) and DESCRIPTlON OF OUTPUT FILES, for various table formats;

to generate tables only;

to generate tables and plots, curves are interpolated;

as 1, b u t allows for fixed labeling of the Y-axes of plots; see also the description on entry E(5,2,9) below;

as I , b u t all curves a r e plotted as step functions;

as 2, but allows for fixed labeling of the Y-axes of plots; see also t h e description on e n t r y E(5,2,9) below;

to print transposed output matrix to simplify further process- ing of t h a t file, in thls case all lines containing t e x t will be pre- ceded by a semicolon; thus the resulting table c a n directly be used a s input file to MESSAGE 11, w h c h interpret a semicolon as the begin of a comment.

as 3, but lines t h a t contain only zeros a r e n o t printed;

as 3, but adds one line containing the s u m over all time series shown in t h a t table;

to print t h e n u m b e r of t h e variable in t h e LP solution file and its s t a t u s in e x t r a columns;

to print t h e s t a t u s of t h e requested variable in the LP-solution;

(12)

labeling control;

no labeling of tables and plots, to label outputs 'MESSAGE 11';

to label outputs 'MESSAGE 11 - N L ' ; unused;

to label outputs 'MESSAGE 11 - MIP';

to label outputs 'MEDEE-2';

table header control;

to suppress certain control characters written to the tabular output file; these control characters a r e only meaningful if the output file is to be used as input file to CAP later;

to suppress the header lines, d a t e , and time written into the table header, this is useful when the output file produced is to serve as a n input file t o another program;

all labels a r e written to the tables.

units of variables in outputs;

this entry has no influence on the calculations as the program does not know anything about the units of the values read from the various input files, i t is up t o the user t o convert t h e results to t h e unit required; t h e string may have up to B char- acters where blanks have t o be padded by a tilde ( ) ; t h s string appears in the first (or only) table produced and/or as left- hand side label of plots; if no unit name is to be written to the output a e s , a t least one tilde must be present indicating t h a t entry.

units of variables in outputs;

this string is written t o the second table and as right-hand side label on plots, again t h s entry has no influence on the calcula- tions; if the first character of t h s string is a percent sign (%) the second table contains the shares of each time series, but the plotted output remains unchanged and its right-hand side is labeled with the string following the percent sign immedi- ately; as above, at least one tilde has to be entered to indicate the entry.

multiplicative conversion factor between the two units given in the previous entries, (Unit defined in E(5,2,5)

*

E(5,2,?) = unit defined in E(5,2,6) ).

multiplicative scaling factor f o r all values; all time series cal- culated withn CAP are multiplied by that factor

upper label on left-hand side of plots, which is used for fixed labeljng if E(5,2,2)=-1; ( t h s entry can remain in the file even if unused); this option helps to produce plots with identical label- ing s o they can be easier compared with each other.

(13)

Block 3

end sign, this is a commercial add (@) which is to be entered in the first column of a separate line.

is set to -2 additional input is required as control for step func- tions; the first entry is to be the number of curves plotted as step functions the following ones are the numbers of the according curves which are derived from the consecutive number of the mathematical equation used in this file to pro- duce the curve; curves not included in that sequence in are plotted as continuous functions.

T h s block contains the actual calculating instructions applied. The format to be followed when setting up these instructions is explained in t h e next subsection.

An example file illustrating the format specifications is included in Section 8. The number of mathematical expressions to be evaluated is limited t o a number which has to be set via the dimensioning program CHDIM prior t o compilation of C A P (see chapter 7.1).

2.2.2 Format of mathematical operations

The calculating instructions are to be written as mathematical equations of the format:

X = mathematical expression,

where X is the chosen name of t h e time series (with up to 10 characters) contain- ing the result obtained by the mathematical operation. The mathematical expression is build up using standard mathematical notation and can be extended to more than one line by typing an ampersand (&) or a backslash ( \ ) a s last char- acter in that line. The number of continuation lines possible has to be set i.n a data statement prior to compilation of the program (see section 7.1). The operands a r e the names of time series as they appear in the input f l e s used. They are appended by an identifier (:id) defining for the program the input file contain- ing the time series in question and, in cases when the given name refers to a set of data, additionally w h c h of the time series is to be taken from t h a t set. For further instructing the program what operation to perform on a time series, these names can be appended by one ore more operators (in the format ':opera- tor'). These operators can be appended to all mathematical expr.essions valid in CAP, i . e . , time series identifiers, parenthesis, constants or internal time series.

For more information on identifiers and operators, see 6 Description of Variables and, in particular, 6.8 Operators.

CAP knows the basic m a t h e ~ ~ ~ a t i c a l operators t , -,

*,

/ ,

**

and parenthesis () as well a s their h e r a r c h y . As the mathematical expressions are only evaluated when a closing parenthesis is found or the end of the expression is reached, one has to take care not to use too long expressions without any parenthesis. The maximum number of nested parenthesis and the maximum number of operands

(14)

enclosed in parenthesis can be s e t prior to compilation of the program and thus be adapted to the specific requirements of t h e u s e r ( s e e section 7.1).

In addition, both constants and time series can be used by following the for- m a t requirements given below,

Constants can be either used directly in a formula (identified a s figures in square brackets

[I)

o r by using a stack. The stacking of constants is initiated by a T in the first column. Each variable to be stacked has to be written i n t h e format

STOii value

ii being the s t a c k n u m b e r ( u p t o 20). The end of a stacking sequence has t o b e indicated by

r

T. The use of a s t a c k e d constant is indicated by RCLii: which is used like a usual variable in a mathematical expression;

Time series a r e identified by Tn, with n being the numbers of the time series.

Thls shorthand for ' r e a d n-th time series' is to be used again like a normal variable i n a mathematical expression. The time series themselves have t o be e n t e r e d one by one in the lines following t h e equation where t h e y a r e used first;

if one of the time series already defined is to be used in another equation it c a n t h e n b e referred to by typing -n, with n being t h e number used when t h a t time series was e n t e r e d ; if r n with a n n number used earlier is used again in another equation, the previ- ous time series with t h a t n u m b e r will be overwritten; t h e number of entries per t i m e series used m u s t correspond t o t h e number given in e n t r y E(3,1,12); the maximum number of internal time series that can b e handled by t h e program is t o b e s e t in a d a t a statement prior t o compilation (see section 7.1).

2 . 2 . 3 Control characters

The program recognizes a few control c h a r a c t e r s , provided they appear in t h e first column of a line.

# indicates to t h e p r o g r a m t o ignore t h a t line;

the r e s t of t h e line will be copied to t h e tabular output preceded by a '#' in the first column. So t h e output c a n , if e n t r y E(5,2,2) was s e t to 3 or -3, be again used as an input file t o CAP.

this line is copied t o t h e output without any control c h a r a c t e r i n the first column.

end of input.

(15)

a f t e r '@' allows t o copy the lines following t h a t control c h a r a c t e r t o the e n d of t h e t a b u l a r output file. The s a m e control c h a r a c t e r s as described above a r e t o be used t o identify the lext lines. The t e x t has t o be ended by a n '8' a n d one of t h e control c h a r a c t e r s described below. If E(5,2,2) is s e t t o + / - 3 this option h a s no effect a s any lines p r e c e e d e d by t e x t identification control c h a r a c t e r s a r e copied t o t h e output according t o their position in t h e input file. In all o t h e r c a s e s however all such lines a r e , if this option is not used, typed just a f t e r the header.

a f t e r ' @ ' indicates t h a t another calculating instruction file follows on t h e s a m e input file. The resulting tables a r e s e p a r a t e d by a '1' in the first column (FORTRAN printer control c h a r a c t e r for new page). The plotting information is also written t o a single file a n d identified accordingly. It is recommended t o use t h s option if more tables should be produced as it saves t h e r e p e a t e d loading of t h e MESSAGE 11 d u m p files.

8 a f t e r '@' indicats 'END OF FILE',

3 DESCRIIVON OF DATA FILES

3.1 MESSAGE I1 Technology Name File (Unit 2)

T h s file contains t h e n a m e s of and descriptions for all technologies, u s e r defined constraints and energy forms included in t h e MESSAGE 11 input file. The infomation contained in t h a t file is only used when CAP is u s e d in interactive mode.

3.2 MEDEE-2 Dump File ( U n i t 8)

T h s dump file holds s o m e general information and all t h e t i m e s e r i e s being inputs t o or outputs from MEDEE-2. The information is s t o r e d in ( ~ + ~ * N c A L ) unformated FORTRAN r e c o r d s , with NCAL being the n u m b e r of time s t e p s for which MEDEE-2 was r u n .

The first record contains the following variables:

REClON (character*8) n a m e of region or country;

CASE ( c h a r a c ter*4) n u m b e r of scenario;

NCAL (integer) n u m b e r of years;

YCAL(~:NCAL) ( i n t e g e r field) list of these years;

UNAME ( c h a r a c t e r q 4 ) MEDEE-2 output energy units

(16)

Each of the following NCAL blocks consists of two FORTRAN records, the first containing

PARVAR(1:231) (real field) inputs to MEDEE-2;

and the second

DERVAR(1:206) (real field) outputs from MEDEE-2

3.3

LP

Solution file (Unit 4)

The actual LP solution file has to be preprocessed before being used as input to CAP. This preprocessing is performed by program RDSOL, that combines the results obtained for each time series into one record that are t h e n sorted alpha- betically to allow the use of an efficient search algorithm in CAP. The resulting file is written as a n unformatted direct access file. For reasons of comparing different LP solutions or for aggregating various solutions it is possible to use up t o I3 different solution files, where the files 2 to B a r e to be assigned t o units 18 upwards. See chapter 6.4 on how t o extract data from these files. For a more explicit description of RDSOL see chapter 7.2.

Besides the data file(s), another file (assigned to unit 9) is needed forwarding information on the content of the direct access file(s) file to the program. This file is produced by RDSOL (on unit 9) during preprocessing of the solution file. If more than one solution is being processed at the same time it is silently assumed that all fles are of the same size and contain the same time series names.

3.4 MESSAGE 11 Dump Files (Units 10, 14 and 17)

These dump files hold a selection of the most important model inputs con- cernmg technology data and user defined constraints. The files a r e created dur- ing matrix generation by program ROWS on the same logical units as unformat- ted, sequential access (units 10 and 14) or direct access (unit 17) file.

3.5 Supplementary File (Unit 13)

Thls file may contain additional time series, which are either supplied by the user or are obtained from a previous run of CAP with entry E ( 5 , 2 , 2 ) set to 3 or -3.

(17)

If the file is created by the user the following format specification have to be followed:

The file is divided into three blocks containing -- comments,

-- number and labels of time steps, and -- time series.

The comment block, made up of an optional number of lines, can be used to identify the data contained in that file.

The beginning of the actual data blocks is signaled by the string NT YEARS

w h c h must be written in the format (lx,a2,2x,a5) followed by a line containing the according figures in free format. The next line can be used to change default values on the file format. Thls line has t o be typed using the format

( l x , a l , lx, i2, l x , i3, l x , a40),

if the default values should be used, t h e n the according entry has to remain blank. To t h s end, the following four values c a n be reset:

File content if tlvs entry is left blank (default) it is assumed that all of the time series names and values a r e read from the file assigned to the unit number specified by the next entry;

n indicates that no names of time series are given explicitly but that they are internally created as natural numbers in increas- ing order;

a indicates that the names of t h e time series are read continuing on t h s file (unit 13) but t h e time series are read from the file connected to the logical unit specified via the next entry.

Unit number if the time series are not following below on this file then any unit number greater t h a n 15 can be chosen, and the program continues to read from there; this option enables one to pro- cess files which are generated by any other computer pro- gram, provided the data file used satisfies the only conditions that time series are given row-wise and each one begins with a new line

File width the standard number is 80 columns, and the maximum 400.

(18)

I n p u t format t h e d e f a u l t considered is 'free f o r m a t ' ( s e e description below);

if t h e file t o b e read follows a defined f o r m a t this c a n b e specified h e r e , resulting in a faster processing of t h a t input file.

The line following t h e one used t o r e s e t default values is ignored by t h e pro- g r a m .

When the default input f o r m a t is used t h e following rules have t o b e observed when settlng up the file containing t h e actual set of d a t a .

-- The first column is r e s e r v e d for control c h a r a c t e r s ; n u m b e r sign (#) indi- c a t e s t h a t thls line is t o be Ignored and a commercial a d d (@) indicates t h e END OF FILE; b u t c a n be omited a t the physical END OF FILE. All other c h a r a c t e r s in t h e first column a r e ignored.

--

All variable n a m e s a n d values have to begin in o r a f t e r column two.

-- All values a r e a s s u m e d to be represented in r e a l f o r m a t . If integer n u m b e r s a r e u s e d t h e i n p u t format has to be s t a t e d explicitely a s Fn.0.

-- All e n t r i e s have t o b e s e p a r a t e d by a n optional n u m b e r of blanks.

-- Each time s e r i e s h a s t o s t a r t in a new line, b u t may continue over a n optional n u m b e r of lines.

3.6 Variable Location in the MEDEE-2 Dump File (Unit 16)

T h s file contains t h e n a m e s of all the variables used in MEDEE-2 and a n index representing their location in t h e d u m p file produced by MEDEE-2. The location is defined by t h e n u m b e r of b y t e s preceding a variable. Variables a r e o r d e r e d in the s e q u e n c e in which they a p p e a r in the common blocks PARVAR ( p a r a m e t e r vari- ables) and DERVAR (derived variables) of the MEDEE-2 p r o g r a m . For a list of the variable names s e e Kahn, A . , A . Hijlzl; 'Evolution of F u t u r e Energy D e m a n d s . . . ' .

The names of t i m e s e r i e s given in the calculating instructions file (on unit 5 ) a r e compared t o those listed in t h e variable location file; and t h e given index e n a b l e s t h e program t o locate t h e respective time s e r i e s i n t h e MEDEE-2 d u m p file (on unit 8). These locations r e m a i n the s a m e , unless t h e MEDEE-2 program is c h a n g e d .

Retrieval of a well defined g r o u p of variables c a n be s p e e d e d u p by setting u p a new variable location file containing t h e names a n d locations of t h e s e variables only. This procedure is r e c o m m e n d e d if certain variables a r e frequently t o be e x t r a c t e d from various d u m p files.

(19)

4 DESCRIPllON OF OUTPUT

FILs

4.1 Tabular Output (Unit 1)

For E(9,1,1) E(5,2,2) set to 0, + / - I , or + / - 2

Up to three tables a r e produced. The first one is labeled with the unit given in the calculating instructions file (unit 5) by entry E(5,2,5). The second one gives them in the unit s e t by entry E(5,2,6) and using the conversion factor given as entry E(5,2,7). The values in the t h r d table are those also used for plotting, fol- lowing the instructions given by entry E(5,2,1). Tabels t h a t would show identical figures are suppressed. An input file to the plotter routines (on unit 7) is pro- duced only if the absolute value value of entry E(3,1,1) is s e t t o 1.

For E(5,2,2) set to + / - 3

Setting this switch to 3 results in a transposed matrix, w h c h usually simplifies processing of the file produced. (Time series a r e written as rows rather than as columns.) The format of the file is such that it can again be used a s an input f i e to CAP (see also description of unit 13 above). Each text line is preceded by a semicolon (;), in this way such a file can also directly be used as an input file to MESSAGE i f , e.g., h a 1 or secondary energy demands are calculated from MEDEE-2. If the entry is set to -3, then all time series containing only zero values are not printed.

For E(5,2,2) set to 4

T h s table format can be used to check LP solutions for upper or lower limits on variables or rows and to get the number of the row or variable in question by that i t is identified in the LP solution. The format is similar to that of the first table described above, but an additional column containing the number is printed before and one showing the status of the row or variable is printed behind the colurnn containing the values required. The status is expressed as up, ( a t upper bound), lo ( a t lower bound), or bs (in basis). If a mathematical expression is used to calculate a time series i t shows the number and status of the last variable in that expression.

For E(5,2,2) s e t to -4

Whle the format is similar to t h a t obtained through E(5,2,2)=4 the colurnn showing the number of that variable in the

LP

solution file is not printed in t h s case.

(20)

4.2 Graphic Output

As the program is s e t u p now it produces (if entries E(3,1,1) and E(5,2,2) a r e s e t up accordingly) a n output file on unit 7 containing all relevant information necessary for t h e plotter interface programs. The file is written in f o r m a t t e d records, in o r d e r t o allow for a device independent postprocessing. The postpro- cessing; i.e.; creating an input file matching the format requirements of the plotter software used; is done with a program called CPLOT. Thls program is now written so t h a t i t m a t c h e s the software used on VAX/IIASA, although the com- mands used a r e very similar or even similar t o t h e ones used in CALCOMP software and is therefor easily t o b e adjusted t o t h e required standards. The appendix t o t h s document contains the description of t h e subroutines called from the plot library.

Another program called SPLOT can b e used t o produce simple g r a p h c a l out- put on a line printer o r a terminal.

The programs produce t h e image for one plot whose Y-axes is labeled with t h e two units specified. Additionally the time series names a r e numbered a n d written to t h e right of t h e plot frame containing t h e plotted time series. If e n t r y E ( 3 , l .I ) is s e t to -1 all additional information, i . e . , header and time series names a r e suppressed. See section 7 for a more detailed description of programs CPLOT and SPLOT.

5 DESCRIPTlON OF INTERMEDIATE FILES

5.1 I n t e r p o l a t e d Time Series Storage ( U n i t 11)

Thls file ia a prerequisite for CAP being used with E ( 3 , i , l!)= 1 . If E(3,1,11) is s e t t o 2 and the f l e has zero length the values of the time series in t h e file on unjt 1 3 a r e interpolated, a s necessary, and written to unit 11. If E(3,1,11) is s e t t o 1 it is assumed t h a t the interpolation was performed in a previous r u n , and any values requested from t h e supplementary file are t a k e n f r o m t h e file on unit 11 instead from t h e one on unit 13. Setting E(3,1,11) t o 3 indicates t h a t the file o n unit 1 3 is t o be used a s input file a n d is to be processed as required.

5.2 Input Format C o n v e r s i o n ( U n i t 15)

Thls file is a n intermediate file, used for converting d a t a given in free format t o ones written i n usual FORTRAN formats.

(21)

6 DESCRIPTION OF VARZABLES

Generally all variable names used in the calculating instruction file represent names of time series. If the values identified by a variable name is a single con- s t a n t it is automatically expanded t o a constant time series.

All variable names a r e written in the format below VARIABLE:DESCRlPTOR[: OPERATOR]

M'ith VARIABLE representing the time series name to be searched for in one of the input files; DESCRIPTOR identifying the file of residence of the variable, and pro- viding for a more exact variable specification if there exist more time series relating to the same variable (e.g. capital cost, efficiency, etc. related t o a specific technology included in MESSAGE). In the cases of certain input files it is also possible to process time series for t h e same variables contained in d f l e r e n t solution files; e . g . , for variables read from the MEDEE-2 dump files, and for those read from LP solution files preprocessed by program RDSOL. The construction of variable names and their descriptors is explained in some detail in the following

subsections. The description of OPERATORS is given in Subsection 6.6.

6.1 Variables Read from the MEDEE-2 Dump File

format: name[:sn.]:descriptor

n a m e variable name a s used in t h e MEDEE-2 program, see Khan A,, A. Holzl;

'Evolution of Future Energy Demands..' for a full list of the variable names .

: s n . is used if more than one solution is processed a t one time for aggre- gation purposes, e t c . ; in t h s case the dump files produced by several of MEDEE-2 runs just have t o be combined into a single file;

the dot (.) has t o be set t o the number of the solution N e in question if a time series is t o be extracted from one of the files; if it is s e t t o zero, or the entry is omitted altogether, t h e n the sum over the time series in question is calculated using all MEDEE-2 solution files avail- able;

:descriptor med t o be appended t o indicate t h a t the time series is contained in a MEDEE-2 dump file.

(22)

6.2 Variables Read from the MESSAGE I1 D u m p Files

6 . 2 . 1 Technology variables Format: name:descriptor

name for conversion technologies:

4 character variable name constructed according to the MESSAGE 11 user guide; the first character is the energy level identifier; the second one t h e main energy input identifier; the t h r d one the addi- tional technology identifier; and the fourth character the main out- put identifier;

for storage technologies:

3-character variable name constructed according t o the MESSAGE I1 user guide plus control characters; the first character is the level identifier, the second one the identifier of the fuel t o be stored, the t h r d one the additional technology identifier, the fourth character in this field has t o be s e t to dot

I.),

the fifth character is t o be set to g when referring t o values related to the mput/output part or to v to indicate values related to the volume part of the storage device; it remains unused (but can be set to g) when a storage device with a fixed relation between generation and volume parts is represented by t h s technology.

:descriptor cap capital cost per unit of total output;

var variable operation and maintenance cost p e r unit of total out- put;

fix fixed operation and maintenance cost per unit of total output;

c t m delivers a value representing the multiplicative factor neces- sary for converting cost per unit of total output t o cost per unit of main output (i.e., name:cap name:ctm gives the capi- tal cost per unit of main output);

pll technical plant life;

plf availability factor;

eff main output t o main input efficiency;

lev calculates levelized cost of technology using t h e technical plant life as economic lifetime and setting the long term discount r a t e equal to the interest rate;

dec parameter describing the decay of storage contents;

rgv relation between generation and volume capacities of storage devices;

each of the following descriptors is valid for a group of entries and delivers inputs t o or outputs from the technology relative to one unit of main input or one unit of installed capacity respectively, the dot (.) has t o be substituted by the identifier given in the MESSAGE 11 input file used to produce the dump file,

(23)

ei. energy input,

if the dot (.) is set to s t a r (+) instead of a specific fuel identifier it delivers the sum over all energy inputs;

eo. energy output,

settlng dot (.) t o star (+) results again in the sum over all out- puts;

r i , nuclear fuel requirement;

r o , nuclear fuel retirement;

fr. fraction of total input or output of the technology in the load region indicated (dot (.) s e t t o the number of t h e load region), when the load duration pattern of a technology was fixed;

r n . coefficient in user defined constraints, where r stands f o r '0'

or 'c' indicating a relation to one unit of output or one unit of new installed capacity respectively and n stands for the type of the constraint (1 or 2); the dot is used for identifying the number of loadregion t h s value is assigned t o (set to dot (.) if t h e coefficient is not defined for a specific load region); the name of t h e constraint in question has to be added as ':name';

6.2.2 User defined constraints Format: name: descriptor

name name of t h e user defined constraint

:descriptor in. coefficient in user defined constraints, where i stands for 'r' or 'v' indicating the right hand side of t h e constraints or the value of t h e objective function coefficient implied on all row entries and n stands for the type of the constraint ( 1 or 2);

the dot is used for identifying the number of loadregion t h s constraint is defined for (set t o dot (.) if the constraint is not defined for a specific load region or t o get the sum over all load regions);

6.2.3 Demands

Format: name:loadregion

name d m . where t h e dot has t o be set to the i d e n t ~ e r of the demand sector in question.

:loadregion lr, gives t h e fraction of the demand falling into the load region indicated, if dot (.) is set to t this results in the total demand.

(24)

6.2.4 Other variables F o r m a t : n a m e :

l r . length of load region specified in dot (.) as fraction of one length of period specified in dot (.) as given in e n t r y E ( 3 , 2 , 2 ) ; if the dot is s e t t o a specific period identifier (in this c a s e r e p r e s e n t e d by a l e t t e r r a t h e r t h a n a number), t h e n t h e whole time series is s e t t o the value of t h e length of t h e period indi- c a t e d ; if t h e dot is s e t t o zero the time series will contain t h e s e t of t h e period lengths as given in entry ~ ( 3 , 2 , 2 ) .

6.3 Variables Read from the

LP

Solution File

Format: name[:sn.]:descriptor

n a m e first 7 c h a r a c t e r s of t h e 8 c h a r a c t e r time series n a m e in t h e LP solu- tion file where trailing d o t s c a n b e omitted; with the c h a r a c t e r iden- tifying the n u m b e r of the load region in question (fifth c h a r a c t e r when MESSAGE I is used, or seventh character in t h e case of MES- SAGE I]), s e t t o 0, the program calculates the sum over t h e load regions; otherwise t h e time series relating t o the load region in ques- tion is e x t r a c t e d .

: s n . is needed i f more t h a n one solution is t o be processed a t t h e s a m e t i m e for purposes of aggregation, e t c . ; the number of l h e file t o be chosen is the consecutive n u m b e r of t h e me in t h e o r d e r t h e y a r e assigned t o t h e unit n u m b e r s , where t h e first file is t o be assigned t o unit 4 and t h e r e s t is assigned t o units 18 upwards; t h e dot (.) is t o b e s e t t o t h e number of t h e solution file in question a t i m e s e r i e s is t o be e x t r a c t e d from one of t h e files; if it is s e t t o zero, o r t h e e n t r y is omitted altogether, t h e n t h e sum over the time series in question is calculated using all LP solution files;

:descriptor t h e descriptor is used t o identify t h e column in the LP o u t p u t f r o m t h a t the time series is t o be e x t r a c t e d ;

a c t activity column,

sla slack (in rows section) o r discounted objective function value (in colurnns-section),

obx t h e objective function value is undiscounted relative t o t h e c e n t e r of t h e periods ( t o be used for all variables excluding capacities),

oby t h e objective function value is undiscounted relative t o t h e beginning of t h e periods ( t o be used for capacity variables), lo1 1.ower limit,

up1 upper limit,

dis shadow price discounted, shp shadow price undiscounted,

(25)

6.4 Variables Read from t h e Supplementary Input File Format: name:descriptor

name variable name as given in the supplementary input file

:descriptor fil has t o be appended t o the variable name to indicate that the t i m e series is to be read from the supplementary file.

6.5 Use of InternalIy Stored Values

The results of a given number of calculations a r e stacked and can be used in the following calculations by using t h e left-hand side name of t h e equation referred to. The number of time series t o be stacked is t o be s e t prior t o compi- lation of the program, see section 7.1 on how t o s e t t h a t value.

Format: name:

The s e a r c h procedure for t h e internally stored time series follows t h e 'last in - f i s t out' principle.

6.6 Operators

Operators can be appended as ':operator1 to any type of operand used in a mathematical expression; i.e., variable names of all types described above, inter- nal constants and time series and closing brackets. It is also possible t o add more than one operator when separated by colons. They a r e applied to the time series in their sequential order. Only the final result followmg the completion of all transformations appears a s output. As some of the operators just copy values from one field element t o another (e.g. : s h + , :sh-, : e x i ) c a r e has t o be taken when time series with unequal time steps a r e used.

Format: :operator

:ind t h e time-series is divided by t h e value of t h e first period (normalized);

:exp calculates t h e exponential value of each member of the time series, (value(i) = exp(value(i));

:grp calculates t h e total growth r a t e per period (the value for the last period is set t o zero);

: p r p calculates t h e growth r a t e in percent per period (the value for the last period is s e t to zero);

(26)

: dif

:#nn : Onn

: sh-

calculates the annual average growth rate per period ( t h e value for the last period is s e t t o zero);

calculates the annual average growth r a t e in percent per year ( t h e value for the last period is s e t t o zero);

multiplies the values in t h e time series by the length of the period, thus allowing to calculate e . g . , the total new installed capacity per period from t h e values given a s annual averages ( a s usually the case in time series t a k e n from LP solution files derived from matrices produced from either of t h e MESSAGE models);

calculates t h e cumulative value of the time series up to the end of e a c h period, and thus c a n be used e.g., t o calculate t h e total resource extrac- tion; t h s operator c a n for instance also be used t o calculate exponential growth functions; e . g . , the expression

[1.03]

* *

( [ l . ] : c u m

-

IpO:) delivers 1.000 1.159 1.344 1.558 2.094 if e n t r y E ( 3 , 2 , l ) was s e t to

1975 1980 19851990 2000:

calculates the natural logarithm of each member of t h e time series;

calculates t h e natural logarithm of the quotient v a r ( t + l ) / v a r ( t ) (the last value of the resulting time series is s e t t o one);

calculates t h e natural logarithm of the quotient v a r ( t + l ) / v a r ( l ) ( t h e last value of the resulting time series is s e t t o one); these last two options a r e very useful for calculating elasticities;

calculates the difference between field elements, i . e . , 1st element = 2nd element - 1 s t element, where t h e last element is s e t to zero;

fills the whole time-series with its nn'th element; ( e . g . ; use '# 2 ' , ' # + 2 ' o r '#02' when referring t o the 2nd element)

s e t s the nn'th element of a time series t o zero (0), all others remain unal- t e r e d ;

sets all elements b u t t h e n n ' t h element of a time series to zero (0);

shifts t h e whole time series one element to the right, the first element is s e t to zero.

shifts t h e whole time series one element to the left, the last element is s e t t o zero.

fills t h e last plus one element of a time series with t h e last element,

(27)

:ex2 fills the last plus one element with a value calculated by linear extrapola- tion from the last two values; this or the former operator can be used to avoid zeros written p e r default to the last field element e.g. when differences (:dif) or logarithms of quotients (:lnp, :lnt) are calculated;

(the sequence of operators: :dif:sh+:ex2:sh- can be used to calculate the differences between the values for each time s t e p and to get a linear extrapolation for the last tlme s t e p , which is s e t t o zero by the operator : diff) ;

:new this operator allows for a rough calculation of annual new installations on the basis of energy flows; if this operator is used four variables a r e read in free format from the f i s t line after the formula including this operator; if it is used more than once in one formula a new line is required for each occurrence: these four variables are the plant life ( t o be given as integer variable), the plant factor, the energy flow in the base year and the his- toric growth rate of the flow (all to be given as real variables); usmg t h s information and t h e time series of the annual flow for each period, the program then calculates the annual new capacities needed t o replace the ones going out of operation and th.e ones necessary to m e e t additional demands; this operator is usually used together with MESSAGE 1, where the resource extraction and the transportation of energy carriers is not modeled explicitly;

:nil with ii being the plant life, also calculates the annual new installations on the basis of annual energy flows; the difference t o :new being, t h a t here the existing capacity is calculated as the annual flow in the first period divided by the plant life based on the assumption that the build-up of t h s capacity was equally distributed to the previous years; this leads, in the case of increasing growth rates for new installations during the periods prior to the modeled time frame to an overestimation of the needs for new installations during the first few periods of t h e modeled time frame;

the resulting time series has to be divided by the plant factor explicitly.

To obtain the total installed capacity of a technology, it is necessary to cal- culte i t exphcitly by adding the slack of the capacity equation to the actual out- put divided by the length of the load region and dividing t h e result by the plant factor. See chapter 0.1.2 for examples for technologies with and without load regions.

This section describes how t o use the program needed t o change t h e dimen- sions of CAP to the required size and how to run the programs necessary to con- vert output files from other programs to a format w b c h c a n be interpreted by CAP.

(28)

7.1 The Dimensioning Program CHDW

This program is common t o all codes related to the MESSAGE 11 model and is used to adapt the array dimensions of the codes to the specific requirements of an explicit application. All codes handling the same type of information have to contain the same data statements and common blocks with arrays being of equal size for a complete model r u n . CHDlM works on blocks of information in the FOR- TRAN codes. The beginning of such a block is identified by three COMMENT lines, where the second line contains a four character block name. The end of t h e block is signalled by one more empty COMMENT lines. Thus such a block has the follow- ing pattern:

C

c name

C

Block of information t o be changed, e.g.; dimension statements, common blocks or data statements.

C

Program CHDIM reads three switches from t h e standard input (unit 5 ) . The first switch tells CHDIM under which operating system the programs a r e running.

Currently there are two options, i.e.; U far UNIX or C for ControI Data operating systems NOS or NOS/BE, but these options can easily be extended to other operating systems if necessary. The next two switches control t h e performance of the program where the first one is related to dimensions of arrays common to all programs and the second one to dimensions of arrays contained in CAP only.

If the according switch is s e t t o zero, the program tries t o read the required dimension from files assigned to unit 4 (in the case of dimensions relevant to all programs) and unit 3 (in the case of dimensions relevant to CAP only). If no input file is found, then the program uses default values when writing the new dimen- sion statements. Here only the second input file is described in detail, the description of the first file c a n be found in Messner S.; 'User's Guide for the Matrlx Generator of MESSAGE I i ' . The input file read from unit 3 contains the following variables (default values a r e shown in parenthesis):

ntm - maximal number of time steps (13);

ncols - maximal number of time series stored (30);

nstac

-

maximal number of internal stacs (30);

nzr - maximal number of internal time series (10);

ik 1

-

maximal number of nested brackets (10);

icont - maximal number of continuation lines (4);

The entry ncols, controlling the maximum number of time series stored, a t the same time, when entry E(5,2,2,) is s e t other than 3 or -3, represents the max- imum number of time series t o be written to the output files; nstac defines the maximum number of operands in a mathematical expression without being enclosed in brackets; nzr refers t o the time series defined in the calculating instruction file by rn as described in section 2.2.2.

(29)

If the switch is set to 1, the program writes instead of complete blocks of code, containing dimension and common statements, depending on the setting of the first switch either

include 'comname' in the case of U(NK), or

*call c omname

in the case of C(DC). These statements are used to indicate t h a t a file called 'comname' is stored outside the program and has to be included during compila- tion (in the case of UNIX) or to be included when the program is extracted from an UPDATE library in the case of CDC operating systems. In case of other operat- ing systems the write statement can be adapted easily to the specific require- ments. In any of these cases (switch set t o zero or one) the program to be changed is read from unit 1 and the new code is written t o unit 2.

Setting the switch to -4 results in creating the blocks of information on separate files having the required names and format. This performance is required when using the UNIX operating system.

If the switch is s e t t o -5, the program creates one file containing all blocks of information according t o t h e format specifications required by CDC UPDATE libraries (i.e.; each block is preceded by *cd comname).

7.2 Program RDSOL

As indicated earlier (section 3.3) RDSOL is needed to convert a solution file produced by a commercial linear programming package t o a format that can be interpreted by CAP. The present version of the program is able to process solu- tion files produces by MlNOS (Stanford University. Department of Operations Research). If other packages a r e used, then the according changes have to be done in SUBROUTlNES FINDR and GETREC as described t h e r e . I t is assumed t h a t the solution file is written in two parts not containing any blank lines, the first block contains the rows section, the second one the columns section. SUBROU- TINE FTNDR is used t o s e t t h e file pointer to the first row (=func), SUBROUTINE GETREC reads one line from the solution file and to set the file pointer t o the first Line of t h e column section after the rows section was read.

The program reads the solution file from unit I . Another input file, created b y program ROWS on unit 3, is read from unit 3. This file contains the name of the LP package used, that can be used as a switch t o select the accordmg READ or FORMAT STATEMENTS in RDSOL. The output file is written to unit 4 and eventual error messages are written t o unit 6. Two additional output files a r e produced.

The first one (on unit 9) contains additional information on the solution file to be forwarded to CAP. The second one (on unit 8) contains information on how the file was sorted. That file can be used as an input file on the same unit when a solution containing the same row and column names is t o be sorted later on. To indicate t h a t a file is to be sorted according to previous information the switch read from

(30)

unit 5 has to be s e t to 'NOSORT', otherwise to 'SORT'.

7.3 Program CPLOT

Program CPLOT reads t h e file produced by CAP on unit 7 from unit 8. Addi- tionally it asks interactively for some additional input from the standards input file (unit 5). The program uses subroutines contained in t h e lIASA plotting library (see Appendix 1 for a description). The subroutines included in this library a r e very similar t o CALCOMP plotter software. Even if other plotter software is used it should not be too difficult t o adjust t h e according subroutine calls.

7.4 Program SPLOT

Program SPLOT works very similar t o program CPLOT. The difference being t h a t the output r e p r e s e n t s a printable file containing a graphical representation of the results produces by CAP.

7.5 Program

NBF

Program NBF allows to s c a n an LP solution for all active constraints. T h s is specially very useful for analyzing a solution if one models long energy chains or uses genarally large models. Optionally the output file c a n show the same values a s described in section 6.3. Additionally t h e s t a t u s (11, ul, fx) of the row or column can be shown. The output is produced in a way t h a t all variables and rows con- cerning one technology, user defined constraint or energy form a r e contained in one group.

For this purpose the program reads from a nu.mber of dump and intermedi- ary files produced during matrix generation and postprocessing the solution file.

The following files a r e required; t h e technology d u m p file (PROGRAM ROWS unit 10) is read from unit 10, the technology name file (PROGRAM ROWS unit 2) is r e a d from unit 2, the technology d u m p file (PROGRAM ROWS unit 11) is read from unit 11 , t h e resource name file (PROGRAM ROWS u n i t 13) is r e a d from unit 13. Addition- ally two files produced by program RDSOL (see above) a r e read from t h e s a m e unit numbers a s written t o by RDSOL (unit 4 and unit 9). The output file is written to unit 1.

The control variables a r e r e a d from unit 3. The first line contains t h e identifier for the requested output in t h e same notation as described in section 6 . 3 ( a c t , sla, obx, oby, 101, upl, dis, shp). Setting t h s identifier t o ' a t ' results in printing the status of the variables a n d rows. Another entry is r e a d from the 5 ' t h column of the first line, setting this e n t r y to ' f ' tells t h e program to type nurneri- cal output in F10.4 FORMAT, any other c h a r a c t e r results in using E10.4 FORMAT.

The next line is used t o control t h e program input. If the Erst c h a r a c t e r is s e t t o ' 8 ' NBF reads from the file asslgned to unit 2 and prints information on all e n e r - gyforms, user defined constraints and techologies. If t h e switch is s e t t o ' + ' t h e

Referenzen

ÄHNLICHE DOKUMENTE

cedure fits a normal distribution to the three values (high, central and low) that resulted from expert discussions, with 90 percent o f the cases lying between the high

When we corrected for this systematic difference (and, in addition, for season by including the date as a linear, quadratic and cubic term, and the three weather parameters

P/Ptime: polynomial time, termination within p(n) steps on inputs of size n, for some polynomial p NP: non-deterministic polynomial time, based on. polynomial depth

This approach exploits observed efficiencies of neighbourhoods to guide the search process and is based on a special for parallelisa- tion adapted VNS called Time Restricted

În Tabelul 1 este prezentat o serie de timp care descrie evolu ia activit ii institu iilor de credit din România, în perioada 2014 T2 – 2015 T2, prin intermediul a

After deriving the cepstrum of important classes of time series processes, also featuring long memory, we discuss likelihood inferences based on the periodogram, for which

We used discriminant analysis with the two sets of variables selected with a likelihood criterion and the sets chosen with the four criteria optimized for the neural network; we

Summary: The influence of biegenie opal sediment input (mainly diatom skeletons) on the fluorine budget of marine sediments will be shown for 24 sampling stations of the