Ignore:
Timestamp:
12/12/17 16:04:23 (7 years ago)
Author:
dubos
Message:

devel/Python : extract pure Python stuff from cython module unstructured.pyx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/Python/test/py/RSW_MPAS_W02.py

    r617 r631  
    1 import sys 
    21print 'Loading modules ...' 
    3 sys.stdout.flush() 
    4  
    52import math as math 
    6 # select non-interactive backend, cf http://stackoverflow.com/questions/4931376/generating-matplotlib-graphs-without-a-running-x-server 
    7 import matplotlib 
    8 matplotlib.use('Agg')  
    93import matplotlib.pyplot as plt 
    104import numpy as np 
     5print '...Done' 
    116 
    127print 'Loading DYNAMICO modules ...' 
    13 sys.stdout.flush() 
    148from dynamico import unstructured as unst 
     9from dynamico.meshes import MPAS_Mesh as Mesh 
    1510from dynamico import time_step 
    1611print '...Done' 
    17 sys.stdout.flush() 
    1812 
    1913grid, llm, nqdyn = 10242, 1,1 # 2562, 10242, 40962 
     
    2216 
    2317print 'Omega, planetary PV', Omega, 2*Omega/gh0 
    24 sys.stdout.flush() 
    2518 
    2619def f(lon,lat): return 2*Omega*np.sin(lat) # Coriolis parameter 
    2720print 'Reading MPAS mesh ...' 
    28 sys.stdout.flush() 
    29 mesh = unst.MPAS_Mesh('grids/x1.%d.grid.nc'%grid, llm, nqdyn, radius, f) 
     21mesh = Mesh('grids/x1.%d.grid.nc'%grid, llm, nqdyn, radius, f) 
    3022print '...Done' 
    31 sys.stdout.flush() 
    3223lon, lat = mesh.lon_i, mesh.lat_i 
    3324x,y,z = np.cos(lat)*np.cos(lon), np.cos(lat)*np.sin(lon), np.sin(lat) 
Note: See TracChangeset for help on using the changeset viewer.