1 /*  -- translated by f2c (version 20100827).
2    You must link the resulting object file with libf2c:
3 	on Microsoft Windows system, link with libf2c.lib;
4 	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 	or, if you install libf2c.a in a standard place, with -lf2c -lm
6 	-- in that order, at the end of the command line, as in
7 		cc *.o -lf2c -lm
8 	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9 
10 		http://www.netlib.org/f2c/libf2c.zip
11 */
12 
13 #include "libtinyf2c.h"
14 
15 /* Table of constant values */
16 
17 static integer c__9 = 9;
18 static integer c__1 = 1;
19 static integer c__3 = 3;
20 static real c_b8 = 0.f;
21 static real c_b9 = 50.f;
22 static integer c__51 = 51;
23 static integer c__2 = 2;
24 
25 /* ----------------------------------------------------------------------- */
26 /*     Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
27 /* ----------------------------------------------------------------------- */
MAIN__(void)28 /* Main program */ int MAIN__(void)
29 {
30     /* System generated locals */
31     real r__1, r__2;
32 
33     /* Builtin functions */
34     double exp(doublereal);
35     integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
36 	    e_wsle(void), s_rsle(cilist *), e_rsle(void);
37 
38     /* Local variables */
39     static integer n;
40     static real y, x1[51], x2[51];
41     static integer iws;
42     extern real rngu0_(integer *);
43     static integer iseed;
44     extern /* Subroutine */ int grcls_(void), grfrm_(void), gropn_(integer *),
45 	     uulin_(integer *, real *, real *), uumrk_(integer *, real *,
46 	    real *);
47     static real rundef;
48     extern /* Subroutine */ int glrget_(char *, real *, ftnlen), grswnd_(real
49 	    *, real *, real *, real *), grstrf_(void), usdaxs_(void), uspfit_(
50 	    void), grstrn_(integer *), sgpwsn_(void), uusmkt_(integer *),
51 	    usspnt_(integer *, real *, real *), ussttl_(char *, char *, char *
52 	    , char *, ftnlen, ftnlen, ftnlen, ftnlen);
53 
54     /* Fortran I/O blocks */
55     static cilist io___7 = { 0, 6, 0, 0, 0 };
56     static cilist io___8 = { 0, 5, 0, 0, 0 };
57 
58 
59 /* -- データ ---- */
60     iseed = 1;
61     for (n = 0; n <= 50; ++n) {
62 	y = n * 50.f / 50 + 0.f;
63 /* Computing 2nd power */
64 	r__1 = exp(-y / 20);
65 /* Computing 2nd power */
66 	r__2 = exp((rngu0_(&iseed) - .5f) * 2);
67 	x1[n] = r__1 * r__1 * 10.f * (r__2 * r__2);
68 /* Computing 2nd power */
69 	r__1 = exp(-y / 20);
70 	x2[n] = r__1 * r__1 * 10.f;
71 /* L10: */
72     }
73     glrget_("RUNDEF", &rundef, (ftnlen)6);
74 /* -- グラフ ---- */
75     s_wsle(&io___7);
76     do_lio(&c__9, &c__1, " WORKSTATION ID (I)  ? ;", (ftnlen)24);
77     e_wsle();
78     sgpwsn_();
79     s_rsle(&io___8);
80     do_lio(&c__3, &c__1, (char *)&iws, (ftnlen)sizeof(integer));
81     e_rsle();
82     gropn_(&iws);
83     grfrm_();
84     grswnd_(&rundef, &rundef, &c_b8, &c_b9);
85     usspnt_(&c__51, x1, &rundef);
86     usspnt_(&c__51, x2, &rundef);
87     grstrn_(&c__3);
88     uspfit_();
89     grstrf_();
90     ussttl_("MIXING RATIO", "ppmv", "HEIGHT", "km", (ftnlen)12, (ftnlen)4, (
91 	    ftnlen)6, (ftnlen)2);
92     usdaxs_();
93     uusmkt_(&c__2);
94     uumrk_(&c__51, x1, &rundef);
95     uulin_(&c__51, x2, &rundef);
96     grcls_();
97     return 0;
98 } /* MAIN__ */
99 
u1d2_()100 /* Main program alias */ int u1d2_ () { MAIN__ (); return 0; }
101