411{
412
413 size_t const slot_cnt( m_veg->slot_cnt());
414 size_t const slot_cnt_old( additional_season.size());
415
416 if ( slot_cnt <= slot_cnt_old)
417 {
418 return LDNDC_ERR_OK;
419 }
420
421 matrix_2d_dbl_t::extent_type const vtsl[] =
422 { static_cast< matrix_2d_dbl_t::extent_type >( slot_cnt),
423 static_cast< matrix_2d_dbl_t::extent_type >( sl_.soil_layer_cnt())};
424
425 additional_season.resize_and_preserve( slot_cnt, false);
426 phenological_year.resize_and_preserve( slot_cnt, 0);
427 foliage_age_of_start_senescence.resize_and_preserve( slot_cnt, 0);
428 days_since_emergence.resize_and_preserve( slot_cnt, 0);
429
430
431 ts_leaftemp_vt.resize_and_preserve( slot_cnt, 0.0);
432 nd_leaftemp_vt.resize_and_preserve( slot_cnt, 0.0);
433
434 uptNH4Max_vt.resize_and_preserve( slot_cnt, 0.0);
435 uptNO3Max_vt.resize_and_preserve( slot_cnt, 0.0);
436 uptDONMax_vt.resize_and_preserve( slot_cnt, 0.0);
437 uptNWetMax_vt.resize_and_preserve( slot_cnt, 0.0);
438 uptNWet_vt.resize_and_preserve( slot_cnt, 0.0);
439 uptNTot_vt.resize_and_preserve( slot_cnt, 0.0);
440
441 rFolOld_vt.resize_and_preserve( slot_cnt, 0.0);
442 rBudOld_vt.resize_and_preserve( slot_cnt, 0.0);
443 rSapOld_vt.resize_and_preserve( slot_cnt, 0.0);
444 rFrtOld_vt.resize_and_preserve( slot_cnt, 0.0);
445 rTraOld_vt.resize_and_preserve( slot_cnt, 0.0);
446 exsuLossOld_vt.resize_and_preserve( slot_cnt, 0.0);
447
448 uptNH4_vt.resize_and_preserve( slot_cnt, 0.0);
449 uptNO3_vt.resize_and_preserve( slot_cnt, 0.0);
450 uptNH3_vt.resize_and_preserve( slot_cnt, 0.0);
451 uptDON_vt.resize_and_preserve( slot_cnt, 0.0);
452
453 uptNH4Old_vt.resize_and_preserve( slot_cnt, 0.0);
454 uptNO3Old_vt.resize_and_preserve( slot_cnt, 0.0);
455 uptNH3Old_vt.resize_and_preserve( slot_cnt, 0.0);
456 uptDONOld_vt.resize_and_preserve( slot_cnt, 0.0);
457
458 uptNOxOld_vt.resize_and_preserve( slot_cnt, 0.0);
459 uptNHyOld_vt.resize_and_preserve(slot_cnt, 0.0);
460
461 while ( slot_cnt > uptNH4Max_vtsl.size())
462 {
463 std::vector<double> help_sl( sl_.soil_layer_cnt(), 0.0);
464 uptNH4Max_vtsl.push_back( help_sl);
465 }
466 while ( slot_cnt > uptNO3Max_vtsl.size())
467 {
468 std::vector<double> help_sl( sl_.soil_layer_cnt(), 0.0);
469 uptNO3Max_vtsl.push_back( help_sl);
470 }
471 while ( slot_cnt > uptDONMax_vtsl.size())
472 {
473 std::vector<double> help_sl( sl_.soil_layer_cnt(), 0.0);
474 uptDONMax_vtsl.push_back( help_sl);
475 }
476 while ( slot_cnt > foliage_age_na.size())
477 {
478 std::vector< int > help_sl( MoBiLE_MaximumAgeClasses, 0);
479 foliage_age_na.push_back( help_sl);
480 }
481
482 carbonuptake_vt.resize_and_preserve( slot_cnt, 0.0);
483
484 xylem_resistance_smoothed_old_vt.resize_and_preserve(slot_cnt, 0.0);
485 psidecline_cum_vt.resize_and_preserve(slot_cnt, 0.0);
486 psidecline_daycum_vt.resize_and_preserve(slot_cnt, 0.0);
487 rehydrationindex_cum_vt.resize_and_preserve(slot_cnt, 0.0);
488
489
490 mSapOpt_vt.resize_and_preserve( slot_cnt, 0.0);
491 mSapOld_vt.resize_and_preserve( slot_cnt, 0.0);
492 mCorOld_vt.resize_and_preserve( slot_cnt, 0.0);
493 qsaparea_vt.resize_and_preserve(slot_cnt, 0.0);
494 fsub_vt.resize_and_preserve(slot_cnt, 0.0);
495
496 mBudLoss_vt.resize_and_preserve( slot_cnt, 0.0);
497 mSapLoss_vt.resize_and_preserve( slot_cnt, 0.0);
498 ncFolOpt.resize_and_preserve( slot_cnt, 0.0);
499 ncBudOpt.resize_and_preserve( slot_cnt, 0.0);
500 nDem_vt.resize_and_preserve( slot_cnt, 0.0);
501 nFol_vt.resize_and_preserve( slot_cnt, 0.0);
502 nFrt_vt.resize_and_preserve( slot_cnt, 0.0);
503 nSap_vt.resize_and_preserve( slot_cnt, 0.0);
504 nCor_vt.resize_and_preserve( slot_cnt, 0.0);
505 nBud_vt.resize_and_preserve( slot_cnt, 0.0);
506
507 n_bud_to_fol_vt.resize_and_preserve( vtsl, 0.0);
508 n_sap_to_cor_vt.resize_and_preserve( vtsl, 0.0);
509 n_bud_to_cor_vt.resize_and_preserve( vtsl, 0.0);
510 n_fol_to_cor_vt.resize_and_preserve( vtsl, 0.0);
511 n_frt_to_cor_vt.resize_and_preserve( vtsl, 0.0);
512 n_sap_to_litter_vt.resize_and_preserve( vtsl, 0.0);
513 n_sap_to_redistribute_vt.resize_and_preserve( vtsl, 0.0);
514 n_bud_to_redistribute_vt.resize_and_preserve( vtsl, 0.0);
515 n_fol_to_redistribute_vt.resize_and_preserve( vtsl, 0.0);
516 n_frt_to_redistribute_vt.resize_and_preserve( vtsl, 0.0);
517 n_sap_gain_vt.resize_and_preserve( vtsl, 0.0);
518 n_bud_gain_vt.resize_and_preserve( vtsl, 0.0);
519 n_fol_gain_vt.resize_and_preserve( vtsl, 0.0);
520 n_frt_gain_vt.resize_and_preserve( vtsl, 0.0);
521
522 return LDNDC_ERR_OK;
523}