示例#1
0
 ProgramRootmatch (const BlockModel& al)
   : Program (al),
     units (al.units ()),
     lex (al),
     pos_dim (al.name ("pos_dim")),
     dens_dim (al.name ("dens_dim")),
     tag_x (al.name ("tag_x")),
     tag_z_min (al.name ("tag_z_min")),
     tag_z_max (al.name ("tag_z_max")),
     tag_density (al.name ("tag_density")),
     c_x_pos (-1),
     c_z_min (-1),
     c_z_max (-1),
     c_density (-1),
     debug (al.integer ("debug")),
     show_data (al.flag ("show_data")),
     show_match (al.flag ("show_match")),
     x_offset (al.number ("x_offset")),
     tabular (al.flag ("tabular")),
     row_position (al.number ("row_position")),
     min_dist (al.number ("min_dist")),
     gp2d (al.number ("row_position"),
           al.number ("row_distance"),
           al.number ("DensRtTip"),
           al.number ("SpRtLength")),
     gp1d (al.number ("DensRtTip"),
           al.number ("SpRtLength")),
     SoilDepth (al.number ("SoilDepth", NAN)),
     gnuplot (submodel<Gnuplot> (al, "gnuplot"))
 { }
  rubiscoNdist_expr (const BlockModel& al)
    : RubiscoNdist (al),
      f_photo (al.number ("f_photo")),
      expr (Librarian::build_item<Number> (al, "value")),
      scope (__FUNCTION__)
  {
    scope.add_item (new ExchangeNumber (LAI_symbol, Attribute::None(),
					"Leaf area index"));
    scope.add_item (new ExchangeNumber (distance_from_top_symbol, "cm",
					"Distance from top of canopy"));
    scope.add_item (new ExchangeNumber (relative_LAI_symbol, Attribute::None(),
					"Relative leaf area index"));
    scope.add_item (new ExchangeNumber (relative_distance_from_top_symbol, Attribute::None(),
					"Relative distance from top of canopy"));
    scope.add_item (new ExchangeNumber (DS_symbol, Attribute::None(),
					"Development stage"));
    scope.done ();
    expr->initialize (al.units (), scope, al.msg());
    if (!expr->check_dim (al.units (), scope, Attribute::Fraction (), al.msg()))
      al.error("Invalid expression of rubisco expr");
  }
示例#3
0
Chemistry::Chemistry (const BlockModel& al)
  : ModelFramed (al),
    units (al.units ())
{ }