NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3ft26.f
Go to the documentation of this file.
1C> @file
2C> @brief Creates wafs 1.25x1.25 thinned grids.
3C> @author Farley @date 1993-04-28
4
5C> Converts a 360x181 1-degree grid into a nh or sh
6C> 360x91 1-degree grid. This nh/sh grid is flipped for grib
7C> purposes and then converted to the desired 1.25 degree
8C> wafs (quadrant) thinned grid.
9C>
10C> ### Program History Log:
11C> Date | Programmer | Comment
12C> -----|------------|--------
13C> 1993-04-28 | FARLEY | Original author.
14C> 1994-04-01 | Ralph Jones | Corrections for 1 deg. displacement of grids and
15C> error in flipping of southern hemisphere.
16C> 1994-05-05 | Ralph Jones | Replace subr. w3ft01() with w3ft16() and w3ft17().
17C> 1994-06-04 | Ralph Jones | Change subroutine name from wfstrp to w3ft26().
18C>
19C> @param[in] MAPNUM Number of grid, 37 to 44.
20C> @param[in] FLD Northern or southern hem. spectral field.
21C> @param[in] HI Interpolated wafs field (3447 points)
22C> @param[in] IGPTS Number of points in interpolated field
23C> @param[in] NSTOP 24, when mapnum .ne. 37 thru 44
24C>
25C> @author Farley @date 1993-04-28
26 SUBROUTINE w3ft26 (MAPNUM,FLD,HI,IGPTS,NSTOP)
27C
28 REAL FLD (360,181)
29 REAL HALF (360,91)
30 REAL HI (3447)
31 REAL QUAD (95,91)
32C
33 INTEGER IGPTS
34 INTEGER MAPNUM
35 INTEGER NSTOP
36C
37 SAVE
38C
39C PRINT *,' MADE IT TO W3FT26'
40 nstop = 0
41C
42C 1.0 CUT FULL GRID TO DESIRED HEMISPHERE.
43C
44C 1.1 EXTRACT THE NORTHERN HEMISPHERE AND FLIP IT.
45C
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
53C
54C 1.2 EXTRACT THE SOUTHERN HEMISPHERE AND FLIP IT.
55C
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
64C
65C 2.0 SELECT THE QUADRANT DESIRED.
66C
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
76C
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
83C
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
90C
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
97C
98 ELSE
99 print *,' W3FT26 - MAP NOT TYPE 37-44'
100 igpts = 0
101 nstop = 24
102 RETURN
103 ENDIF
104C
105 interp = 0
106C
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
113C
114 igpts = 3447
115C
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