Changeset 643 for codes/icosagcm/devel
- Timestamp:
- 12/19/17 16:27:19 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/src/unstructured.pyx
r642 r643 2 2 import math 3 3 import numpy as np 4 cimport numpy as np 4 5 import dynamico.wrap as wrap 5 6 from ctypes import c_void_p, c_int, c_double, c_bool 6 7 7 from libc.time cimport time as ctime, time_t8 cimport numpy as np 8 #from libc.time cimport time as ctime, time_t 9 from numpy cimport ndarray 9 10 10 11 #------------- direct Cython interface to DYNAMICO routines -------------# … … 93 94 return data 94 95 95 cdef check_ptr(name, dbl_ptr p, n p.ndarray data):96 cdef check_ptr(name, dbl_ptr p, ndarray data): 96 97 if p != ptr(data) : print name, 'p <> ptr(data) !!' 97 98 … … 105 106 cdef dbl_ptr p_dPhi_fast, p_dPhi_slow, p_dW_fast, p_dW_slow # tendencies 106 107 # allocated arrays, must remain referenced or segfault 107 cdef readonly n p.ndarray mass, theta_rhodz, u, geopot, W108 cdef readonly n p.ndarray mass_col, dmass_col, ps, theta, pk, hflux, qv109 cdef readonly n p.ndarray drhodz, dtheta_rhodz, du_fast, du_slow110 cdef readonly n p.ndarray dPhi_fast, dPhi_slow, dW_fast, dW_slow108 cdef readonly ndarray mass, theta_rhodz, u, geopot, W 109 cdef readonly ndarray mass_col, dmass_col, ps, theta, pk, hflux, qv 110 cdef readonly ndarray drhodz, dtheta_rhodz, du_fast, du_slow 111 cdef readonly ndarray dPhi_fast, dPhi_slow, dW_fast, dW_slow 111 112 112 113 def __init__(self,mesh,time_scheme, nstep):
Note: See TracChangeset
for help on using the changeset viewer.