ruby-dcl 1.8.1 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/ChangeLog +97 -14
  3. data/LICENSE.txt +1 -1
  4. data/demo/gokuraku/jump/jump2.rb +1 -1
  5. data/demo/grph1/sgpack/sgfont.rb +1 -1
  6. data/demo/grph1/sgpack/sgfonz.rb +1 -1
  7. data/demo/grph1/sgpack/sgpk07.rb +8 -6
  8. data/demo/grph1/slpack/slpk04.rb +1 -1
  9. data/demo/grph2/udegpk/u2df03.rb +2 -2
  10. data/demo/grph2/umpack/test04.rb +1 -1
  11. data/demo/grph2/umpack/test05r.rb +86 -0
  12. data/demo/grph2/uspack/uspk06.rb +1 -1
  13. data/demo/grph2/uspack/uspk08.rb +1 -1
  14. data/demo/grph2/ximage/ximg01.rb +1 -1
  15. data/demo/misc2/tmpack/tmpk01.rb +46 -0
  16. data/demo/misc2/tmpack/tmpk02.rb +58 -0
  17. data/demo/misc2/tmpack/tmpk03.rb +56 -0
  18. data/demo/rakuraku/color/color2.rb +4 -3
  19. data/demo/rakuraku/kihon/kihon7.rb +9 -3
  20. data/demo/rakuraku/kihon/kihonb.rb +11 -9
  21. data/demo/rakuraku/uspack/uspac1.rb +1 -1
  22. data/demo/rakuraku/uspack/uspac3.rb +1 -1
  23. data/ext/numru/dcl_cary2obj.c +1 -1
  24. data/ext/numru/dcl_narrayed_funcs.c +21 -21
  25. data/ext/numru/dcl_obj2cary.c +1 -1
  26. data/ext/numru/dcl_rubydcloriginal.c +0 -1
  27. data/ext/numru/extconf.rb +28 -9
  28. data/ext/numru/grph1_csgi.c +29 -3
  29. data/ext/numru/grph1_scpack.c +40 -41
  30. data/ext/numru/grph1_sgpack.c +158 -159
  31. data/ext/numru/grph1_slpack.c +14 -15
  32. data/ext/numru/grph1_stpack.c +35 -36
  33. data/ext/numru/grph1_swpack.c +89 -90
  34. data/ext/numru/grph2_grpack.c +13 -14
  35. data/ext/numru/grph2_ucpack.c +46 -47
  36. data/ext/numru/grph2_udpack.c +52 -53
  37. data/ext/numru/grph2_uepack.c +51 -52
  38. data/ext/numru/grph2_ugpack.c +40 -41
  39. data/ext/numru/grph2_uhpack.c +16 -17
  40. data/ext/numru/grph2_uipack.c +48 -49
  41. data/ext/numru/grph2_ulpack.c +50 -51
  42. data/ext/numru/grph2_umpack.c +66 -67
  43. data/ext/numru/grph2_uspack.c +88 -89
  44. data/ext/numru/grph2_uupack.c +69 -70
  45. data/ext/numru/grph2_uvpack.c +16 -17
  46. data/ext/numru/grph2_uwpack.c +21 -22
  47. data/ext/numru/grph2_uxpack.c +14 -15
  48. data/ext/numru/grph2_uypack.c +14 -15
  49. data/ext/numru/grph2_uzpack.c +60 -61
  50. data/ext/numru/init.c.default +5 -2
  51. data/ext/numru/math1_blklib.c +4 -5
  52. data/ext/numru/math1_chrlib.c +7 -8
  53. data/ext/numru/math1_clsplib.c +4 -5
  54. data/ext/numru/math1_fnclib.c +7 -8
  55. data/ext/numru/math1_gnmlib.c +12 -13
  56. data/ext/numru/math1_gt2dlib.c +9 -10
  57. data/ext/numru/math1_ifalib.c +9 -10
  58. data/ext/numru/math1_indxlib.c +15 -16
  59. data/ext/numru/math1_intlib.c +4 -5
  60. data/ext/numru/math1_lrllib.c +24 -25
  61. data/ext/numru/math1_maplib.c +5 -6
  62. data/ext/numru/math1_oslib.c +2 -3
  63. data/ext/numru/math1_rfalib.c +30 -31
  64. data/ext/numru/math1_rfblib.c +3 -4
  65. data/ext/numru/math1_sublib.c +4 -5
  66. data/ext/numru/math1_syslib.c +73 -74
  67. data/ext/numru/math1_vialib.c +22 -23
  68. data/ext/numru/math1_viblib.c +15 -16
  69. data/ext/numru/math1_vralib.c +22 -23
  70. data/ext/numru/math1_vrblib.c +15 -16
  71. data/ext/numru/math1_xfclib.c +3 -4
  72. data/ext/numru/math2_fftlib.c +19 -20
  73. data/ext/numru/math2_intrlib.c +2 -3
  74. data/ext/numru/math2_rnmlib.c +3 -4
  75. data/ext/numru/math2_shtlib.c +25 -26
  76. data/ext/numru/math2_vstlib.c +6 -7
  77. data/ext/numru/misc1_chnlib.c +3 -4
  78. data/ext/numru/misc1_datelib.c +27 -28
  79. data/ext/numru/misc1_fmtlib.c +1 -2
  80. data/ext/numru/misc1_misclib.c +2 -3
  81. data/ext/numru/misc1_randlib.c +4 -5
  82. data/ext/numru/misc1_timelib.c +11 -12
  83. data/ext/numru/misc2_tmpack.c +1200 -0
  84. data/lib/numru/dcl/dcl.rb +73 -1
  85. data/lib/numru/dcl/version.rb +1 -1
  86. data/ruby-dcl.gemspec +2 -2
  87. metadata +12 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6c18bb775677102c8c9e25f79d69766b5bb8a334
4
- data.tar.gz: 05da4fb56559848addc0e536d3e262ba89b92a1d
2
+ SHA256:
3
+ metadata.gz: 402649ddd30fb068a288654b41937e8cecd18be88cae88309fd52784a274f880
4
+ data.tar.gz: dcc1022d878e821b296ae57857896ad23b877e0573239c2ec3c48b40b6ce850d
5
5
  SHA512:
6
- metadata.gz: 2644e1621f8bb307b97af66f554c8e6c8877fdb4636c8cac1624f59d27b19d0de9efbebb2bd6081de864c36f2d0231c6871f9eaf90f62fb675cc4e880a5db0e7
7
- data.tar.gz: 08ddbcaf98b21426bd456d1d46383bcbdf61b1aa71b342d30c5c134d9c75f9de876c5e26286f9ec8cd75b5dc9c9fc5e87e5492c91cf7393f84ab6d3499b03bbf
6
+ metadata.gz: 49cb7bfbd8b444280dd899baa5687081c93a5742d4c6a17651491a86d711ad82e8c85758d25c2083a8968ba88ad79d286a0210c81594eb585c10efd6640c62c0
7
+ data.tar.gz: bf94400a1f4d6933d245a83f61643e98504c9e9a3a0d9c7f7b5c4f6c87eacf5c62da73e1137b28461023a57a18ebd2724dd569f5147d51a111b916bbd697d41c
data/ChangeLog CHANGED
@@ -1,4 +1,93 @@
1
- 2016-07-16 Takeshi Horinouchi (HEAD, master)
1
+ 2022-03-21 Takeshi Horinouchi (HEAD -> master, origin/master, origin/HEAD)
2
+ years updated.
3
+
4
+ M LICENSE.txt
5
+
6
+ 2022-03-20 OTOBE, Naohito (tag: v1.8.2)
7
+ Ver 1.8.2
8
+
9
+ M lib/numru/dcl/version.rb
10
+
11
+ 2022-02-03 Tsuyoshi Koshiro (origin/bindc)
12
+ Supported misc2/tmpack.
13
+
14
+ M GenWrapper/dcl_rb_heading
15
+ M GenWrapper/proto/Makefile
16
+ A GenWrapper/proto/misc2_tmpack.fp
17
+ A demo/misc2/tmpack/tmpk01.rb
18
+ A demo/misc2/tmpack/tmpk02.rb
19
+ A demo/misc2/tmpack/tmpk03.rb
20
+ M ext/numru/init.c.default
21
+
22
+ 2021-03-30 OTOBE, Naohito
23
+ [BUGFIX] merge header file libf2cdcl.h to cdcl.h : Demo upate
24
+
25
+ M GenWrapper/dcl_narrayed_funcs.rb
26
+ M GenWrapper/etc/p_header
27
+ M demo/gokuraku/jump/jump2.rb
28
+ M demo/grph2/uspack/uspk06.rb
29
+ M demo/rakuraku/kihon/kihon7.rb
30
+ M ext/numru/dcl_cary2obj.c
31
+ M ext/numru/dcl_obj2cary.c
32
+ M ext/numru/dcl_rubydcloriginal.c
33
+ M ext/numru/init.c.default
34
+
35
+ 2021-03-21 OTOBE, Naohito
36
+ [BUGFIX] + [demo modify] reported Koshir
37
+
38
+ M GenWrapper/dcl_narrayed_funcs.rb
39
+ M demo/grph1/sgpack/sgpk07.rb
40
+ M demo/grph2/udegpk/u2df03.rb
41
+ M demo/grph2/umpack/test04.rb
42
+ M demo/grph2/ximage/ximg01.rb
43
+ M demo/rakuraku/uspack/uspac1.rb
44
+ M demo/rakuraku/uspack/uspac3.rb
45
+
46
+ 2021-01-22 OTOBE, Naohito
47
+ BUGFIX narray.a -> libnatrray.a
48
+
49
+ M ext/numru/extconf.rb
50
+
51
+ 2021-01-22 OTOBE, Naohito
52
+ Add code for mingw wnvironment
53
+
54
+ M ext/numru/extconf.rb
55
+
56
+ 2021-01-21 OTOBE, Naohito
57
+ nul-separated glob pattern is deprecated
58
+
59
+ M ruby-dcl.gemspec
60
+
61
+ 2021-01-04 OTOBE, Naohito
62
+ Add USGI
63
+
64
+ M GenWrapper/proto/grph1_csgi.fp
65
+ M demo/grph1/sgpack/sgfont.rb
66
+ M demo/grph1/sgpack/sgfonz.rb
67
+ M demo/grph1/sgpack/sgpk07.rb
68
+ M demo/grph1/slpack/slpk04.rb
69
+ M demo/grph2/uspack/uspk08.rb
70
+ M demo/rakuraku/color/color2.rb
71
+ M demo/rakuraku/kihon/kihonb.rb
72
+
73
+ 2020-08-18 OTOBE, Naohito
74
+ Direct Call Fortran Function
75
+
76
+ M GenWrapper/dcl_narrayed_funcs.rb
77
+ M GenWrapper/etc/p_header
78
+ M GenWrapper/prototype.rb
79
+ M ext/numru/dcl_cary2obj.c
80
+ M ext/numru/dcl_obj2cary.c
81
+ M ext/numru/dcl_rubydcloriginal.c
82
+ M ext/numru/extconf.rb
83
+ M ext/numru/init.c.default
84
+
85
+ 2016-07-16 Takeshi Horinouchi (tag: v1.8.1)
86
+ To release ver. 1.8.1
87
+
88
+ A ChangeLog
89
+
90
+ 2016-07-16 Takeshi Horinouchi
2
91
  deleted explicit require statement for narray
3
92
 
4
93
  M demo/gokuraku/hop/hop.rb
@@ -225,7 +314,7 @@ To support numru-narray
225
314
 
226
315
  M ext/numru/extconf.rb
227
316
 
228
- 2016-06-22 Takeshi Horinouchi (tag: v1.8.0, origin/master, origin/HEAD)
317
+ 2016-06-22 Takeshi Horinouchi (tag: v1.8.0)
229
318
  To update to version 1.8.0
230
319
 
231
320
  M lib/numru/dcl/version.rb
@@ -400,16 +489,11 @@ A lib/numru/.keepme
400
489
  2015-03-30 Eriko Nishimoto
401
490
  Moved extension files to ext/numru
402
491
 
403
- D dcl_cary2obj.c
404
- D dcl_obj2cary.c
405
- D dcl_rubydcloriginal.c
406
- A ext/numru/dcl_cary2obj.c
407
- A ext/numru/dcl_obj2cary.c
408
- A ext/numru/dcl_rubydcloriginal.c
409
- A ext/numru/extconf.rb
410
- A ext/numru/init.c.default
411
- D extconf.rb
412
- D init.c.default
492
+ R100 dcl_cary2obj.c ext/numru/dcl_cary2obj.c
493
+ R100 dcl_obj2cary.c ext/numru/dcl_obj2cary.c
494
+ R100 dcl_rubydcloriginal.c ext/numru/dcl_rubydcloriginal.c
495
+ R100 extconf.rb ext/numru/extconf.rb
496
+ R100 init.c.default ext/numru/init.c.default
413
497
 
414
498
  2015-03-30 Eriko Nishimoto
415
499
  Added setting files for rubygems
@@ -421,8 +505,7 @@ A ruby-dcl.gemspec
421
505
  2015-03-30 Takeshi Horinouchi
422
506
  Renamed the current ChangeLog to back up.
423
507
 
424
- A .ChangeLog.until20150318
425
- D ChangeLog
508
+ R100 ChangeLog .ChangeLog.until20150318
426
509
 
427
510
  2015-03-30 Takeshi Horinouchi
428
511
  Registered files (patterns) to ignore in the repository
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  RubyDCL is copyrighted free software by Takeshi Horinouchi and
2
2
  GFD Dennou Club (http://www.gfd-dennou.org/).
3
3
 
4
- Copyright 2003-2016 (C) GFD Dennou Club
4
+ Copyright 2003-2022 (C) GFD Dennou Club
5
5
  (http://www.gfd-dennou.org/) All rights reserved.
6
6
 
7
7
  Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ DCL::grsvpt(0.2, 0.8, 0.2, 0.8)
40
40
  DCL::grstrn(4)
41
41
  DCL::grstrf
42
42
 
43
- DCL::ussttl('FREQUENCY', '/s', 'POWER', 'm|2"/s|2"')
43
+ DCL::ussttl('FREQUENCY', '/s', 'POWER', 'm\^2/s\^2')
44
44
  DCL::usdaxs
45
45
 
46
46
  DCL::uulin(x, y)
@@ -40,7 +40,7 @@ DCL::sgtxzv(0.5, 0.95, cttl, 0.03, 0, 0, 3)
40
40
  for i in 0..255
41
41
  ux=i/16+0.5
42
42
  uy=16-(i.divmod(16))[1]-0.5
43
- DCL::sgtxzu(ux, uy, DCL::csgi(i), 0.035, 0, 0, 3)
43
+ DCL::sgtxzu(ux, uy, DCL::usgi(i), 0.035, 0, 0, 3)
44
44
  ux=ux+0.48
45
45
  uy=uy+0.38
46
46
  ch = format("%3d", i)
@@ -39,7 +39,7 @@ for n in 1..2
39
39
  ux=i/16+0.5
40
40
  uy=16-(i.divmod(16))[1]-0.5
41
41
  if (!(i == 30 || i == 31))
42
- DCL::sgtxzu(ux, uy, DCL::csgi(i), 0.035, 0, 0, 3)
42
+ DCL::sgtxzu(ux, uy, DCL::usgi(i), 0.035, 0, 0, 3)
43
43
  end
44
44
  ux=ux+0.48
45
45
  uy=uy+0.38
@@ -30,15 +30,17 @@ end
30
30
  DCL::sglnv(xc, 0.05, xc, 0.95)
31
31
 
32
32
  #----------------------- SUPER/SUB SCRIPT ------------------------------
33
- DCL::sgtxv(xc, y[0], 'SGTXV|SUP"RST_SUB"')
33
+ DCL::sgtxv(xc, y[0], 'SGTXV\^{SUP}RST\_{SUB}')
34
34
 
35
35
  DCL::sgstxi(2)
36
36
  DCL::sglset('LCNTL', true) # <-- ź������ȥ�����ON
37
- DCL::sgtxv(xc, y[1], 'SGTXV|SUP"RST_SUB"')
37
+ DCL::sgtxv(xc, y[1], 'SGTXV\^{SUP}RST\_{SUB}')
38
38
 
39
39
  DCL::sgrset('SHIFT', 0.5) # <-- ���ե�������
40
40
  DCL::sgrset('SMALL', 0.5) # <-- ź�����礭������
41
- DCL::sgtxv(xc, y[2], 'SGTXV|SUP"RST_SUB"')
41
+ DCL::swlset('LSYSFNT', true)
42
+ DCL::sgtxv(xc, y[2], 'S\o-G\o~T\u-X\o~\u-V\^{SUP}RST\_{SUB}')
43
+ DCL::swlset('LSYSFNT', false)
42
44
 
43
45
  #------------------------ FONT SELECTION -------------------------------
44
46
  DCL::sgstxi(1)
@@ -52,13 +54,13 @@ DCL::sgstxi(3)
52
54
  DCL::sgtxv(xc, y[5], 'ABCDEFG abcdefg')
53
55
 
54
56
  #------------------------- GREEK LETTERS -------------------------------
55
- greek1 = [152,153,154,155,156,157,158,159,160,161].collect{|i| DCL::csgi(i)}.join
56
- greek2 = [130,131,135,138,141,143,145,148,150,151].collect{|i| DCL::csgi(i)}.join
57
+ greek1 = [152,153,154,155,156,157,158,159,160,161].collect{|i| DCL::usgi(i)}.join
58
+ greek2 = [130,131,135,138,141,143,145,148,150,151].collect{|i| DCL::usgi(i)}.join
57
59
  DCL::sgtxv(xc, y[6], greek1)
58
60
  DCL::sgtxv(xc, y[7], greek2)
59
61
 
60
62
  #----------------------------- SYMBOLS ---------------------------------
61
- symbol = [189,190,191,192,193,210,211,212,217,218].collect{|i| DCL::csgi(i)}.join
63
+ symbol = [189,190,191,192,193,210,211,212,217,218].collect{|i| DCL::usgi(i)}.join
62
64
  DCL::sgtxv(xc, y[8], symbol)
63
65
 
64
66
  DCL::sgcls
@@ -29,7 +29,7 @@ DCL::sgfrm
29
29
  DCL::sgswnd(-xmaxf/2.0, xmaxf/2.0, -ymaxf/2.0, ymaxf/2.0)
30
30
  DCL::sgstrf
31
31
  DCL::sgplu(x, y)
32
- DCL::sgtxzu(0.0, 0.0, "15cm #{DCL::csgi(194)} 15cm", 0.05, 0, 0, 3)
32
+ DCL::sgtxzu(0.0, 0.0, "15cm #{DCL::usgi(194)} 15cm", 0.05, 0, 0, 3)
33
33
 
34
34
  DCL::sgcls
35
35
 
@@ -71,9 +71,9 @@ DCL::uyaxlb('R', uy1, uy2, ch, nc)
71
71
  DCL::uysttl('L', 'LATITUDE', 0.0)
72
72
 
73
73
  DCL::uwsgxb(XMNZ, XMXZ, NXZ)
74
- DCL::uwsgya(uy1[(IYZ1-1)..-1])
74
+ DCL::uwsgya(uy1[(IYZ1-1)..(IYZ1-1+NYZ-1)])
75
75
 
76
- DCL::udcntr(p[(IXZ1-1)..-1,(IYZ1-1)..-1])
76
+ DCL::udcntr(p[(IXZ1-1)..(IXZ1-1+NXZ-1),(IYZ1-1)..(IYZ1-1+NYZ-1)])
77
77
 
78
78
  DCL::grcls
79
79
 
@@ -42,7 +42,7 @@ for i in 0..np-1
42
42
  DCL::sglset('LCLIP', true)
43
43
  DCL::slpwwr(1)
44
44
  DCL::slpvpr(1)
45
- cttl = DCL::sgtrnl(DCL::isgtrc(ctr[i]))
45
+ cttl=DCL::sgtrnl(DCL::isgtrc(ctr[i]))
46
46
  DCL::sgtxzr(0.5, 0.95, cttl, 0.03, 0, 0, 3)
47
47
 
48
48
  DCL::umpmap('coast_world')
@@ -0,0 +1,86 @@
1
+ #
2
+ # test05.rb
3
+ #
4
+ # $Id$
5
+ #
6
+
7
+ require "numru/dcl"
8
+
9
+ include NumRu
10
+ include Math
11
+
12
+
13
+ np = 14
14
+ nx = 73
15
+ ny = 37
16
+ xmin = 0
17
+ xmax = 360
18
+ ymin = -90
19
+ ymax = 90
20
+ p = NArray.new(Float, nx*ny)
21
+
22
+ #-- data ---
23
+ ctr = ['cyl','mer','mwd','hmr','ek6','ktd','con',
24
+ 'coa','coc','bon','otg','pst','azm','aza']
25
+ fct = NArray[0.12, 0.12, 0.14, 0.14, 0.14, 0.14, 0.11,
26
+ 0.16, 0.12, 0.12, 0.40, 0.12, 0.12, 0.17]
27
+
28
+ i = 0
29
+ File.foreach('t811231.dat') do |line|
30
+ line.split(" ").each do |data|
31
+ p[i] = data.to_f
32
+ i += 1
33
+ end
34
+ end
35
+ p.reshape!(nx, ny)
36
+
37
+ 190.step(245, 5) do |r|
38
+ amin=r
39
+ amax=r+5
40
+ # IDX=(R-180)*1.4*1000+999
41
+ idx=((r-170)*1.25).to_i*1000+999
42
+ DCL::uestlv(amin, amax, idx)
43
+ end
44
+
45
+ #-- graph ---
46
+ DCL::swpset('IWIDTH', 4000)
47
+ DCL::swpset('IHEIGHT', 2800)
48
+ iws = (ARGV[0] || (puts ' WORKSTATION ID (I) ? ;'; DCL::sgpwsn; gets)).to_i
49
+ DCL::sgopn iws
50
+
51
+ DCL::sglset('LSOFTF', false)
52
+ DCL::sgrset('STLAT1', 75.0)
53
+ DCL::sgrset('STLAT2', 60.0)
54
+ DCL::umlset('LGRIDMJ', false)
55
+ DCL::umrset('DGRIDMN', 30.0)
56
+
57
+ for i in 0..np-1
58
+ DCL::sgfrm
59
+ DCL::sgssim(fct[i], 0.0, 0.0)
60
+ DCL::sgsmpl(165.0, 60.0, 0.0)
61
+ DCL::sgsvpt(0.1, 0.9, 0.1, 0.9)
62
+ DCL::sgswnd(xmin, xmax, ymin, ymax)
63
+
64
+ if (ctr[i] == 'otg')
65
+ DCL::sgstxy(-180.0, 180.0, 0.0, 90.0)
66
+ else
67
+ DCL::sgstxy(-180.0, 180.0, -90.0, 90.0)
68
+ end
69
+ DCL::sgstrn(DCL::isgtrc(ctr[i]))
70
+ DCL::sgstrf
71
+
72
+ DCL::sglset('LCLIP', true)
73
+ DCL::slpwwr(1)
74
+ DCL::slpvpr(1)
75
+ cttl = DCL::sgtrnl(DCL::isgtrc(ctr[i]))
76
+ DCL::sgtxzr(0.5, 0.95, cttl, 0.03, 0, 0, 3)
77
+
78
+ DCL::uetone(p)
79
+ DCL::udcntr(p)
80
+ DCL::umpmap('coast_world')
81
+ DCL::umpglb
82
+ DCL::slpvpr(1)
83
+ end
84
+
85
+ DCL::sgcls
86
+
@@ -35,7 +35,7 @@ DCL::gropn iws
35
35
 
36
36
  DCL::grfrm
37
37
 
38
- DCL::ussttl('TIME', 'SEC', 'HEAT FLUX', 'W/m|2"')
38
+ DCL::ussttl('TIME', 'SEC', 'HEAT FLUX', 'W/m\^2')
39
39
  DCL::usgrph(t, a)
40
40
 
41
41
  DCL::grcls
@@ -38,7 +38,7 @@ DCL::uscset('CYSPOS', 'B')
38
38
  DCL::uscset('CXSIDE', 'T')
39
39
  DCL::uscset('CYSIDE', 'L')
40
40
 
41
- DCL::ussttl('TEMPERATURE', 'C|'+ DCL::csgi(4) + '"', 'DEPTH', 'm')
41
+ DCL::ussttl('TEMPERATURE', '\^'+ DCL::usgi(228) + 'C', 'DEPTH', 'm')
42
42
  DCL::usgrph(t, z)
43
43
 
44
44
  DCL::grcls
@@ -80,7 +80,7 @@ tlevn.indgen(203.0, 3.0)
80
80
  cdsn = 'tomsclm.dat'
81
81
  file = open(cdsn, "r")
82
82
 
83
- DCL::swlstx('LWAIT', false)
83
+ DCL::swlstx('LWAIT', true)
84
84
  DCL::swlstx('LWAIT0', false)
85
85
  DCL::swlstx('LDUMP', false)
86
86
  DCL::swistx('IPOSX', 200)
@@ -0,0 +1,46 @@
1
+ #
2
+ # tmpk01.rb
3
+ #
4
+
5
+ require "numru/dcl"
6
+
7
+ include NumRu
8
+ include Math
9
+
10
+ nx = 101
11
+ ny = 101
12
+ thres = 1
13
+
14
+ dx = 6.2832/(nx - 1).to_f
15
+ dy = 6.2832/(ny - 1).to_f
16
+ arrow_thres = 1.0
17
+
18
+ skip = (ARGV[0] || (puts ' SKIP NUM (I) ? ;'; gets)).to_i
19
+
20
+ x = NArray.sfloat(nx).indgen*dx
21
+ y = NArray.sfloat(ny).indgen*dy
22
+
23
+ u = NArray.sfloat(nx,ny)
24
+ v = NArray.sfloat(nx,ny)
25
+
26
+ ny.times do |j|
27
+ nx.times do |i|
28
+ u[i,j] = -cos(y[j])
29
+ v[i,j] = cos(x[i])
30
+ end
31
+ end
32
+
33
+ iws = (ARGV[1] || (puts ' WORKSTATION ID (I) ? ;'; DCL::sgpwsn; gets)).to_i
34
+ DCL::gropn iws
35
+
36
+ DCL::grfrm
37
+ DCL::grswnd(x[0], x[nx-1], y[0], y[ny-1])
38
+ DCL::uspfit
39
+ DCL::grstrf
40
+ DCL::usdaxs
41
+
42
+ DCL::tmiset('SKIPINTV', skip)
43
+ DCL::tmstlc(x, y, u, v)
44
+
45
+ DCL::grcls
46
+
@@ -0,0 +1,58 @@
1
+ #
2
+ # tmpk02.rb
3
+ #
4
+
5
+ require "numru/dcl"
6
+
7
+ include NumRu
8
+ include Math
9
+
10
+ nx = 101
11
+ ny = 101
12
+ thres = 1
13
+
14
+ dx = 6.2832/(nx - 1).to_f
15
+ dy = 6.2832/(ny - 1).to_f
16
+ dyt = 360.0/(ny - 1).to_f
17
+ arrow_thres = 1.0
18
+
19
+ skip = (ARGV[0] || (puts ' SKIP NUM (I) ? ;'; gets)).to_i
20
+
21
+ x = NArray.sfloat(nx).indgen*dx
22
+ y = (NArray.sfloat(ny).indgen - ny/2)*dy
23
+ yt = (NArray.sfloat(ny).indgen - ny/2)*dyt
24
+ xt = NArray.sfloat(ny).fill(x[nx-1])
25
+
26
+ u = NArray.sfloat(nx,ny)
27
+ v = NArray.sfloat(nx,ny)
28
+
29
+ ny.times do |j|
30
+ nx.times do |i|
31
+ u[i,j] = -cos(y[j])
32
+ v[i,j] = cos(x[i])
33
+ end
34
+ end
35
+
36
+ iws = (ARGV[1] || (puts ' WORKSTATION ID (I) ? ;'; DCL::sgpwsn; gets)).to_i
37
+ DCL::gropn iws
38
+
39
+ DCL::grfrm
40
+ DCL::grswnd(x[0], x[nx-1], yt[0], yt[ny-1])
41
+ DCL::grsvpt(0.2, 0.8, 0.2, 0.8)
42
+ DCL::grssim(0.5*0.6/x[nx-1], 0.0, 0.0)
43
+ DCL::grstrn(5)
44
+ DCL::grstrf
45
+ DCL::uzrset('UYUSER', 0.0)
46
+ DCL::uxpaxs('U', 1)
47
+ DCL::uzrset('UYUSER', -180.0)
48
+ DCL::uxpaxs('U', 1)
49
+
50
+ DCL::tmiset('SKIPINTV', skip)
51
+ DCL::tmlset('PERIODY', true)
52
+ DCL::tmlset('NODRSHRT', true)
53
+ DCL::tmstla(x, yt, u, v)
54
+
55
+ DCL::uulin(xt, yt)
56
+
57
+ DCL::grcls
58
+
@@ -0,0 +1,56 @@
1
+ #
2
+ # tmpk03.rb
3
+ #
4
+
5
+ require "numru/dcl"
6
+
7
+ include NumRu
8
+ include Math
9
+
10
+ nx = 101
11
+ ny = 101
12
+ thres = 1
13
+
14
+ dx = 6.2832/(nx - 1).to_f
15
+ dy = 1.57079/(ny - 1).to_f
16
+ dxt = 360.0/(ny - 1).to_f
17
+ dyt = 90.0/(ny - 1).to_f
18
+ arrow_thres = 1.0
19
+
20
+ skip = (ARGV[0] || (puts ' SKIP NUM (I) ? ;'; gets)).to_i
21
+
22
+ x = NArray.sfloat(nx).indgen*dx
23
+ y = (NArray.sfloat(ny).indgen - ny/2)*dy
24
+ xt = NArray.sfloat(nx).indgen*dxt
25
+ yt = (NArray.sfloat(ny).indgen - ny/2)*dyt
26
+
27
+ puts("Y, YT #{y[0]} #{y[ny-1]} #{yt[0]} #{yt[ny-1]}")
28
+
29
+ u = NArray.sfloat(nx,ny)
30
+ v = NArray.sfloat(nx,ny)
31
+
32
+ ny.times do |j|
33
+ nx.times do |i|
34
+ u[i,j] = -cos(y[j])
35
+ v[i,j] = cos(x[i])
36
+ end
37
+ end
38
+
39
+ iws = (ARGV[1] || (puts ' WORKSTATION ID (I) ? ;'; DCL::sgpwsn; gets)).to_i
40
+ DCL::gropn iws
41
+
42
+ DCL::grfrm
43
+ DCL::grswnd(xt[0], xt[nx-1], yt[0], yt[ny-1])
44
+ DCL::grsvpt(0.05, 0.95, 0.1, 0.9)
45
+ DCL::sgstrn(10)
46
+ DCL::umpfit
47
+ DCL::grstrf
48
+
49
+ DCL::umpmap('coast_world')
50
+ DCL::umpglb
51
+
52
+ DCL::tmlset('PERIODX', true)
53
+ DCL::tmiset('SKIPINTV', skip)
54
+ DCL::tmstls(xt, yt, u, v)
55
+
56
+ DCL::grcls
@@ -20,8 +20,9 @@ y[0] = 0.5
20
20
  for n in 0..nmax-1
21
21
  y[n+1] = r*y[n]*(1.0-y[n])
22
22
  end
23
- yave = DCL::rave(y, nmax+1, 1)
24
- y = -4 * (y - yave)
23
+
24
+ yave=DCL::rave(y,nmax+1,1)
25
+ y = -4 * (y - yave)
25
26
 
26
27
  #-- graph ---
27
28
  iws = (ARGV[0] || (puts ' WORKSTATION ID (I) ? ;'; DCL::sgpwsn; gets)).to_i
@@ -45,7 +46,7 @@ DCL::uxsttl('B', 'YEAR', 0.0)
45
46
 
46
47
  DCL::uyaxdv('L', 0.1, 0.5)
47
48
  DCL::uyaxdv('R', 0.1, 0.5)
48
- cttl = DCL::csgi(131) + 'T [K]'
49
+ cttl = DCL::usgi(131) + 'T [K]'
49
50
  DCL::uysttl('L', cttl, 0.0)
50
51
 
51
52
  DCL::uxmttl('T', 'INTERANNUAL VARIATION', 0.0)
@@ -12,6 +12,8 @@ def aplot
12
12
  nmax = 40
13
13
  x = NArray.sfloat(nmax+1)
14
14
  y = NArray.sfloat(nmax+1)
15
+ xx = NArray.sfloat(4)
16
+ yy = NArray.sfloat(4)
15
17
 
16
18
  DCL::slpvpr(1)
17
19
 
@@ -27,11 +29,15 @@ def aplot
27
29
  #-- triangle ----
28
30
  dt = 2.0*PI/3
29
31
  for n in 0..3
30
- x[n] = 40.0*sin(n*dt)
31
- y[n] = 40.0*cos(n*dt)
32
+ xx[n] = 40.0*sin(n*dt)
33
+ yy[n] = 40.0*cos(n*dt)
32
34
  end
33
35
 
34
- DCL::sgplu(x, y)
36
+ DCL::sgplu(xx, yy)
37
+
38
+ p "OTB:"
39
+ p xx
40
+ p yy
35
41
 
36
42
  #-- string ----
37
43
  DCL::sgtxu(0.0, 0.0, 'SGTXU')
@@ -31,15 +31,17 @@ end
31
31
  DCL::sglnv(xc, 0.05, xc, 0.95)
32
32
 
33
33
  #-- �ǥե���� ----
34
- DCL::sgtxv(xc, y[0], 'SGTXV|SUP"RST_SUB"')
34
+ DCL::sgtxv(xc, y[0], 'SGTXV\^{SUP}RST\_{SUB}')
35
35
 
36
36
  #-- ź�� ----
37
37
  DCL::sglset('LCNTL', true)
38
- DCL::sgtxv(xc, y[1], 'SGTXV|SUP"RST_SUB"')
38
+ DCL::sgtxv(xc, y[1], 'SSGTXV\^{SUP}RST\_{SUB}')
39
39
 
40
40
  DCL::sgrset('SMALL', 0.5)
41
41
  DCL::sgrset('SHIFT', 0.5)
42
- DCL::sgtxv(xc, y[2], 'SGTXV|SUP"RST_SUB"')
42
+ DCL::swlset('LSYSFNT', true)
43
+ DCL::sgtxv(xc, y[2], 'S\o-G\o~T\u-X\o~\u-V\^{SUP}RST\_{SUB}')
44
+ DCL::swlset('LSYSFNT', false)
43
45
 
44
46
  #-- �ե���� ----
45
47
  DCL::sgtxv(xc, y[3], 'ABCDEFG abcdefg')
@@ -54,17 +56,17 @@ DCL::sgiset('IFONT', 1)
54
56
  DCL::sgstxi(1)
55
57
 
56
58
  #-- ���ꥷ��ʸ�� ----
57
- greek1 = DCL::csgi(128) + DCL::csgi(129) + DCL::csgi(130) + DCL::csgi(131) + DCL::csgi(132) +
58
- DCL::csgi(133) + DCL::csgi(134) + DCL::csgi(135) + DCL::csgi(136) + DCL::csgi(137)
59
- greek2 = DCL::csgi(152) + DCL::csgi(153) + DCL::csgi(154) + DCL::csgi(155) + DCL::csgi(156) +
60
- DCL::csgi(157) + DCL::csgi(158) + DCL::csgi(159) + DCL::csgi(160) + DCL::csgi(161)
59
+ greek1 = DCL::usgi(128) + DCL::usgi(129) + DCL::usgi(130) + DCL::usgi(131) + DCL::usgi(132) +
60
+ DCL::usgi(133) + DCL::usgi(134) + DCL::usgi(135) + DCL::usgi(136) + DCL::usgi(137)
61
+ greek2 = DCL::usgi(152) + DCL::usgi(153) + DCL::usgi(154) + DCL::usgi(155) + DCL::usgi(156) +
62
+ DCL::usgi(157) + DCL::usgi(158) + DCL::usgi(159) + DCL::usgi(160) + DCL::usgi(161)
61
63
 
62
64
  DCL::sgtxv(xc, y[6], greek1)
63
65
  DCL::sgtxv(xc, y[7], greek2)
64
66
 
65
67
  #-- �ü쵭�� ----
66
- symbol = DCL::csgi(189) + DCL::csgi(190) + DCL::csgi(191) + DCL::csgi(192) + DCL::csgi(193) +
67
- DCL::csgi(210) + DCL::csgi(211) + DCL::csgi(212) + DCL::csgi(217) + DCL::csgi(218)
68
+ symbol = DCL::usgi(189) + DCL::usgi(190) + DCL::usgi(191) + DCL::usgi(192) + DCL::usgi(193) +
69
+ DCL::usgi(210) + DCL::usgi(211) + DCL::usgi(212) + DCL::usgi(217) + DCL::usgi(218)
68
70
 
69
71
  DCL::sgtxv(xc, y[8], symbol)
70
72
 
@@ -27,7 +27,7 @@ DCL::gropn iws
27
27
 
28
28
  DCL::grfrm
29
29
 
30
- DCL::ussttl('TIME', 'YEAR', 'HEAT FLUX', 'W/m|2"')
30
+ DCL::ussttl('TIME', 'YEAR', 'HEAT FLUX', 'W/m\^2')
31
31
  DCL::usgrph(x, y)
32
32
 
33
33
  DCL::grcls
@@ -29,7 +29,7 @@ DCL::grfrm
29
29
 
30
30
  rundef = DCL::glrget('RUNDEF')
31
31
  DCL::grswnd(xmin, xmax, rundef, rundef)
32
- DCL::ussttl('TIME', 'YEAR', 'HEAT FLUX', 'W/m|2"')
32
+ DCL::ussttl('TIME', 'YEAR', 'HEAT FLUX', 'W/m\^2')
33
33
  DCL::usgrph(rundef, y)
34
34
 
35
35
  DCL::grcls
@@ -5,7 +5,7 @@
5
5
 
6
6
  #include <math.h>
7
7
  #include "ruby.h"
8
- #include "libtinyf2c.h"
8
+ #include "cdcl.h"
9
9
  #include "narray.h" /* kuro: depend on numarray.so */
10
10
 
11
11
  #ifndef NARRAY_BIGMEM