예제 #1
0
Rootdens_G_P::Rootdens_G_P (const BlockModel& al)
    : Rootdens (al),
      DensRtTip (al.number ("DensRtTip")),
      MinDens (al.number ("MinDens")),
      a (-42.42e42),
      L0 (-42.42e42)
{ }
예제 #2
0
 PhotoGL (const BlockModel& al)
   : Photo (al),
     Qeff (al.number ("Qeff")),
     Fm (al.number ("Fm")),
     TempEff (al.plf ("TempEff")),
     DSEff (al.plf ("DSEff")),
     DAPEff (al.plf ("DAPEff"))
 { }
예제 #3
0
PhotoFarquhar::PhotoFarquhar (const BlockModel& al)
  : Photo (al),
    Xn (al.number ("Xn")),
    Gamma25 (al.number ("Gamma25")),
    Ea_Gamma (al.number ("Ea_Gamma")),
    rubiscoNdist (Librarian::build_item<RubiscoNdist> (al, "N-dist")),
    Stomatacon (Librarian::build_item<StomataCon> (al, "Stomatacon"))
{ }
예제 #4
0
ChemistryMulti::ChemistryMulti (const BlockModel& al)
  : Chemistry (al),
    combine (Librarian::build_vector<Chemistry> (al, "combine")),
    ignore (al.name_sequence ("ignore")),
    max_sink_total (al.number ("max_sink_total")),
    max_sink_solute (al.number ("max_sink_solute")),
    max_sink_secondary (al.number ("max_sink_secondary")),
    min_sink_total (al.number ("min_sink_total")),
    chemicals (find_chemicals (combine))
{ }
예제 #5
0
 ActionSow (const BlockModel& al)
   : Action (al),
     metalib (al.metalib ()),
     crop (&al.model ("crop").clone ()),
     // Use 'plant_distance' if set, otherwise use 'row_width'.
     row_width (al.number ("plant_distance", al.number ("row_width"))),
     // Use 'plant_distance' if set, otherwise use 'row_width'.
     row_pos (al.number ("plant_position", al.number ("row_position"))),
     seed (al.number ("seed", -42.42e42))
 { }
예제 #6
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"))
 { }
예제 #7
0
HydraulicM_vGp::HydraulicM_vGp (const BlockModel& al)
  : Hydraulic (al),
    alpha (al.number ("alpha")),
    a (-alpha),
    n (al.number ("n")),
    m (1 - 1 / n),
    l (al.number ("l")),
    M_ (),
    h_m (al.number ("h_m")),
    f (al.number ("f")),
    p_m_matrix (pow (1.0 / (-h_m * 1.0 + 1.0), f))
{ }
예제 #8
0
ReactionDenit::ReactionDenit (const BlockModel& al)
  : Reaction (al),
    K (al.number ("K")),
    K_fast (al.number ("K_fast", K)),
    alpha (al.number ("alpha")),
    alpha_fast (al.number ("alpha_fast", alpha)),
    heat_factor (al.check ("heat_factor") 
                 ? al.plf ("heat_factor") 
                 : PLF::empty ()),
    water_factor (al.plf ("water_factor")),
    water_factor_fast (al.check ("water_factor_fast" )
                       ? al.plf ("water_factor_fast")
                       : water_factor),
    redox_height (al.number ("redox_height", 1.0))
{ }
예제 #9
0
 // Create & Destroy.
 PetPM (const BlockModel& al)
   : Pet (al),
     net_radiation (Librarian::build_stock<NetRadiation> (al.metalib (),
                                                          al.msg (),
                                                          "brunt", objid)),
     rb (al.number ("rb"))
   { }
예제 #10
0
Rootdens_AP::Rootdens_AP (const BlockModel& al)
  : Rootdens (al),
    a_DS (al.plf ("a_DS")),
    q (al.number ("q")),
    a (-42.42e42),
    L0 (-42.42e42)
  
{ }
예제 #11
0
std::unique_ptr<Volume>
Volume::build_obsolete (const BlockModel& al)
{
  Volume *const vol = Librarian::build_item<Volume> (al, "volume");
  daisy_assert (vol);
  if (al.check ("from"))
    {
      const double from = al.number ("from");
      if (from < 0)
        vol->limit_top (from);
    }
  if (al.check ("to"))
    {
      const double to = al.number ("to");
      if (to < 0)
        vol->limit_bottom (to);
    }
  return std::unique_ptr<Volume> (vol);
}
예제 #12
0
 ProgramGP2D (const BlockModel& al)
   : Program (al),
     metalib (al.metalib ()),
     geo (submodel<GeometryRect> (al, "Geometry")),
     row_width (al.number ("row_width")),
     row_position (al.number ("row_position")),
     soil_depth (al.number ("soil_depth")),
     crop_depth (al.number ("crop_depth")),
     crop_width (al.number ("crop_width")),
     WRoot (al.number ("WRoot")),
     DS (al.number ("DS"))
 { }
예제 #13
0
DrainLateral::DrainLateral (const BlockModel& al)
  : Drain (al),
    eq_depth (Librarian::build_item<Draineqd> (al, "eq_depth")),
    L (al.number ("L")),
    rad (al.number ("rad")),
    x (al.number ("x", L / 2.0)),
    pipe_position (al.number ("pipe_position")),
    pipe_outlet (Librarian::build_item<Depth> (al, "pipe_outlet")),
    K_to_pipes_ (al.number ("K_to_pipes", -1.0)),
    pipe_level (pipe_position),
    height (al.number ("height", pipe_position))
{ }
예제 #14
0
  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");
  }
예제 #15
0
Horizon::Implementation::Implementation (const BlockModel& al)
  : dry_bulk_density (al.number ("dry_bulk_density", -42.42e42)),
    SOM_C_per_N (al.number_sequence ("SOM_C_per_N")),
    C_per_N (al.number ("C_per_N", -42.42e42)),
    SOM_fractions (al.check ("SOM_fractions") 
                   ? al.number_sequence ("SOM_fractions")
                   : std::vector<double> ()),
    turnover_factor (al.number ("turnover_factor")),
    anisotropy (al.number ("anisotropy")),
    attributes (get_attributes (al.submodel_sequence ("attributes"))),
    dimensions (get_dimensions (al.submodel_sequence ("attributes"))),
    nitrification (Librarian::build_item<Nitrification> (al, "Nitrification")),
    secondary (Librarian::build_item<Secondary> (al, "secondary_domain")),
    r_pore_min (al.number ("r_pore_min")),
    primary_sorption_fraction (NAN),
    hor_heat (al.submodel ("HorHeat")),
    CEC (al.number ("CEC", -42.42e42))
{ }
예제 #16
0
 DepthConst (const BlockModel& al)
   : Depth (al),
     value (al.number ("value"))
 { }
예제 #17
0
파일: uzlr.C 프로젝트: pamoakoy/daisy-model
UZlr::UZlr (const BlockModel& al)
  : UZmodel (al),
    overflow_warn (al.flag ("overflow_warn")),
    h_fc (al.number ("h_fc")),
    z_top (al.number ("z_top"))
{ }
예제 #18
0
UZRectConst::UZRectConst (const BlockModel& al)
  : UZRect (al),
    q_x (al.number ("q_x")),
    q_z (al.number ("q_z"))
{ }
예제 #19
0
Vegetation::Vegetation (const BlockModel& al)
  : ModelDerived (al.type_name ()),
    EpInterchange_ (al.number ("EpInterchange"))
{ }
예제 #20
0
 // Create and Destroy.
 VernalizationStandard (const BlockModel& al)
   : Vernalization (al),
     DSLim (al.number ("DSLim")),
     TaLim (al.number ("TaLim")),
     TaSum (al.number ("TaSum"))
 { }
예제 #21
0
BioporeDrain::BioporeDrain (const BlockModel& al)
  : Biopore (al),
    pipe_position (al.number ("pipe_position", 42.42e42))
{ }
예제 #22
0
 HydraulicB_C_inverse (const BlockModel& al)
   : Hydraulic (al),
     Theta_wp (al.number ("Theta_wp", -42.42e42)),
     Theta_fc (al.number ("Theta_fc"))
 { }
예제 #23
0
 TortuosityLinear (const BlockModel& al)
   : Tortuosity (al),
     a_maybe (al.number ("a", -42.0)),
     b (al.number ("b"))
   { }
예제 #24
0
 ActionSetSurfaceDetentionCapacity (const BlockModel& al)
   : Action (al),
     height (al.number ("height"))
 { }