Changeset 631 for codes/icosagcm/devel/Python/test/py/test_xios.py
- Timestamp:
- 12/12/17 16:04:23 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/test/py/test_xios.py
r622 r631 4 4 print '%d/%d starting'%(mpi_rank,mpi_size) 5 5 6 import sys7 6 import numpy as np 8 #import dynamico.wrap as wrap9 7 print 'import dynamico.unstructured' 10 8 import dynamico.unstructured as unst … … 12 10 import dynamico.xios as xios 13 11 print 'Done.' 12 from dynamico.meshes import MPAS_Mesh as Mesh, radian 14 13 15 14 def boundaries(degree,points,lon,lat): … … 29 28 #----------------------------- read MPAS mesh -------------------------------- 30 29 31 radian=unst.radian32 30 grid, llm, nqdyn, nqtot = 10242, 1,1,1 # 2562, 10242, 40962 33 31 Omega, radius, g, gh0 = 2.*np.pi/86400., 6.4e6, 1., 2.94e4 34 32 N, T, courant = 40, 10800., 1.2 # simulation length = N*T 35 33 print 'Omega, planetary PV', Omega, 2*Omega/gh0 36 sys.stdout.flush()37 34 38 35 def f(lon,lat): return 2*Omega*np.sin(lat) # Coriolis parameter 39 36 print 'Reading MPAS mesh ...' 40 sys.stdout.flush() 41 mesh = unst.MPAS_Mesh('grids/x1.%d.grid.nc'%grid, llm, nqdyn, radius, f) 37 mesh = Mesh('grids/x1.%d.grid.nc'%grid, llm, nqdyn, radius, f) 42 38 print '...Done' 43 sys.stdout.flush()44 39 45 40 lon_i, lat_i, lon_v, lat_v = [x*radian for x in mesh.lon_i, mesh.lat_i, mesh.lon_v, mesh.lat_v]
Note: See TracChangeset
for help on using the changeset viewer.