Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import numpy as np
import numpy.matlib
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as mcolors
from netCDF4 import Dataset
import os as os
import resource
def alt_max(SR, alt, n):
u, v = np.shape(SR)
j = - 1
if (SR[n,0] > 0.01 or SR[n,0] < -10) or (SR[n,1] > 0.01 or SR[n,1] < -10):
return j
i = 2
while i < v:
if (SR[n,i] > -10) and (SR[n,i] < 0.01):
j = i
elif (SR[n,i] > 0.01) and (SR[n,i-1] > 0.01):
#!/usr/bin/env python
import goccp as go
import numpy as np
from netCDF4 import Dataset
from numpy import dtype
def ecr_cdf(sortie,flag, alt_max, lg, lt, ti,alt):
ncfile = Dataset(sortie+'.nc','w')