[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dennou-ruby:000156] Re: reading binary files
�¸��Ǥ���
�ۤ�ȤˤȤꤢ�����Ǥ�����
ftp://dennou-t.ms.u-tokyo.ac.jp/
GFD_Dennou_Club/ftp/arch/davis/ex/1999-11-02-numa
��
mcdcl.991104.tar.gz : mcarray ���Ѥ��� dcl �����ե�����
�åץǡ��Ȥ��ޤ�����
dcl �� (oldsrc�����) �롼���������Υ���ȥ������Ƥ���ޤ���
���������ͤ��֤äƤ����ĤϤޤ��Ȥ��ޤ���
¾������̵�ݾڤǤ���ư���ʤ���¿������Ǥ��礦��
ñ�� mksrc.rb �� dcl ���Τ�ư�Ѵ����������Ǥ��Τǡ�
��� grph2 �������ư�����Ȥ�Τ���ޤ�����
-----
#!/usr/local/bin/ruby
require "mcarray"
require "mcdcl"
include Math
# program u2df01
Nx=19; Ny=19
Xmin=0.0; Xmax=360.0; Ymin=-90.0; Ymax=90.0
Drad=PI/180; Dz=0.05
p = FloatArray.new(Nx,Ny)
for j in 0...Ny
for i in 0...Nx
alon = ( Xmin + (Xmax-Xmin) * i / (Nx-1) ) * Drad
alat = ( Ymin + (Ymax-Ymin) * j / (Ny-1) ) * Drad
slat = sin(alat)
p[i,j] = cos(alon) * (1-slat**2) * sin(2*PI*slat) + Dz
end
end
Dcl.gropn(1)
Dcl.grfrm
Dcl.grswnd( Xmin, Xmax, Ymin, Ymax )
Dcl.grsvpt( 0.2, 0.8, 0.2, 0.8 )
Dcl.grstrn( 1 )
Dcl.grstrf
Dcl.usdaxs
Dcl.udcntr( p, Nx, Nx, Ny )
Dcl.grcls
--
�¸� �ء��̳�ƻ�����ر��ϵ�Ķ��ʳظ���� �絤���η��Ķ��ʳ��칶
tel:011-706-2365 fax:011-706-4865 ��060-0810 ���ڻ��̶���10����5����
mailto:numa@xxxxxx http://wwwoa.ees.hokudai.ac.jp/~numa