Back to home page

MITgcm

 
 

    


File indexing completed on 2021-10-19 05:18:28 UTC

view on githubraw file Latest commit 11c3150c on 2021-10-18 18:00:35 UTC
11c3150c71 Mart*0001 # generate weights files
                0002 import numpy as np
                0003 
                0004 ratio=0.25
                0005 terr = np.asarray(
                0006     [0.5201, 0.5199, 0.5201, 0.5142, 0.4917, 0.4707, 0.4324, 0.3782,
                0007      0.3103, 0.2435, 0.1994, 0.1582, 0.1144, 0.0905, 0.0659, 0.0602,
                0008      0.0508, 0.0498, 0.0501, 0.0500, 0.0500, 0.0500, 0.0500])
                0009 serr = np.asarray(
                0010     [0.2676, 0.2224, 0.1942, 0.1751, 0.1452, 0.1223, 0.1125, 0.1078,
                0011      0.0884, 0.0785, 0.0777, 0.0702, 0.0710, 0.0599, 0.0510, 0.0408,
                0012      0.0399, 0.0314, 0.0205, 0.0199, 0.0200, 0.0200, 0.0200])
                0013 
                0014 terr = terr/np.sqrt(ratio)
                0015 serr = serr/np.sqrt(ratio)
                0016 
                0017 terr.astype('>f4').tofile('t.err')
                0018 serr.astype('>f4').tofile('s.err')
                0019 
                0020 # from now deleted "data.err"
                0021 # with open('data.err') as f:
                0022 #     contents = f.readlines()
                0023 
                0024 # ratio=float(contents[0])
                0025 # terr=np.zeros((len(contents)-1,))
                0026 # serr=np.zeros((len(contents)-1,))
                0027 # for k in range(1,len(contents)):
                0028 #     terr[k-1] = float(contents[k].split()[0])/np.sqrt(ratio)
                0029 #     serr[k-1] = float(contents[k].split()[1])/np.sqrt(ratio)