updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / wavelet / dwtai_w.c
bloba5a096f1f7d26b87707a54c8709426ce4b88e2ef
1 // Author: Aime' Fournier
2 // E-mail: fournier@ucar.edu
4 #include <stdio.h>
5 #include "qf.h" // for pqf ...
6 #include "real.h"
8 // See 2009/8/4 e-mail from john@michalakes.us
9 #ifndef CRAY
10 # ifdef NOUNDERSCORE
11 # define DWTAI_W dwtai_w
12 # else
13 # ifdef F2CSTYLE
14 # define DWTAI_W dwtai_w__
15 # else
16 # define DWTAI_W dwtai_w_
17 # endif
18 # endif
19 #endif
21 void DWTAI_W (char *nam,// in: filter name
22 int *ran, // in: filter length
23 real *u, // in/out: data & transform
24 real *s, // scratch space
25 int *iv, // v-space lengths
26 int *ia, // w-space starts
27 int *lm) { // maximum level
28 pqf *g,*h; // wavelet hpf & lpf
29 static int call1=1;
31 //printf("dwtai_w::dwtai_w(%s,%2d,{%6.3f,...},{%6.3f,...},{%2d,...},{%2d,...},%2d)\n",nam,*ran,*u,*s,*iv,*ia,*lm);
32 if( *ran ) {
33 h=qf(nam,*ran,0); // assign h
34 g=qf(nam,*ran,1); // assign g
35 // PrintFilter(nam,*ran,0,h);
36 // PrintFilter(nam,*ran,1,g);
38 dwtai(u,s,iv,ia,*lm,h,g);
40 free(g->fp);free(g);free(h->fp);free(h);
41 }else{
42 if( call1 ) {
43 printf(" dwtai_w: abort because *ran==0.\n");
44 call1=0;
45 abort();