GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — wrf-python/test/test_multi_cache.py at develop · huddao/wrf-python Expand file tree/ Copy pathtest_multi_cache.pyMore file actions 62 lines (53 loc) · 1.67 KB / Copy pathtest_multi_cache.pyFile metadata and controls62 lines (53 loc) · 1.67 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 import time from wrf.cache import _get_cache from wrf import getvar from netCDF4 import Dataset as nc a = nc("/Users/ladwig/Documents/wrf_files/wrf_vortex_multi/moving_nest/" "wrfout_d02_2005-08-28_00:00:00") b = nc("/Users/ladwig/Documents/wrf_files/wrf_vortex_multi/moving_nest/" "wrfout_d02_2005-08-28_12:00:00") q = {"outoutoutout": {"outoutout": {"outout": {"out1": {"blah": [a, b], "blah2": [a, b]}, "out2": {"blah": [a, b], "blah2": [a, b]}}}}} t1 = time.time() c = getvar(q, "rh", method="cat", timeidx=None, squeeze=True) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="cat", timeidx=None, squeeze=False) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="cat", timeidx=1, squeeze=True) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="cat", timeidx=1, squeeze=False) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="join", timeidx=None, squeeze=True) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="join", timeidx=None, squeeze=False) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="join", timeidx=1, squeeze=True) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) t1 = time.time() c = getvar(q, "rh", method="join", timeidx=1, squeeze=False) t2 = time.time() print(c) print("time taken: {}".format((t2-t1)*1000.)) |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |