You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
4.6 KiB
Python
40 lines
4.6 KiB
Python
from py_rmatools import rma
|
|
|
|
startyear=2013
|
|
|
|
runNumber = 'HWQ041'
|
|
|
|
DictNodeConst = {
|
|
1: [94,204,2281,213,2466,209,212,166,2468,2257,2256,194,2259,2471,2261,2252,2253,2467,2260,2262,197,2251,2255,2258,195,93,205,201,2254,200,2464,202,206,51,199,207,2465,2469,193,211,2263,196,208,2470,210,198,203],
|
|
2: [606,89,168,2445,600,614,166,2283,2804,2460,172,2824,2830,2808,2450,176,2452,2451,82,2801,2454,186,616,2447,2820,611,2455,2821,593,167,83,87,2459,605,84,621,618,2802,625,596,2813,2289,2803,180,2290,185,2809,2443,622,187,2811,184,626,617,601,80,85,81,619,88,181,592,2456,2287,603,610,2823,2825,177,2818,2444,179,602,170,2462,2805,2814,2292,2812,2442,2286,2798,595,2463,2822,2819,624,183,2807,2284,613,609,2291,2458,608,175,2806,173,599,598,2827,2446,2448,174,90,2461,2810,2829,604,2285,2800,171,2817,2826,182,2288,2828,91,2799,2453,615,627,2831,169,2797,178,612,620,623,607,597,2816,2796,594,2449,2815,2457,2282,86],
|
|
3: [498,507,516,2974,518,499,2942,531,512,33,64,485,34,41,2957,38,46,533,2947,524,2936,51,2915,2963,522,514,39,2928,2945,2932,2955,2960,2980,2927,489,2943,506,496,50,2967,508,2916,2956,2925,2930,2889,495,2970,520,2979,2977,2964,40,2968,511,2952,591,523,500,528,32,2950,525,502,488,2924,2934,2962,43,45,35,505,509,63,530,36,492,521,503,2971,2921,2917,519,2944,2946,2926,48,2922,2961,2938,2923,497,487,493,47,2975,2937,513,2972,504,517,501,2931,2953,2929,486,2920,2958,494,2966,515,2918,2983,2933,510,42,2935,2982,2940,2981,2939,37,490,527,2954,49,2965,2978,44,2973,2951,526,2941,491,2949,2969,2976,2919,2948,532,2959,484,31,529,2912],
|
|
4: [76,2871,2700,2768,2787,2715,2778,580,2271,575,1397,2850,436,2776,379,2844,403,2712,2713,349,2767,555,2703,543,2719,2842,2710,424,369,67,589,2745,2688,346,2848,377,2743,2763,400,2758,2277,2788,2874,428,1386,2741,417,332,374,361,2689,341,426,551,548,384,432,2782,401,382,577,542,574,2834,563,2781,2747,1396,66,2885,2739,2840,427,2769,591,339,351,2838,2714,547,4246,2861,2270,4249,2273,2882,583,2731,2869,347,381,2754,2722,430,2694,390,1399,2854,4252,2865,343,380,581,73,364,435,2702,1400,4250,587,69,567,2863,2784,75,406,558,534,2760,2888,2766,421,2852,545,2868,414,536,71,2867,1390,2441,557,410,416,2272,429,371,2740,541,2693,70,438,2735,423,2771,366,569,2870,2711,2790,2780,1385,4242,362,2732,2761,572,2880,2785,2695,2279,2750,590,1401,383,576,2691,394,544,4247,407,2851,1394,419,2707,2886,333,378,404,2728,392,415,368,395,2841,358,340,571,2846,367,385,2720,165,2847,586,359,344,579,2756,4257,2864,564,2786,422,437,2697,556,584,2699,2872,434,570,2859,72,549,537,2278,386,338,2274,2836,2698,2752,2753,405,582,4258,2862,397,2751,356,409,2705,337,2727,1392,398,540,2887,2724,2793,2757,2835,553,552,2876,2884,4254,538,2837,331,2764,373,352,1402,2855,1393,2773,4245,2269,2729,1398,560,1388,389,425,2762,2775,376,2856,2770,2730,573,74,354,335,2853,336,2792,2744,350,345,2748,4244,357,562,375,4241,418,578,1389,2765,2873,2736,433,2832,2881,2783,393,2875,2794,2791,561,2726,2275,363,1391,2268,2721,2738,2774,2718,2833,370,550,402,2759,4243,559,4255,565,2734,2696,2742,68,2857,2789,413,365,2843,2879,431,2723,408,342,4248,2772,2883,2717,2795,1395,4256,588,1387,360,420,2746,2877,2866,372,566,2733,2755,2845,2737,2725,412,348,2878,539,2839,554,2860,77,535,2779,2276,399,387,4251,2692,2749,411,2708,2701,334,2849,2690,396,4253,568,2704,2716,546,2777,2858,2706,585,353,2709,391,355,388],
|
|
5: [2218,2244,24,451,2232,2212,2893,442,26,483,2897,444,2231,1,2248,466,2892,452,2,3,464,453,2215,2233,454,2210,2234,2203,2896,2216,478,2903,440,470,2245,30,4,21,459,4364,19,2236,2891,445,2206,2899,460,1373,17,463,25,2207,2213,480,2221,443,2222,476,2909,2209,2908,471,6,20,13,15,482,2900,458,2895,456,18,2238,2247,2904,2239,450,457,2902,2201,2223,16,1369,27,2217,2205,2243,5994,2220,2890,9,1374,2911,12,2913,469,2240,2905,441,2246,2901,2894,2225,449,2914,455,2214,2280,472,11,2211,462,2204,2202,2241,1372,2237,5,481,448,475,477,2907,22,2910,7,2228,465,446,2242,14,2230,5993,8,461,2906,2226,468,2250,28,447,2898,439,2249,10,23,2208,467,2219,474,29,2227,2224,479,473,484,2235]
|
|
}
|
|
|
|
|
|
for key in DictNodeConst:
|
|
|
|
time=[]
|
|
|
|
node=DictNodeConst[key]
|
|
I_const=key
|
|
|
|
filename1='{}_{}_WQ'.format(runNumber,startyear)
|
|
filename2='{}_{}.csv'.format(runNumber,I_const)
|
|
|
|
target = open(filename2, 'w')
|
|
target.write("Year, Hour")
|
|
for n in node:
|
|
target.write(", {}".format(n))
|
|
target.write("\n")
|
|
|
|
R=rma()
|
|
R.open(filename1)
|
|
while R.next():
|
|
target.write("{}, {}".format(startyear,R.time))
|
|
for ii in range(0,len(node)):
|
|
target.write(", {}".format(R.constit[I_const][node[ii]]))
|
|
target.write("\n")
|
|
|
|
target.close() |