begin M = 24 N = 12 R = 5 T = 5 nlat = N mlon = M X = random_normal(10, 5, (/nlat, mlon/)) opt = True opt@tspace = 22 print("====================RHOMBOIDAL=====================") ab = shagC(X) abc = rhomb_trunC (ab,R) ;print(ab) bb = ab - abc bb = fabs(bb) print( "sum(bb)="+sum(bb) ) opt@title = "*** REAL COEFFICIENTS ***" write_matrix (ab(0,:,:), "12f7.2" , opt) opt@title = "*** IMAGINARY COEFFICIENTS ***" write_matrix (ab(1,:,:), "12f7.2" , opt) opt@title = "*** REAL RHOM COEFFICIENTS ***" write_matrix (abc(0,:,:), "12f7.2" , opt) opt@title = "*** IMAGINARY RHOM COEFFICIENTS ***" write_matrix (abc(1,:,:), "12f7.2" , opt) print("====================TRIANGULAR=====================") AB = shagC(X) ABC = tri_trunC (AB,T) ;print(AB) BB = AB - ABC BB = fabs(BB) print( "sum(BB)="+sum(BB) ) opt@title = "*** REAL COEFFICIENTS ***" write_matrix (AB(0,:,:), "12f7.2" , opt) opt@title = "*** IMAGINARY COEFFICIENTS ***" write_matrix (AB(1,:,:), "12f7.2" , opt) opt@title = "*** REAL TRI COEFFICIENTS ***" write_matrix (ABC(0,:,:), "12f7.2" , opt) opt@title = "*** IMAGINARY TRI COEFFICIENTS ***" write_matrix (ABC(1,:,:), "12f7.2" , opt) end