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