gs2crmod 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
- gem "coderunner", ">= 0.13.13"
4
+ gem "coderunner", ">= 0.13.29"
5
5
  gem "rubyhacks", ">= 0.1.2"
6
6
  # It seems necessary to have the following line un-commented on some systems but commented out on other systems:
7
7
  gem "ruby-netcdf", ">= 0.6.6.1"
data/Rakefile CHANGED
@@ -53,6 +53,11 @@ Rake::TestTask.new(:sync_variables) do |test|
53
53
  test.pattern = 'sync_variables/sync_variables.rb'
54
54
  test.verbose = true
55
55
  end
56
+ Rake::TestTask.new(:sync_mediawiki) do |test|
57
+ test.libs << 'lib' << 'sync_mediawiki'
58
+ test.pattern = 'sync_mediawiki/sync_mediawiki.rb'
59
+ test.verbose = true
60
+ end
56
61
 
57
62
  # make the :test task depend on the shared
58
63
  # object, so it will be built automatically
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.11.1
data/gs2crmod.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gs2crmod"
8
- s.version = "0.11.0"
8
+ s.version = "0.11.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Edmund Highcock", "Ferdinand van Wyk"]
@@ -65,6 +65,8 @@ Gem::Specification.new do |s|
65
65
  "lib/gs2crmod/spectrogk/namelists.rb",
66
66
  "lib/gs2crmod/test_gs2.rb",
67
67
  "lib/gs2crmod_extension.rb",
68
+ "sync_mediawiki/helper.rb",
69
+ "sync_mediawiki/sync_mediawiki.rb",
68
70
  "sync_variables/helper.rb",
69
71
  "sync_variables/sync_variables.rb",
70
72
  "test/agk_slab_itg_low_kperp.in",
@@ -86,7 +88,7 @@ Gem::Specification.new do |s|
86
88
  s.specification_version = 3
87
89
 
88
90
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
89
- s.add_runtime_dependency(%q<coderunner>, [">= 0.13.13"])
91
+ s.add_runtime_dependency(%q<coderunner>, [">= 0.13.29"])
90
92
  s.add_runtime_dependency(%q<rubyhacks>, [">= 0.1.2"])
91
93
  s.add_runtime_dependency(%q<ruby-netcdf>, [">= 0.6.6.1"])
92
94
  s.add_development_dependency(%q<shoulda>, [">= 0"])
@@ -94,7 +96,7 @@ Gem::Specification.new do |s|
94
96
  s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
95
97
  s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
96
98
  else
97
- s.add_dependency(%q<coderunner>, [">= 0.13.13"])
99
+ s.add_dependency(%q<coderunner>, [">= 0.13.29"])
98
100
  s.add_dependency(%q<rubyhacks>, [">= 0.1.2"])
99
101
  s.add_dependency(%q<ruby-netcdf>, [">= 0.6.6.1"])
100
102
  s.add_dependency(%q<shoulda>, [">= 0"])
@@ -103,7 +105,7 @@ Gem::Specification.new do |s|
103
105
  s.add_dependency(%q<jeweler>, [">= 1.8.4"])
104
106
  end
105
107
  else
106
- s.add_dependency(%q<coderunner>, [">= 0.13.13"])
108
+ s.add_dependency(%q<coderunner>, [">= 0.13.29"])
107
109
  s.add_dependency(%q<rubyhacks>, [">= 0.1.2"])
108
110
  s.add_dependency(%q<ruby-netcdf>, [">= 0.6.6.1"])
109
111
  s.add_dependency(%q<shoulda>, [">= 0"])
@@ -4,7 +4,7 @@
4
4
  :variables=>
5
5
  {:beta=>
6
6
  {:help=>
7
- "In GS2 <math>\\beta</math> is the ratio of the reference pressure to the reference magnetic energy density, <math>\\beta = 2 \\mu_0 n_{\\rm ref} T_{\\rm ref}/B_{\\rm ref}^2 </math>. Mainly GS2 uses <math>\\beta</math> to determine the amplitude of the perturbed magnetic fields. \n**For electromagnetic runs, the contribution of each species to the total parallel current is weighted by a factor of <math>w_s = 2 \\beta Z_s n_s \\sqrt{T_s/m_s}</math>.\n**For electromagnetic runs that include <math>\\delta B_\\parallel</math>, this field is proportional to <math>\\beta</math>.\n**The contribution of <math>(\\delta B)^2</math> to the total gyrokinetic energy is inversely proportional to this input parameter.\n**If an antenna is set up to drive Alfven waves, then <math>\\beta</math> is used to calculate the Alfven frequency. \n**For some collision operator models, <math>\\beta</math> is used to calculate the resistivity. \n**For some rarely-used initial conditions, <math>\\beta</math> appears explicitly. \n**Important: <math>\\beta</math> is not a GS2 plasma equilibrium parameter, but it must be chosen with care. <math>\\beta</math> is '''not''' automatically consistent with the value of <math>\\beta'</math> used in the local magnetic equilibrium. The user is responsible for ensuring that the values of <math> \\beta </math> together with the densities, temperatures and gradients for all species are consistent with the local equilibrium value of <math>\\beta'</math>.",
7
+ "In GS2 <math>\\beta</math> is the ratio of the reference pressure to the reference magnetic energy density, <math>\\beta = 2 \\mu_0 n_{\\rm ref} T_{\\rm ref}/B_{\\rm ref}^2 </math>. Mainly GS2 uses <math>\\beta</math> to determine the amplitude of the perturbed magnetic fields. \n**For electromagnetic runs, the contribution of each species to the total parallel current is weighted by a factor of <math>w_s = 2 \\beta Z_s n_s \\sqrt{T_s/m_s}</math>.\n**Handy formula: 403. * nref_19 * T_ref(kev) / 1.e5 / B_T**2, where nref_19 is the reference density / 10**19 and B_T is the magnetic field in Tesla.\n**For electromagnetic runs that include <math>\\delta B_\\parallel</math>, this field is proportional to <math>\\beta</math>.\n**The contribution of <math>(\\delta B)^2</math> to the total gyrokinetic energy is inversely proportional to this input parameter.\n**If an antenna is set up to drive Alfven waves, then <math>\\beta</math> is used to calculate the Alfven frequency. \n**For some collision operator models, <math>\\beta</math> is used to calculate the resistivity. \n**For some rarely-used initial conditions, <math>\\beta</math> appears explicitly. \n**Important: <math>\\beta</math> is not a GS2 plasma equilibrium parameter, but it must be chosen with care. <math>\\beta</math> is '''not''' automatically consistent with the value of <math>\\beta'</math> used in the local magnetic equilibrium. The user is responsible for ensuring that the values of <math> \\beta </math> together with the densities, temperatures and gradients for all species are consistent with the local equilibrium value of <math>\\beta'</math>.",
8
8
  :should_include=>"true",
9
9
  :description=>
10
10
  "Ratio of particle to magnetic pressure (reference Beta, not total beta): beta=n_0 T_0 /( B^2 / (8 pi))",
@@ -73,7 +73,8 @@
73
73
  :rhostar=>
74
74
  {:should_include=>"true",
75
75
  :description=>"Rhostar, for low flow terms.",
76
- :help=>"Rhostar, for low flow terms.",
76
+ :help=>
77
+ "Normalised gyro-radius, <math>\\frac{\\rho}{a}</math>, needed for calculating the momentum flux in the low flow limit.",
77
78
  :code_name=>:rhostar,
78
79
  :must_pass=>
79
80
  [{:test=>"kind_of? Numeric",
@@ -138,7 +139,7 @@
138
139
  :module=>:kt_grids_specified},
139
140
  :jtwist=>
140
141
  {:help=>
141
- "For finite magnetic shear, determines box size in x direction according to \n** <math>L_x = L_y jtwist / (2 \\pi \\hat{s}) </math>\n** Also affects the number of \"connections\" at each ky when linked boundary conditions are selected in the dist_fn_knobs namelist.",
142
+ "For finite magnetic shear, determines box size in x direction according to \n** <math>L_x = L_y jtwist / (2 \\pi \\hat{s}) </math>\n** Also affects the number of \"connections\" at each ky when linked boundary conditions are selected in the dist_fn_knobs namelist. \n** Internally initialised to <math>jtwist=MAX(Int[2\\pi\\hat{s}+0.5],1)</math> such that <math>L_x \\sim L_y</math> except for very small shear (<math>\\hat{s}<\\sim 0.16</math>).",
142
143
  :should_include=>"true",
143
144
  :description=>"L_x = L_y jtwist / (2 pi shat)",
144
145
  :tests=>["Tst::INT"],
@@ -150,7 +151,7 @@
150
151
  :module=>:kt_grids_box},
151
152
  :y0=>
152
153
  {:help=>
153
- "The length of the box in the y direction (measured in the Larmour radius of species 1). Box size in y direction is 2*pi*y0.",
154
+ "The length of the box in the y direction (measured in the Larmour radius of species 1). Box size in y direction is 2*pi*y0. \n**Note if <math>y0<0</math> then replaced with <math>-1/y0</math> so effectively setting the minimum wavelength captured by the box (related to [[aky_min]]).",
154
155
  :should_include=>"true",
155
156
  :description=>
156
157
  "The length of the box in the y direction (measured in the Larmour radius of species 1)",
@@ -244,7 +245,30 @@
244
245
  :autoscanned_defaults=>[0],
245
246
  :type=>:Integer,
246
247
  :code_name=>:nkpolar,
247
- :module=>:kt_grids_box}}},
248
+ :module=>:kt_grids_box},
249
+ :n0=>
250
+ {:should_include=>"true",
251
+ :description=>
252
+ "if (rhostar_box .gt. 0.0 .and. n0 .gt. 0) y0=1.0/(n0*rhostar_box*drhodpsi)",
253
+ :help=>
254
+ "Number of toroidal mode numbers: if set, overrides y0... y0=1.0/(n0*rhostar_box*drhodpsi)",
255
+ :code_name=>:n0,
256
+ :must_pass=>
257
+ [{:test=>"kind_of? Integer",
258
+ :explanation=>"This variable must be an integer."}],
259
+ :type=>:Integer},
260
+ :rhostar_box=>
261
+ {:should_include=>"true",
262
+ :description=>
263
+ "if (rhostar_box .gt. 0.0 .and. n0 .gt. 0) y0=1.0/(n0*rhostar_box*drhodpsi)",
264
+ :help=>
265
+ "If rhostar_box and n0 are set then y0=1.0/(n0*rhostar_box*drhodpsi)",
266
+ :code_name=>:rhostar_box,
267
+ :must_pass=>
268
+ [{:test=>"kind_of? Numeric",
269
+ :explanation=>
270
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
271
+ :type=>:Float}}},
248
272
  :kt_grids_single_parameters=>
249
273
  {:description=>"",
250
274
  :should_include=>"@grid_option=='single'",
@@ -289,14 +313,35 @@
289
313
  :autoscanned_defaults=>[0.0],
290
314
  :type=>:Float,
291
315
  :code_name=>:akx,
292
- :module=>:kt_grids_single}}},
316
+ :module=>:kt_grids_single},
317
+ :n0=>
318
+ {:should_include=>"true",
319
+ :description=>"Overrides aky: aky=n0*drhodpsi*rhostar_single",
320
+ :help=>
321
+ "if n0>0 use toroidal mode number to override aky and set aky=n0*drhodpsi*rhostar_single",
322
+ :code_name=>:n0,
323
+ :must_pass=>
324
+ [{:test=>"kind_of? Integer",
325
+ :explanation=>"This variable must be an integer."}],
326
+ :type=>:Integer},
327
+ :rhostar_single=>
328
+ {:should_include=>"true",
329
+ :description=>"If n0>0 aky=n0*drhodpsi*rhostar_single",
330
+ :help=>
331
+ "Used in conjunction with n0: aky=n0*drhodpsi*rhostar_single (if n0 is set).",
332
+ :code_name=>:rhostar_single,
333
+ :must_pass=>
334
+ [{:test=>"kind_of? Numeric",
335
+ :explanation=>
336
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
337
+ :type=>:Float}}},
293
338
  :theta_grid_parameters=>
294
339
  {:description=>"",
295
340
  :should_include=>"true",
296
341
  :variables=>
297
342
  {:ntheta=>
298
343
  {:help=>
299
- "Number of grid points along equilibrium magnetic field between <math>\\theta=(-\\pi,\\pi)</math> (in addition to a grid point at <math>\\theta=0</math>).\n** Ignored in some cases",
344
+ "Number of grid points along equilibrium magnetic field between <math>\\theta=(-\\pi,\\pi)</math> (in addition to a grid point at <math>\\theta=0</math>).\n** Ignored in some cases (when using numerical equilibria)",
300
345
  :should_include=>"true",
301
346
  :description=>
302
347
  "Number of points along field line (theta) per 2 pi segment",
@@ -335,7 +380,7 @@
335
380
  :module=>:theta_grid_gridgen},
336
381
  :epsl=>
337
382
  {:help=>
338
- "Sets curvature drift in simple geometric models. <math>\\epsilon_\\ell = 2 a / R </math>, where a is the GS2 normalisation length and R is the major radius at the centre of the flux surface.",
383
+ "<math>\\epsilon_\\ell = \\frac{2 L_{ref}}{ R} </math> Sets curvature drift in s-alpha model, where <math>L_{ref}</math> is the GS2 equilibrium reference normalisation length and R is the major radius at the centre of the flux surface.",
339
384
  :should_include=>"true",
340
385
  :description=>"epsl=2 a/R",
341
386
  :tests=>["Tst::FLOAT"],
@@ -361,7 +406,7 @@
361
406
  :module=>:theta_grid_params},
362
407
  :pk=>
363
408
  {:help=>
364
- "<math>p_k = 2 a / q R</math> - when using high aspect ratio, <math>s-\\alpha</math> model for geometry it sets q, the magnetic safety factor, since the ratio 2a/R is set by epsl. It therefore also sets the connection length, i.e. the length of the box in the parallel direction, in terms of a, the GS2 normalization quantity.",
409
+ "<math>p_k = \\frac{epsl}{q} = \\frac{2 L_{ref}}{ q R} </math> Sets q, the magnetic safety factor, and therefore also sets the connection length, i.e. the length of the box in the parallel direction, in terms of <math>L_{ref}</math>. Used only in high aspect ratio <math>s-\\alpha</math> equilibrium model.",
365
410
  :should_include=>"true",
366
411
  :description=>"pk = 2 a / q R",
367
412
  :tests=>["Tst::FLOAT"],
@@ -374,7 +419,7 @@
374
419
  :module=>:theta_grid_gridgen},
375
420
  :kp=>
376
421
  {:help=>
377
- "If kp > 0 then pk = 2*kp. Set kp rather than pk in the slab. Since in the slab limit, shat = 2a/ (L_S pk), this means that if kp = 1, shat = a/ L_S, where L_S is the magnetic shear scale length.\n\nSets parallel box length when geometry is unsheared slab. <math>k_p = 2 \\pi /L_z</math>.",
422
+ "kp sets parallel wavenumber and box length in slab geometry. <math>k_p = \\frac{2 \\pi L_{ref}}{L_z}</math>. \n** always use kp instead of pk in slab geometry (if kp > 0 then gs2 sets pk = 2*kp) \n** in slab limit <math> shat = \\frac{L_z}{2 \\pi L_s} = \\frac{L_{ref}}{k_p L_s}</math> : nb if kp = 1, <math> shat = \\frac{L_{ref}}{L_s}</math>, where L_s is the magnetic shear scale length.",
378
423
  :should_include=>"true",
379
424
  :description=>"if kp >0 then pk = 2*kp",
380
425
  :tests=>["Tst::FLOAT"],
@@ -468,7 +513,7 @@
468
513
  :module=>:theta_grid_params},
469
514
  :shift=>
470
515
  {:help=>
471
- "Related to Shafranov shift. Sign depends on geometric model. ?? Exact definition uncertain... please edit if you know! ?? Could be\n** <math>shift = -R q**2 d\\beta/d\\rho (>0) </math> ??\n** dR/drho (R normalized to a) (< 0) ??",
516
+ "shift is related to the derivative of the Shafranov shift, but it has different definitions in the s-alpha and Miller equilbrium models: \n** In s-alpha: <math>shift = -\\frac{2epsl}{pk^2}\\frac{d\\beta}{d\\rho}=-\\frac{q^2R}{L_{ref}}\\frac{d\\beta}{d\\rho} > 0 </math> \n** In Miller: <math>shift = \\frac{1}{L_{ref}} \\frac{dR}{d\\rho} < 0 </math>",
472
517
  :should_include=>"true",
473
518
  :description=>"shift = -R q**2 dbeta/drho (>0)",
474
519
  :tests=>["Tst::FLOAT"],
@@ -565,7 +610,7 @@
565
610
  :variables=>
566
611
  {:equilibrium_option=>
567
612
  {:help=>
568
- "The equilibrium_option variable controls which geometric assumptions are used in the run. Additional namelists determine the geometric parameters according to the choice made here. Allowed values are:\n** 'eik' Use routines from the geometry module, controlled mainly by the subsidiary namelists theta_grid_parameters and theta_grid_eik_knob.\n** 'default' Same as 'eik' \n** 's-alpha' Use high aspect-ratio toroidal equilbrium (which can be simplified to slab or cylinder), controlled by the subsidiary namelist theta_grid_parameters and theta_grid_salpha_knob\n** 'file' Use output from rungridgen code directly. Controlled by theta_grid_file_knobs. Note: in this case, the variables nperiod and ntheta (from the theta_grid_parameters namelist) are ignored.\n** 'grid.out' Same as 'file'",
613
+ "The equilibrium_option variable controls which geometric assumptions are used in the run. Additional namelists determine the geometric parameters according to the choice made here. Allowed values are:\n** 'eik' Use routines from the geometry module, controlled mainly by the subsidiary namelists theta_grid_parameters and theta_grid_eik_knob. This includes options for Miller as well as a range of different numerical equilibrium file formats.\n** 'default' Same as 'eik' \n** 's-alpha' Use high aspect-ratio toroidal equilbrium (which can be simplified to slab or cylinder), controlled by the subsidiary namelist theta_grid_parameters and theta_grid_salpha_knob\n** 'file' Use output from rungridgen code directly. Controlled by theta_grid_file_knobs. Note: in this case, the variables nperiod and ntheta (from the theta_grid_parameters namelist) are ignored.\n** 'grid.out' Same as 'file'",
569
614
  :should_include=>"true",
570
615
  :description=>
571
616
  "Controls which geometric assumptions are used in the run.",
@@ -580,7 +625,8 @@
580
625
  :gb_to_cv=>
581
626
  {:should_include=>"true",
582
627
  :description=>nil,
583
- :help=>nil,
628
+ :help=>
629
+ "If true then force grad-B drift to be equal to curvature drift. This is not recommended when fbpar<math>\\neq</math>0.",
584
630
  :tests=>["Tst::FORTRAN_BOOL"],
585
631
  :gs2_name=>:gb_to_cv,
586
632
  :must_pass=>
@@ -597,9 +643,9 @@
597
643
  :variables=>
598
644
  {:model_option=>
599
645
  {:help=>
600
- " \n** 's-alpha' High aspect ratio toroidal equilibrium. (Note that the curvature and grad-B drifts are equal.)\n** 'default' Same as 's-alpha'\n**\n'alpha1','rogers','b2','normal_only',const-curv',no-curvature': See output of ingen until this page is improved.\n",
646
+ "Sets the particular model for the magnetic field and related drifts.\n** 's-alpha' High aspect ratio toroidal equilibrium. (Note that the curvature and grad-B drifts are equal.)\n** 'default' Same as 's-alpha'\n**'alpha1','rogers','b2','normal_only',const-curv',no-curvature': See output of ingen (or contents of theta_grid.f90) until this page is improved.",
601
647
  :should_include=>"true",
602
- :description=>nil,
648
+ :description=>"",
603
649
  :tests=>["Tst::STRING"],
604
650
  :autoscanned_defaults=>["default"],
605
651
  :must_pass=>
@@ -618,8 +664,9 @@
618
664
  :module=>:theta_grid_salpha},
619
665
  :alpmhdfac=>
620
666
  {:should_include=>"true",
621
- :description=>nil,
622
- :help=>" \n",
667
+ :description=>"",
668
+ :help=>
669
+ "Used in conjunction with [[alpmhd]] of [[theta_grid_parameters]] to override shift, set as <math>shift=-alpmhd*alpmhdfac</math>.",
623
670
  :tests=>["Tst::FLOAT"],
624
671
  :gs2_name=>:alpmhdfac,
625
672
  :must_pass=>
@@ -632,8 +679,9 @@
632
679
  :module=>:theta_grid_salpha},
633
680
  :alpha1=>
634
681
  {:should_include=>"true",
635
- :description=>nil,
636
- :help=>" \n",
682
+ :description=>"",
683
+ :help=>
684
+ "Coefficient in model when [[model_option]]='alpha1' has been selected.",
637
685
  :tests=>["Tst::FLOAT"],
638
686
  :gs2_name=>:alpha1,
639
687
  :must_pass=>
@@ -1129,7 +1177,7 @@
1129
1177
  :module=>:le_grids},
1130
1178
  :ngauss=>
1131
1179
  {:help=>
1132
- "Number of untrapped pitch-angles moving in one direction along field line.",
1180
+ "2*ngauss is the number of untrapped pitch-angles moving in one direction along field line.",
1133
1181
  :should_include=>"true",
1134
1182
  :description=>
1135
1183
  "Number of untrapped pitch-angles moving in one direction along field line.",
@@ -1213,8 +1261,9 @@
1213
1261
  :code_name=>:test},
1214
1262
  :trapped_particles=>
1215
1263
  {:should_include=>"true",
1216
- :description=>nil,
1217
- :help=>" \n",
1264
+ :description=>"",
1265
+ :help=>
1266
+ "If set to False then the <math>\\lambda</math> grid weighting (wl) is set to zero for trapped pitch angles. This means that integrals over velocity space do not include a contribution from trapped particles which is equivalent to the situation where eps<=0.0. \n*Trapped particle drifts are not set to zero so \"trapped\" particles still enter the source term through wdfac. At least for s-alpha the drifts are the main difference (?please correct if not true?) between the eps<=0.0 and the trapped_particles = False cases as Bmag is not a function of <math>\\theta</math> in the eps<=0.0 case whilst it is in the trapped_particles = False case.",
1218
1267
  :tests=>["Tst::FORTRAN_BOOL"],
1219
1268
  :gs2_name=>:trapped_particles,
1220
1269
  :must_pass=>
@@ -1324,7 +1373,8 @@
1324
1373
  :type=>:Float,
1325
1374
  :module=>:dist_fn},
1326
1375
  :omprimfac=>
1327
- {:help=>nil,
1376
+ {:help=>
1377
+ "Factor multiplying the parallel shearing drive term when running with non-zero [[g_exb]] ",
1328
1378
  :should_include=>"true",
1329
1379
  :description=>nil,
1330
1380
  :tests=>["Tst::FLOAT"],
@@ -1337,7 +1387,7 @@
1337
1387
  :module=>:dist_fn},
1338
1388
  :boundary_option=>
1339
1389
  {:help=>
1340
- "Sets the boundary condition along the field line (i.e. the boundary conditions at theta = +- pi). Possible values are: \n'zero', 'default', 'unconnected' - Use Kotschenreuther boundary condition at endpoints of theta grid\n'self-periodic', 'periodic', 'kperiod=1' - Each mode is periodic in theta with itself\n'linked' - Twist and shift boundary conditions\n'alternate-zero' - Ignored",
1390
+ "Sets the boundary condition along the field line (i.e. the boundary conditions at theta = +- pi). Possible values are: \n**'zero', 'default', 'unconnected' - Use Kotschenreuther boundary condition at endpoints of theta grid\n**'self-periodic', 'periodic', 'kperiod=1' - Each mode is periodic in theta with itself\n**'linked' - Twist and shift boundary conditions (used for kt_grids:grid_option='box')\n**'alternate-zero' - Ignored \n*See also [[nonad_zero]]",
1341
1391
  :should_include=>"true",
1342
1392
  :description=>
1343
1393
  "Sets the boundary condition along the field line (i.e. the boundary conditions at theta = +- pi).",
@@ -1379,8 +1429,22 @@
1379
1429
  "iphi00=3",
1380
1430
  "dimits"],
1381
1431
  :module=>:dist_fn},
1432
+ :include_lowflow=>
1433
+ {:help=>
1434
+ "Include calculation of terms present in the low flow limit of gyrokinetics. Many new terms... will slow calculation... don't set true unless you know what you are doing. ",
1435
+ :should_include=>"true",
1436
+ :description=>nil,
1437
+ :tests=>["Tst::STRING"],
1438
+ :autoscanned_defaults=>[".false."],
1439
+ :must_pass=>
1440
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1441
+ :explanation=>
1442
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1443
+ :type=>:Fortran_Bool,
1444
+ :module=>:dist_fn},
1382
1445
  :test=>
1383
- {:help=>"For debugging only.",
1446
+ {:help=>
1447
+ "For debugging only. If set then run will print various grid sizes and then stop.",
1384
1448
  :should_include=>"true",
1385
1449
  :description=>"For debugging",
1386
1450
  :tests=>["Tst::STRING"],
@@ -1391,7 +1455,8 @@
1391
1455
  :type=>:String,
1392
1456
  :module=>:dist_fn},
1393
1457
  :g_exb=>
1394
- {:help=>nil,
1458
+ {:help=>
1459
+ "<math> \\frac{\\rho}{q} \\frac{d\\Omega^{\\rm GS2}}{d\\rho_n} </math> where <math>\\Omega^{\\rm GS2}</math> is toroidal angular velocity normalised to the reference frequency <math>v_{t}^{\\rm ref}/a</math>\nand <math>\\rho_n</math> is the normalised flux label which has value <math>\\rho</math> on the local surface. ",
1395
1460
  :should_include=>"true",
1396
1461
  :description=>nil,
1397
1462
  :tests=>["Tst::FLOAT"],
@@ -1403,7 +1468,8 @@
1403
1468
  :type=>:Float,
1404
1469
  :module=>:dist_fn},
1405
1470
  :btor_slab=>
1406
- {:help=>nil,
1471
+ {:help=>
1472
+ "Overrides the itor_over_B internal parameter, meant only for slab runs where it sets the angle between the magnetic field and the toroidal flow.",
1407
1473
  :should_include=>"true",
1408
1474
  :description=>nil,
1409
1475
  :tests=>["Tst::FLOAT"],
@@ -1430,8 +1496,9 @@
1430
1496
  :module=>:dist_fn},
1431
1497
  :driftknob=>
1432
1498
  {:should_include=>"true",
1433
- :description=>nil,
1434
- :help=>" Leave as unity. For debugging/\n",
1499
+ :description=>"",
1500
+ :help=>
1501
+ "Leave as unity. For debugging. Multiplies the passing particle drifts (also see [[tpdriftknob]]).",
1435
1502
  :tests=>["Tst::FLOAT"],
1436
1503
  :gs2_name=>:driftknob,
1437
1504
  :must_pass=>
@@ -1445,7 +1512,8 @@
1445
1512
  :tpdriftknob=>
1446
1513
  {:should_include=>"true",
1447
1514
  :description=>nil,
1448
- :help=>nil,
1515
+ :help=>
1516
+ "For debugging only. Multiplies the trapped particle drifts (also see [[driftknob]]). ",
1449
1517
  :tests=>["Tst::FLOAT"],
1450
1518
  :gs2_name=>:tpdriftknob,
1451
1519
  :must_pass=>
@@ -1511,28 +1579,6 @@
1511
1579
  :explanation=>
1512
1580
  "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1513
1581
  :type=>:Fortran_Bool},
1514
- :read_many=>
1515
- {:should_include=>"true",
1516
- :description=>"Allows reading of many restart files and writing to one. Compile with USE_PARALLEL_NETCDF=on.\n",
1517
- :help=>"Allows reading of many restart files and writing to one. Compile with USE_PARALLEL_NETCDF=on.\n",
1518
- :gs2_name=>:read_many,
1519
- :must_pass=>
1520
- [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1521
- :explanation=>
1522
- "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1523
- :type=>:Fortran_Bool,
1524
- :code_name=>:read_many},
1525
- :save_many=>
1526
- {:should_include=>"true",
1527
- :description=>"Allows saving of many restart files. Compile with USE_PARALLEL_NETCDF=on.\n",
1528
- :help=>"Allows saving of many restart files. Compile with USE_PARALLEL_NETCDF=on.\n",
1529
- :gs2_name=>:save_many,
1530
- :must_pass=>
1531
- [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1532
- :explanation=>
1533
- "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1534
- :type=>:Fortran_Bool,
1535
- :code_name=>:save_many},
1536
1582
  :mult_imp=>
1537
1583
  {:should_include=>"true",
1538
1584
  :description=>nil,
@@ -1578,7 +1624,8 @@
1578
1624
  :wfb=>
1579
1625
  {:should_include=>"true",
1580
1626
  :description=>nil,
1581
- :help=>nil,
1627
+ :help=>
1628
+ "For debugging only. Sets the boundary value for the barely trapped/passing particle. ",
1582
1629
  :tests=>["Tst::FLOAT"],
1583
1630
  :gs2_name=>:wfb,
1584
1631
  :must_pass=>
@@ -1592,7 +1639,7 @@
1592
1639
  :mach=>
1593
1640
  {:should_include=>"true",
1594
1641
  :description=>nil,
1595
- :help=>nil,
1642
+ :help=>"Number multiplying the coriolis drift ",
1596
1643
  :tests=>["Tst::FLOAT"],
1597
1644
  :code_name=>:mach,
1598
1645
  :must_pass=>
@@ -1659,6 +1706,27 @@
1659
1706
  :description=>"",
1660
1707
  :help=>"",
1661
1708
  :code_name=>:lf_decompose,
1709
+ :must_pass=>
1710
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1711
+ :explanation=>
1712
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1713
+ :type=>:Fortran_Bool},
1714
+ :cllc=>
1715
+ {:should_include=>"true",
1716
+ :description=>"",
1717
+ :help=>"Experimental",
1718
+ :code_name=>:cllc,
1719
+ :must_pass=>
1720
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1721
+ :explanation=>
1722
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1723
+ :type=>:Fortran_Bool},
1724
+ :esv=>
1725
+ {:should_include=>"true",
1726
+ :description=>"",
1727
+ :help=>
1728
+ "If esv=.true. and boundary_option='linked' (i.e. flux tube simulation) then at every time step we ensure the fields are exactly single valued by replacing the field at one of the repeated boundary points with the value at the other boundary (i.e. of the two array locations which should be storing the field at the same point in space we pick one and set the other equal to the one we picked). This can be important in correctly tracking the amplitude of damped modes to very small values. Also see [[clean_init]].\n ",
1729
+ :code_name=>:esv,
1662
1730
  :must_pass=>
1663
1731
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1664
1732
  :explanation=>
@@ -1778,7 +1846,7 @@
1778
1846
  :module=>:run_parameters},
1779
1847
  :delt_option=>
1780
1848
  {:help=>
1781
- "Deprecated. Do not use. (Use 'check_restart' to get initial timestep from restart file, 'default' otherwise.)",
1849
+ "Deprecated. Do not use. Is this really right? History of svn suggests this comment may be meant for margin. (Use 'check_restart' to get initial timestep from restart file, 'default' otherwise.)",
1782
1850
  :should_include=>"true",
1783
1851
  :description=>"Deprecated.",
1784
1852
  :tests=>["Tst::STRING"],
@@ -1894,7 +1962,7 @@
1894
1962
  :description=>
1895
1963
  "Specify the available wall clock time in seconds. GS2 will exit before this time.",
1896
1964
  :help=>
1897
- "Specify the available wall clock time in seconds. GS2 will exit before this time. This ensures that all the output files are written correctly. CodeRunner automatically sets this quantity unless it is given the value false.",
1965
+ "Specify the available wall clock time in seconds. GS2 will start to exit up to 5 minutes before this time is up. This ensures that all the output files are written correctly. CodeRunner automatically sets this quantity unless it is given the value false.",
1898
1966
  :tests=>["Tst::FLOAT"],
1899
1967
  :gs2_name=>:avail_cpu_time,
1900
1968
  :must_pass=>
@@ -1927,15 +1995,37 @@
1927
1995
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
1928
1996
  :explanation=>
1929
1997
  "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1930
- :type=>:Fortran_Bool}}},
1998
+ :type=>:Fortran_Bool},
1999
+ :fixpar_secondary=>
2000
+ {:should_include=>"true",
2001
+ :description=>"",
2002
+ :help=>"",
2003
+ :code_name=>:fixpar_secondary,
2004
+ :must_pass=>
2005
+ [{:test=>"kind_of? Integer",
2006
+ :explanation=>"This variable must be an integer."}],
2007
+ :type=>:Integer},
2008
+ :margin_cpu_time=>
2009
+ {:should_include=>"true",
2010
+ :description=>
2011
+ "Start finalising when (avail_cpu_time - margin_cpu_time) seconds have elapsed.",
2012
+ :help=>
2013
+ "Time (in seconds) before [[avail_cpu_time]] at which finalisation triggered. May need to set this quite large for large problems to make certain the run finishes cleanly.",
2014
+ :code_name=>:margin_cpu_time,
2015
+ :must_pass=>
2016
+ [{:test=>"kind_of? Numeric",
2017
+ :explanation=>
2018
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
2019
+ :type=>:Float}}},
1931
2020
  :reinit_knobs=>
1932
2021
  {:description=>"",
1933
2022
  :should_include=>"true",
1934
2023
  :variables=>
1935
2024
  {:delt_adj=>
1936
- {:help=>"When the time step needs to be changed, it is adjusted ",
2025
+ {:help=>
2026
+ "When the time step needs to be changed it is adjusted by this factor (i.e dt-->dt/delt_adj or dt-->dt*delt_adj when reducing/increasing the timestep).\n**For implicit non-linear runs good choice of [[delt_adj]] can make a moderate difference to efficiency. Need to balance time taken to reinitialise against frequency of time step adjustments (i.e. if your run takes a long time to initialise you probably want to set delt_adj to be reasonably large).",
1937
2027
  :should_include=>"true",
1938
- :description=>"When the time step needs to be changed, it is adjusted ",
2028
+ :description=>"When the time step needs to be changed, it is adjusted",
1939
2029
  :tests=>["Tst::FLOAT"],
1940
2030
  :autoscanned_defaults=>[2.0],
1941
2031
  :must_pass=>
@@ -1945,7 +2035,8 @@
1945
2035
  :type=>:Float,
1946
2036
  :module=>:gs2_reinit},
1947
2037
  :delt_minimum=>
1948
- {:help=>"The minimum time step is delt_minimum.",
2038
+ {:help=>
2039
+ "The minimum time step allowed is delt_minimum. If the code wants to drop below this value then the run will end.",
1949
2040
  :should_include=>"true",
1950
2041
  :description=>"The minimum time step is delt_minimum.",
1951
2042
  :tests=>["Tst::FLOAT"],
@@ -1957,7 +2048,8 @@
1957
2048
  :type=>:Float,
1958
2049
  :module=>:gs2_reinit},
1959
2050
  :delt_cushion=>
1960
- {:help=>nil,
2051
+ {:help=>
2052
+ "Used in deciding when to increase the time step to help prevent oscillations in time step around some value. We only increase the time step when it is less than the scaled cfl estimate divided by delt_adj*delt_cushion (whilst we decrease it as soon as the time step is larger than the scaled cfl estimate). ",
1961
2053
  :should_include=>"true",
1962
2054
  :description=>nil,
1963
2055
  :tests=>["Tst::FLOAT"],
@@ -1985,7 +2077,7 @@
1985
2077
  :variables=>
1986
2078
  {:layout=>
1987
2079
  {:help=>
1988
- "Determines the way the grids are laid out in memory. Rightmost is parallelised first. \n** Can be 'yxles', 'lxyes', 'lyxes', 'lexys' \n** Strongly affects performance on parallel computers\n** In general avoid parallelizing over x. For this reason 'lxyes' is often a good choice.",
2080
+ "Determines the way the grids are laid out in memory. Rightmost is parallelised first. \n** Can be 'yxles', 'lxyes', 'lyxes', 'lexys','xyles'\n** Strongly affects performance on parallel computers\n** In general avoid parallelizing over x. For this reason 'lxyes' is often a good choice.\n*Depending on the type of run you are doing, and how many processors you are using, the optimal layout will vary.\n** In nonlinear runs FFTs are taken in x and y, so keeping these as local as possible (i.e. keeping xy to the left in layout) will help these.\n** In calculating collisions we need to take derivatives in l and e, hence keeping these as local as possible will help these.\n** The best choice will vary depending on grid sizes generally for linear runs with collisions 'lexys' is a good choice whilst for nonlinear runs (with or without collisions) 'xyles' (or similar) is usually fastest.",
1989
2081
  :should_include=>"true",
1990
2082
  :description=>
1991
2083
  "'yxles', 'lxyes', 'lyxes', 'lexys' Determines the way the grids are laid out in memory.",
@@ -1998,7 +2090,7 @@
1998
2090
  :module=>:gs2_layouts},
1999
2091
  :local_field_solve=>
2000
2092
  {:help=>
2001
- "Strongly affects initialization time on some parallel computers. \n** Recommendation: Use T on computers with slow communication networks.",
2093
+ "Strongly affects initialization time on some parallel computers. \n** Recommendation: Use T on computers with slow communication networks.\n** It's probably worth trying changing this on your favourite machine to see how much difference it makes for you.",
2002
2094
  :should_include=>"true",
2003
2095
  :description=>
2004
2096
  "Strongly affects initialization time on some parallel computers.",
@@ -2013,7 +2105,8 @@
2013
2105
  {:should_include=>"true",
2014
2106
  :description=>
2015
2107
  "This allows GS2 to set up an unbalanced xxf processor grid (e.g. leaving some tasks with no work) in order to balance the work load on each.",
2016
- :help=>"",
2108
+ :help=>
2109
+ "Setting to .true. allows GS2 to adopt a more flexible domain decomposition of the xxf data type (used in nonlinear FFTs). \n** By default GS2 allocates each MPI task with ''the same uniform blocksize'' in xxf_lo, one task may have a smaller block of data, and other tasks may be empty. There is no attempt to keep both x and y as local as possible, and sometimes large MPI data transfers are required to map from xxf to yxf and vice-versa during FFTs.\n** With \"unbalanced_xxf = .true.\", ''two slightly different blocksizes'' are chosen in order to keep both x and y as local as possible, and avoid this potentially large MPI communication overhead. The level of imbalance is limited by max_unbalanced_xxf. \n* [http://www.gyrokinetics.sourceforge.net/wikifiles/CMR/GS2_Final_report_NAG_Version_v1.0.pdf See Adrian Jackson's DCSE report \"Improved Data Distribution Routines for Gyrokinetic Plasma Simulations\"]\n",
2017
2110
  :code_name=>:unbalanced_xxf,
2018
2111
  :must_pass=>
2019
2112
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
@@ -2024,7 +2117,8 @@
2024
2117
  {:should_include=>"true",
2025
2118
  :description=>
2026
2119
  "This sets the maximum level of difference between the largest and smallest block sizes. Must be between 0 and 1",
2027
- :help=>"",
2120
+ :help=>
2121
+ "Sets maximum allowable fractional imbalance between the two different blocksizes used in xxf_lo if unbalanced_xxf =.true.\n* [http://www.gyrokinetics.sourceforge.net/wikifiles/CMR/GS2_Final_report_NAG_Version_v1.0.pdf See Adrian Jackson's DCSE report \"Improved Data Distribution Routines for Gyrokinetic Plasma Simulations\"]\n",
2028
2122
  :code_name=>:max_unbalanced_xxf,
2029
2123
  :must_pass=>
2030
2124
  [{:test=>"kind_of? Numeric",
@@ -2035,7 +2129,8 @@
2035
2129
  {:should_include=>"true",
2036
2130
  :description=>
2037
2131
  "This allows GS2 to set up an unbalanced yxxf processor grid (e.g. leaving some tasks with no work) in order to balance the work load on each.",
2038
- :help=>"",
2132
+ :help=>
2133
+ "Setting to .true. allows GS2 to adopt a more flexible domain decomposition of the yxf data type (used in nonlinear FFTs). \n** By default GS2 allocates each MPI task with ''the same uniform blocksize'' in yxf_lo, one task may have a smaller block of data, and other tasks may be empty. There is no attempt to keep both x and y as local as possible, and sometimes large MPI data transfers are required to map from xxf to yxf and vice-versa during FFTs.\n** With \"unbalanced_yxf = .true.\", ''two slightly different blocksizes'' are chosen in order to keep both x and y as local as possible, and avoid this potentially large MPI communication overhead. The level of imbalance is limited by max_unbalanced_yxf. \n* [http://www.gyrokinetics.sourceforge.net/wikifiles/CMR/GS2_Final_report_NAG_Version_v1.0.pdf See Adrian Jackson's DCSE report \"Improved Data Distribution Routines for Gyrokinetic Plasma Simulations\"]\n",
2039
2134
  :code_name=>:unbalanced_yxf,
2040
2135
  :must_pass=>
2041
2136
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
@@ -2046,7 +2141,8 @@
2046
2141
  {:should_include=>"true",
2047
2142
  :description=>
2048
2143
  "This sets the maximum level of difference between the largest and smallest block sizes. Must be between 0 and 1",
2049
- :help=>"",
2144
+ :help=>
2145
+ "Sets maximum allowable fractional imbalance between the two different blocksizes used in yxf_lo if unbalanced_yxf =.true.\n* [http://www.gyrokinetics.sourceforge.net/wikifiles/CMR/GS2_Final_report_NAG_Version_v1.0.pdf See Adrian Jackson's DCSE report \"Improved Data Distribution Routines for Gyrokinetic Plasma Simulations\"]\n",
2050
2146
  :code_name=>:max_unbalanced_yxf,
2051
2147
  :must_pass=>
2052
2148
  [{:test=>"kind_of? Numeric",
@@ -2100,7 +2196,8 @@
2100
2196
  :opt_local_copy=>
2101
2197
  {:should_include=>"true",
2102
2198
  :description=>"A recent optimisation ..please add better help!",
2103
- :help=>"",
2199
+ :help=>
2200
+ "Setting to .true. enables optimising redistribute code, used in FFTs for evaluating nonlinear terms, that avoids indirect addressing. \nThis can introduces worthwhile savings in nonlinear GS2 simulations at lower core counts. \n* [http://www.gyrokinetics.sourceforge.net/wikifiles/CMR/GS2_Final_report_NAG_Version_v1.0.pdf See Adrian Jackson's DCSE report \"Improved Data Distribution Routines for Gyrokinetic Plasma Simulations\"]\n",
2104
2201
  :code_name=>:opt_local_copy,
2105
2202
  :must_pass=>
2106
2203
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
@@ -2183,7 +2280,8 @@
2183
2280
  :adjust=>
2184
2281
  {:should_include=>"true",
2185
2282
  :description=>nil,
2186
- :help=>nil,
2283
+ :help=>
2284
+ "If adjust is .true., transform from the gyro-averaged dist. fn., g, to the non-Boltzmann part of delta f, h, when applying the collision operator ",
2187
2285
  :tests=>["Tst::FORTRAN_BOOL"],
2188
2286
  :gs2_name=>:adjust,
2189
2287
  :must_pass=>
@@ -2397,9 +2495,10 @@
2397
2495
  :should_include=>"true",
2398
2496
  :variables=>
2399
2497
  {:hyper_option=>
2400
- {:help=>"'default' is 'none'",
2498
+ {:help=>
2499
+ "Should be set to 'default','none','visc_only', 'res_only', or 'both'. 'default' and 'none' are identical.",
2401
2500
  :should_include=>"true",
2402
- :description=>nil,
2501
+ :description=>"",
2403
2502
  :tests=>["Tst::STRING"],
2404
2503
  :autoscanned_defaults=>["default"],
2405
2504
  :must_pass=>
@@ -2420,9 +2519,11 @@
2420
2519
  :type=>:String,
2421
2520
  :module=>:hyper},
2422
2521
  :const_amp=>
2423
- {:help=>'Determines whether hyperviscosity includes time dependent amplitude factor when calculating damping rate. Recommend TRUE for linear runs and FALSE for nolinear runs, since amplutide of turbulence grows linearly with time in linear run.',
2522
+ {:help=>
2523
+ "Determines whether hyperviscosity includes time dependent amplitude factor when calculating damping rate. Recommend TRUE for linear runs and FALSE for nolinear runs, since amplutide of turbulence grows linearly with time in linear run.",
2424
2524
  :should_include=>"true",
2425
- :description=>'Detrmines whether damping rate depends on amplitude variations. Recommend FALSE for nonlinear, TRUE for linear.',
2525
+ :description=>
2526
+ "Detrmines whether damping rate depends on amplitude variations. Recommend FALSE for nonlinear, TRUE for linear.",
2426
2527
  :tests=>["Tst::STRING"],
2427
2528
  :autoscanned_defaults=>[".false."],
2428
2529
  :must_pass=>
@@ -2736,7 +2837,7 @@
2736
2837
  :module=>:file_utils},
2737
2838
  :tprim=>
2738
2839
  {:help=>
2739
- "Normalised inverse temperature gradient: <math>-1/T (dT/d\\rho)</math>",
2840
+ "Normalised inverse temperature gradient: <math>-1/T (dT/d\\rho)</math> (Note here <math>\\rho</math> is the normalised radius <math>\\rho/L_{ref}</math>)",
2740
2841
  :should_include=>"true",
2741
2842
  :description=>"-1/T (dT/drho)",
2742
2843
  :tests=>["Tst::FLOAT"],
@@ -2748,7 +2849,7 @@
2748
2849
  :type=>:Float},
2749
2850
  :fprim=>
2750
2851
  {:help=>
2751
- "Normalised inverse density gradient: <math>-1/n (dn/d\\rho)</math>",
2852
+ "Normalised inverse density gradient: <math>-1/n (dn/d\\rho)</math> (Note here <math>\\rho</math> is the normalised radius <math>\\rho/L_{ref}</math>)",
2752
2853
  :should_include=>"true",
2753
2854
  :description=>"-1/n (dn/drho)",
2754
2855
  :tests=>["Tst::FLOAT"],
@@ -2770,7 +2871,8 @@
2770
2871
  "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
2771
2872
  :type=>:Float},
2772
2873
  :vnewk=>
2773
- {:help=>"Collisionality parameter: collisionality normalized to v_th/a",
2874
+ {:help=>
2875
+ "Collisionality parameter: For species <math>s</math>, vnewk = <math> \\nu_{ss} L_{ref} / v_{ref}</math> where <math>L_{ref}</math> is the reference length (half-minor-radius at the elevation of the magnetic axis), <math>v_{ref} = \\sqrt{2 T_{ref} / m_{ref}} </math> is the reference thermal speed (not the thermal speed of species <math>s</math>!), <math>\\nu_{ss} = \\frac{\\sqrt{2} \\pi n_s Z_s^4 e^4 \\ln(\\Lambda)}{\\sqrt{m_s} T_s^{3/2}}</math> is a dimensional collision frequency, <math>e</math> is the proton charge, <math>\\ln(\\Lambda)</math> is the Coloumb logarithm, and (<math>Z_s, T_s, n_s, m_s</math>) are the (charge, temperature, density, mass) of species <math>s</math>. (The dimensional collision frequency given here is in Gaussian units. For SI units, include an extra factor <math>(4 \\pi \\epsilon_0)^2 </math> in the denominator of the definition of <math>\\nu_{ss}</math>.)",
2774
2876
  :should_include=>"true",
2775
2877
  :description=>"collisionality parameter",
2776
2878
  :tests=>["Tst::FLOAT"],
@@ -2947,6 +3049,17 @@
2947
3049
  :help=>
2948
3050
  "Alpha electron collion rate. Normalisation chosen so that this parameter should be roughly the same as nu_ee.",
2949
3051
  :code_name=>:gamma_ae,
3052
+ :must_pass=>
3053
+ [{:test=>"kind_of? Numeric",
3054
+ :explanation=>
3055
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
3056
+ :type=>:Float},
3057
+ :bess_fac=>
3058
+ {:should_include=>"true",
3059
+ :description=>"",
3060
+ :help=>
3061
+ "Multiplies the argument of the Bessel function for this species. Useful for removing the effect of the Bessel functions (set to 0.0) ",
3062
+ :code_name=>:bess_fac,
2950
3063
  :must_pass=>
2951
3064
  [{:test=>"kind_of? Numeric",
2952
3065
  :explanation=>
@@ -2959,7 +3072,7 @@
2959
3072
  :variables=>
2960
3073
  {:fexpr=>
2961
3074
  {:help=>
2962
- "Temporal implicitness parameter. Any value other than 0.5 adds numerical dissipation.\n** Recommended value: 0.48",
3075
+ "Temporal implicitness parameter. Any value smaller than 0.5 adds numerical dissipation. fexpr=0.5 is 2cd order time-centered, fexpr=0 is fully implicit backward Euler, fexpr=1.0 is fully explicit forward Euler. \n** Recommended value: 0.48",
2963
3076
  :should_include=>"true",
2964
3077
  :description=>
2965
3078
  "Temporal implicitness parameter. Recommended value: 0.48",
@@ -2985,7 +3098,7 @@
2985
3098
  :module=>:dist_fn},
2986
3099
  :bakdif=>
2987
3100
  {:help=>
2988
- "Spatial implicitness parameter. Any value greater than 0 adds numerical dissipation (usually necessary).\n** Recommended value: 0.05",
3101
+ "Spatial implicitness parameter. Any value greater than 0 adds numerical dissipation (usually necessary). bakdif=0 is 2cd-order space-centered, bakdif=1.0 is fully upwinded.\n** Recommended value for electrostatic runs: 0.05. For electromagnetic runs, bakdif should be 0.",
2989
3102
  :should_include=>"true",
2990
3103
  :description=>"Spatial implicitness parameter. Recommended value: 0.05",
2991
3104
  :tests=>["Tst::FLOAT"],
@@ -3104,7 +3217,7 @@
3104
3217
  :type=>:Float},
3105
3218
  :clean_init=>
3106
3219
  {:help=>
3107
- "Makes sure phi = 0 at either ends of paralle domain. Only works when chop_side is also true",
3220
+ "Used with ginit_option='noise'. Ensures that in flux tube simulations the connected boundary points are initialised to the same value. Also allows for chop_side to behave correctly in flux tube simulations.",
3108
3221
  :should_include=>"true",
3109
3222
  :description=>"phi = 0 at either end of domain.",
3110
3223
  :tests=>["Tst::STRING"],
@@ -3115,7 +3228,8 @@
3115
3228
  "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
3116
3229
  :type=>:Fortran_Bool},
3117
3230
  :chop_side=>
3118
- {:help=>"Rarely needed. Forces asymmetry into initial condition.",
3231
+ {:help=>
3232
+ "Rarely needed. Forces asymmetry into initial condition. Warning: This does not behave as one may expect in flux tube simulations (see [[clean_init]]), this can be important as the default is to use chop_side.",
3119
3233
  :should_include=>"true",
3120
3234
  :description=>"Rarely needed. Forces asymmetry into initial condition.",
3121
3235
  :tests=>["Tst::STRING"],
@@ -3167,7 +3281,7 @@
3167
3281
  :module=>:init_g},
3168
3282
  :ginit_option=>
3169
3283
  {:help=>
3170
- "Sets the way that the distribution function is initialized. There are many possible choices.\n** 'default'\n** 'noise' This is the recommended selection. Pretty random.\n** 'test1'\n** 'xi'\n** 'xi2'\n** 'zero'\n** 'test3'\n** 'convect'\n** 'rh'\n** 'many'\n** 'small'\n** 'file'\n** 'cont'\n** 'kz0' initialise only with k_parallel=0\n** 'nl'\n** 'nl2'\n** 'nl3'\n** 'nl4'\n** 'nl5'\n** 'nl6'\n** 'gs'\n** 'kpar'\n** 'zonal_only' Restart but set all non-zonal components of the potential and the distribution function to 0. Noise can be added to these other components by setting iphiinit > 0.\n** 'single_parallel_mode' Initialise only with a single parallel mode specified by either ikpar_init for periodic boundary conditions or kpar_init for linked boundary conditions. Intended for linear calculations.\n** 'all_modes_equal' Initialise with every single parallel and perpendicular mode given the same amplitude. Intended for linear calculations.",
3284
+ "Sets the way that the distribution function is initialized. There are many possible choices.\n** 'default' This gives a gaussian in theta (see [[width0]])\n** 'noise' This is the recommended selection ('''but not the default'''). Pretty random.\n** 'test1'\n** 'xi'\n** 'xi2'\n** 'zero'\n** 'test3'\n** 'convect'\n** 'rh'\n** 'many' This is the option to read the (many) restart files written by a previous run. Use for restarts\n** 'small'\n** 'file'\n** 'cont'\n** 'kz0' initialise only with k_parallel=0\n** 'nl'\n** 'nl2'\n** 'nl3'\n** 'nl4'\n** 'nl5'\n** 'nl6'\n** 'gs'\n** 'kpar'\n** 'zonal_only' Restart but set all non-zonal components of the potential and the distribution function to 0. Noise can be added to these other components by setting iphiinit > 0.\n** 'single_parallel_mode' Initialise only with a single parallel mode specified by either ikpar_init for periodic boundary conditions or kpar_init for linked boundary conditions. Intended for linear calculations.\n** 'all_modes_equal' Initialise with every single parallel and perpendicular mode given the same amplitude. Intended for linear calculations.",
3171
3285
  :should_include=>"true",
3172
3286
  :description=>
3173
3287
  "Sets the way that the distribution function is initialized.",
@@ -3408,7 +3522,8 @@
3408
3522
  :restart_dir=>
3409
3523
  {:should_include=>"true",
3410
3524
  :description=>nil,
3411
- :help=>nil,
3525
+ :help=>
3526
+ "Directory in which to write/read restart files. Make sure this exists before running.",
3412
3527
  :tests=>["Tst::STRING"],
3413
3528
  :code_name=>:restart_dir,
3414
3529
  :must_pass=>
@@ -3679,6 +3794,17 @@
3679
3794
  :help=>
3680
3795
  "When initialised with single parallel mode, sets other modes to zero at every time step.",
3681
3796
  :code_name=>:force_single_kpar,
3797
+ :must_pass=>
3798
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
3799
+ :explanation=>
3800
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
3801
+ :type=>:Fortran_Bool},
3802
+ :read_many=>
3803
+ {:should_include=>"true",
3804
+ :description=>"Single/many restart files.",
3805
+ :help=>
3806
+ "Only applies if GS2 has been build with USE_PARALLEL_NETCDF=on. If .true., restart the old way from many restart files, if .false. use the new single restart file.",
3807
+ :code_name=>:read_many,
3682
3808
  :must_pass=>
3683
3809
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
3684
3810
  :explanation=>
@@ -3701,7 +3827,7 @@
3701
3827
  :type=>:Fortran_Bool,
3702
3828
  :module=>:gs2_diagnostics},
3703
3829
  :write_nl_flux=>
3704
- {:help=>"Write nonlinear fluxes as a function of time.",
3830
+ {:help=>"Phi**2(kx,ky) written to runname.out",
3705
3831
  :should_include=>"true",
3706
3832
  :description=>"Write nonlinear fluxes as a function of time.",
3707
3833
  :tests=>["Tst::FORTRAN_BOOL"],
@@ -3835,7 +3961,7 @@
3835
3961
  :module=>:gs2_diagnostics},
3836
3962
  :write_omega=>
3837
3963
  {:help=>
3838
- "If (write_ascii = T) instantaneous omega to output file every nwrite timesteps. Very heavy output.",
3964
+ "If (write_ascii = T) instantaneous omega to output file every nwrite timesteps. Very heavy output.\n*If true writes omega to netcdf file every nwrite timesteps.\n**Also writes out omegaavg (omega averaged over navg steps) to netcdf file no matter what the value of write_omavg is.",
3839
3965
  :should_include=>"true",
3840
3966
  :description=>
3841
3967
  "If (write_ascii = T) instantaneous omega to output file. Very heavy output",
@@ -3849,7 +3975,7 @@
3849
3975
  :module=>:gs2_diagnostics},
3850
3976
  :write_omavg=>
3851
3977
  {:help=>
3852
- "If (write_ascii = T) time-averaged frequencies written to runname.out every nwrite timesteps.\n** Average is over navg steps.",
3978
+ "If (write_ascii = T) time-averaged frequencies written to runname.out every nwrite timesteps.\n** Average is over navg steps.\n** Worth noting that setting this to true does not result in omegaavg being written to netcdf file (see [[write_omega]]).",
3853
3979
  :should_include=>"true",
3854
3980
  :description=>
3855
3981
  "If (write_ascii = T) time-averaged growth rate and frequency to the output file.",
@@ -4002,8 +4128,9 @@
4002
4128
  :module=>:gs2_diagnostics},
4003
4129
  :write_ascii=>
4004
4130
  {:should_include=>"true",
4005
- :description=>nil,
4006
- :help=>" If true, some data is written to runname.out\n",
4131
+ :description=>"",
4132
+ :help=>
4133
+ "If true, some data is written to runname.out\n** Also controls the creation of a large number of ascii data files (such as <run_name>.fields). Many of the write_* settings in this namelist will only have an effect when write_ascii= .TRUE.",
4007
4134
  :tests=>["Tst::FORTRAN_BOOL"],
4008
4135
  :gs2_name=>:write_ascii,
4009
4136
  :must_pass=>
@@ -4374,6 +4501,37 @@
4374
4501
  :description=>"Write final delta B.",
4375
4502
  :help=>"Write final delta B.",
4376
4503
  :code_name=>:write_final_db,
4504
+ :must_pass=>
4505
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
4506
+ :explanation=>
4507
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
4508
+ :type=>:Fortran_Bool},
4509
+ :save_many=>
4510
+ {:should_include=>"true",
4511
+ :description=>"Single/many restart files.",
4512
+ :help=>
4513
+ "Only applies if GS2 has been build with USE_PARALLEL_NETCDF=on. If .true., save for restart the old way to many restart files, if .false. save the new single restart file.",
4514
+ :code_name=>:save_many,
4515
+ :must_pass=>
4516
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
4517
+ :explanation=>
4518
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
4519
+ :type=>:Fortran_Bool},
4520
+ :write_pflux_sym=>
4521
+ {:should_include=>"true",
4522
+ :description=>"",
4523
+ :help=>"Ask J-P Lee.",
4524
+ :code_name=>:write_pflux_sym,
4525
+ :must_pass=>
4526
+ [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
4527
+ :explanation=>
4528
+ "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
4529
+ :type=>:Fortran_Bool},
4530
+ :write_pflux_tormom=>
4531
+ {:should_include=>"true",
4532
+ :description=>"",
4533
+ :help=>"Ask J-P Lee.",
4534
+ :code_name=>:write_pflux_tormom,
4377
4535
  :must_pass=>
4378
4536
  [{:test=>"kind_of? String and FORTRAN_BOOLS.include? self",
4379
4537
  :explanation=>
@@ -5101,7 +5259,49 @@
5101
5259
  :explanation=>
5102
5260
  "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
5103
5261
  :type=>:Float,
5104
- :module=>:kt_grids_range}}},
5262
+ :module=>:kt_grids_range},
5263
+ :nn0=>
5264
+ {:should_include=>"true",
5265
+ :description=>"Overrides naky in kt_grids_range_parameters.",
5266
+ :help=>
5267
+ "Number of toroidal modes, only used if [[n0_min]]>0. Overrides naky in kt_grids_range_parameters.",
5268
+ :code_name=>:nn0,
5269
+ :must_pass=>
5270
+ [{:test=>"kind_of? Integer",
5271
+ :explanation=>"This variable must be an integer."}],
5272
+ :type=>:Integer},
5273
+ :n0_min=>
5274
+ {:should_include=>"true",
5275
+ :description=>"if (n0_min > 0) aky_min=n0_min*drhodpsi*rhostar_range",
5276
+ :help=>
5277
+ "Minimum toroidal mode number. \n if n0_min > 0 then\n set [[aky_min]]=[[n0_min]]*drhodpsi*[[rhostar_range]]\n endif",
5278
+ :code_name=>:n0_min,
5279
+ :must_pass=>
5280
+ [{:test=>"kind_of? Integer",
5281
+ :explanation=>"This variable must be an integer."}],
5282
+ :type=>:Integer},
5283
+ :n0_max=>
5284
+ {:should_include=>"true",
5285
+ :description=>"If n0_min > 0, aky_max=n0_max*drhodpsi*rhostar_range",
5286
+ :help=>
5287
+ "Maximum toroidal mode number. \n If [[n0_min]] > 0 then\n if (mod([[n0_max]]-[[n0_min]],[[nn0]]).ne.0 .or. nn0 .eq. 1 .or. [[n0_min]].[[ge.n0_max]]) then\n set [[naky]]=1, [[aky_max]]=[[aky_min]]\n else\n set [[naky]]=[[nn0]], [[aky_max]]=[[n0_max]]*drhodpsi*[[rhostar_range]] \n endif",
5288
+ :code_name=>:n0_max,
5289
+ :must_pass=>
5290
+ [{:test=>"kind_of? Integer",
5291
+ :explanation=>"This variable must be an integer."}],
5292
+ :type=>:Integer},
5293
+ :rhostar_range=>
5294
+ {:should_include=>"true",
5295
+ :description=>
5296
+ "If n0_min > 0 aky_min=n0_min*drhodpsi*rhostar_range, etc",
5297
+ :help=>
5298
+ "[[rhostar_range]] used to convert [[n0_min]], [[n0_max]] range into [[aky_min]], [[aky_max]], if [[n0_min]]>0.\n** If n0_min is set, aky_min=n0_min*drhodpsi*rhostar_range and aky_max=n0_max*drhodpsi*rhostar_range",
5299
+ :code_name=>:rhostar_range,
5300
+ :must_pass=>
5301
+ [{:test=>"kind_of? Numeric",
5302
+ :explanation=>
5303
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
5304
+ :type=>:Float}}},
5105
5305
  :kt_grids_specified_parameters=>
5106
5306
  {:description=>"",
5107
5307
  :should_include=>"@grid_option=='specified'",
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'coderunner'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+ CodeRunner.setup_run_class('gs2')
3
+
4
+ raise "curl failed" unless system %[curl 'http://sourceforge.net/apps/mediawiki/gyrokinetics/index.php?title=GS2_Input_Parameters&action=edit' | sed 's/&amp;/\&/g' | sed 's/&quot;/"/g' | sed 's/&gt;/>/g' | sed 's/&lt;/</g' | sed 's/&nbsp;/ /g' > gs2_mediawiki.txt]
5
+ CodeRunner::Gs2.read_mediawiki_documentation('gs2_mediawiki.txt')
6
+ CodeRunner::Gs2.write_mediawiki_documentation('gs2_mediawiki2.txt')
7
+ system 'kwrite gs2_mediawiki2.txt' or system '/Applications/TextEdit.app/Contents/MacOS/TextEdit gs2_mediawiki2.txt'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gs2crmod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.13.13
22
+ version: 0.13.29
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ! '>='
29
29
  - !ruby/object:Gem::Version
30
- version: 0.13.13
30
+ version: 0.13.29
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: rubyhacks
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -183,6 +183,8 @@ files:
183
183
  - lib/gs2crmod/spectrogk/namelists.rb
184
184
  - lib/gs2crmod/test_gs2.rb
185
185
  - lib/gs2crmod_extension.rb
186
+ - sync_mediawiki/helper.rb
187
+ - sync_mediawiki/sync_mediawiki.rb
186
188
  - sync_variables/helper.rb
187
189
  - sync_variables/sync_variables.rb
188
190
  - test/agk_slab_itg_low_kperp.in