YAC 3.13.0
Yet Another Coupler
Loading...
Searching...
No Matches
toy_multi_curve2d.py File Reference

Go to the source code of this file.

Namespaces

namespace  toy_multi_curve2d
 

Functions

 toy_multi_curve2d.lonlat2xyz (lon, lat)
 
 toy_multi_curve2d.xyz2lonlat (x, y, z)
 
 toy_multi_curve2d.rotmat (theta, plane_dims, d=2)
 
 toy_multi_curve2d.msg (m)
 
 toy_multi_curve2d.data (lon, lat)
 

Variables

 toy_multi_curve2d.yac = YAC()
 
str toy_multi_curve2d.my_comp_name = "PISM"
 
 toy_multi_curve2d.comp = yac.def_comp(my_comp_name)
 
 toy_multi_curve2d.size = comp.comp_comm.size
 
 toy_multi_curve2d.rank = comp.comp_comm.rank
 
 toy_multi_curve2d.fac = int(np.sqrt(size))
 
list toy_multi_curve2d.dim2d = [100, 50]
 
list toy_multi_curve2d.size2d = [fac, size//fac]
 
list toy_multi_curve2d.rank2d = [rank % fac, rank//fac]
 
list toy_multi_curve2d.chunk2d = [math.ceil(dim2d[0]/size2d[0]), math.ceil(dim2d[1]/size2d[1])]
 
list toy_multi_curve2d.slice2d
 
 toy_multi_curve2d.x = np.linspace(-.5, .5, dim2d[0])
 
 toy_multi_curve2d.y = np.linspace(-.5, .5, dim2d[1])
 
 toy_multi_curve2d.vx
 
 toy_multi_curve2d.vy
 
 toy_multi_curve2d.r = rotmat(-.45*np.pi, [0, 2], 3)@rotmat(0.1*np.pi, [0, 1], 3)
 
 toy_multi_curve2d.v_xyz = np.stack(lonlat2xyz(vx, vy), axis=-1)
 
float toy_multi_curve2d.c_xyz = 0.25*(v_xyz[:-1, :-1, :]+v_xyz[1:, :-1, :]+v_xyz[:-1, 1:, :]+v_xyz[1:, 1:, :])
 
 toy_multi_curve2d.cx
 
 toy_multi_curve2d.cy
 
 toy_multi_curve2d.grid = Curve2dGrid(f"{my_comp_name}_grid", vx, vy)
 
 toy_multi_curve2d.corner_idx = np.arange(math.prod(dim2d)).reshape(dim2d)[slice2d[0], slice2d[1]]
 
 toy_multi_curve2d.cell_idx
 
 toy_multi_curve2d.points_cell = grid.def_points(Location.CELL, cx, cy)
 
 toy_multi_curve2d.points_vertex = grid.def_points(Location.CORNER, vx, vy)
 
list toy_multi_curve2d.interpolations
 
dict toy_multi_curve2d.field
 
 toy_multi_curve2d.data_vertex = data(vx, vy)
 
 toy_multi_curve2d.data_cell = data(cx, cy)
 
dict toy_multi_curve2d.data = field[f"{interp[0]}_{comp_name}_field_out"].get()