NCEPLIBS-w3emc  2.11.0
w3ft26.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Creates wafs 1.25x1.25 thinned grids.
3 C> @author Farley @date 1993-04-28
4 
5 C> Converts a 360x181 1-degree grid into a nh or sh
6 C> 360x91 1-degree grid. This nh/sh grid is flipped for grib
7 C> purposes and then converted to the desired 1.25 degree
8 C> wafs (quadrant) thinned grid.
9 C>
10 C> ### Program History Log:
11 C> Date | Programmer | Comment
12 C> -----|------------|--------
13 C> 1993-04-28 | FARLEY | Original author.
14 C> 1994-04-01 | Ralph Jones | Corrections for 1 deg. displacement of grids and
15 C> error in flipping of southern hemisphere.
16 C> 1994-05-05 | Ralph Jones | Replace subr. w3ft01() with w3ft16() and w3ft17().
17 C> 1994-06-04 | Ralph Jones | Change subroutine name from wfstrp to w3ft26().
18 C>
19 C> @param[in] MAPNUM Number of grid, 37 to 44.
20 C> @param[in] FLD Northern or southern hem. spectral field.
21 C> @param[in] HI Interpolated wafs field (3447 points)
22 C> @param[in] IGPTS Number of points in interpolated field
23 C> @param[in] NSTOP 24, when mapnum .ne. 37 thru 44
24 C>
25 C> @author Farley @date 1993-04-28
26  SUBROUTINE w3ft26 (MAPNUM,FLD,HI,IGPTS,NSTOP)
27 C
28  REAL FLD (360,181)
29  REAL HALF (360,91)
30  REAL HI (3447)
31  REAL QUAD (95,91)
32 C
33  INTEGER IGPTS
34  INTEGER MAPNUM
35  INTEGER NSTOP
36 C
37  SAVE
38 C
39 C PRINT *,' MADE IT TO W3FT26'
40  nstop = 0
41 C
42 C 1.0 CUT FULL GRID TO DESIRED HEMISPHERE.
43 C
44 C 1.1 EXTRACT THE NORTHERN HEMISPHERE AND FLIP IT.
45 C
46  IF (mapnum .EQ. 37 .OR. mapnum .EQ. 38 .OR.
47  & mapnum .EQ. 39 .OR. mapnum .EQ. 40) THEN
48  DO j=1,91
49  DO i=1,360
50  half(i,91-j+1) = fld(i,j)
51  END DO
52  END DO
53 C
54 C 1.2 EXTRACT THE SOUTHERN HEMISPHERE AND FLIP IT.
55 C
56  ELSE IF (mapnum .EQ. 41 .OR. mapnum .EQ. 42 .OR.
57  & mapnum .EQ. 43 .OR. mapnum .EQ. 44) THEN
58  DO j=91,181
59  DO i=1,360
60  half(i,181-j+1) = fld(i,j)
61  END DO
62  END DO
63  ENDIF
64 C
65 C 2.0 SELECT THE QUADRANT DESIRED.
66 C
67  IF (mapnum .EQ. 37 .OR. mapnum .EQ. 41) THEN
68  DO 372 j = 1,91
69  DO 370 i = 329,360
70  quad(i-328,j) = half(i,j)
71  370 CONTINUE
72  DO 371 i = 1,63
73  quad(i+32,j) = half(i,j)
74  371 CONTINUE
75  372 CONTINUE
76 C
77  ELSE IF (mapnum .EQ. 38 .OR. mapnum .EQ. 42) THEN
78  DO 381 j = 1,91
79  DO 380 i = 59,153
80  quad(i-58,j) = half(i,j)
81  380 CONTINUE
82  381 CONTINUE
83 C
84  ELSE IF (mapnum .EQ. 39 .OR. mapnum .EQ. 43) THEN
85  DO 391 j = 1,91
86  DO 390 i = 149,243
87  quad(i-148,j) = half(i,j)
88  390 CONTINUE
89  391 CONTINUE
90 C
91  ELSE IF (mapnum .EQ. 40 .OR. mapnum .EQ. 44) THEN
92  DO 401 j = 1,91
93  DO 400 i = 239,333
94  quad(i-238,j) = half(i,j)
95  400 CONTINUE
96  401 CONTINUE
97 C
98  ELSE
99  print *,' W3FT26 - MAP NOT TYPE 37-44'
100  igpts = 0
101  nstop = 24
102  RETURN
103  ENDIF
104 C
105  interp = 0
106 C
107  IF (mapnum .EQ. 37 .OR. mapnum .EQ. 38 .OR.
108  & mapnum .EQ. 39 .OR. mapnum .EQ. 40) THEN
109  CALL w3ft16(quad,hi,interp)
110  ELSE
111  CALL w3ft17(quad,hi,interp)
112  ENDIF
113 C
114  igpts = 3447
115 C
116  RETURN
117  END
subroutine w3ft16(ALOLA, BTHIN, INTERP)
Convert a northern hemisphere 1.0 degree lat.,lon.
Definition: w3ft16.f:24
subroutine w3ft17(ALOLA, BTHIN, INTERP)
Convert a southern hemisphere 1.0 degree lat.,lon.
Definition: w3ft17.f:24
subroutine w3ft26(MAPNUM, FLD, HI, IGPTS, NSTOP)
Converts a 360x181 1-degree grid into a nh or sh 360x91 1-degree grid.
Definition: w3ft26.f:27