2 import read_header
as readh
3 import read_grid
as readg
19 H = readh.Header(OUTPUT_DIR, nested=NEST)
24 G = pf.read_grid(H, nspec_ret=SPEC_NUM,
25 age_ret=AGE_CLASS_NUM,
26 pspec_ret=RELEASE_NUM,
32 G = readg.read_grid(H, nspec_ret=SPEC_NUM,
33 age_ret=AGE_CLASS_NUM,
34 pspec_ret=RELEASE_NUM,
39 G = readg.read_grid(H, nspec_ret=SPEC_NUM,
40 age_ret=AGE_CLASS_NUM,
41 pspec_ret=RELEASE_NUM,
46 print '==============================='
49 G = readg.read_grid(H,
51 age_ret=AGE_CLASS_NUM,
53 pspec_ret=RELEASE_NUM,
59 the_grid = G[ (SPEC_NUM, TIME) ]
62 print the_grid.dry.shape
63 print 'Nonzero elements: ', np.count_nonzero(the_grid.dry)
67 print the_grid.wet.shape
68 print 'Nonzero elements: ', np.count_nonzero(the_grid.wet)