Changeset 754


Ignore:
Timestamp:
10/08/18 18:57:20 (6 years ago)
Author:
dubos
Message:

devel/unstructured : fix RSW_2D test case for mixed precision

File:
1 edited

Legend:

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

    r747 r754  
    44from dynamico import time_step 
    55from dynamico import DCMIP 
     6from dynamico.precision import zero, np_num 
     7 
    68import math as math 
    79import matplotlib.pyplot as plt 
     
    911import time 
    1012 
    11 nx,ny,llm,nqdyn=128,128,1,1 
    12 Lx,Ly,g,f = 8.,8.,1.,1. 
     13nx,ny,llm,nqdyn=128,192,1,1 
     14Lx,Ly,g,f = 8.,12.,1.,1. 
    1315dx,dy=Lx/nx,Ly/ny 
    1416 
     
    3032dt=T/N 
    3133print N,dt,Lx/nx 
    32 scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt) 
     34scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt, precision=np_num) 
    3335 
    3436print 'types : yy, u0, h0, u0', yy.dtype, u0.dtype, h0.dtype, u0.dtype 
     
    3840    h,u=flow 
    3941    print 'types : h,u', h.dtype, u.dtype 
    40     caldyn.bwd_fast_slow(flow, 0.) 
     42    caldyn.bwd_fast_slow(flow, zero) 
    4143    plt.figure(); plt.pcolor(mesh.x,mesh.y,caldyn.qv) 
    4244    plt.colorbar(); plt.title('potential vorticity') 
Note: See TracChangeset for help on using the changeset viewer.