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 /* ********************************************************************** */
16 /* TRANSFORM SPECTRA INTO WAVE FROM M=M1 TO M=M2 AT A LATITUDE */
17 /* ********************************************************************** */
18 /* Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
19 /* ----------------------------------------------------------------------- */
shmswj_(integer * mm,integer * jm,integer * isw,integer * j,integer * m1,integer * m2,real * s,real * wj,real * sd,real * pmj,real * ys,real * yc,real * py,real * r__)20 /* Subroutine */ int shmswj_(integer *mm, integer *jm, integer *isw, integer *
21 j, integer *m1, integer *m2, real *s, real *wj, real *sd, real *pmj,
22 real *ys, real *yc, real *py, real *r__)
23 {
24 /* System generated locals */
25 integer wj_offset, py_dim2, py_offset, i__1;
26
27 /* Local variables */
28 static integer m;
29 extern /* Subroutine */ int shmwjm_(integer *, integer *, integer *,
30 integer *, integer *, real *, real *, real *, real *, real *,
31 real *, real *, real *, real *), shmwjz_(integer *, integer *,
32 integer *, integer *, real *, real *, real *, real *, real *,
33 real *, real *, real *);
34
35 /* Parameter adjustments */
36 --r__;
37 wj_offset = -(*mm);
38 wj -= wj_offset;
39 --s;
40 py_dim2 = *jm - 0 + 1;
41 py_offset = 1 + 2 * (0 + py_dim2 * 0);
42 py -= py_offset;
43
44 /* Function Body */
45 if (*m1 > 0) {
46 wj[0] = 0.f;
47 } else {
48 shmwjz_(mm, jm, isw, j, &s[1], wj, sd, pmj, ys, yc, &py[py_offset], &
49 r__[1]);
50 }
51 i__1 = *m2;
52 for (m = *m1; m <= i__1; ++m) {
53 shmwjm_(mm, jm, isw, j, &m, &s[1], &wj[m], &wj[-m], sd, pmj, ys, yc, &
54 py[py_offset], &r__[1]);
55 /* L20: */
56 }
57 i__1 = *mm;
58 for (m = *m2 + 1; m <= i__1; ++m) {
59 wj[m] = 0.f;
60 wj[-m] = 0.f;
61 /* L30: */
62 }
63 return 0;
64 } /* shmswj_ */
65
66