Changeset 425 for branches/ORCHIDEE_EXT/ORCHIDEE/src_parameters
- Timestamp:
- 2011-08-31T09:32:29+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_EXT/ORCHIDEE/src_parameters/pft_parameters.f90
r360 r425 18 18 ! PFT global 19 19 !------------------------ 20 ! Number of vegetation types (see constantes_veg)21 INTEGER(i_std) :: nvm = 1320 ! Number of vegetation types 21 INTEGER(i_std), SAVE :: nvm = 13 22 22 !- 23 23 !Table of conversion : we associate one pft to one mtc … … 379 379 380 380 381 382 381 CONTAINS 383 382 ! 384 SUBROUTINE pft_parameters_main 385 383 SUBROUTINE pft_parameters_main(ok_sechiba,ok_stomate) 384 386 385 IMPLICIT NONE 387 386 388 ! Local 389 INTEGER(i_std) :: i 387 ! 0.1 input 388 389 ! Is SECHIBA active ? 390 LOGICAL, INTENT(in) :: ok_sechiba 391 ! Is STOMATE active ? 392 LOGICAL, INTENT(in) :: ok_stomate 393 394 ! 0.4 local 395 396 ! Indice 397 INTEGER(i_std) :: i 390 398 391 399 !---------------------- … … 402 410 ! 2. Memory allocation 403 411 ! Allocation of memory for the pfts-parameters 404 CALL pft_parameters_alloc 412 CALL pft_parameters_alloc(ok_sechiba,ok_stomate) 405 413 406 414 ! 3. Correspondance table … … 408 416 ! 3.1 Initialisation of the correspondance table 409 417 ! Initialisation of the correspondance table 410 pft_to_mtc 418 pft_to_mtc(:) = undef_int 411 419 412 420 ! 3.2 Reading of the conrrespondance table in the .def file … … 459 467 460 468 ! 4.Initialisation of the pfts-parameters 461 CALL pft_parameters_init 469 CALL pft_parameters_init(ok_sechiba,ok_stomate) 462 470 463 471 ! 5. Useful data … … 483 491 ! 6. Initialisation of 2D arrays used in the code 484 492 485 !-alb_leaf486 alb_leaf(:) = zero487 488 493 !- pref_soil_veg 489 494 pref_soil_veg(:,:) = zero_int 490 495 491 !- pheno_gdd_crit 492 pheno_gdd_crit(:,:) = zero 493 ! 494 !- senescence_temp 495 senescence_temp(:,:) = zero 496 ! 497 !- maint_resp_slope 498 maint_resp_slope(:,:) = zero 499 ! 500 !-coeff_maint_zero 501 coeff_maint_zero(:,:) = zero 496 IF (ok_sechiba) THEN 497 !-alb_leaf 498 alb_leaf(:) = zero 499 ENDIF 500 501 IF (ok_stomate) THEN 502 !- pheno_gdd_crit 503 pheno_gdd_crit(:,:) = zero 504 ! 505 !- senescence_temp 506 senescence_temp(:,:) = zero 507 ! 508 !- maint_resp_slope 509 maint_resp_slope(:,:) = zero 510 ! 511 !-coeff_maint_zero 512 coeff_maint_zero(:,:) = zero 513 ENDIF 502 514 503 515 ! 7. End message … … 518 530 != 519 531 ! 520 SUBROUTINE pft_parameters_init 532 SUBROUTINE pft_parameters_init(ok_sechiba,ok_stomate) 521 533 522 534 IMPLICIT NONE 523 535 524 !------------ 525 ! local 536 ! 0.1 input 537 538 ! Is SECHIBA active ? 539 LOGICAL, INTENT(in) :: ok_sechiba 540 ! Is STOMATE active ? 541 LOGICAL, INTENT(in) :: ok_stomate 542 543 ! 0.4 local 544 526 545 INTEGER(i_std) :: j,k 527 !------------ 546 547 !--------------------------------------------------------------- 528 548 529 549 ! … … 531 551 ! 532 552 553 554 ! 1.1 For parameters used anytime 555 533 556 DO j= 1, nvm 534 557 !- 535 558 PFT_name(j) = MTC_name(pft_to_mtc(j)) 536 537 559 !- 538 560 ! Vegetation structure … … 547 569 type_of_lai(j) = type_of_lai_mtc(pft_to_mtc(j)) 548 570 is_tree(j) = is_tree_mtc(pft_to_mtc(j)) 549 rveg_pft(j) = rveg_mtc(pft_to_mtc(j)) 550 571 natural(j) = natural_mtc(pft_to_mtc(j)) 572 ! 573 ! 2 .Stomate 574 ! 551 575 !>> DS new for merge in the trunk ! 15/06/2011 552 576 ! Add for writing history files in stomate_lpj.f90 'treeFracPrimDec' and 'treeFracPrimEver' … … 554 578 is_evergreen(j) = is_evergreen_mtc(pft_to_mtc(j)) 555 579 is_c3(j) = is_c3(pft_to_mtc(j)) 556 557 !558 ! 2 .Stomate559 !560 leaf_tab(j) = leaf_tab_mtc(pft_to_mtc(j))561 sla(j) = sla_mtc(pft_to_mtc(j))562 natural(j) = natural_mtc(pft_to_mtc(j))563 564 !-565 ! Evapotranspiration - sechiba566 !-567 rstruct_const(j) = rstruct_const_mtc(pft_to_mtc(j))568 kzero(j) = kzero_mtc(pft_to_mtc(j))569 580 !- 570 581 ! Water - sechiba 571 582 !- 572 wmax_veg(j) = wmax_veg_mtc(pft_to_mtc(j))573 583 humcste(j) = humcste_mtc(pft_to_mtc(j)) 574 throughfall_by_pft(j) = throughfall_by_mtc(pft_to_mtc(j))575 !-576 ! Albedo - sechiba577 !-578 snowa_ini(j) = snowa_ini_mtc(pft_to_mtc(j))579 snowa_dec(j) = snowa_dec_mtc(pft_to_mtc(j))580 alb_leaf_vis(j) = alb_leaf_vis_mtc(pft_to_mtc(j))581 alb_leaf_nir(j) = alb_leaf_nir_mtc(pft_to_mtc(j))582 584 !- 583 585 ! Soil - vegetation … … 586 588 pref_soil_veg_loan(j) = pref_soil_veg_loan_mtc(pft_to_mtc(j)) 587 589 pref_soil_veg_clay(j) = pref_soil_veg_clay_mtc(pft_to_mtc(j)) 588 589 590 !- 590 591 ! Photosynthesis 591 592 !- 592 !593 ! 1 .CO2594 !595 593 is_c4(j) = is_c4_mtc(pft_to_mtc(j)) 596 594 gsslope(j) = gsslope_mtc(pft_to_mtc(j)) … … 601 599 co2_topt_fix(j) = co2_topt_fix_mtc(pft_to_mtc(j)) 602 600 co2_tmax_fix(j) = co2_tmax_fix_mtc(pft_to_mtc(j)) 603 !604 ! 2 .Stomate605 !606 601 ext_coeff(j) = ext_coeff_mtc(pft_to_mtc(j)) 607 vcmax_opt(j) = vcmax_opt_mtc(pft_to_mtc(j)) 608 vjmax_opt(j) = vjmax_opt_mtc(pft_to_mtc(j)) 609 tphoto_min_a(j) = tphoto_min_a_mtc(pft_to_mtc(j)) 610 tphoto_min_b(j) = tphoto_min_b_mtc(pft_to_mtc(j)) 611 tphoto_min_c(j) = tphoto_min_c_mtc(pft_to_mtc(j)) 612 tphoto_opt_a(j) = tphoto_opt_a_mtc(pft_to_mtc(j)) 613 tphoto_opt_b(j) = tphoto_opt_b_mtc(pft_to_mtc(j)) 614 tphoto_opt_c(j) = tphoto_opt_c_mtc(pft_to_mtc(j)) 615 tphoto_max_a(j) = tphoto_max_a_mtc(pft_to_mtc(j)) 616 tphoto_max_b(j) = tphoto_max_b_mtc(pft_to_mtc(j)) 617 tphoto_max_c(j) = tphoto_max_c_mtc(pft_to_mtc(j)) 618 !- 619 ! Respiration - stomate 620 !- 621 maint_resp_slope_c(j) = maint_resp_slope_c_mtc(pft_to_mtc(j)) 622 maint_resp_slope_b(j) = maint_resp_slope_b_mtc(pft_to_mtc(j)) 623 maint_resp_slope_a(j) = maint_resp_slope_a_mtc(pft_to_mtc(j)) 624 cm_zero_leaf(j)= cm_zero_leaf_mtc(pft_to_mtc(j)) 625 cm_zero_sapabove(j) = cm_zero_sapabove_mtc(pft_to_mtc(j)) 626 cm_zero_sapbelow(j) = cm_zero_sapbelow_mtc(pft_to_mtc(j)) 627 cm_zero_heartabove(j) = cm_zero_heartabove_mtc(pft_to_mtc(j)) 628 cm_zero_heartbelow(j) = cm_zero_heartbelow_mtc(pft_to_mtc(j)) 629 cm_zero_root(j) = cm_zero_root_mtc(pft_to_mtc(j)) 630 cm_zero_fruit(j) = cm_zero_fruit_mtc(pft_to_mtc(j)) 631 cm_zero_carbres(j) = cm_zero_carbres_mtc(pft_to_mtc(j)) 632 !- 633 ! Fire - stomate 634 !- 635 flam(j) = flam_mtc(pft_to_mtc(j)) 636 resist(j) = resist_mtc(pft_to_mtc(j)) 637 !- 638 ! Flux - LUC 639 !- 640 coeff_lcchange_1(j) = coeff_lcchange_1_mtc(pft_to_mtc(j)) 641 coeff_lcchange_10(j) = coeff_lcchange_10_mtc(pft_to_mtc(j)) 642 coeff_lcchange_100(j) = coeff_lcchange_100_mtc(pft_to_mtc(j)) 643 !- 644 ! Phenology 645 !- 646 ! 647 ! 1 .Stomate 648 ! 649 lai_max(j) = lai_max_mtc(pft_to_mtc(j)) 650 pheno_model(j) = pheno_model_mtc(pft_to_mtc(j)) 651 pheno_type(j) = pheno_type_mtc(pft_to_mtc(j)) 652 ! 653 ! 2. Leaf Onset 654 ! 655 pheno_gdd_crit_c(j) = pheno_gdd_crit_c_mtc(pft_to_mtc(j)) 656 pheno_gdd_crit_b(j) = pheno_gdd_crit_b_mtc(pft_to_mtc(j)) 657 pheno_gdd_crit_a(j) = pheno_gdd_crit_a_mtc(pft_to_mtc(j)) 658 ngd_crit(j) = ngd_crit_mtc(pft_to_mtc(j)) 659 ncdgdd_temp(j) = ncdgdd_temp_mtc(pft_to_mtc(j)) 660 hum_frac(j) = hum_frac_mtc(pft_to_mtc(j)) 661 lowgpp_time(j) = lowgpp_time_mtc(pft_to_mtc(j)) 662 hum_min_time(j) = hum_min_time_mtc(pft_to_mtc(j)) 663 tau_sap(j) = tau_sap_mtc(pft_to_mtc(j)) 664 tau_fruit(j) = tau_fruit_mtc(pft_to_mtc(j)) 665 ecureuil(j) = ecureuil_mtc(pft_to_mtc(j)) 666 alloc_min(j) = alloc_min_mtc(pft_to_mtc(j)) 667 alloc_max(j) = alloc_max_mtc(pft_to_mtc(j)) 668 demi_alloc(j) = demi_alloc_mtc(pft_to_mtc(j)) 669 !>> DS new for merge in the trunk ! 15/06/2011 670 leaflife_tab(j) = leaflife_mtc(pft_to_mtc(j)) 671 ! 672 ! 3. Senescence 673 ! 674 leaffall(j) = leaffall_mtc(pft_to_mtc(j)) 675 leafagecrit(j) = leafagecrit_mtc(pft_to_mtc(j)) 676 senescence_type(j) = senescence_type_mtc(pft_to_mtc(j)) 677 senescence_hum(j) = senescence_hum_mtc(pft_to_mtc(j)) 678 nosenescence_hum(j) = nosenescence_hum_mtc(pft_to_mtc(j)) 679 max_turnover_time(j) = max_turnover_time_mtc(pft_to_mtc(j)) 680 min_turnover_time(j) = min_turnover_time_mtc(pft_to_mtc(j)) 681 min_leaf_age_for_senescence(j) = min_leaf_age_for_senescence_mtc(pft_to_mtc(j)) 682 senescence_temp_c(j) = senescence_temp_c_mtc(pft_to_mtc(j)) 683 senescence_temp_b(j) = senescence_temp_b_mtc(pft_to_mtc(j)) 684 senescence_temp_a(j) = senescence_temp_a_mtc(pft_to_mtc(j)) 685 !- 686 ! DGVM 687 residence_time(j) = residence_time_mtc(pft_to_mtc(j)) 688 tmin_crit(j) = tmin_crit_mtc(pft_to_mtc(j)) 689 tcm_crit(j) = tcm_crit_mtc(pft_to_mtc(j)) 690 691 ENDDO ! end loop over nvm 602 !- 603 ENDDO 604 605 ! 1.2 For sechiba parameters 606 607 IF (ok_sechiba) THEN 608 !- 609 DO j =1 ,nvm 610 !- 611 ! Vegetation structure - sechiba 612 !- 613 rveg_pft(j) = rveg_mtc(pft_to_mtc(j)) 614 !- 615 ! Evapotranspiration - sechiba 616 !- 617 rstruct_const(j) = rstruct_const_mtc(pft_to_mtc(j)) 618 kzero(j) = kzero_mtc(pft_to_mtc(j)) 619 !- 620 ! Water - sechiba 621 !- 622 wmax_veg(j) = wmax_veg_mtc(pft_to_mtc(j)) 623 throughfall_by_pft(j) = throughfall_by_mtc(pft_to_mtc(j)) 624 !- 625 ! Albedo - sechiba 626 !- 627 snowa_ini(j) = snowa_ini_mtc(pft_to_mtc(j)) 628 snowa_dec(j) = snowa_dec_mtc(pft_to_mtc(j)) 629 alb_leaf_vis(j) = alb_leaf_vis_mtc(pft_to_mtc(j)) 630 alb_leaf_nir(j) = alb_leaf_nir_mtc(pft_to_mtc(j)) 631 ENDDO 632 !- 633 ENDIF 634 635 ! 1.3 For stomate parameters 636 637 IF (ok_stomate) THEN 638 !- 639 DO j = 1,nvm 640 !- 641 ! Vegetation structure - stomate 642 !- 643 leaf_tab(j) = leaf_tab_mtc(pft_to_mtc(j)) 644 sla(j) = sla_mtc(pft_to_mtc(j)) 645 !- 646 ! Photosynthesis 647 !- 648 vcmax_opt(j) = vcmax_opt_mtc(pft_to_mtc(j)) 649 vjmax_opt(j) = vjmax_opt_mtc(pft_to_mtc(j)) 650 tphoto_min_a(j) = tphoto_min_a_mtc(pft_to_mtc(j)) 651 tphoto_min_b(j) = tphoto_min_b_mtc(pft_to_mtc(j)) 652 tphoto_min_c(j) = tphoto_min_c_mtc(pft_to_mtc(j)) 653 tphoto_opt_a(j) = tphoto_opt_a_mtc(pft_to_mtc(j)) 654 tphoto_opt_b(j) = tphoto_opt_b_mtc(pft_to_mtc(j)) 655 tphoto_opt_c(j) = tphoto_opt_c_mtc(pft_to_mtc(j)) 656 tphoto_max_a(j) = tphoto_max_a_mtc(pft_to_mtc(j)) 657 tphoto_max_b(j) = tphoto_max_b_mtc(pft_to_mtc(j)) 658 tphoto_max_c(j) = tphoto_max_c_mtc(pft_to_mtc(j)) 659 !- 660 ! Respiration - stomate 661 !- 662 maint_resp_slope_c(j) = maint_resp_slope_c_mtc(pft_to_mtc(j)) 663 maint_resp_slope_b(j) = maint_resp_slope_b_mtc(pft_to_mtc(j)) 664 maint_resp_slope_a(j) = maint_resp_slope_a_mtc(pft_to_mtc(j)) 665 cm_zero_leaf(j)= cm_zero_leaf_mtc(pft_to_mtc(j)) 666 cm_zero_sapabove(j) = cm_zero_sapabove_mtc(pft_to_mtc(j)) 667 cm_zero_sapbelow(j) = cm_zero_sapbelow_mtc(pft_to_mtc(j)) 668 cm_zero_heartabove(j) = cm_zero_heartabove_mtc(pft_to_mtc(j)) 669 cm_zero_heartbelow(j) = cm_zero_heartbelow_mtc(pft_to_mtc(j)) 670 cm_zero_root(j) = cm_zero_root_mtc(pft_to_mtc(j)) 671 cm_zero_fruit(j) = cm_zero_fruit_mtc(pft_to_mtc(j)) 672 cm_zero_carbres(j) = cm_zero_carbres_mtc(pft_to_mtc(j)) 673 !- 674 ! Fire - stomate 675 !- 676 flam(j) = flam_mtc(pft_to_mtc(j)) 677 resist(j) = resist_mtc(pft_to_mtc(j)) 678 !- 679 ! Flux - LUC 680 !- 681 coeff_lcchange_1(j) = coeff_lcchange_1_mtc(pft_to_mtc(j)) 682 coeff_lcchange_10(j) = coeff_lcchange_10_mtc(pft_to_mtc(j)) 683 coeff_lcchange_100(j) = coeff_lcchange_100_mtc(pft_to_mtc(j)) 684 !- 685 ! Phenology 686 !- 687 ! 688 ! 1 .Stomate 689 ! 690 lai_max(j) = lai_max_mtc(pft_to_mtc(j)) 691 pheno_model(j) = pheno_model_mtc(pft_to_mtc(j)) 692 pheno_type(j) = pheno_type_mtc(pft_to_mtc(j)) 693 ! 694 ! 2. Leaf Onset 695 ! 696 pheno_gdd_crit_c(j) = pheno_gdd_crit_c_mtc(pft_to_mtc(j)) 697 pheno_gdd_crit_b(j) = pheno_gdd_crit_b_mtc(pft_to_mtc(j)) 698 pheno_gdd_crit_a(j) = pheno_gdd_crit_a_mtc(pft_to_mtc(j)) 699 ngd_crit(j) = ngd_crit_mtc(pft_to_mtc(j)) 700 ncdgdd_temp(j) = ncdgdd_temp_mtc(pft_to_mtc(j)) 701 hum_frac(j) = hum_frac_mtc(pft_to_mtc(j)) 702 lowgpp_time(j) = lowgpp_time_mtc(pft_to_mtc(j)) 703 hum_min_time(j) = hum_min_time_mtc(pft_to_mtc(j)) 704 tau_sap(j) = tau_sap_mtc(pft_to_mtc(j)) 705 tau_fruit(j) = tau_fruit_mtc(pft_to_mtc(j)) 706 ecureuil(j) = ecureuil_mtc(pft_to_mtc(j)) 707 alloc_min(j) = alloc_min_mtc(pft_to_mtc(j)) 708 alloc_max(j) = alloc_max_mtc(pft_to_mtc(j)) 709 demi_alloc(j) = demi_alloc_mtc(pft_to_mtc(j)) 710 !>> DS new for merge in the trunk ! 15/06/2011 711 leaflife_tab(j) = leaflife_mtc(pft_to_mtc(j)) 712 ! 713 ! 3. Senescence 714 ! 715 leaffall(j) = leaffall_mtc(pft_to_mtc(j)) 716 leafagecrit(j) = leafagecrit_mtc(pft_to_mtc(j)) 717 senescence_type(j) = senescence_type_mtc(pft_to_mtc(j)) 718 senescence_hum(j) = senescence_hum_mtc(pft_to_mtc(j)) 719 nosenescence_hum(j) = nosenescence_hum_mtc(pft_to_mtc(j)) 720 max_turnover_time(j) = max_turnover_time_mtc(pft_to_mtc(j)) 721 min_turnover_time(j) = min_turnover_time_mtc(pft_to_mtc(j)) 722 min_leaf_age_for_senescence(j) = min_leaf_age_for_senescence_mtc(pft_to_mtc(j)) 723 senescence_temp_c(j) = senescence_temp_c_mtc(pft_to_mtc(j)) 724 senescence_temp_b(j) = senescence_temp_b_mtc(pft_to_mtc(j)) 725 senescence_temp_a(j) = senescence_temp_a_mtc(pft_to_mtc(j)) 726 !- 727 ! DGVM 728 residence_time(j) = residence_time_mtc(pft_to_mtc(j)) 729 tmin_crit(j) = tmin_crit_mtc(pft_to_mtc(j)) 730 tcm_crit(j) = tcm_crit_mtc(pft_to_mtc(j)) 731 ENDDO 732 !- 733 ENDIF 692 734 693 735 END SUBROUTINE pft_parameters_init … … 695 737 != 696 738 ! 697 SUBROUTINE pft_parameters_alloc 739 SUBROUTINE pft_parameters_alloc(ok_sechiba,ok_stomate) 698 740 699 741 IMPLICIT NONE 700 !------------------ 701 ! local 702 LOGICAL :: l_error 703 INTEGER :: ier 704 !----------------- 705 742 743 ! 0.1 input 744 745 ! Is SECHIBA active ? 746 LOGICAL, INTENT(in) :: ok_sechiba 747 ! Is STOMATE active ? 748 LOGICAL, INTENT(in) :: ok_stomate 749 750 ! 0.4 local 751 LOGICAL :: l_error 752 INTEGER :: ier 753 754 !--------------------------------------------- 755 756 ! 757 ! 1. Parameters used anytime 758 ! 706 759 l_error = .FALSE. 760 !- 707 761 ALLOCATE(pft_to_mtc(nvm),stat=ier) 708 762 l_error = l_error .OR. (ier .NE. 0) 709 763 ALLOCATE(PFT_name(nvm),stat=ier) 710 764 l_error = l_error .OR. (ier .NE. 0) 765 ALLOCATE(height_presc(nvm),stat=ier) 766 l_error = l_error .OR. (ier .NE. 0) 767 ALLOCATE(is_tree(nvm),stat=ier) 768 l_error = l_error .OR. (ier .NE. 0) 769 ALLOCATE(natural(nvm),stat=ier) 770 l_error = l_error .OR. (ier .NE. 0) 771 ALLOCATE(is_c4(nvm),stat=ier) 772 l_error = l_error .OR. (ier .NE. 0) 773 ALLOCATE(gsslope(nvm),stat=ier) 774 l_error = l_error .OR. (ier .NE. 0) 775 ALLOCATE(gsoffset(nvm),stat=ier) 776 l_error = l_error .OR. (ier .NE. 0) 777 ALLOCATE(humcste(nvm),stat=ier) 778 l_error = l_error .OR. (ier .NE. 0) 779 ALLOCATE(ext_coeff(nvm),stat=ier) 780 l_error = l_error .OR. (ier .NE. 0) 781 !- 782 ALLOCATE(veget_ori_fixed_test_1(nvm),stat=ier) 783 l_error = l_error .OR. (ier .NE. 0) 784 ALLOCATE(llaimax(nvm),stat=ier) 785 l_error = l_error .OR. (ier .NE. 0) 786 ALLOCATE(llaimin(nvm),stat=ier) 787 l_error = l_error .OR. (ier .NE. 0) 788 ALLOCATE(type_of_lai(nvm),stat=ier) 789 l_error = l_error .OR. (ier .NE. 0) 790 ALLOCATE(vcmax_fix(nvm),stat=ier) 791 l_error = l_error .OR. (ier .NE. 0) 792 ALLOCATE(vjmax_fix(nvm),stat=ier) 793 l_error = l_error .OR. (ier .NE. 0) 794 ALLOCATE(co2_tmin_fix(nvm),stat=ier) 795 l_error = l_error .OR. (ier .NE. 0) 796 ALLOCATE(co2_topt_fix(nvm),stat=ier) 797 l_error = l_error .OR. (ier .NE. 0) 798 ALLOCATE(co2_tmax_fix(nvm),stat=ier) 799 l_error = l_error .OR. (ier .NE. 0) 800 !- 801 ALLOCATE(pref_soil_veg_sand(nvm),stat=ier) 802 l_error = l_error .OR. (ier .NE. 0) 803 ALLOCATE(pref_soil_veg_loan(nvm),stat=ier) 804 l_error = l_error .OR. (ier .NE. 0) 805 ALLOCATE(pref_soil_veg_clay(nvm),stat=ier) 806 l_error = l_error .OR. (ier .NE. 0) 807 ALLOCATE(pref_soil_veg(nvm,nstm),stat=ier) 808 l_error = l_error .OR. (ier .NE. 0) 809 711 810 !- 712 811 !>> DS new for merge in the trunk ! 15/06/2011 … … 718 817 ALLOCATE(is_c3(nvm),stat=ier) 719 818 l_error = l_error .OR. (ier .NE. 0) 720 ALLOCATE(leaflife_tab(nvm),stat=ier)721 l_error = l_error .OR. (ier .NE. 0)722 819 ! >> END 723 724 ALLOCATE(veget_ori_fixed_test_1(nvm),stat=ier) 725 l_error = l_error .OR. (ier .NE. 0) 726 ALLOCATE(llaimax(nvm),stat=ier) 727 l_error = l_error .OR. (ier .NE. 0) 728 ALLOCATE(llaimin(nvm),stat=ier) 729 l_error = l_error .OR. (ier .NE. 0) 730 ALLOCATE(height_presc(nvm),stat=ier) 731 l_error = l_error .OR. (ier .NE. 0) 732 ALLOCATE(type_of_lai(nvm),stat=ier) 733 l_error = l_error .OR. (ier .NE. 0) 734 ALLOCATE(is_tree(nvm),stat=ier) 735 l_error = l_error .OR. (ier .NE. 0) 736 !- 737 ALLOCATE(leaf_tab(nvm),stat=ier) 738 l_error = l_error .OR. (ier .NE. 0) 739 ALLOCATE(sla(nvm),stat=ier) 740 l_error = l_error .OR. (ier .NE. 0) 741 ALLOCATE(natural(nvm),stat=ier) 742 l_error = l_error .OR. (ier .NE. 0) 743 !- 744 ALLOCATE(is_c4(nvm),stat=ier) 745 l_error = l_error .OR. (ier .NE. 0) 746 ALLOCATE(gsslope(nvm),stat=ier) 747 l_error = l_error .OR. (ier .NE. 0) 748 ALLOCATE(gsoffset(nvm),stat=ier) 749 l_error = l_error .OR. (ier .NE. 0) 750 ALLOCATE(vcmax_fix(nvm),stat=ier) 751 l_error = l_error .OR. (ier .NE. 0) 752 ALLOCATE(vjmax_fix(nvm),stat=ier) 753 l_error = l_error .OR. (ier .NE. 0) 754 ALLOCATE(co2_tmin_fix(nvm),stat=ier) 755 l_error = l_error .OR. (ier .NE. 0) 756 ALLOCATE(co2_topt_fix(nvm),stat=ier) 757 l_error = l_error .OR. (ier .NE. 0) 758 ALLOCATE(co2_tmax_fix(nvm),stat=ier) 759 l_error = l_error .OR. (ier .NE. 0) 760 !- 761 ALLOCATE(ext_coeff(nvm),stat=ier) 762 l_error = l_error .OR. (ier .NE. 0) 763 ALLOCATE(vcmax_opt(nvm),stat=ier) 764 l_error = l_error .OR. (ier .NE. 0) 765 ALLOCATE(vjmax_opt(nvm),stat=ier) 766 l_error = l_error .OR. (ier .NE. 0) 767 ALLOCATE(tphoto_min_a(nvm),stat=ier) 768 l_error = l_error .OR. (ier .NE. 0) 769 ALLOCATE(tphoto_min_b(nvm),stat=ier) 770 l_error = l_error .OR. (ier .NE. 0) 771 ALLOCATE(tphoto_min_c(nvm),stat=ier) 772 l_error = l_error .OR. (ier .NE. 0) 773 ALLOCATE(tphoto_opt_a(nvm),stat=ier) 774 l_error = l_error .OR. (ier .NE. 0) 775 ALLOCATE(tphoto_opt_b(nvm),stat=ier) 776 l_error = l_error .OR. (ier .NE. 0) 777 ALLOCATE(tphoto_opt_c(nvm),stat=ier) 778 l_error = l_error .OR. (ier .NE. 0) 779 ALLOCATE(tphoto_max_a(nvm),stat=ier) 780 l_error = l_error .OR. (ier .NE. 0) 781 ALLOCATE(tphoto_max_b(nvm),stat=ier) 782 l_error = l_error .OR. (ier .NE. 0) 783 ALLOCATE(tphoto_max_c(nvm),stat=ier) 784 l_error = l_error .OR. (ier .NE. 0) 785 !- 786 ALLOCATE(pheno_gdd_crit_c(nvm),stat=ier) 787 l_error = l_error .OR. (ier .NE. 0) 788 ALLOCATE(pheno_gdd_crit_b(nvm),stat=ier) 789 l_error = l_error .OR. (ier .NE. 0) 790 ALLOCATE(pheno_gdd_crit_a(nvm),stat=ier) 791 l_error = l_error .OR. (ier .NE. 0) 792 ALLOCATE(pheno_gdd_crit(nvm,3),stat=ier) 793 l_error = l_error .OR. (ier .NE. 0) 794 ALLOCATE(ngd_crit(nvm),stat=ier) 795 l_error = l_error .OR. (ier .NE. 0) 796 ALLOCATE(ncdgdd_temp(nvm),stat=ier) 797 l_error = l_error .OR. (ier .NE. 0) 798 ALLOCATE(hum_frac(nvm),stat=ier) 799 l_error = l_error .OR. (ier .NE. 0) 800 ALLOCATE(lowgpp_time(nvm),stat=ier) 801 l_error = l_error .OR. (ier .NE. 0) 802 ALLOCATE(hum_min_time(nvm),stat=ier) 803 l_error = l_error .OR. (ier .NE. 0) 804 ALLOCATE(tau_sap(nvm),stat=ier) 805 l_error = l_error .OR. (ier .NE. 0) 806 ALLOCATE(tau_fruit(nvm),stat=ier) 807 l_error = l_error .OR. (ier .NE. 0) 808 ALLOCATE(ecureuil(nvm),stat=ier) 809 l_error = l_error .OR. (ier .NE. 0) 810 ALLOCATE(alloc_min(nvm),stat=ier) 811 l_error = l_error .OR. (ier .NE. 0) 812 ALLOCATE(alloc_max(nvm),stat=ier) 813 l_error = l_error .OR. (ier .NE. 0) 814 ALLOCATE(demi_alloc(nvm),stat=ier) 815 l_error = l_error .OR. (ier .NE. 0) 816 !- 817 ALLOCATE(maint_resp_slope(nvm,3),stat=ier) 818 l_error = l_error .OR. (ier .NE. 0) 819 ALLOCATE(maint_resp_slope_c(nvm),stat=ier) 820 l_error = l_error .OR. (ier .NE. 0) 821 ALLOCATE(maint_resp_slope_b(nvm),stat=ier) 822 l_error = l_error .OR. (ier .NE. 0) 823 ALLOCATE(maint_resp_slope_a(nvm),stat=ier) 824 l_error = l_error .OR. (ier .NE. 0) 825 ALLOCATE(coeff_maint_zero(nvm,nparts),stat=ier) 826 l_error = l_error .OR. (ier .NE. 0) 827 ALLOCATE(cm_zero_leaf(nvm),stat=ier) 828 l_error = l_error .OR. (ier .NE. 0) 829 ALLOCATE(cm_zero_sapabove(nvm),stat=ier) 830 l_error = l_error .OR. (ier .NE. 0) 831 ALLOCATE(cm_zero_sapbelow(nvm),stat=ier) 832 l_error = l_error .OR. (ier .NE. 0) 833 ALLOCATE(cm_zero_heartabove(nvm),stat=ier) 834 l_error = l_error .OR. (ier .NE. 0) 835 ALLOCATE(cm_zero_heartbelow(nvm),stat=ier) 836 l_error = l_error .OR. (ier .NE. 0) 837 ALLOCATE(cm_zero_root(nvm),stat=ier) 838 l_error = l_error .OR. (ier .NE. 0) 839 ALLOCATE(cm_zero_fruit(nvm),stat=ier) 840 l_error = l_error .OR. (ier .NE. 0) 841 ALLOCATE(cm_zero_carbres(nvm),stat=ier) 842 l_error = l_error .OR. (ier .NE. 0) 843 !- 844 ALLOCATE(flam(nvm),stat=ier) 845 l_error = l_error .OR. (ier .NE. 0) 846 ALLOCATE(resist(nvm),stat=ier) 847 l_error = l_error .OR. (ier .NE. 0) 848 !- 849 ALLOCATE(coeff_lcchange_1(nvm),stat=ier) 850 l_error = l_error .OR. (ier .NE. 0) 851 ALLOCATE(coeff_lcchange_10(nvm),stat=ier) 852 l_error = l_error .OR. (ier .NE. 0) 853 ALLOCATE(coeff_lcchange_100(nvm),stat=ier) 854 l_error = l_error .OR. (ier .NE. 0) 855 !- 856 ALLOCATE(lai_max(nvm),stat=ier) 857 l_error = l_error .OR. (ier .NE. 0) 858 ALLOCATE(pheno_model(nvm),stat=ier) 859 l_error = l_error .OR. (ier .NE. 0) 860 ALLOCATE(pheno_type(nvm),stat=ier) 861 l_error = l_error .OR. (ier .NE. 0) 862 !- 863 ALLOCATE(leaffall(nvm),stat=ier) 864 l_error = l_error .OR. (ier .NE. 0) 865 ALLOCATE(leafagecrit(nvm),stat=ier) 866 l_error = l_error .OR. (ier .NE. 0) 867 ALLOCATE(senescence_type(nvm),stat=ier) 868 l_error = l_error .OR. (ier .NE. 0) 869 ALLOCATE(senescence_hum(nvm),stat=ier) 870 l_error = l_error .OR. (ier .NE. 0) 871 ALLOCATE(nosenescence_hum(nvm),stat=ier) 872 l_error = l_error .OR. (ier .NE. 0) 873 ALLOCATE(max_turnover_time(nvm),stat=ier) 874 l_error = l_error .OR. (ier .NE. 0) 875 ALLOCATE(min_turnover_time(nvm),stat=ier) 876 l_error = l_error .OR. (ier .NE. 0) 877 ALLOCATE(min_leaf_age_for_senescence(nvm),stat=ier) 878 l_error = l_error .OR. (ier .NE. 0) 879 ALLOCATE(senescence_temp_c(nvm),stat=ier) 880 l_error = l_error .OR. (ier .NE. 0) 881 ALLOCATE(senescence_temp_b(nvm),stat=ier) 882 l_error = l_error .OR. (ier .NE. 0) 883 ALLOCATE(senescence_temp_a(nvm),stat=ier) 884 l_error = l_error .OR. (ier .NE. 0) 885 ALLOCATE(senescence_temp(nvm,3),stat=ier) 886 l_error = l_error .OR. (ier .NE. 0) 887 !- 888 ALLOCATE(residence_time(nvm),stat=ier) 889 l_error = l_error .OR. (ier .NE. 0) 890 ALLOCATE(tmin_crit(nvm),stat=ier) 891 l_error = l_error .OR. (ier .NE. 0) 892 ALLOCATE(tcm_crit(nvm),stat=ier) 893 l_error = l_error .OR. (ier .NE. 0) 894 !- 895 ALLOCATE(rstruct_const(nvm),stat=ier) 896 l_error = l_error .OR. (ier .NE. 0) 897 ALLOCATE(kzero(nvm),stat=ier) 898 l_error = l_error .OR. (ier .NE. 0) 899 !- 900 ALLOCATE(wmax_veg(nvm),stat=ier) 901 l_error = l_error .OR. (ier .NE. 0) 902 ALLOCATE(humcste(nvm),stat=ier) 903 l_error = l_error .OR. (ier .NE. 0) 904 !- 905 ALLOCATE(snowa_ini(nvm),stat=ier) 906 l_error = l_error .OR. (ier .NE. 0) 907 ALLOCATE(snowa_dec(nvm),stat=ier) 908 l_error = l_error .OR. (ier .NE. 0) 909 ALLOCATE(alb_leaf_vis(nvm),stat=ier) 910 l_error = l_error .OR. (ier .NE. 0) 911 ALLOCATE(alb_leaf_nir(nvm),stat=ier) 912 l_error = l_error .OR. (ier .NE. 0) 913 ALLOCATE(alb_leaf(2*nvm),stat=ier) 914 l_error = l_error .OR. (ier .NE. 0) 915 !- 916 ALLOCATE(pref_soil_veg_sand(nvm),stat=ier) 917 l_error = l_error .OR. (ier .NE. 0) 918 ALLOCATE(pref_soil_veg_loan(nvm),stat=ier) 919 l_error = l_error .OR. (ier .NE. 0) 920 ALLOCATE(pref_soil_veg_clay(nvm),stat=ier) 921 l_error = l_error .OR. (ier .NE. 0) 922 ALLOCATE(pref_soil_veg(nvm,nstm),stat=ier) 923 l_error = l_error .OR. (ier .NE. 0) 924 !- 925 ALLOCATE(lai_initmin(nvm),stat=ier) 926 l_error = l_error .OR. (ier .NE. 0) 927 ALLOCATE(tree(nvm),stat=ier) 928 l_error = l_error .OR. (ier .NE. 0) 929 ALLOCATE(bm_sapl(nvm,nparts),stat=ier) 930 l_error = l_error .OR. (ier .NE. 0) 931 ALLOCATE(migrate(nvm),stat=ier) 932 l_error = l_error .OR. (ier .NE. 0) 933 ALLOCATE(maxdia(nvm),stat=ier) 934 l_error = l_error .OR. (ier .NE. 0) 935 ALLOCATE(cn_sapl(nvm),stat=ier) 936 l_error = l_error .OR. (ier .NE. 0) 937 ALLOCATE(leaf_timecst(nvm),stat=ier) 938 l_error = l_error .OR. (ier .NE. 0) 939 !- 940 ALLOCATE(throughfall_by_pft(nvm),stat=ier) 941 l_error = l_error .OR. (ier .NE. 0) 942 ALLOCATE (rveg_pft(nvm),stat=ier) 943 l_error = l_error .OR. (ier .NE. 0) 820 821 IF(l_error) THEN 822 STOP 'pft _alloc : error in memory allocation of pft parameters' 823 ENDIF 824 825 ! 826 ! 2. Parameters used if ok_sechiba only 827 ! 828 IF (ok_sechiba) THEN 829 l_error=.FALSE. 830 !- 831 ALLOCATE(rstruct_const(nvm),stat=ier) 832 l_error = l_error .OR. (ier .NE. 0) 833 ALLOCATE(kzero(nvm),stat=ier) 834 l_error = l_error .OR. (ier .NE. 0) 835 ALLOCATE (rveg_pft(nvm),stat=ier) 836 l_error = l_error .OR. (ier .NE. 0) 837 ALLOCATE(wmax_veg(nvm),stat=ier) 838 l_error = l_error .OR. (ier .NE. 0) 839 ALLOCATE(throughfall_by_pft(nvm),stat=ier) 840 l_error = l_error .OR. (ier .NE. 0) 841 !- 842 ALLOCATE(snowa_ini(nvm),stat=ier) 843 l_error = l_error .OR. (ier .NE. 0) 844 ALLOCATE(snowa_dec(nvm),stat=ier) 845 l_error = l_error .OR. (ier .NE. 0) 846 ALLOCATE(alb_leaf_vis(nvm),stat=ier) 847 l_error = l_error .OR. (ier .NE. 0) 848 ALLOCATE(alb_leaf_nir(nvm),stat=ier) 849 l_error = l_error .OR. (ier .NE. 0) 850 ALLOCATE(alb_leaf(2*nvm),stat=ier) 851 l_error = l_error .OR. (ier .NE. 0) 852 ENDIF 853 854 IF(l_error) THEN 855 WRITE(numout,*) 'Error in memory allocation for sechiba pft parameters' 856 ENDIF 857 858 ! 859 ! 3. Parameters used if ok_stomate only 860 ! 861 IF (ok_stomate) THEN 862 l_error=.FALSE. 863 !- 864 ALLOCATE(leaf_tab(nvm),stat=ier) 865 l_error = l_error .OR. (ier .NE. 0) 866 ALLOCATE(sla(nvm),stat=ier) 867 l_error = l_error .OR. (ier .NE. 0) 868 ALLOCATE(vcmax_opt(nvm),stat=ier) 869 l_error = l_error .OR. (ier .NE. 0) 870 ALLOCATE(vjmax_opt(nvm),stat=ier) 871 l_error = l_error .OR. (ier .NE. 0) 872 !- 873 ALLOCATE(tphoto_min_a(nvm),stat=ier) 874 l_error = l_error .OR. (ier .NE. 0) 875 ALLOCATE(tphoto_min_b(nvm),stat=ier) 876 l_error = l_error .OR. (ier .NE. 0) 877 ALLOCATE(tphoto_min_c(nvm),stat=ier) 878 l_error = l_error .OR. (ier .NE. 0) 879 ALLOCATE(tphoto_opt_a(nvm),stat=ier) 880 l_error = l_error .OR. (ier .NE. 0) 881 ALLOCATE(tphoto_opt_b(nvm),stat=ier) 882 l_error = l_error .OR. (ier .NE. 0) 883 ALLOCATE(tphoto_opt_c(nvm),stat=ier) 884 l_error = l_error .OR. (ier .NE. 0) 885 ALLOCATE(tphoto_max_a(nvm),stat=ier) 886 l_error = l_error .OR. (ier .NE. 0) 887 ALLOCATE(tphoto_max_b(nvm),stat=ier) 888 l_error = l_error .OR. (ier .NE. 0) 889 ALLOCATE(tphoto_max_c(nvm),stat=ier) 890 l_error = l_error .OR. (ier .NE. 0) 891 !- 892 ALLOCATE(pheno_gdd_crit_c(nvm),stat=ier) 893 l_error = l_error .OR. (ier .NE. 0) 894 ALLOCATE(pheno_gdd_crit_b(nvm),stat=ier) 895 l_error = l_error .OR. (ier .NE. 0) 896 ALLOCATE(pheno_gdd_crit_a(nvm),stat=ier) 897 l_error = l_error .OR. (ier .NE. 0) 898 ALLOCATE(pheno_gdd_crit(nvm,3),stat=ier) 899 l_error = l_error .OR. (ier .NE. 0) 900 ALLOCATE(ngd_crit(nvm),stat=ier) 901 l_error = l_error .OR. (ier .NE. 0) 902 ALLOCATE(ncdgdd_temp(nvm),stat=ier) 903 l_error = l_error .OR. (ier .NE. 0) 904 ALLOCATE(hum_frac(nvm),stat=ier) 905 l_error = l_error .OR. (ier .NE. 0) 906 ALLOCATE(lowgpp_time(nvm),stat=ier) 907 l_error = l_error .OR. (ier .NE. 0) 908 ALLOCATE(hum_min_time(nvm),stat=ier) 909 l_error = l_error .OR. (ier .NE. 0) 910 ALLOCATE(tau_sap(nvm),stat=ier) 911 l_error = l_error .OR. (ier .NE. 0) 912 ALLOCATE(tau_fruit(nvm),stat=ier) 913 l_error = l_error .OR. (ier .NE. 0) 914 ALLOCATE(ecureuil(nvm),stat=ier) 915 l_error = l_error .OR. (ier .NE. 0) 916 ALLOCATE(alloc_min(nvm),stat=ier) 917 l_error = l_error .OR. (ier .NE. 0) 918 ALLOCATE(alloc_max(nvm),stat=ier) 919 l_error = l_error .OR. (ier .NE. 0) 920 ALLOCATE(demi_alloc(nvm),stat=ier) 921 l_error = l_error .OR. (ier .NE. 0) 922 !- 923 ALLOCATE(maint_resp_slope(nvm,3),stat=ier) 924 l_error = l_error .OR. (ier .NE. 0) 925 ALLOCATE(maint_resp_slope_c(nvm),stat=ier) 926 l_error = l_error .OR. (ier .NE. 0) 927 ALLOCATE(maint_resp_slope_b(nvm),stat=ier) 928 l_error = l_error .OR. (ier .NE. 0) 929 ALLOCATE(maint_resp_slope_a(nvm),stat=ier) 930 l_error = l_error .OR. (ier .NE. 0) 931 ALLOCATE(coeff_maint_zero(nvm,nparts),stat=ier) 932 l_error = l_error .OR. (ier .NE. 0) 933 ALLOCATE(cm_zero_leaf(nvm),stat=ier) 934 l_error = l_error .OR. (ier .NE. 0) 935 ALLOCATE(cm_zero_sapabove(nvm),stat=ier) 936 l_error = l_error .OR. (ier .NE. 0) 937 ALLOCATE(cm_zero_sapbelow(nvm),stat=ier) 938 l_error = l_error .OR. (ier .NE. 0) 939 ALLOCATE(cm_zero_heartabove(nvm),stat=ier) 940 l_error = l_error .OR. (ier .NE. 0) 941 ALLOCATE(cm_zero_heartbelow(nvm),stat=ier) 942 l_error = l_error .OR. (ier .NE. 0) 943 ALLOCATE(cm_zero_root(nvm),stat=ier) 944 l_error = l_error .OR. (ier .NE. 0) 945 ALLOCATE(cm_zero_fruit(nvm),stat=ier) 946 l_error = l_error .OR. (ier .NE. 0) 947 ALLOCATE(cm_zero_carbres(nvm),stat=ier) 948 l_error = l_error .OR. (ier .NE. 0) 949 !- 950 ALLOCATE(flam(nvm),stat=ier) 951 l_error = l_error .OR. (ier .NE. 0) 952 ALLOCATE(resist(nvm),stat=ier) 953 l_error = l_error .OR. (ier .NE. 0) 954 !- 955 ALLOCATE(coeff_lcchange_1(nvm),stat=ier) 956 l_error = l_error .OR. (ier .NE. 0) 957 ALLOCATE(coeff_lcchange_10(nvm),stat=ier) 958 l_error = l_error .OR. (ier .NE. 0) 959 ALLOCATE(coeff_lcchange_100(nvm),stat=ier) 960 l_error = l_error .OR. (ier .NE. 0) 961 !- 962 ALLOCATE(lai_max(nvm),stat=ier) 963 l_error = l_error .OR. (ier .NE. 0) 964 ALLOCATE(pheno_model(nvm),stat=ier) 965 l_error = l_error .OR. (ier .NE. 0) 966 ALLOCATE(pheno_type(nvm),stat=ier) 967 l_error = l_error .OR. (ier .NE. 0) 968 !- 969 ALLOCATE(leaffall(nvm),stat=ier) 970 l_error = l_error .OR. (ier .NE. 0) 971 ALLOCATE(leafagecrit(nvm),stat=ier) 972 l_error = l_error .OR. (ier .NE. 0) 973 ALLOCATE(senescence_type(nvm),stat=ier) 974 l_error = l_error .OR. (ier .NE. 0) 975 ALLOCATE(senescence_hum(nvm),stat=ier) 976 l_error = l_error .OR. (ier .NE. 0) 977 ALLOCATE(nosenescence_hum(nvm),stat=ier) 978 l_error = l_error .OR. (ier .NE. 0) 979 ALLOCATE(max_turnover_time(nvm),stat=ier) 980 l_error = l_error .OR. (ier .NE. 0) 981 ALLOCATE(min_turnover_time(nvm),stat=ier) 982 l_error = l_error .OR. (ier .NE. 0) 983 ALLOCATE(min_leaf_age_for_senescence(nvm),stat=ier) 984 l_error = l_error .OR. (ier .NE. 0) 985 ALLOCATE(senescence_temp_c(nvm),stat=ier) 986 l_error = l_error .OR. (ier .NE. 0) 987 ALLOCATE(senescence_temp_b(nvm),stat=ier) 988 l_error = l_error .OR. (ier .NE. 0) 989 ALLOCATE(senescence_temp_a(nvm),stat=ier) 990 l_error = l_error .OR. (ier .NE. 0) 991 ALLOCATE(senescence_temp(nvm,3),stat=ier) 992 l_error = l_error .OR. (ier .NE. 0) 993 !- 994 ALLOCATE(residence_time(nvm),stat=ier) 995 l_error = l_error .OR. (ier .NE. 0) 996 ALLOCATE(tmin_crit(nvm),stat=ier) 997 l_error = l_error .OR. (ier .NE. 0) 998 ALLOCATE(tcm_crit(nvm),stat=ier) 999 l_error = l_error .OR. (ier .NE. 0) 1000 !- 1001 ALLOCATE(lai_initmin(nvm),stat=ier) 1002 l_error = l_error .OR. (ier .NE. 0) 1003 ALLOCATE(tree(nvm),stat=ier) 1004 l_error = l_error .OR. (ier .NE. 0) 1005 ALLOCATE(bm_sapl(nvm,nparts),stat=ier) 1006 l_error = l_error .OR. (ier .NE. 0) 1007 ALLOCATE(migrate(nvm),stat=ier) 1008 l_error = l_error .OR. (ier .NE. 0) 1009 ALLOCATE(maxdia(nvm),stat=ier) 1010 l_error = l_error .OR. (ier .NE. 0) 1011 ALLOCATE(cn_sapl(nvm),stat=ier) 1012 l_error = l_error .OR. (ier .NE. 0) 1013 ALLOCATE(leaf_timecst(nvm),stat=ier) 1014 l_error = l_error .OR. (ier .NE. 0) 1015 ALLOCATE(leaflife_tab(nvm),stat=ier) 1016 l_error = l_error .OR. (ier .NE. 0) 1017 ENDIF 944 1018 ! 945 1019 IF (l_error) THEN 946 STOP 'pft _alloc : error in memory allocation '1020 STOP 'pft _alloc : error in memory allocation of stomate pft parameters' 947 1021 ENDIF 948 1022 … … 1776 1850 1777 1851 END SUBROUTINE getin_stomate_pft_parameters 1778 1779 1780 1852 ! 1853 != 1854 ! 1781 1855 SUBROUTINE pft_parameters_clear 1782 1856 … … 1786 1860 IF(ALLOCATED(PFT_name))DEALLOCATE(PFT_name) 1787 1861 !- 1788 !>> DS new for merge in the trunk ! 15/06/20111789 ! Add for writing history files in stomate_lpj.f90 'treeFracPrimDec' and 'treeFracPrimEver'1790 IF(ALLOCATED(is_deciduous))DEALLOCATE(is_deciduous)1791 IF(ALLOCATED(is_evergreen))DEALLOCATE(is_evergreen)1792 IF(ALLOCATED(leaflife_tab))DEALLOCATE(leaflife_tab)1793 IF(ALLOCATED(is_c3))DEALLOCATE(is_c3)1794 !-1795 1862 IF(ALLOCATED(veget_ori_fixed_test_1))DEALLOCATE(veget_ori_fixed_test_1) 1796 1863 IF(ALLOCATED(llaimax))DEALLOCATE(llaimax) … … 1799 1866 IF(ALLOCATED(type_of_lai))DEALLOCATE(type_of_lai) 1800 1867 IF(ALLOCATED(is_tree))DEALLOCATE(is_tree) 1801 !-1802 IF(ALLOCATED(leaf_tab))DEALLOCATE(leaf_tab)1803 IF(ALLOCATED(sla))DEALLOCATE(sla)1804 1868 IF(ALLOCATED(natural))DEALLOCATE(natural) 1869 !- 1870 !>> DS new for merge in the trunk ! 15/06/2011 1871 ! Add for writing history files in stomate_lpj.f90 'treeFracPrimDec' and 'treeFracPrimEver' 1872 IF(ALLOCATED(is_deciduous))DEALLOCATE(is_deciduous) 1873 IF(ALLOCATED(is_evergreen))DEALLOCATE(is_evergreen) 1874 IF(ALLOCATED(is_c3))DEALLOCATE(is_c3) 1875 !- 1876 IF(ALLOCATED(humcste))DEALLOCATE(humcste) 1877 !- 1878 IF(ALLOCATED(pref_soil_veg_sand))DEALLOCATE(pref_soil_veg_sand) 1879 IF(ALLOCATED(pref_soil_veg_loan))DEALLOCATE(pref_soil_veg_loan) 1880 IF(ALLOCATED(pref_soil_veg_clay))DEALLOCATE(pref_soil_veg_clay) 1881 IF(ALLOCATED(pref_soil_veg))DEALLOCATE(pref_soil_veg) 1805 1882 !- 1806 1883 IF(ALLOCATED(is_c4))DEALLOCATE(is_c4) … … 1812 1889 IF(ALLOCATED(co2_topt_fix))DEALLOCATE(co2_topt_fix) 1813 1890 IF(ALLOCATED(co2_tmax_fix))DEALLOCATE(co2_tmax_fix) 1814 !-1815 1891 IF(ALLOCATED(ext_coeff))DEALLOCATE(ext_coeff) 1892 !- 1893 IF(ALLOCATED(rveg_pft))DEALLOCATE(rveg_pft) 1894 !- 1895 IF(ALLOCATED(rstruct_const))DEALLOCATE(rstruct_const) 1896 IF(ALLOCATED(kzero))DEALLOCATE(kzero) 1897 !- 1898 IF(ALLOCATED(wmax_veg))DEALLOCATE(wmax_veg) 1899 IF(ALLOCATED(throughfall_by_pft))DEALLOCATE(throughfall_by_pft) 1900 !- 1901 IF(ALLOCATED(snowa_ini))DEALLOCATE(snowa_ini) 1902 IF(ALLOCATED(snowa_dec))DEALLOCATE(snowa_dec) 1903 IF(ALLOCATED(alb_leaf_vis))DEALLOCATE(alb_leaf_vis) 1904 IF(ALLOCATED(alb_leaf_nir))DEALLOCATE(alb_leaf_nir) 1905 IF(ALLOCATED(alb_leaf))DEALLOCATE(alb_leaf) 1906 !- 1907 IF(ALLOCATED(leaf_tab))DEALLOCATE(leaf_tab) 1908 IF(ALLOCATED(sla))DEALLOCATE(sla) 1909 !- 1816 1910 IF(ALLOCATED(vcmax_opt))DEALLOCATE(vcmax_opt) 1817 1911 IF(ALLOCATED(vjmax_opt))DEALLOCATE(vjmax_opt) … … 1866 1960 IF(ALLOCATED(alloc_max))DEALLOCATE(alloc_max) 1867 1961 IF(ALLOCATED(demi_alloc))DEALLOCATE(demi_alloc) 1962 !>> DS new for merge in the trunk ! 15/06/2011 1963 IF(ALLOCATED(leaflife_tab))DEALLOCATE(leaflife_tab) 1868 1964 !- 1869 1965 IF(ALLOCATED(leaffall))DEALLOCATE(leaffall) … … 1885 1981 IF(ALLOCATED(tcm_crit))DEALLOCATE(tcm_crit) 1886 1982 !- 1887 IF(ALLOCATED(rstruct_const))DEALLOCATE(rstruct_const)1888 IF(ALLOCATED(kzero))DEALLOCATE(kzero)1889 !-1890 IF(ALLOCATED(wmax_veg))DEALLOCATE(wmax_veg)1891 IF(ALLOCATED(humcste))DEALLOCATE(humcste)1892 !-1893 IF(ALLOCATED(snowa_ini))DEALLOCATE(snowa_ini)1894 IF(ALLOCATED(snowa_dec))DEALLOCATE(snowa_dec)1895 IF(ALLOCATED(alb_leaf_vis))DEALLOCATE(alb_leaf_vis)1896 IF(ALLOCATED(alb_leaf_nir))DEALLOCATE(alb_leaf_nir)1897 IF(ALLOCATED(alb_leaf))DEALLOCATE(alb_leaf)1898 !-1899 IF(ALLOCATED(pref_soil_veg_sand))DEALLOCATE(pref_soil_veg_sand)1900 IF(ALLOCATED(pref_soil_veg_loan))DEALLOCATE(pref_soil_veg_loan)1901 IF(ALLOCATED(pref_soil_veg_clay))DEALLOCATE(pref_soil_veg_clay)1902 IF(ALLOCATED(pref_soil_veg))DEALLOCATE(pref_soil_veg)1903 !-1904 1983 IF(ALLOCATED(lai_initmin))DEALLOCATE(lai_initmin) 1905 1984 IF(ALLOCATED(tree))DEALLOCATE(tree) … … 1909 1988 IF(ALLOCATED(cn_sapl))DEALLOCATE(cn_sapl) 1910 1989 IF(ALLOCATED(leaf_timecst))DEALLOCATE(leaf_timecst) 1911 !-1912 IF(ALLOCATED(throughfall_by_pft))DEALLOCATE(throughfall_by_pft)1913 IF(ALLOCATED(rveg_pft))DEALLOCATE(rveg_pft)1914 1990 1915 1991 END SUBROUTINE pft_parameters_clear
Note: See TracChangeset
for help on using the changeset viewer.