6 /* wesley ebisuzaki v1.0
10 * prints out a simple description of kpds6, kpds7
12 * kpds6 = octet 10 of the PDS
13 * kpds7 = octet 11 and 12 of the PDS
14 * (kpds values are from NMC's grib routines)
15 * center = PDS_Center(pds) .. NMC, ECMWF, etc
17 * the description of the levels is
19 * (2) include some NMC-only values (>= 200?)
21 * v1.1 wgrib v1.7.3.1 updated with new levels
22 * v1.2 added new level and new parameter
23 * v1.2.1 modified level 117 pv units
24 * v1.2.2 corrected level 141
25 * v1.2.3 fixed layer 206 (was 205)
28 void levels(int kpds6
, int kpds7
, int center
) {
32 /* octets 11 and 12 */
39 case 1: printf("sfc");
41 case 2: printf("cld base");
43 case 3: printf("cld top");
45 case 4: printf("0C isotherm");
47 case 5: printf("cond lev");
49 case 6: printf("max wind lev");
51 case 7: printf("tropopause");
53 case 8: printf("nom. top");
55 case 9: printf("sea bottom");
58 case 10: printf("atmos col");
62 case 212: printf("low cld bot");
65 case 213: printf("low cld top");
68 case 214: printf("low cld lay");
71 case 222: printf("mid cld bot");
74 case 223: printf("mid cld top");
77 case 224: printf("mid cld lay");
80 case 232: printf("high cld bot");
83 case 233: printf("high cld top");
86 case 234: printf("high cld lay");
89 case 201: printf("ocean column");
91 case 204: printf("high trop freezing lvl");
93 case 206: printf("grid-scale cld bot");
95 case 207: printf("grid-scale cld top");
97 case 209: printf("bndary-layer cld bot");
99 case 210: printf("bndary-layer cld top");
101 case 211: printf("bndary-layer cld layer");
103 case 242: printf("convect-cld bot");
105 case 243: printf("convect-cld top");
107 case 244: printf("convect-cld layer");
109 case 246: printf("max e-pot-temp lvl");
111 case 247: printf("equilibrium lvl");
113 case 248: printf("shallow convect-cld bot");
115 case 249: printf("shallow convect-cld top");
117 case 251: printf("deep convect-cld bot");
119 case 252: printf("deep convect-cld top");
122 case 100: printf("%d mb",kpds7
);
124 case 101: printf("%d-%d mb",o11
*10,o12
*10);
126 case 102: printf("MSL");
128 case 103: printf("%d m above MSL",kpds7
);
130 case 104: printf("%d-%d m above msl",o11
*100,o12
*100);
132 case 105: printf("%d m above gnd",kpds7
);
134 case 106: printf("%d-%d m above gnd",o11
*100,o12
*100);
136 case 107: printf("sigma=%.4f",kpds7
/10000.0);
138 case 108: printf("sigma %.2f-%.2f",o11
/100.0,o12
/100.0);
140 case 109: printf("hybrid lev %d",kpds7
);
142 case 110: printf("hybrid %d-%d",o11
,o12
);
144 case 111: printf("%d cm down",kpds7
);
146 case 112: printf("%d-%d cm down",o11
,o12
);
148 case 113: printf("%dK",kpds7
);
150 case 114: printf("%d-%dK",475-o11
,475-o12
);
152 case 115: printf("%d mb above gnd",kpds7
);
154 case 116: printf("%d-%d mb above gnd",o11
,o12
);
156 case 117: printf("%d pv units",INT2(o11
,o12
)); /* units are suspect */
158 case 119: printf("%.5f (ETA level)",kpds7
/10000.0);
160 case 120: printf("%.2f-%.2f (ETA levels)",o11
/100.0,o12
/100.0);
162 case 121: printf("%d-%d mb",1100-o11
,1100-o12
);
164 case 125: printf("%d cm above gnd",kpds7
);
167 if (center
== NMC
) printf("%.2f mb",kpds7
*0.01);
169 case 128: printf("%.3f-%.3f (sigma)",1.1-o11
/1000.0, 1.1-o12
/1000.0);
171 case 141: printf("%d-%d mb",o11
*10,1100-o12
);
173 case 160: printf("%d m below sea level",kpds7
);