From 6280c79b2b05d06c1a1f4ba46dbac33879512bf4 Mon Sep 17 00:00:00 2001 From: bikegeek <3753118+bikegeek@users.noreply.github.com> Date: Tue, 11 Jul 2023 15:12:39 -0600 Subject: [PATCH] Feature 339 tcdiag skewt (#365) * Issu #337 initial version of skew T, hard-coded, proof-of-concept version * initial commit of config file * Addes some logic to retrieve units for each field. Still need to get the units for the levels (z). * Added a few more settings for setting sounding hours of interest. * Issue #337 added support to get the YYMMDDhh and basin-storm id from the input file * Issue #337 added logging support * Issue #337 added settings for logging, decimation, turning on/off plotting features. * Issue #337 updated logging * instructions and environment yaml file * Remove hard-coded paths * reinstated resampling/decimating wind barbs * fix comment for labels along the y2-axis * Close figure after saving to prevent warning from Matplotlib about too many figures opened at once * allow user to specify subdir for log and output dirs * Added a note to the README about which line options are supported, as per the error message I recieved when I used an unsupported value (I didn't see the explanation in the config file at first) -- if not all of these values are actually appropriate, adjust this message as needed. * updated year for copyright, reformatted file, fixed typos * tests for partially and completely missing data * partial and completely missing data to use for testing * config file for testing * checking for missing data * Add check for empty file * Update requirements.txt update scipy from 1.9.3 to 1.10.0 to address dependabot/vulnerability * clean up code following sonarlint check * resolve conflict * fixed indentation of 'return'- previously got indented too far and only processes the first sounding time * new data to test behavior when there is an empty file * Clean up tests, add test for empty input data file --------- Co-authored-by: Jonathan Vigh --- .../ssh052023_avno_doper_2023010106_diag.dat | 168 +++++++++++++ metplotpy/plots/skew_t/skew_t.py | 20 +- requirements.txt | 2 +- .../sal092022_avno_doper_2022092700_diag.dat | 168 +++++++++++++ .../sal092022_avno_doper_2022092800_diag.dat | 0 test/skew_t/test_skew_t.py | 234 ++++++++++++++---- 6 files changed, 539 insertions(+), 53 deletions(-) create mode 100644 metplotpy/plots/skew_t/data/empties/ssh052023_avno_doper_2023010106_diag.dat create mode 100644 test/skew_t/data/2023/sal092022_avno_doper_2022092700_diag.dat create mode 100644 test/skew_t/data/2023/sal092022_avno_doper_2022092800_diag.dat diff --git a/metplotpy/plots/skew_t/data/empties/ssh052023_avno_doper_2023010106_diag.dat b/metplotpy/plots/skew_t/data/empties/ssh052023_avno_doper_2023010106_diag.dat new file mode 100644 index 00000000..888c1fb3 --- /dev/null +++ b/metplotpy/plots/skew_t/data/empties/ssh052023_avno_doper_2023010106_diag.dat @@ -0,0 +1,168 @@ + * AVNO 2023010106 * + * SH05 SH05 * + + ------------------------------------------------------ STORM DATA ---------------------------------------------------------- + +NTIME 041 DELTAT 006 +TIME (HR) 0 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 132 138 144 150 156 162 168 174 180 186 192 198 204 210 216 222 228 234 240 +LAT (DEG) -35.9 -37.0 -38.1 -39.3 -40.5 -41.7 -43.4 -44.9 -47.5 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 +LON (DEG) 71.4 73.4 75.5 77.7 80.2 83.4 87.0 91.5 95.8 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 9999.0 +MAXWIND (KT) 33 32 35 36 36 41 40 38 36 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +RMW (KM) 197 225 185 161 167 136 62 31 212 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +MIN_SLP (MB) 1002 1000 1001 1000 1001 1001 1002 1002 998 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +SHR_MAG (KT) 40 44 47 46 46 43 42 38 38 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +SHR_HDG (DEG) 122 118 112 106 104 96 91 90 93 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +STM_SPD (KT) 19 19 20 21 24 29 33 37 39 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +STM_HDG (DEG) 124 123 124 123 118 119 118 123 131 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +SST (10C) 192 182 170 156 143 130 113 97 75 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +OHC (KJ/CM2) 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +TPW (MM) 37 37 36 35 33 31 29 26 25 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +LAND (KM) 2182 2395 2615 2857 3103 2891 2629 2335 2176 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +850TANG (10M/S) -113 -110 -108 -101 -95 -89 -78 -65 -50 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +850VORT (/S) 26 33 52 69 70 69 65 37 -21 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +200DVRG (/S) 56 37 17 29 38 69 16 20 34 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 + + ------------------------------------------------------ SOUNDING DATA ------------------------------------------------------- + +NLEV 027 SURF 1000 0975 0950 0925 0900 0850 0800 0750 0700 0650 0600 0550 0500 0450 0400 0350 0300 0250 0200 0150 0100 0070 0050 0030 0020 0010 +TIME (HR) 0 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 132 138 144 150 156 162 168 174 180 186 192 198 204 210 216 222 228 234 240 +T_SURF (10C) 190 182 170 159 150 141 125 110 90 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_SURF (%) 86 87 88 88 89 90 91 90 92 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +P_SURF (MB) 1014 1013 1013 1012 1013 1012 1011 1010 1005 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_SURF (10KT) 16 31 28 32 47 66 83 110 137 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_SURF (10KT) -35 -46 -58 -80 -115 -136 -171 -175 -178 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_1000 (10C) 181 175 163 153 145 138 121 108 91 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_1000 (%) 86 87 88 88 88 90 90 89 91 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_1000 (DM) 12 11 11 10 11 10 9 8 4 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_1000 (10KT) 19 37 35 40 62 86 107 138 157 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_1000 (10KT) -49 -60 -76 -103 -146 -168 -209 -210 -200 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0975 (10C) 166 160 149 141 135 130 116 101 83 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0975 (%) 88 90 91 90 90 90 90 91 93 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0975 (DM) 33 32 33 32 32 31 30 29 25 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0975 (10KT) 21 46 49 61 92 135 165 205 237 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0975 (10KT) -69 -82 -100 -128 -177 -202 -240 -234 -237 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0950 (10C) 155 149 141 133 128 124 112 99 81 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0950 (%) 88 89 88 88 87 87 87 89 92 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0950 (DM) 56 54 55 54 54 53 52 51 47 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0950 (10KT) 44 81 86 102 134 181 211 260 309 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0950 (10KT) -84 -94 -106 -133 -179 -195 -241 -227 -222 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0925 (10C) 144 140 133 124 122 117 104 90 74 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0925 (%) 87 87 86 88 85 86 87 90 92 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0925 (DM) 78 77 77 76 76 75 74 73 69 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0925 (10KT) 72 109 109 130 163 216 247 298 340 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0925 (10KT) -83 -87 -98 -123 -166 -181 -223 -200 -187 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0900 (10C) 133 132 125 117 113 110 97 86 72 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0900 (%) 87 84 82 85 84 84 84 87 87 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0900 (DM) 101 100 100 99 99 98 97 96 91 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0900 (10KT) 86 122 120 143 175 233 264 312 342 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0900 (10KT) -81 -80 -90 -114 -151 -162 -202 -167 -161 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0850 (10C) 114 115 111 106 104 104 94 84 69 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0850 (%) 80 76 72 71 69 64 65 69 72 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0850 (DM) 149 148 148 147 147 146 145 143 138 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0850 (10KT) 105 134 134 158 183 232 268 309 336 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0850 (10KT) -83 -73 -83 -102 -129 -135 -167 -137 -149 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0800 (10C) 98 98 93 88 85 87 79 68 54 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0800 (%) 66 66 65 64 60 55 58 62 66 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0800 (DM) 200 199 199 198 197 196 195 193 188 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0800 (10KT) 116 144 143 169 187 231 268 309 347 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0800 (10KT) -87 -71 -87 -96 -129 -138 -163 -144 -160 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0750 (10C) 78 76 71 65 62 64 56 47 36 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0750 (%) 58 58 58 58 55 50 54 56 60 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0750 (DM) 253 252 252 251 250 249 248 246 241 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0750 (10KT) 128 156 152 179 196 243 278 322 373 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0750 (10KT) -85 -68 -88 -96 -130 -142 -170 -155 -159 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0700 (10C) 51 50 46 42 37 36 28 22 11 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0700 (%) 53 50 51 48 48 48 49 51 55 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0700 (DM) 310 309 309 307 307 306 304 302 296 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0700 (10KT) 145 167 166 197 213 260 295 342 394 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0700 (10KT) -83 -69 -89 -90 -132 -141 -169 -158 -157 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0650 (10C) 21 20 17 13 8 5 -2 -8 -18 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0650 (%) 47 44 45 44 45 46 47 48 51 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0650 (DM) 370 369 369 367 367 365 364 361 356 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0650 (10KT) 162 179 184 216 228 281 310 364 413 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0650 (10KT) -85 -67 -87 -85 -137 -132 -161 -156 -159 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0600 (10C) -13 -14 -18 -22 -26 -29 -36 -41 -51 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0600 (%) 45 43 45 45 47 47 51 47 48 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0600 (DM) 434 433 433 431 431 429 427 425 419 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0600 (10KT) 176 199 203 234 246 301 329 376 434 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0600 (10KT) -81 -62 -86 -82 -128 -126 -149 -147 -158 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0550 (10C) -52 -52 -57 -62 -66 -70 -76 -80 -90 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0550 (%) 39 39 41 42 47 50 53 47 49 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0550 (DM) 503 502 501 500 499 498 496 493 487 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0550 (10KT) 196 228 220 251 265 321 353 387 455 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0550 (10KT) -77 -60 -79 -80 -114 -116 -134 -134 -160 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0500 (10C) -93 -96 -102 -107 -111 -115 -121 -125 -133 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0500 (%) 34 38 43 45 46 51 51 47 44 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0500 (DM) 578 576 576 574 573 571 569 566 560 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0500 (10KT) 217 259 249 264 278 331 364 395 464 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0500 (10KT) -94 -71 -76 -86 -117 -117 -139 -128 -163 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0450 (10C) -142 -145 -151 -159 -162 -164 -171 -175 -182 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0450 (%) 33 38 42 50 51 53 51 53 50 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0450 (DM) 658 657 656 654 653 651 649 646 639 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0450 (10KT) 231 285 278 282 287 345 380 397 471 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0450 (10KT) -131 -100 -93 -103 -132 -134 -137 -124 -174 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0400 (10C) -197 -199 -208 -216 -219 -221 -227 -233 -240 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0400 (%) 42 41 43 48 57 57 50 51 58 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0400 (DM) 747 745 744 741 740 739 736 733 726 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0400 (10KT) 257 312 314 308 302 354 392 401 490 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0400 (10KT) -163 -125 -110 -108 -151 -144 -140 -126 -190 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0350 (10C) -269 -272 -280 -288 -290 -290 -297 -304 -313 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0350 (%) 45 47 45 46 51 55 52 54 66 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0350 (DM) 844 842 841 838 837 836 833 830 822 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0350 (10KT) 280 326 357 334 331 365 411 424 520 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0350 (10KT) -178 -143 -129 -101 -159 -156 -161 -130 -203 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0300 (10C) -345 -348 -356 -363 -366 -366 -375 -382 -395 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0300 (%) 39 45 37 41 44 46 53 58 70 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0300 (DM) 954 952 950 947 946 944 941 937 930 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0300 (10KT) 299 329 387 383 367 398 425 436 550 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0300 (10KT) -203 -178 -172 -137 -181 -175 -175 -135 -237 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0250 (10C) -428 -433 -439 -445 -450 -449 -456 -462 -478 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0250 (%) 22 37 37 39 44 44 40 42 55 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0250 (DM) 1079 1077 1075 1071 1070 1068 1064 1060 1052 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0250 (10KT) 374 383 415 466 471 491 516 510 587 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0250 (10KT) -243 -226 -240 -216 -219 -188 -188 -163 -254 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0200 (10C) -508 -510 -514 -517 -520 -523 -524 -526 -522 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0200 (%) 8 8 9 9 11 12 12 15 14 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0200 (DM) 1226 1224 1222 1218 1216 1214 1210 1206 1197 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0200 (10KT) 447 529 571 603 634 668 696 689 723 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0200 (10KT) -305 -289 -268 -236 -242 -185 -176 -137 -176 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0150 (10C) -616 -615 -610 -605 -599 -591 -580 -574 -558 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0150 (%) 10 10 8 6 5 4 3 3 2 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0150 (DM) 1409 1407 1404 1401 1399 1398 1394 1390 1382 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0150 (10KT) 361 441 474 523 568 612 661 662 699 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0150 (10KT) -213 -212 -221 -224 -248 -219 -211 -157 -154 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0100 (10C) -695 -687 -678 -667 -659 -652 -638 -628 -606 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0100 (%) 11 10 9 7 7 6 5 4 3 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0100 (DM) 1654 1652 1651 1648 1648 1647 1645 1642 1637 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0100 (10KT) 166 263 280 316 361 409 425 457 507 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0100 (10KT) -180 -188 -170 -178 -201 -168 -156 -135 -103 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0070 (10C) -702 -695 -684 -680 -667 -661 -648 -633 -609 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0070 (%) 7 6 5 5 4 4 3 2 1 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0070 (DM) 1866 1865 1865 1862 1863 1863 1863 1861 1858 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0070 (10KT) 26 107 128 153 198 196 226 254 258 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0070 (10KT) -109 -140 -104 -122 -133 -100 -138 -61 -101 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0050 (10C) -659 -649 -644 -638 -631 -622 -614 -605 -582 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0050 (%) 1 1 1 1 1 1 1 0 0 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0050 (DM) 2067 2067 2068 2066 2068 2069 2069 2069 2068 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0050 (10KT) -45 4 -4 49 10 30 100 90 77 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0050 (10KT) -91 -57 -71 -57 -46 -86 -101 -4 -92 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0030 (10C) -557 -544 -541 -543 -533 -524 -527 -516 -497 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0030 (%) 0 0 0 0 0 0 0 0 0 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0030 (DM) 2385 2386 2388 2387 2389 2391 2393 2393 2395 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0030 (10KT) -107 -119 -62 -78 -113 -100 -78 -66 -67 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0030 (10KT) -26 -36 -68 14 -48 -45 -58 -16 -23 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0020 (10C) -485 -471 -476 -478 -468 -464 -461 -452 -437 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0020 (%) 0 0 0 0 0 0 0 0 0 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0020 (DM) 2647 2650 2651 2650 2654 2657 2658 2660 2664 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0020 (10KT) -177 -58 -169 -182 -136 -141 -167 -217 -131 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0020 (10KT) -89 -24 4 -29 -83 -1 -15 -31 -56 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +T_0010 (10C) -381 -368 -373 -375 -362 -357 -355 -361 -359 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +R_0010 (%) 0 0 0 0 0 0 0 0 0 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +Z_0010 (DM) 3113 3118 3119 3118 3123 3128 3130 3132 3138 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +U_0010 (10KT) -280 -295 -330 -307 -363 -350 -290 -310 -296 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +V_0010 (10KT) -27 -1 -22 -26 9 -32 -2 -15 -1 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 + + ------------------------------------------------------ CUSTOM DATA --------------------------------------------------------- + +NVAR 001 +TGRD (10^7C/M) 31 27 26 34 25 25 25 37 57 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 diff --git a/metplotpy/plots/skew_t/skew_t.py b/metplotpy/plots/skew_t/skew_t.py index 23f023a7..caadfb99 100644 --- a/metplotpy/plots/skew_t/skew_t.py +++ b/metplotpy/plots/skew_t/skew_t.py @@ -11,6 +11,7 @@ import re import logging import warnings +import shutil import pandas import pandas as pd @@ -441,7 +442,7 @@ def retrieve_height(sounding_data: pd.DataFrame, hour_of_interest: str, return hgt_by_hour -def check_for_all_na(input_file, soundings_df: pandas.DataFrame) -> bool: +def check_for_all_na(soundings_df: pandas.DataFrame) -> bool: ''' Checks if the file consists entirely of the fill/missing data value of 9999. Args: @@ -502,12 +503,22 @@ def create_skew_t(input_file: str, config: dict) -> None: Return: None, generate plots as png files in the specified output file directory. ''' + + file_only = os.path.basename(input_file) logger.info(f" Creating skew T plots for input file {file_only} ") + + # Check for zero-sized file and log empty file and return to continue to the next + # file in the input directory. + if os.stat(input_file).st_size == 0: + logger.warning(f"EMPTY FILE, NO CONTENT in {file_only}. NO PLOT " + f"GENERATED.") + return + sounding_df, plevs = extract_sounding_data(input_file) # Check if sounding data consists entirely of na-values. - all_na = check_for_all_na(input_file, sounding_df) + all_na = check_for_all_na(sounding_df) if all_na: logger.warning(f"NO DATA to plot for {file_only}. NO PLOT GENERATED.") return @@ -567,7 +578,7 @@ def create_skew_t(input_file: str, config: dict) -> None: continue v_winds_all_nan = check_list_for_all_nan(v_winds) - if u_winds_all_nan: + if v_winds_all_nan: logger.warning(f"No data for the v-winds for {cur_time} hour and " f"{file_only}") continue @@ -667,6 +678,8 @@ def create_skew_t(input_file: str, config: dict) -> None: plt.close('all') logger.info(f"Finished generating plots for {cur_time} hr in {file_only}") + return + def main(config_filename=None): ''' @@ -728,7 +741,6 @@ def main(config_filename=None): for file_of_interest in files_of_interest: create_skew_t(file_of_interest, config) - # create_skew_t(input_file, config) except yaml.YAMLError as exc: logger.error(f"YAMLError: {exc}") diff --git a/requirements.txt b/requirements.txt index 0a62cd49..68bc5ff3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ plotly==5.13.0 pytest>=7.2.1 pyyaml==6.0 scikit-image==0.19.3 -scipy==1.10.0 +scipy==1.10.0 xarray==2023.1.0 eofs==1.4.0 #cartopy==0.21.1 diff --git a/test/skew_t/data/2023/sal092022_avno_doper_2022092700_diag.dat b/test/skew_t/data/2023/sal092022_avno_doper_2022092700_diag.dat new file mode 100644 index 00000000..ca7403a6 --- /dev/null +++ b/test/skew_t/data/2023/sal092022_avno_doper_2022092700_diag.dat @@ -0,0 +1,168 @@ + * AVNO 2022092700 * + * AL09 AL09 * + + ------------------------------------------------------ STORM DATA ---------------------------------------------------------- + +NTIME 041 DELTAT 006 +TIME (HR) 0 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 132 138 144 150 156 162 168 174 180 186 192 198 204 210 216 222 228 234 240 +LAT (DEG) 20.9 21.7 22.7 23.6 24.4 25.1 25.9 26.5 26.9 27.1 27.4 27.6 27.7 27.8 28.3 29.0 29.7 30.7 31.6 32.3 32.6 33.0 33.4 33.9 34.1 34.5 34.7 34.4 33.6 33.0 33.4 33.1 32.7 32.3 31.9 31.9 31.8 31.4 31.4 31.8 32.3 +LON (DEG) 276.6 276.4 276.3 276.3 276.4 276.5 276.7 276.8 277.2 277.3 277.5 277.6 277.6 277.6 277.5 277.6 277.6 277.2 276.6 275.9 275.7 275.6 275.9 276.4 277.1 277.9 278.2 278.7 279.2 280.7 283.3 284.7 286.7 287.9 288.9 290.2 291.3 291.8 292.2 292.5 292.1 +MAXWIND (KT) 67 74 66 69 85 87 90 89 90 78 75 66 69 60 52 50 48 35 32 23 20 16 14 13 13 15 13 13 17 20 27 27 27 22 21 21 22 21 22 21 20 +RMW (KM) 65 56 76 68 71 67 55 56 58 62 61 75 77 91 105 123 200 210 261 366 403 418 458 442 350 336 155 305 233 238 232 240 251 217 213 182 135 261 162 256 156 +MIN_SLP (MB) 977 971 975 973 966 961 956 957 958 965 969 976 979 983 984 986 989 992 995 999 1001 1005 1007 1010 1011 1011 1011 1011 1011 1009 1007 1006 1006 1006 1008 1009 1012 1013 1016 1016 1018 +SHR_MAG (KT) 3 7 11 13 18 21 20 23 29 34 31 34 37 33 25 29 35 41 28 27 27 28 20 23 24 28 25 33 41 44 41 44 47 49 50 49 48 45 47 48 53 +SHR_HDG (DEG) 326 26 35 26 17 29 26 25 29 45 60 58 57 70 78 59 58 70 64 51 60 82 86 67 82 102 108 111 111 114 104 104 104 98 90 80 73 68 71 69 70 +STM_SPD (KT) 8 9 9 8 7 7 7 5 3 2 2 1 0 3 5 7 8 10 9 6 3 4 5 6 6 5 3 6 10 17 16 14 14 10 9 10 7 4 3 4 6 +STM_HDG (DEG) 346 351 357 3 6 10 10 24 36 28 28 16 0 351 0 3 348 335 325 322 340 11 36 54 64 56 98 143 130 93 88 103 106 113 101 92 110 117 56 354 325 +SST (10C) 290 291 290 292 286 284 282 286 277 274 269 281 271 268 260 265 249 223 208 222 201 186 176 227 189 176 173 217 198 208 229 260 261 264 264 264 261 261 261 264 259 +OHC (KJ/CM2) 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 +TPW (MM) 58 58 58 58 55 53 50 48 47 46 46 47 46 45 45 47 44 41 38 35 34 34 33 34 35 35 34 35 34 35 35 35 36 35 35 36 36 37 38 38 37 +LAND (KM) 129 48 1 84 182 203 145 90 43 20 -15 -21 -8 -5 -29 -37 -80 -119 -177 -250 -272 -322 -322 -303 -250 -254 -263 -214 -109 3 132 218 366 482 584 680 778 842 866 874 813 +850TANG (10M/S) 118 121 132 141 148 150 155 160 155 149 142 141 150 148 148 152 160 155 160 146 136 119 108 86 83 75 73 67 61 57 56 59 59 59 51 46 46 41 37 37 34 +850VORT (/S) 64 57 51 77 83 90 90 93 108 117 119 107 107 90 76 101 104 62 84 92 89 90 97 114 104 83 82 69 64 32 46 41 35 16 22 18 18 18 9 -7 -29 +200DVRG (/S) 127 111 114 107 111 114 136 106 101 95 66 102 105 66 51 82 64 60 29 33 36 26 26 70 11 10 0 1 -33 -42 -16 -24 -22 -40 -8 -20 2 9 23 32 7 + + ------------------------------------------------------ SOUNDING DATA ------------------------------------------------------- + +NLEV 027 SURF 1000 0975 0950 0925 0900 0850 0800 0750 0700 0650 0600 0550 0500 0450 0400 0350 0300 0250 0200 0150 0100 0070 0050 0030 0020 0010 +TIME (HR) 0 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 132 138 144 150 156 162 168 174 180 186 192 198 204 210 216 222 228 234 240 +T_SURF (10C) 277 273 273 284 273 262 251 270 258 247 239 261 255 246 236 251 239 213 202 234 219 200 190 237 216 194 182 233 213 203 200 242 236 239 243 248 246 247 246 248 245 +R_SURF (%) 76 79 77 71 72 72 71 64 65 66 68 65 66 69 73 70 73 78 78 64 69 72 77 64 73 82 86 66 75 80 80 65 72 72 72 72 72 72 73 72 73 +P_SURF (MB) 1008 1009 1009 1010 1010 1011 1011 1012 1012 1012 1012 1011 1010 1010 1010 1009 1009 1009 1010 1010 1011 1012 1013 1013 1014 1014 1014 1013 1012 1012 1011 1010 1010 1010 1011 1012 1015 1016 1018 1019 1021 +U_SURF (10KT) -29 -32 -43 -42 -38 -51 -31 -6 -14 -24 -21 -24 -35 -38 -20 -27 -48 -18 9 14 7 -2 9 12 -10 -4 2 16 27 44 53 54 58 52 39 35 -7 -24 -50 -56 -77 +V_SURF (10KT) 25 19 0 0 -40 -50 -58 -73 -101 -92 -78 -75 -89 -54 -33 -27 -37 -16 -5 -19 -16 -7 -1 0 -8 -12 -22 -25 -30 -31 -49 -51 -45 -41 -48 -49 -68 -48 -45 -37 -46 +T_1000 (10C) 272 267 265 273 266 254 243 256 250 237 230 248 249 240 229 243 237 214 202 230 222 203 191 230 220 198 184 227 217 205 198 234 231 231 232 235 232 231 228 229 226 +R_1000 (%) 72 76 74 68 67 68 67 61 61 62 65 63 63 66 70 68 70 75 75 63 66 70 75 64 70 79 83 66 72 77 77 63 67 68 70 70 71 71 74 72 73 +Z_1000 (DM) 7 8 8 9 8 9 10 10 10 10 10 10 9 8 8 8 8 7 9 9 9 10 11 11 12 12 12 11 11 10 9 8 8 8 10 11 13 14 16 16 18 +U_1000 (10KT) -34 -36 -50 -49 -47 -63 -40 -14 -24 -36 -34 -38 -50 -50 -28 -32 -54 -24 11 18 12 1 17 18 -5 0 6 21 30 47 57 60 65 59 44 41 -7 -27 -56 -62 -86 +V_1000 (10KT) 29 22 3 2 -46 -56 -66 -85 -121 -109 -95 -92 -107 -65 -39 -26 -36 -15 -1 -14 -12 -1 3 4 -3 -9 -22 -26 -38 -41 -61 -57 -50 -43 -50 -51 -74 -51 -48 -39 -48 +T_0975 (10C) 255 250 247 251 248 237 227 235 231 219 211 225 230 223 212 221 220 202 193 209 209 195 183 210 207 189 176 207 204 190 184 212 214 213 213 214 211 211 208 209 206 +R_0975 (%) 77 80 78 73 71 72 70 65 65 67 70 69 68 71 75 74 74 77 76 67 67 71 76 68 71 79 84 70 73 80 79 69 71 73 75 77 77 77 80 79 80 +Z_0975 (DM) 30 30 30 31 31 32 32 32 32 32 32 32 31 30 30 30 30 29 30 31 31 32 33 33 34 34 33 33 33 32 31 30 30 30 32 33 35 36 38 39 40 +U_0975 (10KT) -41 -40 -56 -53 -53 -73 -51 -23 -37 -51 -50 -54 -70 -73 -47 -56 -82 -53 0 17 14 5 37 25 0 -2 5 19 27 37 49 62 68 62 48 45 -3 -25 -55 -61 -85 +V_0975 (10KT) 30 29 12 7 -45 -53 -67 -87 -134 -120 -108 -104 -127 -78 -52 -45 -61 -35 -21 -26 -28 -8 1 3 -17 -22 -40 -39 -61 -63 -76 -59 -52 -41 -48 -49 -72 -48 -45 -36 -43 +T_0950 (10C) 237 233 230 231 229 220 213 215 212 201 194 204 210 204 194 201 201 190 183 189 192 182 173 190 191 178 167 187 190 177 172 192 196 195 194 194 192 191 189 189 187 +R_0950 (%) 80 84 82 79 77 76 73 71 69 71 75 76 74 77 81 80 80 81 78 72 71 75 78 73 73 79 84 75 75 82 82 75 76 78 80 82 82 83 86 85 85 +Z_0950 (DM) 53 53 53 54 54 54 55 55 55 55 55 55 54 53 53 53 52 52 53 53 53 54 55 56 56 56 56 55 55 54 53 53 53 53 54 55 57 58 60 61 63 +U_0950 (10KT) -46 -41 -56 -52 -53 -77 -61 -29 -43 -60 -62 -63 -80 -83 -59 -67 -94 -80 -23 2 -2 -16 22 12 -9 -19 -10 12 12 16 31 62 71 66 52 52 1 -20 -51 -57 -81 +V_0950 (10KT) 38 37 20 14 -41 -45 -58 -83 -134 -121 -109 -105 -131 -80 -52 -47 -66 -42 -40 -41 -50 -21 -7 -2 -24 -25 -41 -44 -71 -69 -78 -56 -52 -39 -45 -47 -70 -43 -38 -29 -36 +T_0925 (10C) 221 217 214 213 211 203 198 196 194 185 179 185 190 185 180 183 184 177 173 171 177 170 165 173 177 168 158 170 175 164 160 172 178 177 177 176 174 174 173 172 170 +R_0925 (%) 81 85 85 83 81 79 76 75 73 74 79 81 79 83 86 85 84 84 80 77 74 78 79 77 75 79 84 79 78 84 84 80 79 81 82 86 85 85 87 87 87 +Z_0925 (DM) 76 76 77 77 77 78 78 78 78 78 78 78 77 76 76 76 75 75 76 76 76 77 78 79 79 79 78 78 78 77 76 76 76 76 77 78 80 81 83 84 85 +U_0925 (10KT) -49 -39 -54 -49 -50 -78 -63 -35 -50 -70 -81 -70 -87 -99 -85 -84 -110 -101 -43 -17 -26 -43 10 2 -15 -29 -20 2 11 13 29 63 76 71 59 60 8 -14 -44 -49 -74 +V_0925 (10KT) 48 46 27 22 -36 -34 -42 -70 -128 -116 -99 -101 -132 -75 -40 -43 -62 -38 -35 -46 -53 -8 10 0 -17 -13 -26 -34 -62 -58 -71 -52 -51 -39 -42 -45 -65 -35 -30 -18 -26 +T_0900 (10C) 208 205 200 198 196 190 185 180 177 172 168 169 174 172 171 172 170 165 164 161 167 162 159 157 163 157 149 155 160 152 148 155 162 162 162 161 159 159 158 159 157 +R_0900 (%) 80 82 84 84 80 77 75 78 75 75 80 82 82 85 87 85 84 84 79 76 73 78 77 79 76 79 82 82 80 83 84 82 80 81 83 85 86 85 86 86 85 +Z_0900 (DM) 100 100 100 101 100 101 101 102 101 101 101 101 100 100 99 99 99 98 99 100 100 100 101 102 102 102 102 102 101 100 99 99 99 99 101 102 104 105 107 107 109 +U_0900 (10KT) -47 -35 -50 -43 -45 -78 -62 -44 -56 -85 -93 -80 -98 -117 -108 -95 -125 -128 -61 -48 -53 -53 6 -6 -14 -26 -19 2 22 28 35 65 81 77 65 67 14 -7 -37 -39 -64 +V_0900 (10KT) 56 58 33 29 -30 -21 -27 -50 -114 -97 -78 -91 -126 -56 -9 -24 -50 -27 -22 -37 -25 23 32 10 -2 7 -7 -15 -54 -46 -62 -44 -50 -38 -38 -40 -58 -26 -20 -7 -15 +T_0850 (10C) 183 180 176 175 173 167 163 157 154 153 154 154 153 155 158 153 150 149 145 147 149 146 144 136 138 132 128 127 131 131 127 131 137 138 140 139 136 137 137 138 139 +R_0850 (%) 74 77 77 77 71 70 72 72 72 73 75 76 80 80 79 82 80 76 74 66 67 71 71 77 77 79 79 84 79 76 76 73 71 70 69 74 74 76 77 74 70 +Z_0850 (DM) 149 149 150 150 150 150 150 151 150 150 150 150 149 148 148 148 148 147 148 148 148 149 150 150 151 150 150 150 150 149 148 147 148 148 149 150 152 153 155 156 157 +U_0850 (10KT) -37 -25 -34 -32 -33 -67 -49 -37 -55 -98 -96 -101 -114 -128 -99 -83 -121 -149 -84 -70 -51 -24 23 -3 0 -5 0 17 54 64 56 80 95 88 81 85 37 15 -9 -10 -34 +V_0850 (10KT) 72 77 50 42 -16 4 4 -12 -66 -44 -21 -38 -80 -19 35 14 -17 21 21 0 15 62 51 39 27 32 6 9 -45 -36 -46 -32 -39 -25 -25 -24 -34 -1 2 14 7 +T_0800 (10C) 155 153 150 149 149 148 146 144 145 147 144 143 138 138 138 135 134 134 127 130 129 125 122 119 113 109 105 103 105 107 105 109 115 115 116 118 118 119 118 120 120 +R_0800 (%) 72 74 74 71 64 61 59 57 55 55 58 61 68 70 69 71 69 62 64 57 60 62 63 67 74 74 73 78 73 68 65 63 62 61 62 61 59 61 64 60 58 +Z_0800 (DM) 201 201 201 202 201 202 202 202 202 201 201 201 200 200 200 199 199 198 199 199 200 200 201 202 202 201 201 201 200 200 199 198 199 199 200 201 203 204 206 207 208 +U_0800 (10KT) -33 -20 -19 -18 -19 -45 -31 -17 -39 -71 -56 -63 -89 -103 -73 -56 -77 -102 -69 -56 -40 -5 36 16 17 18 15 31 71 81 75 104 115 106 102 106 68 46 22 18 0 +V_0800 (10KT) 85 89 64 55 0 28 25 11 -27 -7 5 -14 -53 -7 41 29 4 46 50 24 33 76 53 51 40 42 0 6 -42 -35 -34 -21 -30 -11 -11 -7 -8 17 22 31 22 +T_0750 (10C) 125 124 121 121 123 123 123 123 125 127 123 122 119 118 115 111 110 110 104 104 104 100 96 94 90 87 82 80 80 82 79 83 87 89 90 92 93 95 94 95 95 +R_0750 (%) 71 73 72 67 63 57 56 52 50 49 50 51 54 56 57 61 59 56 54 52 52 55 57 60 65 63 64 67 63 59 61 60 57 57 57 54 53 54 56 53 52 +Z_0750 (DM) 255 256 256 256 256 256 256 256 256 256 255 256 255 254 254 254 253 252 253 253 254 254 255 255 256 255 254 254 254 253 252 252 252 252 254 255 257 258 260 261 262 +U_0750 (10KT) -30 -19 -6 -5 -9 -24 -15 -2 -18 -42 -29 -41 -69 -78 -52 -40 -49 -68 -48 -42 -27 0 42 32 26 28 28 45 79 90 97 126 134 125 124 128 96 78 52 45 27 +V_0750 (10KT) 94 99 76 65 24 45 37 25 0 9 6 -6 -45 3 34 38 17 71 56 40 40 88 61 54 39 47 -2 -1 -41 -34 -22 -9 -23 -1 0 7 7 32 33 40 28 +T_0700 (10C) 94 92 90 93 94 95 94 96 98 99 97 96 95 94 91 85 85 85 78 76 77 73 68 66 63 59 54 54 54 54 49 53 56 58 61 63 65 66 65 65 66 +R_0700 (%) 69 71 71 63 63 56 55 50 48 44 44 46 46 47 47 52 51 46 46 43 45 49 52 55 56 55 56 56 53 52 57 55 54 54 52 50 49 52 53 51 46 +Z_0700 (DM) 313 313 313 314 313 314 314 314 314 314 313 313 312 312 311 311 310 310 310 311 311 311 312 312 312 312 311 311 311 310 309 309 309 309 311 312 314 315 317 318 319 +U_0700 (10KT) -23 -15 1 3 0 -5 0 3 0 -22 -17 -35 -52 -55 -36 -26 -37 -54 -38 -32 -17 6 44 52 37 33 37 60 87 107 120 149 156 145 143 148 122 99 76 70 56 +V_0700 (10KT) 101 103 82 73 44 57 43 36 14 16 6 -1 -26 18 33 39 30 89 60 49 42 86 73 58 29 48 3 0 -43 -25 -10 -1 -15 6 9 23 20 43 43 52 33 +T_0650 (10C) 58 57 57 60 62 63 63 64 66 68 65 65 65 64 62 57 57 55 48 47 46 41 35 33 31 27 22 24 24 24 19 23 26 30 31 33 34 35 34 33 31 +R_0650 (%) 72 72 70 63 63 55 53 48 45 40 40 41 41 41 40 44 43 40 39 36 37 44 50 50 47 48 49 47 44 45 47 44 44 43 42 44 41 45 46 47 43 +Z_0650 (DM) 374 374 374 375 374 375 375 375 375 375 374 374 373 373 372 372 371 370 371 371 371 372 372 373 373 372 371 371 371 370 369 369 369 370 371 372 374 375 377 378 380 +U_0650 (10KT) -13 -10 7 8 12 11 11 11 10 -11 -15 -32 -38 -36 -16 -18 -19 -38 -30 -6 0 17 47 71 50 43 53 82 100 132 146 169 178 170 162 168 150 121 95 98 81 +V_0650 (10KT) 108 106 83 82 57 61 46 43 19 19 9 3 -12 17 16 41 41 78 60 56 43 85 82 62 24 45 6 2 -48 -17 -6 0 -8 12 15 41 34 49 56 68 39 +T_0600 (10C) 21 21 22 24 27 28 27 29 33 35 31 31 32 32 28 24 23 20 13 11 8 3 -2 -1 -1 -5 -10 -9 -8 -7 -8 -7 -4 0 -1 0 0 0 -2 -3 -5 +R_0600 (%) 74 72 68 63 61 54 50 45 41 37 35 35 34 33 35 38 37 34 34 31 32 37 44 40 37 41 41 39 37 36 35 34 34 33 34 34 35 43 47 46 41 +Z_0600 (DM) 439 439 440 440 440 440 440 440 440 440 440 440 439 438 438 437 436 435 436 436 436 436 437 437 437 436 436 436 435 434 433 433 434 434 436 437 439 440 442 443 444 +U_0600 (10KT) 0 3 13 14 23 21 23 17 16 -3 -8 -22 -26 -1 2 -2 10 -13 -13 25 27 30 56 84 75 58 75 108 123 163 177 187 204 202 189 190 182 152 119 130 114 +V_0600 (10KT) 107 102 73 81 60 62 41 42 14 15 3 5 -11 13 1 47 44 65 72 64 52 92 90 74 22 41 3 2 -48 -19 -10 -4 -2 13 11 53 46 48 63 81 48 +T_0550 (10C) -13 -14 -13 -11 -8 -7 -8 -6 -4 -4 -8 -7 -7 -8 -13 -15 -18 -23 -30 -34 -36 -39 -41 -40 -39 -43 -47 -47 -44 -42 -45 -45 -41 -38 -38 -38 -39 -40 -43 -45 -47 +R_0550 (%) 71 70 64 59 58 51 47 42 37 33 31 27 27 31 34 33 33 32 32 31 30 34 38 35 33 39 38 35 33 29 31 30 31 30 31 31 39 46 47 48 42 +Z_0550 (DM) 509 509 509 510 510 510 510 510 510 510 510 509 509 508 507 507 506 505 505 505 505 506 506 506 506 506 505 504 504 503 502 502 503 503 505 506 508 509 511 512 513 +U_0550 (10KT) 6 22 22 22 29 27 29 32 31 13 4 -6 -4 24 25 30 40 9 4 50 49 40 62 104 103 84 103 134 153 188 200 209 229 242 222 215 217 195 155 165 150 +V_0550 (10KT) 103 96 60 67 53 51 39 43 6 8 -2 0 -3 20 10 51 49 67 85 83 67 92 98 86 19 34 0 0 -49 -22 -21 -13 -6 6 3 62 63 52 63 88 64 +T_0500 (10C) -51 -53 -52 -51 -49 -49 -51 -50 -49 -50 -53 -56 -55 -57 -62 -64 -66 -71 -79 -81 -81 -83 -84 -83 -83 -87 -92 -89 -85 -84 -89 -89 -84 -81 -80 -81 -81 -83 -86 -90 -93 +R_0500 (%) 68 67 60 57 54 50 44 40 37 33 30 28 26 31 33 34 34 34 34 33 33 34 38 37 37 38 40 34 29 28 29 30 28 30 34 33 38 45 46 47 43 +Z_0500 (DM) 585 585 585 585 585 586 585 586 586 586 585 585 584 583 583 582 581 580 580 580 580 580 580 581 581 580 579 579 579 578 576 576 577 578 579 580 582 584 585 586 587 +U_0500 (10KT) 8 27 30 35 36 39 35 48 58 50 42 30 28 55 58 59 63 39 19 49 49 48 74 122 135 114 130 156 188 218 225 238 256 282 268 250 252 234 196 199 187 +V_0500 (10KT) 100 89 53 60 43 52 46 58 21 15 -2 5 14 52 33 74 69 87 94 99 77 88 86 74 19 20 -2 -8 -49 -34 -33 -25 -9 7 2 65 73 56 61 88 72 +T_0450 (10C) -94 -98 -98 -96 -96 -98 -101 -100 -99 -101 -106 -110 -109 -110 -114 -114 -117 -124 -128 -128 -128 -130 -132 -132 -135 -139 -142 -140 -137 -136 -140 -138 -134 -130 -129 -129 -130 -132 -137 -141 -145 +R_0450 (%) 67 66 63 56 53 49 43 39 38 36 34 33 33 34 34 35 38 38 38 36 36 37 38 43 45 41 41 37 33 33 32 33 32 37 36 33 40 46 46 47 41 +Z_0450 (DM) 667 667 667 667 667 668 667 668 668 668 667 667 666 665 664 663 663 661 661 661 661 661 661 662 662 661 659 660 659 659 657 657 658 659 660 661 664 665 666 667 668 +U_0450 (10KT) -2 21 32 47 48 56 58 60 71 98 94 70 72 96 97 83 87 67 30 30 47 73 98 126 154 145 152 176 215 261 263 274 287 321 317 300 291 288 248 241 236 +V_0450 (10KT) 93 88 61 71 52 62 47 67 62 63 26 41 50 74 67 99 101 118 108 108 96 77 52 68 15 10 -2 -18 -58 -46 -49 -39 -18 16 15 67 78 65 66 94 74 +T_0400 (10C) -147 -150 -152 -149 -149 -153 -157 -156 -157 -160 -165 -165 -165 -166 -171 -170 -171 -174 -179 -178 -180 -184 -188 -189 -191 -196 -202 -200 -196 -192 -197 -195 -191 -189 -189 -189 -190 -192 -195 -199 -204 +R_0400 (%) 66 66 65 59 52 49 47 40 42 40 38 38 37 36 37 42 46 42 43 43 40 40 38 47 48 44 45 43 38 40 40 45 47 39 37 40 52 49 46 44 37 +Z_0400 (DM) 757 757 757 757 757 758 757 758 758 757 756 756 755 754 754 753 752 750 750 750 750 750 750 751 750 749 748 748 748 747 745 746 747 748 749 750 752 753 755 755 756 +U_0400 (10KT) -6 17 26 45 68 102 100 76 82 126 115 103 126 144 119 87 94 66 29 11 50 78 104 129 159 163 179 206 245 306 308 323 341 373 355 348 334 324 309 297 294 +V_0400 (10KT) 86 84 73 95 89 80 47 81 101 93 76 104 96 93 86 141 145 157 131 123 88 72 43 71 21 21 -13 -35 -78 -66 -67 -56 -30 -5 17 76 81 83 88 108 94 +T_0350 (10C) -213 -216 -218 -214 -214 -219 -225 -224 -223 -223 -226 -226 -227 -231 -233 -226 -227 -230 -237 -237 -241 -247 -251 -252 -255 -261 -268 -266 -262 -260 -265 -264 -261 -261 -261 -260 -262 -264 -266 -270 -277 +R_0350 (%) 67 71 70 61 55 54 54 46 45 43 41 39 39 42 43 47 49 47 46 46 44 44 42 46 46 48 47 49 46 45 53 52 50 44 43 52 56 45 46 45 41 +Z_0350 (DM) 857 857 856 857 857 857 857 857 857 857 855 855 854 853 852 852 851 849 848 849 849 848 848 849 849 847 845 846 846 845 843 843 845 846 847 848 850 851 853 853 853 +U_0350 (10KT) -10 16 19 32 62 101 120 113 120 133 120 132 166 182 137 87 76 53 4 -3 56 111 133 119 157 184 201 234 289 358 353 374 411 444 425 420 404 367 339 342 356 +V_0350 (10KT) 95 102 90 127 141 144 104 140 128 132 127 170 150 143 119 182 179 179 153 156 104 76 44 88 33 18 -37 -64 -97 -103 -95 -70 -34 -17 14 76 54 77 109 145 147 +T_0300 (10C) -294 -298 -300 -296 -294 -298 -302 -299 -300 -301 -304 -304 -304 -303 -304 -299 -301 -304 -307 -309 -312 -320 -328 -329 -331 -336 -345 -345 -340 -341 -348 -348 -348 -346 -347 -346 -345 -345 -349 -352 -359 +R_0300 (%) 71 77 76 71 63 61 54 51 51 47 42 41 42 46 46 46 46 46 47 47 44 42 48 53 50 51 53 50 54 48 55 58 58 50 54 59 50 45 48 49 47 +Z_0300 (DM) 969 968 968 969 969 969 968 969 968 968 967 967 966 965 964 963 962 960 959 960 959 959 958 959 959 957 955 955 955 955 953 953 954 955 957 958 960 961 962 962 962 +U_0300 (10KT) -18 12 10 13 45 69 97 111 109 137 156 175 183 194 151 116 97 71 22 16 72 127 143 145 173 208 227 270 341 394 391 434 480 515 483 474 478 441 404 398 419 +V_0300 (10KT) 103 119 110 153 170 206 204 209 189 202 185 223 207 198 161 181 180 193 169 165 99 63 28 95 42 -3 -79 -90 -132 -147 -103 -92 -50 -34 -5 70 71 98 111 175 190 +T_0250 (10C) -394 -399 -400 -396 -394 -395 -395 -393 -395 -398 -400 -398 -397 -397 -398 -396 -396 -399 -402 -403 -402 -408 -418 -424 -424 -428 -437 -439 -437 -437 -445 -444 -443 -444 -442 -440 -436 -437 -441 -444 -448 +R_0250 (%) 74 78 78 73 74 68 61 55 56 55 50 48 51 50 46 47 49 48 48 46 40 38 46 50 51 49 52 49 60 52 58 52 49 50 48 49 40 45 47 43 40 +Z_0250 (DM) 1096 1095 1095 1096 1096 1096 1095 1096 1096 1095 1094 1094 1093 1092 1091 1091 1090 1088 1086 1086 1086 1085 1084 1085 1084 1082 1080 1080 1081 1080 1077 1077 1079 1080 1081 1083 1085 1085 1087 1086 1086 +U_0250 (10KT) -37 -3 6 7 16 17 36 52 87 160 198 226 214 207 172 120 127 125 78 62 124 157 173 166 197 227 243 306 378 435 425 495 559 566 533 533 520 469 425 423 443 +V_0250 (10KT) 110 126 131 165 178 212 216 228 228 238 199 201 177 164 120 156 181 209 165 165 103 47 26 83 34 -32 -112 -113 -174 -187 -138 -94 -119 -85 -12 74 72 111 138 210 210 +T_0200 (10C) -521 -524 -526 -521 -519 -519 -520 -512 -514 -516 -515 -512 -510 -511 -511 -512 -509 -508 -510 -513 -514 -515 -520 -526 -529 -527 -527 -526 -530 -531 -532 -533 -535 -535 -535 -535 -536 -538 -542 -546 -546 +R_0200 (%) 81 76 76 75 74 70 66 62 64 63 58 49 47 49 42 45 44 35 33 32 30 29 33 38 47 36 29 24 37 34 32 28 32 31 35 37 38 43 41 40 38 +Z_0200 (DM) 1245 1244 1243 1245 1245 1245 1244 1245 1244 1244 1242 1242 1241 1240 1239 1239 1238 1236 1235 1235 1235 1233 1232 1232 1231 1229 1226 1226 1227 1227 1224 1224 1225 1226 1228 1229 1231 1232 1233 1232 1232 +U_0200 (10KT) -56 8 31 30 21 37 42 63 90 142 182 194 198 191 153 167 184 241 174 146 189 257 228 213 244 275 245 331 442 470 454 514 553 581 589 573 497 441 438 446 467 +V_0200 (10KT) 99 144 141 168 159 189 192 197 189 195 134 140 118 93 87 163 171 156 146 170 149 99 62 129 61 -31 -75 -115 -199 -223 -152 -144 -153 -95 -27 56 105 164 149 187 181 +T_0150 (10C) -678 -678 -678 -674 -670 -672 -670 -665 -664 -662 -658 -653 -651 -650 -648 -646 -642 -635 -632 -629 -626 -620 -617 -614 -613 -611 -611 -613 -619 -624 -622 -626 -632 -636 -644 -648 -651 -654 -652 -650 -645 +R_0150 (%) 77 81 78 75 76 80 82 81 81 72 60 57 58 49 41 34 32 24 19 15 13 12 12 12 13 13 13 18 20 19 16 19 22 25 30 31 32 33 27 27 25 +Z_0150 (DM) 1424 1423 1422 1424 1425 1424 1423 1425 1425 1424 1423 1423 1423 1422 1420 1420 1420 1418 1417 1417 1417 1415 1414 1414 1413 1411 1408 1408 1409 1408 1405 1405 1406 1407 1408 1409 1411 1412 1412 1412 1412 +U_0150 (10KT) 2 63 35 37 10 41 39 28 103 171 140 108 133 189 247 258 227 233 215 183 185 186 210 226 237 227 224 290 366 387 410 475 517 576 556 527 446 414 427 434 432 +V_0150 (10KT) 75 78 120 130 111 139 155 166 130 105 93 110 118 100 63 41 56 104 117 135 134 139 124 122 45 20 -24 -53 -156 -160 -103 -102 -122 -110 -60 60 138 182 137 149 139 +T_0100 (10C) -791 -781 -775 -771 -778 -774 -769 -766 -767 -762 -761 -765 -765 -759 -756 -758 -748 -736 -734 -724 -719 -715 -709 -705 -696 -691 -688 -688 -694 -695 -690 -696 -702 -708 -714 -717 -716 -719 -714 -712 -703 +R_0100 (%) 76 65 57 55 64 60 56 53 56 53 50 55 57 52 49 52 46 36 34 29 27 24 22 21 17 16 15 15 16 17 16 18 21 24 25 27 26 27 25 25 21 +Z_0100 (DM) 1659 1658 1658 1660 1661 1661 1660 1662 1662 1661 1660 1661 1661 1660 1659 1659 1659 1659 1658 1659 1659 1659 1658 1658 1658 1657 1655 1655 1654 1653 1650 1650 1650 1650 1650 1651 1653 1653 1654 1653 1655 +U_0100 (10KT) -41 8 39 -1 -11 27 28 20 -1 1 -6 5 32 19 -13 -13 9 29 34 50 73 75 98 117 129 142 123 142 166 218 227 236 266 334 303 276 257 266 229 236 249 +V_0100 (10KT) 22 48 -3 -7 24 44 2 14 22 48 15 56 31 1 -3 54 60 46 62 92 72 79 66 59 19 4 -21 -9 -30 -11 -50 -9 28 30 -10 57 97 105 78 115 84 +T_0070 (10C) -704 -702 -709 -708 -700 -693 -701 -696 -692 -695 -702 -704 -691 -694 -698 -696 -691 -693 -689 -683 -685 -682 -678 -677 -673 -673 -671 -673 -671 -672 -672 -674 -668 -668 -668 -668 -659 -665 -665 -663 -652 +R_0070 (%) 10 9 10 10 9 8 9 8 8 8 10 10 8 8 9 8 8 8 8 7 7 7 6 6 6 5 5 6 5 5 5 6 5 5 5 5 5 5 5 5 4 +Z_0070 (DM) 1867 1867 1866 1868 1868 1869 1868 1870 1870 1870 1869 1869 1869 1869 1868 1868 1869 1869 1868 1870 1871 1871 1870 1871 1872 1871 1868 1868 1868 1867 1864 1863 1863 1863 1863 1863 1865 1866 1867 1867 1869 +U_0070 (10KT) -39 -78 -112 -119 -88 -85 -102 -114 -67 -84 -127 -103 -97 -166 -142 -105 -115 -126 -74 -54 -53 -31 7 8 26 56 54 41 62 95 104 97 119 154 123 147 160 137 81 131 116 +V_0070 (10KT) 29 -36 -38 41 48 14 -1 52 26 -18 -12 25 -50 -47 14 2 -42 20 37 26 12 63 21 -5 -5 -2 -44 -20 -16 -9 -40 21 24 34 26 87 62 24 52 79 -5 +T_0050 (10C) -634 -640 -637 -632 -635 -631 -631 -633 -637 -635 -629 -635 -637 -637 -633 -633 -638 -635 -635 -633 -633 -634 -634 -628 -635 -636 -631 -632 -636 -640 -636 -630 -625 -627 -622 -619 -615 -623 -616 -608 -612 +R_0050 (%) 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 1 1 1 2 1 1 1 +Z_0050 (DM) 2069 2070 2069 2071 2072 2073 2072 2074 2074 2074 2072 2073 2073 2072 2071 2072 2073 2073 2072 2074 2075 2075 2074 2076 2076 2075 2073 2073 2072 2071 2068 2067 2068 2068 2068 2069 2072 2071 2072 2073 2075 +U_0050 (10KT) -186 -195 -126 -145 -181 -196 -172 -164 -171 -200 -223 -204 -133 -158 -219 -209 -126 -113 -145 -138 -75 -65 -68 -33 4 -5 6 -1 36 38 32 32 74 85 48 72 64 37 -13 -2 14 +V_0050 (10KT) -28 39 18 -6 -30 12 20 4 -23 -38 -21 25 8 -68 -57 36 8 -20 -33 42 22 -3 -2 14 -32 -34 -56 -14 -31 -35 -31 39 31 37 44 87 44 42 40 46 39 +T_0030 (10C) -560 -548 -561 -557 -554 -553 -559 -553 -557 -555 -564 -555 -560 -564 -564 -562 -567 -567 -575 -564 -564 -568 -572 -570 -569 -567 -572 -573 -572 -572 -569 -556 -550 -551 -542 -536 -527 -535 -537 -533 -520 +R_0030 (%) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Z_0030 (DM) 2388 2389 2388 2391 2391 2393 2391 2394 2393 2394 2392 2392 2392 2391 2390 2391 2391 2391 2390 2393 2393 2393 2393 2394 2394 2393 2392 2391 2390 2388 2387 2387 2389 2388 2389 2391 2395 2393 2396 2396 2399 +U_0030 (10KT) -182 -164 -187 -186 -191 -202 -206 -224 -208 -196 -160 -236 -223 -143 -138 -220 -165 -105 -106 -136 -109 -43 -45 -69 -25 -4 10 -18 4 -18 -2 2 7 -13 -38 -58 -89 -94 -65 -128 -164 +V_0030 (10KT) -10 6 1 12 -25 -6 -18 6 2 10 -22 -40 16 46 -56 -7 33 25 -26 3 22 24 -51 0 -28 -27 -78 2 -57 -14 11 67 76 86 82 109 88 132 46 14 81 +T_0020 (10C) -500 -505 -515 -495 -504 -509 -514 -503 -501 -507 -515 -498 -504 -513 -518 -504 -514 -519 -516 -509 -518 -521 -523 -515 -523 -525 -528 -520 -521 -524 -517 -505 -504 -497 -488 -482 -480 -481 -482 -478 -485 +R_0020 (%) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Z_0020 (DM) 2650 2651 2649 2653 2653 2654 2652 2655 2655 2655 2652 2653 2653 2652 2650 2652 2651 2651 2650 2654 2654 2653 2652 2654 2654 2653 2650 2650 2650 2647 2646 2648 2650 2650 2652 2654 2659 2657 2659 2661 2664 +U_0020 (10KT) -93 -113 -123 -145 -140 -186 -174 -209 -170 -193 -170 -185 -134 -182 -143 -142 -120 -151 -94 -76 2 -63 -70 12 34 -28 -2 34 5 -34 37 18 11 -17 -78 -35 -21 -140 -157 -85 -38 +V_0020 (10KT) -1 -16 -17 -3 -10 31 8 23 -12 7 -15 25 -35 21 13 40 -20 8 8 67 -22 -39 -14 36 -84 -70 -16 11 -76 41 72 92 110 82 107 190 51 47 68 123 5 +T_0010 (10C) -442 -434 -426 -418 -414 -411 -412 -421 -409 -416 -422 -430 -435 -432 -437 -430 -426 -438 -433 -437 -432 -437 -450 -446 -436 -449 -453 -448 -442 -435 -452 -446 -429 -436 -444 -435 -426 -433 -443 -441 -442 +R_0010 (%) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Z_0010 (DM) 3109 3109 3107 3114 3113 3114 3112 3115 3115 3114 3111 3114 3111 3109 3107 3111 3109 3108 3107 3111 3111 3110 3107 3111 3110 3108 3105 3106 3106 3104 3104 3106 3111 3111 3113 3116 3122 3120 3121 3122 3123 +U_0010 (10KT) -7 -127 -110 -73 -62 -87 -127 -101 -67 -105 -69 -24 -51 -134 -98 14 9 -85 -13 78 31 2 103 69 76 85 183 50 138 175 116 108 190 141 100 76 129 78 -10 -8 -27 +V_0010 (10KT) -43 -35 47 95 23 -9 11 80 -44 -31 4 25 -84 -65 24 72 -89 -32 29 47 -79 6 5 -4 -22 39 -31 29 86 49 28 165 110 109 51 136 20 -43 -99 -27 -141 + + ------------------------------------------------------ CUSTOM DATA --------------------------------------------------------- + +NVAR 001 +TGRD (10^7C/M) 15 13 25 25 38 46 37 38 60 60 51 47 51 51 40 40 64 80 41 45 31 28 23 44 29 31 28 33 25 32 54 55 47 46 50 56 71 66 66 63 67 diff --git a/test/skew_t/data/2023/sal092022_avno_doper_2022092800_diag.dat b/test/skew_t/data/2023/sal092022_avno_doper_2022092800_diag.dat new file mode 100644 index 00000000..e69de29b diff --git a/test/skew_t/test_skew_t.py b/test/skew_t/test_skew_t.py index f9bfe6f9..d870b0e7 100644 --- a/test/skew_t/test_skew_t.py +++ b/test/skew_t/test_skew_t.py @@ -1,20 +1,10 @@ import os import pytest import shutil +import re -from metplotpy.plots.skew_t import skew_t -# from metcalcpy.compare_images import \ -# CompareImages - -@pytest.fixture -def setup(): - custom_config_filename = "./test_skew_t.yaml" - - # Invoke the command to generate askew-T diagram based on - # the test_skew_t.yaml custom config file. - # Retrieve the contents of the custom config file to over-ride - # or augment settings defined by the default config file. - skew_t.main(custom_config_filename) +from metplotpy.plots.skew_t import skew_t as skew_t +# from metcalcpy.compare_images import CompareImages @@ -34,7 +24,89 @@ def test_files_exist(): # Verify that files for the ssh052023 data exists for the 0,6, 12,18,24, 30, 42, # 48, 54, and 60 hour data. + output_dir = os.path.join(cur_dir, 'output' ) + + # Some of these data files have incomplete data so check for the expected hour + # plots. + + print(f"Output dir: {output_dir}") + file_ext = '.png' + files_of_interest = [] + for root, dir, files in os.walk(output_dir): + for item in files: + if item.endswith(file_ext): + # print(f"Item of interest: {item}") + full_file = os.path.join(root, item) + base_file = os.path.basename(full_file) + files_of_interest.append(base_file) + + # List of files for the sh052023 data (which is missing data for hours 66-240). + data_some_missing_data = ['ssh052023_avno_doper_2023010100_diag', + 'ssh052023_avno_doper_2023010106_diag'] + + # Config file is requesting all the available sounding hours + expected_hours_for_2023_010100 = range(0,61,6) + expected_hours_for_2023_010106 = range(0,49,6) + + # Create a list of expected base file names with their expected hours. + expected_base_filenames = [] + for base in data_some_missing_data: + # Expected base for expected plot output name of format: + # ssh_052023_avno_doper_202301010[0|6]_diag_[0-9]{1,2}_hr + if base == 'ssh052023_avno_doper_2023010100_diag': + # Working with the 2023010100 date file + for cur_hr in expected_hours_for_2023_010100: + base_hr = base + '_' + str(cur_hr) + '_hr' + expected_base_filenames.append(base_hr) + + elif base == 'ssh052023_avno_doper_2023010106_diag': + # Working with the 2023010106 date + for cur_hr in expected_hours_for_2023_010106: + base_hr = base + '_' + str(cur_hr) + '_hr' + expected_base_filenames.append(base_hr) + + # Subset only the files that correspond to the sh052023 data + subset_files_of_interest = [] + for cur_file in files_of_interest: + match_found = re.match(r'(ssh052023_.*).png', cur_file) + if match_found: + subset_files_of_interest.append(match_found.group(1)) + + # Verify that the expected plots were generated. + num_found = 0 + for expected in expected_base_filenames: + if expected in subset_files_of_interest: + num_found += 1 + + if len(subset_files_of_interest) == num_found: + assert True + else: + assert False + + + # Clean up all png files + temp_datafile = os.path.join(cur_dir, 'sounding_data.dat') + os.remove(temp_datafile) + shutil.rmtree(output_dir) + # If running without the ' -p no:logging' option, then uncomment to ensure that log + # files are removed. + # shutil.rmtree('./logs') + +def test_files_not_created(): + ''' + Checking that input files with only fill/missing data are not created. + ''' + + os.environ['METPLOTPY_BASE'] = "../../" cur_dir = os.getcwd() + custom_config_filename = os.path.join(cur_dir, "test_skew_t.yaml") + + # Invoke the command to generate a skew-T Diagram based on + # the test_skew_tm.yaml custom config file. + skew_t.main(custom_config_filename) + + # Verify that files for the ssh052023 data exists for the 0,6, 12,18,24, 30, 42, + # 48, 54, and 60 hour data. output_dir = os.path.join(cur_dir, 'output' ) # Some of these data files have incomplete data so check for the expected hour @@ -51,42 +123,108 @@ def test_files_exist(): base_file = os.path.basename(full_file) files_of_interest.append(base_file) + # List of files with no sounding data (9999 for all fields and times) + no_sounding_data = ['ssh162023_avno_doper_2023022712_diag', + 'ssh162023_avno_doper_2023022800_diag', + 'ssh162023_avno_doper_2023022806_diag', + 'ssh162023_avno_doper_2023030706_diag'] + + # Subset the files of interest to just sh162023 output. + subsetted_files_of_interest = [] + for cur in files_of_interest: + match = re.match(r'^ssh162023', cur) + if match: + subsetted_files_of_interest.append(cur) + + # Verify that there aren't any plots created for the files with missing sounding + # data. First, create a list of the base names of the plots that were created and + # that correspond to the input data of interest (i.e. the sh162023_*.dat data). + subsetted_basenames = [] + for cur_plot in subsetted_files_of_interest: + match = re.match(r'(ssh162023_avno_doper_20230[0-9]{5}_diag)_*._hr.png', + cur_plot) + if match: + subsetted_basenames.append(match.group(1)) + + # Count how often we find a basename of a plot that we didn't expect to create with + # the list of base names of plots that were created. + fail_counter = 0 + for cur in no_sounding_data: + if cur in subsetted_basenames: + fail_counter += 1 + + if fail_counter == 0: + assert True + else: + assert False + + + # Clean up all png files + temp_datafile = os.path.join(cur_dir, 'sounding_data.dat') + os.remove(temp_datafile) + shutil.rmtree(output_dir) + # If running with the ' -p no:logging' option, then uncomment to ensure that log + # files are removed. + # shutil.rmtree('./logs') + + +def test_empty_input(): + ''' + Checking that empty input file is not creating any plots. + ''' + + os.environ['METPLOTPY_BASE'] = "../../" + cur_dir = os.getcwd() + custom_config_filename = os.path.join(cur_dir, "test_skew_t.yaml") + + # Invoke the command to generate a skew-T Diagram based on + # the test_skew_tm.yaml custom config file. + skew_t.main(custom_config_filename) + + # Verify that files for the ssh052023 data exists for the 0,6, 12,18,24, 30, 42, + # 48, 54, and 60 hour data. + output_dir = os.path.join(cur_dir, 'output') + + # Some of these data files have incomplete data so check for the expected hour + # plots. + + print(f"Output dir: {output_dir}") + file_ext = '.png' + files_of_interest = [] + for root, dir, files in os.walk(output_dir): + for item in files: + if item.endswith(file_ext): + # print(f"Item of interest: {item}") + full_file = os.path.join(root, item) + base_file = os.path.basename(full_file) + files_of_interest.append(base_file) + + # List of empty files + no_data_empty_file = ['sal092022_avno_doper_2022092800_diag'] + + # Verify that there aren't any plots created for the file with missing sounding + # data. + + # First, subset the files of interest to just sal0920223 output. + subsetted_files_of_interest = [] + for cur in files_of_interest: + match = re.match(r'^sal092022', cur) + if match: + subsetted_files_of_interest.append(cur) - expected_hours_ssh_162023_2023030100 = range(0, 175, 6) - expected_hours_ssh_052023_2023030100 = range (0, 61, 6) - # Create filenames of the expected output from ssh162023 - expected_filenames_ssh162023_start = 'ssh162023_avno_doper_2023030100' - expected_filenames_ssh052023_start = 'ssh052023_avno_doper_2023010100' - file_end = '_hr.png' - expected_filenames_ssh162023 = [] - expected_filenames_ssh052023 = [] - - # Create filename of the expected output from ssh052023 - for hr in expected_hours_ssh_052023_2023030100: - filename_start = expected_filenames_ssh052023_start + "_diag_" - filename = filename_start + str(hr) + file_end - expected_filenames_ssh052023.append(filename) - num_ssh_052023_expected = len(expected_filenames_ssh052023) - - # Create filename of the expected output from ssh162023 - for hr in expected_hours_ssh_162023_2023030100: - filename_start = expected_filenames_ssh162023_start + "_diag_" - filename = filename_start + str(hr) + file_end - expected_filenames_ssh162023.append(filename) - num_ssh162023_expected = len(expected_filenames_ssh162023) - - num_sh052023 = 0 - num_sh162023 = 0 - for skewt_file in files_of_interest: - if skewt_file in expected_filenames_ssh052023: - num_sh052023 = num_sh052023 + 1 - elif skewt_file in expected_filenames_ssh162023: - num_sh162023 = num_sh162023 + 1 - - - assert num_ssh_052023_expected == num_sh052023 - assert num_ssh162023_expected == num_sh162023 + match_found = re.match(r'^sal092022_avno_doper_2022092800_diag', + no_data_empty_file[0]) + if match_found in subsetted_files_of_interest: + # The output file was created when it shouldn't have been, fail. + assert False + else: + # The output file was NOT created, as expected. Pass. + assert True # Clean up all png files + temp_datafile = os.path.join(cur_dir, 'sounding_data.dat') + os.remove(temp_datafile) shutil.rmtree(output_dir) - shutil.rmtree('./logs') + # If running without the ' -p no:logging' option, then uncomment to ensure that log + # files are removed. + # shutil.rmtree('./logs')