updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / wavelet / idwtai2_w.c
blob58c057856d7df2d56fbec53bbf41fddddf94b4bd
1 // Author: Aime' Fournier
2 // E-mail: fournier@ucar.edu
4 #include "qf.h" // for pqf ...
6 // See 2009/8/4 e-mail from john@michalakes.us
7 #ifndef CRAY
8 # ifdef NOUNDERSCORE
9 # define IDWTAI_W idwtai2_w
10 # else
11 # ifdef F2CSTYLE
12 # define IDWTAI_W idwtai2_w__
13 # else
14 # define IDWTAI_W idwtai2_w_
15 # endif
16 # endif
17 #endif
19 void IDWTAI_W (char *nam, // in: filter name
20 int *ran, // in: filter length
21 real *u, // in/out: data & transform
22 real *s, // scratch space
23 int *iv, // v-space lengths
24 int *iw, // w-space lengths
25 int *ia, // w-space starts
26 int *lm) { // maximum level
27 int *ja[2],*jv[2],*jw[2]; // reshapes of ia, iv & iw
28 pqf *g,*h; // wavelet hpf & lpf
30 //printf("idwtai2_w::idwtai2_w(%s,%2d,{%6.3f,...},{%6.3f,...},{%2d,...},{%2d,...},{%2d,...},%2d)\n",nam,*ran,*u,*s,*iv,*iw,*ia,*lm);
31 h=qf(nam,*ran,0); // assign h
32 g=qf(nam,*ran,1); // assign g
33 //PrintFilter(nam,*ran,0,h);
34 //PrintFilter(nam,*ran,1,g);
36 for( int i=0; i<2; i++ ) {
37 ja[i]=ia+(*lm+1)*i;
38 jv[i]=iv+(*lm+1)*i;
39 jw[i]=iw+(*lm+1)*i;
41 idwtai2(u,s,jv,jw,ja,*lm,h,g);
43 free(g->fp);free(g);free(h->fp);free(h);