Changeset 7716
- Timestamp:
- 2017-02-22T16:11:16+01:00 (8 years ago)
- Location:
- branches/UKMO/dev_r5518_v3.4_asm_nemovar_community_bgc_ersem/NEMOGCM/NEMO/OPA_SRC/ASM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_v3.4_asm_nemovar_community_bgc_ersem/NEMOGCM/NEMO/OPA_SRC/ASM/asmbal.F90
r6983 r7716 70 70 IF ( ln_logchltotinc .OR. ln_logchlpftinc ) THEN 71 71 #if defined key_fabm 72 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_chl1', logchl_balinc_ersem_chl1 ) 73 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_chl2', logchl_balinc_ersem_chl2 ) 74 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_chl3', logchl_balinc_ersem_chl3 ) 75 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_chl4', logchl_balinc_ersem_chl4 ) 76 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p1c', logchl_balinc_ersem_p1c ) 77 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p1n', logchl_balinc_ersem_p1n ) 78 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p1p', logchl_balinc_ersem_p1p ) 79 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p1s', logchl_balinc_ersem_p1s ) 80 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p2c', logchl_balinc_ersem_p2c ) 81 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p2n', logchl_balinc_ersem_p2n ) 82 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p2p', logchl_balinc_ersem_p2p ) 83 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p3c', logchl_balinc_ersem_p3c ) 84 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p3n', logchl_balinc_ersem_p3n ) 85 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p3p', logchl_balinc_ersem_p3p ) 86 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p4c', logchl_balinc_ersem_p4c ) 87 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p4n', logchl_balinc_ersem_p4n ) 88 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_p4p', logchl_balinc_ersem_p4p ) 89 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z4c', logchl_balinc_ersem_z4c ) 90 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z5c', logchl_balinc_ersem_z5c ) 91 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z5n', logchl_balinc_ersem_z5n ) 92 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z5p', logchl_balinc_ersem_z5p ) 93 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z6c', logchl_balinc_ersem_z6c ) 94 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z6n', logchl_balinc_ersem_z6n ) 95 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_z6p', logchl_balinc_ersem_z6p ) 96 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_n1p', logchl_balinc_ersem_n1p ) 97 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_n3n', logchl_balinc_ersem_n3n ) 98 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_n4n', logchl_balinc_ersem_n4n ) 99 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ersem_n5s', logchl_balinc_ersem_n5s ) 72 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_chl1', logchl_balinc(:,:,:,jp_fabm_m1+jp_fabm_chl1) ) 73 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_chl2', logchl_balinc(:,:,:,jp_fabm_m1+jp_fabm_chl2) ) 74 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_chl3', logchl_balinc(:,:,:,jp_fabm_m1+jp_fabm_chl3) ) 75 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_chl4', logchl_balinc(:,:,:,jp_fabm_m1+jp_fabm_chl4) ) 100 76 #elif defined key_medusa && defined key_foam_medusa 101 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_chn', logchl_balinc_medusa_chn)102 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_chd', logchl_balinc_medusa_chd)103 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_phn', logchl_balinc_medusa_phn)104 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_phd', logchl_balinc_medusa_phd)105 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_pds', logchl_balinc_medusa_pds)106 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_zmi', logchl_balinc_medusa_zmi)107 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_zme', logchl_balinc_medusa_zme)108 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_din', logchl_balinc_medusa_din)109 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_sil', logchl_balinc_medusa_sil)110 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_fer', logchl_balinc_medusa_fer)111 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_det', logchl_balinc_medusa_det)112 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_dtc', logchl_balinc_medusa_dtc)113 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_dic', logchl_balinc_medusa_dic)114 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_alk', logchl_balinc_medusa_alk)115 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ medusa_oxy', logchl_balinc_medusa_oxy)77 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_chn', logchl_balinc(:,:,:,jpchn) ) 78 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_chd', logchl_balinc(:,:,:,jpchd) ) 79 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_phn', logchl_balinc(:,:,:,jpphn) ) 80 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_phd', logchl_balinc(:,:,:,jpphd) ) 81 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_pds', logchl_balinc(:,:,:,jppds) ) 82 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_zmi', logchl_balinc(:,:,:,jpzmi) ) 83 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_zme', logchl_balinc(:,:,:,jpzme) ) 84 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_din', logchl_balinc(:,:,:,jpdin) ) 85 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_sil', logchl_balinc(:,:,:,jpsil) ) 86 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_fer', logchl_balinc(:,:,:,jpfer) ) 87 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_det', logchl_balinc(:,:,:,jpdet) ) 88 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_dtc', logchl_balinc(:,:,:,jpdtc) ) 89 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_dic', logchl_balinc(:,:,:,jpdic) ) 90 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_alk', logchl_balinc(:,:,:,jpalk) ) 91 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_oxy', logchl_balinc(:,:,:,jpoxy) ) 116 92 #elif defined key_hadocc 117 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ hadocc_nut', logchl_balinc_hadocc_nut)118 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ hadocc_phy', logchl_balinc_hadocc_phy)119 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ hadocc_zoo', logchl_balinc_hadocc_zoo)120 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ hadocc_det', logchl_balinc_hadocc_det)121 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ hadocc_dic', logchl_balinc_hadocc_dic)122 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_ hadocc_alk', logchl_balinc_hadocc_alk)93 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_nut', logchl_balinc(:,:,:,jp_had_nut) ) 94 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_phy', logchl_balinc(:,:,:,jp_had_phy) ) 95 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_zoo', logchl_balinc(:,:,:,jp_had_zoo) ) 96 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_det', logchl_balinc(:,:,:,jp_had_det) ) 97 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_dic', logchl_balinc(:,:,:,jp_had_dic) ) 98 CALL iom_rstput( kt, kt, inum, 'logchl_balinc_alk', logchl_balinc(:,:,:,jp_had_alk) ) 123 99 #endif 124 100 ENDIF -
branches/UKMO/dev_r5518_v3.4_asm_nemovar_community_bgc_ersem/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r7472 r7716 53 53 USE bdy_oce, ONLY: bdytmask 54 54 #endif 55 #if defined key_top 56 USE trc, ONLY: & 57 & trn, & 58 & trb 59 USE par_trc, ONLY: & 60 & jptra 61 #endif 55 62 #if defined key_fabm 56 63 USE asmlogchlbal_ersem, ONLY: & 57 64 & asm_logchl_bal_ersem 58 USE trc, ONLY: &59 & trn, &60 & trb61 65 USE par_fabm 62 66 #elif defined key_medusa && defined key_foam_medusa 63 67 USE asmlogchlbal_medusa, ONLY: & 64 68 & asm_logchl_bal_medusa 65 USE trc, ONLY: &66 & trn, &67 & trb68 69 USE par_medusa 69 70 #elif defined key_hadocc 70 71 USE asmlogchlbal_hadocc, ONLY: & 71 72 & asm_logchl_bal_hadocc 72 USE trc, ONLY: &73 & trn, &74 & trb75 73 USE par_hadocc 76 74 #endif … … 130 128 131 129 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_bkginc !: Increment to background logchl 132 #if defined key_fabm 133 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_chl1 !: Increment to ERSEM diatom chl from logchl 134 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_chl2 !: Increment to ERSEM nanophy chl from logchl 135 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_chl3 !: Increment to ERSEM picophy chl from logchl 136 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_chl4 !: Increment to ERSEM microphy chl from logchl 137 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p1c !: Increment to ERSEM diatom c from logchl 138 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p1n !: Increment to ERSEM diatom n from logchl 139 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p1p !: Increment to ERSEM diatom p from logchl 140 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p1s !: Increment to ERSEM diatom s from logchl 141 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p2c !: Increment to ERSEM nanophy c from logchl 142 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p2n !: Increment to ERSEM nanophy n from logchl 143 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p2p !: Increment to ERSEM nanophy p from logchl 144 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p3c !: Increment to ERSEM picophy c from logchl 145 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p3n !: Increment to ERSEM picophy n from logchl 146 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p3p !: Increment to ERSEM picophy p from logchl 147 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p4c !: Increment to ERSEM microphy c from logchl 148 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p4n !: Increment to ERSEM microphy n from logchl 149 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_p4p !: Increment to ERSEM microphy p from logchl 150 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z4c !: Increment to ERSEM mesozoo c from logchl 151 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z5c !: Increment to ERSEM microzoo c from logchl 152 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z5n !: Increment to ERSEM microzoo n from logchl 153 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z5p !: Increment to ERSEM microzoo p from logchl 154 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z6c !: Increment to ERSEM het flag c from logchl 155 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z6n !: Increment to ERSEM het flag n from logchl 156 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_z6p !: Increment to ERSEM het flag p from logchl 157 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_n1p !: Increment to ERSEM phosphate from logchl 158 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_n3n !: Increment to ERSEM nitrate from logchl 159 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_n4n !: Increment to ERSEM ammonium from logchl 160 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_ersem_n5s !: Increment to ERSEM silicate from logchl 161 #elif defined key_medusa && defined key_foam_medusa 162 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_chn !: Increment to MEDUSA nondiatom chl from logchl 163 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_chd !: Increment to MEDUSA diatom chl from logchl 164 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_phn !: Increment to MEDUSA nondiatom n from logchl 165 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_phd !: Increment to MEDUSA diatom n from logchl 166 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_pds !: Increment to MEDUSA diatom s from logchl 167 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_zmi !: Increment to MEDUSA microzoop n from logchl 168 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_zme !: Increment to MEDUSA mesozoop n from logchl 169 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_din !: Increment to MEDUSA nitrate from logchl 170 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_sil !: Increment to MEDUSA silicate from logchl 171 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_fer !: Increment to MEDUSA iron from logchl 172 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_det !: Increment to MEDUSA detritus n from logchl 173 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_dtc !: Increment to MEDUSA detritus c from logchl 174 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_dic !: Increment to MEDUSA dic from logchl 175 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_alk !: Increment to MEDUSA alkalinity from logchl 176 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_medusa_oxy !: Increment to MEDUSA oxygen from logchl 177 #elif defined key_hadocc 178 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_hadocc_nut !: Increment to HadOCC nutrient from logchl 179 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_hadocc_phy !: Increment to HadOCC phytoplankton from logchl 180 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_hadocc_zoo !: Increment to HadOCC zooplankton from logchl 181 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_hadocc_det !: Increment to HadOCC detritus from logchl 182 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_hadocc_dic !: Increment to HadOCC DIC from logchl 183 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: logchl_balinc_hadocc_alk !: Increment to HadOCC alkalinity from logchl 130 #if defined key_top 131 REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: logchl_balinc !: Increment to BGC variables from logchl assim 184 132 #endif 185 133 … … 544 492 #endif 545 493 IF ( ( ln_logchltotinc ).OR.( ln_logchlpftinc ) ) THEN 546 IF ( ln_logchltotinc ) THEN 547 ALLOCATE( logchl_bkginc(jpi,jpj,1)) 548 ELSE IF ( ln_logchlpftinc ) THEN 549 ALLOCATE( logchl_bkginc(jpi,jpj,nn_asmpfts)) 550 ENDIF 494 ALLOCATE( logchl_bkginc(jpi,jpj,nn_asmpfts)) 551 495 logchl_bkginc(:,:,:) = 0.0 552 #if defined key_fabm 553 ALLOCATE( logchl_balinc_ersem_chl1(jpi,jpj,jpk) ) 554 ALLOCATE( logchl_balinc_ersem_chl2(jpi,jpj,jpk) ) 555 ALLOCATE( logchl_balinc_ersem_chl3(jpi,jpj,jpk) ) 556 ALLOCATE( logchl_balinc_ersem_chl4(jpi,jpj,jpk) ) 557 ALLOCATE( logchl_balinc_ersem_p1c(jpi,jpj,jpk) ) 558 ALLOCATE( logchl_balinc_ersem_p1n(jpi,jpj,jpk) ) 559 ALLOCATE( logchl_balinc_ersem_p1p(jpi,jpj,jpk) ) 560 ALLOCATE( logchl_balinc_ersem_p1s(jpi,jpj,jpk) ) 561 ALLOCATE( logchl_balinc_ersem_p2c(jpi,jpj,jpk) ) 562 ALLOCATE( logchl_balinc_ersem_p2n(jpi,jpj,jpk) ) 563 ALLOCATE( logchl_balinc_ersem_p2p(jpi,jpj,jpk) ) 564 ALLOCATE( logchl_balinc_ersem_p3c(jpi,jpj,jpk) ) 565 ALLOCATE( logchl_balinc_ersem_p3n(jpi,jpj,jpk) ) 566 ALLOCATE( logchl_balinc_ersem_p3p(jpi,jpj,jpk) ) 567 ALLOCATE( logchl_balinc_ersem_p4c(jpi,jpj,jpk) ) 568 ALLOCATE( logchl_balinc_ersem_p4n(jpi,jpj,jpk) ) 569 ALLOCATE( logchl_balinc_ersem_p4p(jpi,jpj,jpk) ) 570 ALLOCATE( logchl_balinc_ersem_z4c(jpi,jpj,jpk) ) 571 ALLOCATE( logchl_balinc_ersem_z5c(jpi,jpj,jpk) ) 572 ALLOCATE( logchl_balinc_ersem_z5n(jpi,jpj,jpk) ) 573 ALLOCATE( logchl_balinc_ersem_z5p(jpi,jpj,jpk) ) 574 ALLOCATE( logchl_balinc_ersem_z6c(jpi,jpj,jpk) ) 575 ALLOCATE( logchl_balinc_ersem_z6n(jpi,jpj,jpk) ) 576 ALLOCATE( logchl_balinc_ersem_z6p(jpi,jpj,jpk) ) 577 ALLOCATE( logchl_balinc_ersem_n1p(jpi,jpj,jpk) ) 578 ALLOCATE( logchl_balinc_ersem_n3n(jpi,jpj,jpk) ) 579 ALLOCATE( logchl_balinc_ersem_n4n(jpi,jpj,jpk) ) 580 ALLOCATE( logchl_balinc_ersem_n5s(jpi,jpj,jpk) ) 581 logchl_balinc_ersem_chl1(:,:,:) = 0.0 582 logchl_balinc_ersem_chl2(:,:,:) = 0.0 583 logchl_balinc_ersem_chl3(:,:,:) = 0.0 584 logchl_balinc_ersem_chl4(:,:,:) = 0.0 585 logchl_balinc_ersem_p1c(:,:,:) = 0.0 586 logchl_balinc_ersem_p1n(:,:,:) = 0.0 587 logchl_balinc_ersem_p1p(:,:,:) = 0.0 588 logchl_balinc_ersem_p1s(:,:,:) = 0.0 589 logchl_balinc_ersem_p2c(:,:,:) = 0.0 590 logchl_balinc_ersem_p2n(:,:,:) = 0.0 591 logchl_balinc_ersem_p2p(:,:,:) = 0.0 592 logchl_balinc_ersem_p3c(:,:,:) = 0.0 593 logchl_balinc_ersem_p3n(:,:,:) = 0.0 594 logchl_balinc_ersem_p3p(:,:,:) = 0.0 595 logchl_balinc_ersem_p4c(:,:,:) = 0.0 596 logchl_balinc_ersem_p4n(:,:,:) = 0.0 597 logchl_balinc_ersem_p4p(:,:,:) = 0.0 598 logchl_balinc_ersem_z4c(:,:,:) = 0.0 599 logchl_balinc_ersem_z5c(:,:,:) = 0.0 600 logchl_balinc_ersem_z5n(:,:,:) = 0.0 601 logchl_balinc_ersem_z5p(:,:,:) = 0.0 602 logchl_balinc_ersem_z6c(:,:,:) = 0.0 603 logchl_balinc_ersem_z6n(:,:,:) = 0.0 604 logchl_balinc_ersem_z6p(:,:,:) = 0.0 605 logchl_balinc_ersem_n1p(:,:,:) = 0.0 606 logchl_balinc_ersem_n3n(:,:,:) = 0.0 607 logchl_balinc_ersem_n4n(:,:,:) = 0.0 608 logchl_balinc_ersem_n5s(:,:,:) = 0.0 609 #elif defined key_medusa && defined key_foam_medusa 610 ALLOCATE( logchl_balinc_medusa_chn(jpi,jpj,jpk) ) 611 ALLOCATE( logchl_balinc_medusa_chd(jpi,jpj,jpk) ) 612 ALLOCATE( logchl_balinc_medusa_phn(jpi,jpj,jpk) ) 613 ALLOCATE( logchl_balinc_medusa_phd(jpi,jpj,jpk) ) 614 ALLOCATE( logchl_balinc_medusa_pds(jpi,jpj,jpk) ) 615 ALLOCATE( logchl_balinc_medusa_zmi(jpi,jpj,jpk) ) 616 ALLOCATE( logchl_balinc_medusa_zme(jpi,jpj,jpk) ) 617 ALLOCATE( logchl_balinc_medusa_din(jpi,jpj,jpk) ) 618 ALLOCATE( logchl_balinc_medusa_sil(jpi,jpj,jpk) ) 619 ALLOCATE( logchl_balinc_medusa_fer(jpi,jpj,jpk) ) 620 ALLOCATE( logchl_balinc_medusa_det(jpi,jpj,jpk) ) 621 ALLOCATE( logchl_balinc_medusa_dtc(jpi,jpj,jpk) ) 622 ALLOCATE( logchl_balinc_medusa_dic(jpi,jpj,jpk) ) 623 ALLOCATE( logchl_balinc_medusa_alk(jpi,jpj,jpk) ) 624 ALLOCATE( logchl_balinc_medusa_oxy(jpi,jpj,jpk) ) 625 logchl_balinc_medusa_chn(:,:,:) = 0.0 626 logchl_balinc_medusa_chd(:,:,:) = 0.0 627 logchl_balinc_medusa_phn(:,:,:) = 0.0 628 logchl_balinc_medusa_phd(:,:,:) = 0.0 629 logchl_balinc_medusa_pds(:,:,:) = 0.0 630 logchl_balinc_medusa_zmi(:,:,:) = 0.0 631 logchl_balinc_medusa_zme(:,:,:) = 0.0 632 logchl_balinc_medusa_din(:,:,:) = 0.0 633 logchl_balinc_medusa_sil(:,:,:) = 0.0 634 logchl_balinc_medusa_fer(:,:,:) = 0.0 635 logchl_balinc_medusa_det(:,:,:) = 0.0 636 logchl_balinc_medusa_dtc(:,:,:) = 0.0 637 logchl_balinc_medusa_dic(:,:,:) = 0.0 638 logchl_balinc_medusa_alk(:,:,:) = 0.0 639 logchl_balinc_medusa_oxy(:,:,:) = 0.0 640 #elif defined key_hadocc 641 ALLOCATE( logchl_balinc_hadocc_nut(jpi,jpj,jpk) ) 642 ALLOCATE( logchl_balinc_hadocc_phy(jpi,jpj,jpk) ) 643 ALLOCATE( logchl_balinc_hadocc_zoo(jpi,jpj,jpk) ) 644 ALLOCATE( logchl_balinc_hadocc_det(jpi,jpj,jpk) ) 645 ALLOCATE( logchl_balinc_hadocc_dic(jpi,jpj,jpk) ) 646 ALLOCATE( logchl_balinc_hadocc_alk(jpi,jpj,jpk) ) 647 logchl_balinc_hadocc_nut(:,:,:) = 0.0 648 logchl_balinc_hadocc_phy(:,:,:) = 0.0 649 logchl_balinc_hadocc_zoo(:,:,:) = 0.0 650 logchl_balinc_hadocc_det(:,:,:) = 0.0 651 logchl_balinc_hadocc_dic(:,:,:) = 0.0 652 logchl_balinc_hadocc_alk(:,:,:) = 0.0 496 #if defined key_top 497 ALLOCATE( logchl_balinc(jpi,jpj,jpk,jptra) ) 498 logchl_balinc(:,:,:,:) = 0.0 653 499 #endif 654 500 ENDIF … … 1561 1407 1562 1408 #if defined key_fabm 1563 CALL asm_logchl_bal_ersem( ln_logchlpftinc, nn_asmpfts, & 1564 & mld_choice_bgc, logchl_bkginc, & 1565 & logchl_balinc_ersem_chl1, logchl_balinc_ersem_chl2, & 1566 & logchl_balinc_ersem_chl3, logchl_balinc_ersem_chl4, & 1567 & logchl_balinc_ersem_p1c, logchl_balinc_ersem_p1n, & 1568 & logchl_balinc_ersem_p1p, logchl_balinc_ersem_p1s, & 1569 & logchl_balinc_ersem_p2c, logchl_balinc_ersem_p2n, & 1570 & logchl_balinc_ersem_p2p, logchl_balinc_ersem_p3c, & 1571 & logchl_balinc_ersem_p3n, logchl_balinc_ersem_p3p, & 1572 & logchl_balinc_ersem_p4c, logchl_balinc_ersem_p4n, & 1573 & logchl_balinc_ersem_p4p, logchl_balinc_ersem_z4c, & 1574 & logchl_balinc_ersem_z5c, logchl_balinc_ersem_z5n, & 1575 & logchl_balinc_ersem_z5p, logchl_balinc_ersem_z6c, & 1576 & logchl_balinc_ersem_z6n, logchl_balinc_ersem_z6p, & 1577 & logchl_balinc_ersem_n1p, logchl_balinc_ersem_n3n, & 1578 & logchl_balinc_ersem_n4n, logchl_balinc_ersem_n5s ) 1409 CALL asm_logchl_bal_ersem( ln_logchlpftinc, nn_asmpfts, mld_choice_bgc, & 1410 & logchl_bkginc, logchl_balinc ) 1579 1411 #elif defined key_medusa && defined key_foam_medusa 1580 1412 !CALL asm_logchl_bal_medusa() … … 1611 1443 ENDIF 1612 1444 1613 ! Update the biogeochemical tendencies 1445 ! Update the biogeochemical variables 1446 ! Add directly to trn and trb, rather than to tra, as not a tendency 1614 1447 #if defined key_fabm 1615 1448 DO jk = 1, jpkm1 1616 ! Add directly to trn and trb, rather than to tra, as not a tendency 1617 trn(:,:,jk,jp_fabm_m1+jp_fabm_chl1) = trn(:,:,jk,jp_fabm_m1+jp_fabm_chl1) + & 1618 & logchl_balinc_ersem_chl1(:,:,jk) * zincwgt 1619 trn(:,:,jk,jp_fabm_m1+jp_fabm_chl2) = trn(:,:,jk,jp_fabm_m1+jp_fabm_chl2) + & 1620 & logchl_balinc_ersem_chl2(:,:,jk) * zincwgt 1621 trn(:,:,jk,jp_fabm_m1+jp_fabm_chl3) = trn(:,:,jk,jp_fabm_m1+jp_fabm_chl3) + & 1622 & logchl_balinc_ersem_chl3(:,:,jk) * zincwgt 1623 trn(:,:,jk,jp_fabm_m1+jp_fabm_chl4) = trn(:,:,jk,jp_fabm_m1+jp_fabm_chl4) + & 1624 & logchl_balinc_ersem_chl4(:,:,jk) * zincwgt 1625 trn(:,:,jk,jp_fabm_m1+jp_fabm_p1c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p1c) + & 1626 & logchl_balinc_ersem_p1c(:,:,jk) * zincwgt 1627 trn(:,:,jk,jp_fabm_m1+jp_fabm_p1n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p1n) + & 1628 & logchl_balinc_ersem_p1n(:,:,jk) * zincwgt 1629 trn(:,:,jk,jp_fabm_m1+jp_fabm_p1p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p1p) + & 1630 & logchl_balinc_ersem_p1p(:,:,jk) * zincwgt 1631 trn(:,:,jk,jp_fabm_m1+jp_fabm_p1s) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p1s) + & 1632 & logchl_balinc_ersem_p1s(:,:,jk) * zincwgt 1633 trn(:,:,jk,jp_fabm_m1+jp_fabm_p2c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p2c) + & 1634 & logchl_balinc_ersem_p2c(:,:,jk) * zincwgt 1635 trn(:,:,jk,jp_fabm_m1+jp_fabm_p2n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p2n) + & 1636 & logchl_balinc_ersem_p2n(:,:,jk) * zincwgt 1637 trn(:,:,jk,jp_fabm_m1+jp_fabm_p2p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p2p) + & 1638 & logchl_balinc_ersem_p2p(:,:,jk) * zincwgt 1639 trn(:,:,jk,jp_fabm_m1+jp_fabm_p3c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p3c) + & 1640 & logchl_balinc_ersem_p3c(:,:,jk) * zincwgt 1641 trn(:,:,jk,jp_fabm_m1+jp_fabm_p3n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p3n) + & 1642 & logchl_balinc_ersem_p3n(:,:,jk) * zincwgt 1643 trn(:,:,jk,jp_fabm_m1+jp_fabm_p3p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p3p) + & 1644 & logchl_balinc_ersem_p3p(:,:,jk) * zincwgt 1645 trn(:,:,jk,jp_fabm_m1+jp_fabm_p4c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p4c) + & 1646 & logchl_balinc_ersem_p4c(:,:,jk) * zincwgt 1647 trn(:,:,jk,jp_fabm_m1+jp_fabm_p4n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p4n) + & 1648 & logchl_balinc_ersem_p4n(:,:,jk) * zincwgt 1649 trn(:,:,jk,jp_fabm_m1+jp_fabm_p4p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_p4p) + & 1650 & logchl_balinc_ersem_p4p(:,:,jk) * zincwgt 1651 trn(:,:,jk,jp_fabm_m1+jp_fabm_z4c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z4c) + & 1652 & logchl_balinc_ersem_z4c(:,:,jk) * zincwgt 1653 trn(:,:,jk,jp_fabm_m1+jp_fabm_z5c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z5c) + & 1654 & logchl_balinc_ersem_z5c(:,:,jk) * zincwgt 1655 trn(:,:,jk,jp_fabm_m1+jp_fabm_z5n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z5n) + & 1656 & logchl_balinc_ersem_z5n(:,:,jk) * zincwgt 1657 trn(:,:,jk,jp_fabm_m1+jp_fabm_z5p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z5p) + & 1658 & logchl_balinc_ersem_z5p(:,:,jk) * zincwgt 1659 trn(:,:,jk,jp_fabm_m1+jp_fabm_z6c) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z6c) + & 1660 & logchl_balinc_ersem_z6c(:,:,jk) * zincwgt 1661 trn(:,:,jk,jp_fabm_m1+jp_fabm_z6n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z6n) + & 1662 & logchl_balinc_ersem_z6n(:,:,jk) * zincwgt 1663 trn(:,:,jk,jp_fabm_m1+jp_fabm_z6p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_z6p) + & 1664 & logchl_balinc_ersem_z6p(:,:,jk) * zincwgt 1665 trn(:,:,jk,jp_fabm_m1+jp_fabm_n1p) = trn(:,:,jk,jp_fabm_m1+jp_fabm_n1p) + & 1666 & logchl_balinc_ersem_n1p(:,:,jk) * zincwgt 1667 trn(:,:,jk,jp_fabm_m1+jp_fabm_n3n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_n3n) + & 1668 & logchl_balinc_ersem_n3n(:,:,jk) * zincwgt 1669 trn(:,:,jk,jp_fabm_m1+jp_fabm_n4n) = trn(:,:,jk,jp_fabm_m1+jp_fabm_n4n) + & 1670 & logchl_balinc_ersem_n4n(:,:,jk) * zincwgt 1671 trn(:,:,jk,jp_fabm_m1+jp_fabm_n5s) = trn(:,:,jk,jp_fabm_m1+jp_fabm_n5s) + & 1672 & logchl_balinc_ersem_n5s(:,:,jk) * zincwgt 1673 1674 trb(:,:,jk,jp_fabm_m1+jp_fabm_chl1) = trb(:,:,jk,jp_fabm_m1+jp_fabm_chl1) + & 1675 & logchl_balinc_ersem_chl1(:,:,jk) * zincwgt 1676 trb(:,:,jk,jp_fabm_m1+jp_fabm_chl2) = trb(:,:,jk,jp_fabm_m1+jp_fabm_chl2) + & 1677 & logchl_balinc_ersem_chl2(:,:,jk) * zincwgt 1678 trb(:,:,jk,jp_fabm_m1+jp_fabm_chl3) = trb(:,:,jk,jp_fabm_m1+jp_fabm_chl3) + & 1679 & logchl_balinc_ersem_chl3(:,:,jk) * zincwgt 1680 trb(:,:,jk,jp_fabm_m1+jp_fabm_chl4) = trb(:,:,jk,jp_fabm_m1+jp_fabm_chl4) + & 1681 & logchl_balinc_ersem_chl4(:,:,jk) * zincwgt 1682 trb(:,:,jk,jp_fabm_m1+jp_fabm_p1c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p1c) + & 1683 & logchl_balinc_ersem_p1c(:,:,jk) * zincwgt 1684 trb(:,:,jk,jp_fabm_m1+jp_fabm_p1n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p1n) + & 1685 & logchl_balinc_ersem_p1n(:,:,jk) * zincwgt 1686 trb(:,:,jk,jp_fabm_m1+jp_fabm_p1p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p1p) + & 1687 & logchl_balinc_ersem_p1p(:,:,jk) * zincwgt 1688 trb(:,:,jk,jp_fabm_m1+jp_fabm_p1s) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p1s) + & 1689 & logchl_balinc_ersem_p1s(:,:,jk) * zincwgt 1690 trb(:,:,jk,jp_fabm_m1+jp_fabm_p2c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p2c) + & 1691 & logchl_balinc_ersem_p2c(:,:,jk) * zincwgt 1692 trb(:,:,jk,jp_fabm_m1+jp_fabm_p2n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p2n) + & 1693 & logchl_balinc_ersem_p2n(:,:,jk) * zincwgt 1694 trb(:,:,jk,jp_fabm_m1+jp_fabm_p2p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p2p) + & 1695 & logchl_balinc_ersem_p2p(:,:,jk) * zincwgt 1696 trb(:,:,jk,jp_fabm_m1+jp_fabm_p3c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p3c) + & 1697 & logchl_balinc_ersem_p3c(:,:,jk) * zincwgt 1698 trb(:,:,jk,jp_fabm_m1+jp_fabm_p3n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p3n) + & 1699 & logchl_balinc_ersem_p3n(:,:,jk) * zincwgt 1700 trb(:,:,jk,jp_fabm_m1+jp_fabm_p3p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p3p) + & 1701 & logchl_balinc_ersem_p3p(:,:,jk) * zincwgt 1702 trb(:,:,jk,jp_fabm_m1+jp_fabm_p4c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p4c) + & 1703 & logchl_balinc_ersem_p4c(:,:,jk) * zincwgt 1704 trb(:,:,jk,jp_fabm_m1+jp_fabm_p4n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p4n) + & 1705 & logchl_balinc_ersem_p4n(:,:,jk) * zincwgt 1706 trb(:,:,jk,jp_fabm_m1+jp_fabm_p4p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_p4p) + & 1707 & logchl_balinc_ersem_p4p(:,:,jk) * zincwgt 1708 trb(:,:,jk,jp_fabm_m1+jp_fabm_z4c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z4c) + & 1709 & logchl_balinc_ersem_z4c(:,:,jk) * zincwgt 1710 trb(:,:,jk,jp_fabm_m1+jp_fabm_z5c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z5c) + & 1711 & logchl_balinc_ersem_z5c(:,:,jk) * zincwgt 1712 trb(:,:,jk,jp_fabm_m1+jp_fabm_z5n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z5n) + & 1713 & logchl_balinc_ersem_z5n(:,:,jk) * zincwgt 1714 trb(:,:,jk,jp_fabm_m1+jp_fabm_z5p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z5p) + & 1715 & logchl_balinc_ersem_z5p(:,:,jk) * zincwgt 1716 trb(:,:,jk,jp_fabm_m1+jp_fabm_z6c) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z6c) + & 1717 & logchl_balinc_ersem_z6c(:,:,jk) * zincwgt 1718 trb(:,:,jk,jp_fabm_m1+jp_fabm_z6n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z6n) + & 1719 & logchl_balinc_ersem_z6n(:,:,jk) * zincwgt 1720 trb(:,:,jk,jp_fabm_m1+jp_fabm_z6p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_z6p) + & 1721 & logchl_balinc_ersem_z6p(:,:,jk) * zincwgt 1722 trb(:,:,jk,jp_fabm_m1+jp_fabm_n1p) = trb(:,:,jk,jp_fabm_m1+jp_fabm_n1p) + & 1723 & logchl_balinc_ersem_n1p(:,:,jk) * zincwgt 1724 trb(:,:,jk,jp_fabm_m1+jp_fabm_n3n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_n3n) + & 1725 & logchl_balinc_ersem_n3n(:,:,jk) * zincwgt 1726 trb(:,:,jk,jp_fabm_m1+jp_fabm_n4n) = trb(:,:,jk,jp_fabm_m1+jp_fabm_n4n) + & 1727 & logchl_balinc_ersem_n4n(:,:,jk) * zincwgt 1728 trb(:,:,jk,jp_fabm_m1+jp_fabm_n5s) = trb(:,:,jk,jp_fabm_m1+jp_fabm_n5s) + & 1729 & logchl_balinc_ersem_n5s(:,:,jk) * zincwgt 1449 trn(:,:,jk,jp_fabm0:jp_fabm1) = trn(:,:,jk,jp_fabm0:jp_fabm1) + & 1450 & logchl_balinc(:,:,jk,jp_fabm0:jp_fabm1) * zincwgt 1451 trb(:,:,jk,jp_fabm0:jp_fabm1) = trb(:,:,jk,jp_fabm0:jp_fabm1) + & 1452 & logchl_balinc(:,:,jk,jp_fabm0:jp_fabm1) * zincwgt 1730 1453 END DO 1731 1732 1454 #elif defined key_medusa && defined key_foam_medusa 1733 1455 DO jk = 1, jpkm1 1734 ! Add directly to trn and trb, rather than to tra, as not a tendency 1735 trn(:,:,jk,jpchn) = trn(:,:,jk,jpchn) + logchl_balinc_medusa_chn(:,:,jk) * zincwgt 1736 trn(:,:,jk,jpchd) = trn(:,:,jk,jpchd) + logchl_balinc_medusa_chd(:,:,jk) * zincwgt 1737 trn(:,:,jk,jpphn) = trn(:,:,jk,jpphn) + logchl_balinc_medusa_phn(:,:,jk) * zincwgt 1738 trn(:,:,jk,jpphd) = trn(:,:,jk,jpphd) + logchl_balinc_medusa_phd(:,:,jk) * zincwgt 1739 trn(:,:,jk,jpzmi) = trn(:,:,jk,jpzmi) + logchl_balinc_medusa_zmi(:,:,jk) * zincwgt 1740 trn(:,:,jk,jpzme) = trn(:,:,jk,jpzme) + logchl_balinc_medusa_zme(:,:,jk) * zincwgt 1741 trn(:,:,jk,jpdin) = trn(:,:,jk,jpdin) + logchl_balinc_medusa_din(:,:,jk) * zincwgt 1742 trn(:,:,jk,jpsil) = trn(:,:,jk,jpsil) + logchl_balinc_medusa_sil(:,:,jk) * zincwgt 1743 trn(:,:,jk,jpfer) = trn(:,:,jk,jpfer) + logchl_balinc_medusa_fer(:,:,jk) * zincwgt 1744 trn(:,:,jk,jpdet) = trn(:,:,jk,jpdet) + logchl_balinc_medusa_det(:,:,jk) * zincwgt 1745 trn(:,:,jk,jppds) = trn(:,:,jk,jppds) + logchl_balinc_medusa_pds(:,:,jk) * zincwgt 1746 trn(:,:,jk,jpdtc) = trn(:,:,jk,jpdtc) + logchl_balinc_medusa_dtc(:,:,jk) * zincwgt 1747 trn(:,:,jk,jpdic) = trn(:,:,jk,jpdic) + logchl_balinc_medusa_dic(:,:,jk) * zincwgt 1748 trn(:,:,jk,jpalk) = trn(:,:,jk,jpalk) + logchl_balinc_medusa_alk(:,:,jk) * zincwgt 1749 trn(:,:,jk,jpoxy) = trn(:,:,jk,jpoxy) + logchl_balinc_medusa_oxy(:,:,jk) * zincwgt 1750 1751 trb(:,:,jk,jpchn) = trb(:,:,jk,jpchn) + logchl_balinc_medusa_chn(:,:,jk) * zincwgt 1752 trb(:,:,jk,jpchd) = trb(:,:,jk,jpchd) + logchl_balinc_medusa_chd(:,:,jk) * zincwgt 1753 trb(:,:,jk,jpphn) = trb(:,:,jk,jpphn) + logchl_balinc_medusa_phn(:,:,jk) * zincwgt 1754 trb(:,:,jk,jpphd) = trb(:,:,jk,jpphd) + logchl_balinc_medusa_phd(:,:,jk) * zincwgt 1755 trb(:,:,jk,jpzmi) = trb(:,:,jk,jpzmi) + logchl_balinc_medusa_zmi(:,:,jk) * zincwgt 1756 trb(:,:,jk,jpzme) = trb(:,:,jk,jpzme) + logchl_balinc_medusa_zme(:,:,jk) * zincwgt 1757 trb(:,:,jk,jpdin) = trb(:,:,jk,jpdin) + logchl_balinc_medusa_din(:,:,jk) * zincwgt 1758 trb(:,:,jk,jpsil) = trb(:,:,jk,jpsil) + logchl_balinc_medusa_sil(:,:,jk) * zincwgt 1759 trb(:,:,jk,jpfer) = trb(:,:,jk,jpfer) + logchl_balinc_medusa_fer(:,:,jk) * zincwgt 1760 trb(:,:,jk,jpdet) = trb(:,:,jk,jpdet) + logchl_balinc_medusa_det(:,:,jk) * zincwgt 1761 trb(:,:,jk,jppds) = trb(:,:,jk,jppds) + logchl_balinc_medusa_pds(:,:,jk) * zincwgt 1762 trb(:,:,jk,jpdtc) = trb(:,:,jk,jpdtc) + logchl_balinc_medusa_dtc(:,:,jk) * zincwgt 1763 trb(:,:,jk,jpdic) = trb(:,:,jk,jpdic) + logchl_balinc_medusa_dic(:,:,jk) * zincwgt 1764 trb(:,:,jk,jpalk) = trb(:,:,jk,jpalk) + logchl_balinc_medusa_alk(:,:,jk) * zincwgt 1765 trb(:,:,jk,jpoxy) = trb(:,:,jk,jpoxy) + logchl_balinc_medusa_oxy(:,:,jk) * zincwgt 1456 trn(:,:,jk,jp_msa0:jp_msa1) = trn(:,:,jk,jp_msa0:jp_msa1) + & 1457 & logchl_balinc(:,:,jk,jp_msa0:jp_msa1) * zincwgt 1458 trb(:,:,jk,jp_msa0:jp_msa1) = trb(:,:,jk,jp_msa0:jp_msa1) + & 1459 & logchl_balinc(:,:,jk,jp_msa0:jp_msa1) * zincwgt 1766 1460 END DO 1767 1768 1461 #elif defined key_hadocc 1769 1462 DO jk = 1, jpkm1 1770 ! Add directly to trn and trb, rather than to tra, as not a tendency 1771 trn(:,:,jk,jp_had_nut) = trn(:,:,jk,jp_had_nut) + logchl_balinc_hadocc_nut(:,:,jk) * zincwgt 1772 trn(:,:,jk,jp_had_phy) = trn(:,:,jk,jp_had_phy) + logchl_balinc_hadocc_phy(:,:,jk) * zincwgt 1773 trn(:,:,jk,jp_had_zoo) = trn(:,:,jk,jp_had_zoo) + logchl_balinc_hadocc_zoo(:,:,jk) * zincwgt 1774 trn(:,:,jk,jp_had_pdn) = trn(:,:,jk,jp_had_pdn) + logchl_balinc_hadocc_det(:,:,jk) * zincwgt 1775 trn(:,:,jk,jp_had_dic) = trn(:,:,jk,jp_had_dic) + logchl_balinc_hadocc_dic(:,:,jk) * zincwgt 1776 trn(:,:,jk,jp_had_alk) = trn(:,:,jk,jp_had_alk) + logchl_balinc_hadocc_alk(:,:,jk) * zincwgt 1777 1778 trb(:,:,jk,jp_had_nut) = trb(:,:,jk,jp_had_nut) + logchl_balinc_hadocc_nut(:,:,jk) * zincwgt 1779 trb(:,:,jk,jp_had_phy) = trb(:,:,jk,jp_had_phy) + logchl_balinc_hadocc_phy(:,:,jk) * zincwgt 1780 trb(:,:,jk,jp_had_zoo) = trb(:,:,jk,jp_had_zoo) + logchl_balinc_hadocc_zoo(:,:,jk) * zincwgt 1781 trb(:,:,jk,jp_had_pdn) = trb(:,:,jk,jp_had_pdn) + logchl_balinc_hadocc_det(:,:,jk) * zincwgt 1782 trb(:,:,jk,jp_had_dic) = trb(:,:,jk,jp_had_dic) + logchl_balinc_hadocc_dic(:,:,jk) * zincwgt 1783 trb(:,:,jk,jp_had_alk) = trb(:,:,jk,jp_had_alk) + logchl_balinc_hadocc_alk(:,:,jk) * zincwgt 1463 trn(:,:,jk,jp_had0:jp_had1) = trn(:,:,jk,jp_had0:jp_had1) + & 1464 & logchl_balinc(:,:,jk,jp_had0:jp_had1) * zincwgt 1465 trb(:,:,jk,jp_had0:jp_had1) = trb(:,:,jk,jp_had0:jp_had1) + & 1466 & logchl_balinc(:,:,jk,jp_had0:jp_had1) * zincwgt 1784 1467 END DO 1785 1468 #endif … … 1805 1488 CALL ctl_warn( ' Doing direct initialisation of ERSEM with chlorophyll assimilation', & 1806 1489 & ' Background state is taken from model rather than background file' ) 1807 trn(:,:,:,jp_fabm_m1+jp_fabm_chl1) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl1) + & 1808 & logchl_balinc_ersem_chl1(:,:,:) 1809 trn(:,:,:,jp_fabm_m1+jp_fabm_chl2) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl2) + & 1810 & logchl_balinc_ersem_chl2(:,:,:) 1811 trn(:,:,:,jp_fabm_m1+jp_fabm_chl3) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl3) + & 1812 & logchl_balinc_ersem_chl3(:,:,:) 1813 trn(:,:,:,jp_fabm_m1+jp_fabm_chl4) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl4) + & 1814 & logchl_balinc_ersem_chl4(:,:,:) 1815 trn(:,:,:,jp_fabm_m1+jp_fabm_p1c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1c) + & 1816 & logchl_balinc_ersem_p1c(:,:,:) 1817 trn(:,:,:,jp_fabm_m1+jp_fabm_p1n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1n) + & 1818 & logchl_balinc_ersem_p1n(:,:,:) 1819 trn(:,:,:,jp_fabm_m1+jp_fabm_p1p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1p) + & 1820 & logchl_balinc_ersem_p1p(:,:,:) 1821 trn(:,:,:,jp_fabm_m1+jp_fabm_p1s) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1s) + & 1822 & logchl_balinc_ersem_p1s(:,:,:) 1823 trn(:,:,:,jp_fabm_m1+jp_fabm_p2c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p2c) + & 1824 & logchl_balinc_ersem_p2c(:,:,:) 1825 trn(:,:,:,jp_fabm_m1+jp_fabm_p2n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p2n) + & 1826 & logchl_balinc_ersem_p2n(:,:,:) 1827 trn(:,:,:,jp_fabm_m1+jp_fabm_p2p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p2p) + & 1828 & logchl_balinc_ersem_p2p(:,:,:) 1829 trn(:,:,:,jp_fabm_m1+jp_fabm_p3c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p3c) + & 1830 & logchl_balinc_ersem_p3c(:,:,:) 1831 trn(:,:,:,jp_fabm_m1+jp_fabm_p3n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p3n) + & 1832 & logchl_balinc_ersem_p3n(:,:,:) 1833 trn(:,:,:,jp_fabm_m1+jp_fabm_p3p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p3p) + & 1834 & logchl_balinc_ersem_p3p(:,:,:) 1835 trn(:,:,:,jp_fabm_m1+jp_fabm_p4c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p4c) + & 1836 & logchl_balinc_ersem_p4c(:,:,:) 1837 trn(:,:,:,jp_fabm_m1+jp_fabm_p4n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p4n) + & 1838 & logchl_balinc_ersem_p4n(:,:,:) 1839 trn(:,:,:,jp_fabm_m1+jp_fabm_p4p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p4p) + & 1840 & logchl_balinc_ersem_p4p(:,:,:) 1841 trn(:,:,:,jp_fabm_m1+jp_fabm_z4c) = trn(:,:,:,jp_fabm_m1+jp_fabm_z4c) + & 1842 & logchl_balinc_ersem_z4c(:,:,:) 1843 trn(:,:,:,jp_fabm_m1+jp_fabm_z5c) = trn(:,:,:,jp_fabm_m1+jp_fabm_z5c) + & 1844 & logchl_balinc_ersem_z5c(:,:,:) 1845 trn(:,:,:,jp_fabm_m1+jp_fabm_z5n) = trn(:,:,:,jp_fabm_m1+jp_fabm_z5n) + & 1846 & logchl_balinc_ersem_z5n(:,:,:) 1847 trn(:,:,:,jp_fabm_m1+jp_fabm_z5p) = trn(:,:,:,jp_fabm_m1+jp_fabm_z5p) + & 1848 & logchl_balinc_ersem_z5p(:,:,:) 1849 trn(:,:,:,jp_fabm_m1+jp_fabm_z6c) = trn(:,:,:,jp_fabm_m1+jp_fabm_z6c) + & 1850 & logchl_balinc_ersem_z6c(:,:,:) 1851 trn(:,:,:,jp_fabm_m1+jp_fabm_z6n) = trn(:,:,:,jp_fabm_m1+jp_fabm_z6n) + & 1852 & logchl_balinc_ersem_z6n(:,:,:) 1853 trn(:,:,:,jp_fabm_m1+jp_fabm_z6p) = trn(:,:,:,jp_fabm_m1+jp_fabm_z6p) + & 1854 & logchl_balinc_ersem_z6p(:,:,:) 1855 trn(:,:,:,jp_fabm_m1+jp_fabm_n1p) = trn(:,:,:,jp_fabm_m1+jp_fabm_n1p) + & 1856 & logchl_balinc_ersem_n1p(:,:,:) 1857 trn(:,:,:,jp_fabm_m1+jp_fabm_n3n) = trn(:,:,:,jp_fabm_m1+jp_fabm_n3n) + & 1858 & logchl_balinc_ersem_n3n(:,:,:) 1859 trn(:,:,:,jp_fabm_m1+jp_fabm_n4n) = trn(:,:,:,jp_fabm_m1+jp_fabm_n4n) + & 1860 & logchl_balinc_ersem_n4n(:,:,:) 1861 trn(:,:,:,jp_fabm_m1+jp_fabm_n5s) = trn(:,:,:,jp_fabm_m1+jp_fabm_n5s) + & 1862 & logchl_balinc_ersem_n5s(:,:,:) 1863 1864 trb(:,:,:,jp_fabm_m1+jp_fabm_chl1) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl1) 1865 trb(:,:,:,jp_fabm_m1+jp_fabm_chl2) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl2) 1866 trb(:,:,:,jp_fabm_m1+jp_fabm_chl3) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl3) 1867 trb(:,:,:,jp_fabm_m1+jp_fabm_chl4) = trn(:,:,:,jp_fabm_m1+jp_fabm_chl4) 1868 trb(:,:,:,jp_fabm_m1+jp_fabm_p1c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1c) 1869 trb(:,:,:,jp_fabm_m1+jp_fabm_p1n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1n) 1870 trb(:,:,:,jp_fabm_m1+jp_fabm_p1p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1p) 1871 trb(:,:,:,jp_fabm_m1+jp_fabm_p1s) = trn(:,:,:,jp_fabm_m1+jp_fabm_p1s) 1872 trb(:,:,:,jp_fabm_m1+jp_fabm_p2c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p2c) 1873 trb(:,:,:,jp_fabm_m1+jp_fabm_p2n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p2n) 1874 trb(:,:,:,jp_fabm_m1+jp_fabm_p2p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p2p) 1875 trb(:,:,:,jp_fabm_m1+jp_fabm_p3c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p3c) 1876 trb(:,:,:,jp_fabm_m1+jp_fabm_p3n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p3n) 1877 trb(:,:,:,jp_fabm_m1+jp_fabm_p3p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p3p) 1878 trb(:,:,:,jp_fabm_m1+jp_fabm_p4c) = trn(:,:,:,jp_fabm_m1+jp_fabm_p4c) 1879 trb(:,:,:,jp_fabm_m1+jp_fabm_p4n) = trn(:,:,:,jp_fabm_m1+jp_fabm_p4n) 1880 trb(:,:,:,jp_fabm_m1+jp_fabm_p4p) = trn(:,:,:,jp_fabm_m1+jp_fabm_p4p) 1881 trb(:,:,:,jp_fabm_m1+jp_fabm_z4c) = trn(:,:,:,jp_fabm_m1+jp_fabm_z4c) 1882 trb(:,:,:,jp_fabm_m1+jp_fabm_z5c) = trn(:,:,:,jp_fabm_m1+jp_fabm_z5c) 1883 trb(:,:,:,jp_fabm_m1+jp_fabm_z5n) = trn(:,:,:,jp_fabm_m1+jp_fabm_z5n) 1884 trb(:,:,:,jp_fabm_m1+jp_fabm_z5p) = trn(:,:,:,jp_fabm_m1+jp_fabm_z5p) 1885 trb(:,:,:,jp_fabm_m1+jp_fabm_z6c) = trn(:,:,:,jp_fabm_m1+jp_fabm_z6c) 1886 trb(:,:,:,jp_fabm_m1+jp_fabm_z6n) = trn(:,:,:,jp_fabm_m1+jp_fabm_z6n) 1887 trb(:,:,:,jp_fabm_m1+jp_fabm_z6p) = trn(:,:,:,jp_fabm_m1+jp_fabm_z6p) 1888 trb(:,:,:,jp_fabm_m1+jp_fabm_n1p) = trn(:,:,:,jp_fabm_m1+jp_fabm_n1p) 1889 trb(:,:,:,jp_fabm_m1+jp_fabm_n3n) = trn(:,:,:,jp_fabm_m1+jp_fabm_n3n) 1890 trb(:,:,:,jp_fabm_m1+jp_fabm_n4n) = trn(:,:,:,jp_fabm_m1+jp_fabm_n4n) 1891 trb(:,:,:,jp_fabm_m1+jp_fabm_n5s) = trn(:,:,:,jp_fabm_m1+jp_fabm_n5s) 1892 1490 trn(:,:,:,jp_fabm0:jp_fabm1) = trn(:,:,:,jp_fabm0:jp_fabm1) + & 1491 & logchl_balinc(:,:,:,jp_fabm0:jp_fabm1) 1492 trb(:,:,:,jp_fabm0:jp_fabm1) = trn(:,:,:,jp_fabm0:jp_fabm1) 1893 1493 #elif defined key_medusa && defined key_foam_medusa 1894 1494 ! Initialize the now fields with the background + increment … … 1896 1496 CALL ctl_warn( ' Doing direct initialisation of MEDUSA with chlorophyll assimilation', & 1897 1497 & ' Background state is taken from model rather than background file' ) 1898 trn(:,:,:,jpchn) = trn(:,:,:,jpchn) + logchl_balinc_medusa_chn(:,:,:) 1899 trn(:,:,:,jpchd) = trn(:,:,:,jpchd) + logchl_balinc_medusa_chd(:,:,:) 1900 trn(:,:,:,jpphn) = trn(:,:,:,jpphn) + logchl_balinc_medusa_phn(:,:,:) 1901 trn(:,:,:,jpphd) = trn(:,:,:,jpphd) + logchl_balinc_medusa_phd(:,:,:) 1902 trn(:,:,:,jpzmi) = trn(:,:,:,jpzmi) + logchl_balinc_medusa_zmi(:,:,:) 1903 trn(:,:,:,jpzme) = trn(:,:,:,jpzme) + logchl_balinc_medusa_zme(:,:,:) 1904 trn(:,:,:,jpdin) = trn(:,:,:,jpdin) + logchl_balinc_medusa_din(:,:,:) 1905 trn(:,:,:,jpsil) = trn(:,:,:,jpsil) + logchl_balinc_medusa_sil(:,:,:) 1906 trn(:,:,:,jpfer) = trn(:,:,:,jpfer) + logchl_balinc_medusa_fer(:,:,:) 1907 trn(:,:,:,jpdet) = trn(:,:,:,jpdet) + logchl_balinc_medusa_det(:,:,:) 1908 trn(:,:,:,jppds) = trn(:,:,:,jppds) + logchl_balinc_medusa_pds(:,:,:) 1909 trn(:,:,:,jpdtc) = trn(:,:,:,jpdtc) + logchl_balinc_medusa_dtc(:,:,:) 1910 trn(:,:,:,jpdic) = trn(:,:,:,jpdic) + logchl_balinc_medusa_dic(:,:,:) 1911 trn(:,:,:,jpalk) = trn(:,:,:,jpalk) + logchl_balinc_medusa_alk(:,:,:) 1912 trn(:,:,:,jpoxy) = trn(:,:,:,jpoxy) + logchl_balinc_medusa_oxy(:,:,:) 1913 1914 trb(:,:,:,jpchn) = trn(:,:,:,jpchn) 1915 trb(:,:,:,jpchd) = trn(:,:,:,jpchd) 1916 trb(:,:,:,jpphn) = trn(:,:,:,jpphn) 1917 trb(:,:,:,jpphd) = trn(:,:,:,jpphd) 1918 trb(:,:,:,jpzmi) = trn(:,:,:,jpzmi) 1919 trb(:,:,:,jpzme) = trn(:,:,:,jpzme) 1920 trb(:,:,:,jpdin) = trn(:,:,:,jpdin) 1921 trb(:,:,:,jpsil) = trn(:,:,:,jpsil) 1922 trb(:,:,:,jpfer) = trn(:,:,:,jpfer) 1923 trb(:,:,:,jpdet) = trn(:,:,:,jpdet) 1924 trb(:,:,:,jppds) = trn(:,:,:,jppds) 1925 trb(:,:,:,jpdtc) = trn(:,:,:,jpdtc) 1926 trb(:,:,:,jpdic) = trn(:,:,:,jpdic) 1927 trb(:,:,:,jpalk) = trn(:,:,:,jpalk) 1928 trb(:,:,:,jpoxy) = trn(:,:,:,jpoxy) 1929 1498 trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + & 1499 & logchl_balinc(:,:,:,jp_msa0:jp_msa1) 1500 trb(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) 1930 1501 #elif defined key_hadocc 1931 1502 ! Initialize the now fields with the background + increment … … 1933 1504 CALL ctl_warn( ' Doing direct initialisation of HadOCC with chlorophyll assimilation', & 1934 1505 & ' Background state is taken from model rather than background file' ) 1935 trn(:,:,:,jp_had_nut) = trn(:,:,:,jp_had_nut) + logchl_balinc_hadocc_nut(:,:,:) 1936 trn(:,:,:,jp_had_phy) = trn(:,:,:,jp_had_phy) + logchl_balinc_hadocc_phy(:,:,:) 1937 trn(:,:,:,jp_had_zoo) = trn(:,:,:,jp_had_zoo) + logchl_balinc_hadocc_zoo(:,:,:) 1938 trn(:,:,:,jp_had_pdn) = trn(:,:,:,jp_had_pdn) + logchl_balinc_hadocc_det(:,:,:) 1939 trn(:,:,:,jp_had_dic) = trn(:,:,:,jp_had_dic) + logchl_balinc_hadocc_dic(:,:,:) 1940 trn(:,:,:,jp_had_alk) = trn(:,:,:,jp_had_alk) + logchl_balinc_hadocc_alk(:,:,:) 1941 1942 trb(:,:,:,jp_had_nut) = trn(:,:,:,jp_had_nut) 1943 trb(:,:,:,jp_had_phy) = trn(:,:,:,jp_had_phy) 1944 trb(:,:,:,jp_had_zoo) = trn(:,:,:,jp_had_zoo) 1945 trb(:,:,:,jp_had_pdn) = trn(:,:,:,jp_had_pdn) 1946 trb(:,:,:,jp_had_dic) = trn(:,:,:,jp_had_dic) 1947 trb(:,:,:,jp_had_alk) = trn(:,:,:,jp_had_alk) 1506 trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + & 1507 & logchl_balinc(:,:,:,jp_had0:jp_had1) 1508 trb(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) 1948 1509 #endif 1949 1510 -
branches/UKMO/dev_r5518_v3.4_asm_nemovar_community_bgc_ersem/NEMOGCM/NEMO/OPA_SRC/ASM/asmlogchlbal_ersem.F90
r7045 r7716 20 20 USE trc, ONLY: trn ! ERSEM state variables 21 21 USE par_fabm ! FABM parameters 22 USE par_trc, ONLY: jptra ! Tracer parameters 22 23 23 24 IMPLICIT NONE … … 30 31 CONTAINS 31 32 32 SUBROUTINE asm_logchl_bal_ersem( ln_logchlpftinc, npfts, & 33 & mld_choice_bgc, logchl_bkginc, & 34 & logchl_balinc_ersem_chl1, logchl_balinc_ersem_chl2, & 35 & logchl_balinc_ersem_chl3, logchl_balinc_ersem_chl4, & 36 & logchl_balinc_ersem_p1c, logchl_balinc_ersem_p1n, & 37 & logchl_balinc_ersem_p1p, logchl_balinc_ersem_p1s, & 38 & logchl_balinc_ersem_p2c, logchl_balinc_ersem_p2n, & 39 & logchl_balinc_ersem_p2p, logchl_balinc_ersem_p3c, & 40 & logchl_balinc_ersem_p3n, logchl_balinc_ersem_p3p, & 41 & logchl_balinc_ersem_p4c, logchl_balinc_ersem_p4n, & 42 & logchl_balinc_ersem_p4p, logchl_balinc_ersem_z4c, & 43 & logchl_balinc_ersem_z5c, logchl_balinc_ersem_z5n, & 44 & logchl_balinc_ersem_z5p, logchl_balinc_ersem_z6c, & 45 & logchl_balinc_ersem_z6n, logchl_balinc_ersem_z6p, & 46 & logchl_balinc_ersem_n1p, logchl_balinc_ersem_n3n, & 47 & logchl_balinc_ersem_n4n, logchl_balinc_ersem_n5s ) 33 SUBROUTINE asm_logchl_bal_ersem( ln_logchlpftinc, npfts, mld_choice_bgc, & 34 & logchl_bkginc, logchl_balinc ) 48 35 !!--------------------------------------------------------------------------- 49 36 !! *** ROUTINE asm_logchl_bal_ersem *** … … 58 45 !!--------------------------------------------------------------------------- 59 46 !! 60 LOGICAL, INTENT(in ) :: ln_logchlpftinc 61 INTEGER, INTENT(in ) :: npfts 62 INTEGER, INTENT(in ) :: mld_choice_bgc 63 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,npfts) :: logchl_bkginc 64 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_chl1 65 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_chl2 66 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_chl3 67 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_chl4 68 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p1c 69 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p1n 70 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p1p 71 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p1s 72 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p2c 73 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p2n 74 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p2p 75 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p3c 76 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p3n 77 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p3p 78 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p4c 79 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p4n 80 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_p4p 81 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z4c 82 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z5c 83 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z5n 84 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z5p 85 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z6c 86 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z6n 87 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_z6p 88 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_n1p 89 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_n3n 90 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_n4n 91 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk) :: logchl_balinc_ersem_n5s 47 LOGICAL, INTENT(in ) :: ln_logchlpftinc 48 INTEGER, INTENT(in ) :: npfts 49 INTEGER, INTENT(in ) :: mld_choice_bgc 50 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,npfts) :: logchl_bkginc 51 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk,jptra) :: logchl_balinc 92 52 !! 93 53 INTEGER :: ji, jj, jk … … 98 58 99 59 ! Split surface logchl incs into surface Chl1-4 incs 60 ! 61 ! In order to transform logchl incs to chl incs, need to account for the background, 62 ! cannot simply do 10^logchl_bkginc. Need to: 63 ! 1) Add logchl inc to log10(background) to get log10(analysis) 64 ! 2) Take 10^log10(analysis) to get analysis 65 ! 3) Subtract background from analysis to get chl incs 100 66 ! 101 67 IF ( ln_logchlpftinc ) THEN … … 108 74 DO jj = 1, jpj 109 75 DO ji = 1, jpi 110 IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) > 0.0 ) THEN 111 logchl_balinc_ersem_chl1(ji,jj,1) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) + & 112 & tiny ) + logchl_bkginc(ji,jj,1) ) - & 113 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) - tiny 114 ENDIF 115 IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) > 0.0 ) THEN 116 logchl_balinc_ersem_chl2(ji,jj,1) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) + & 117 & tiny ) + logchl_bkginc(ji,jj,2) ) - & 118 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) - tiny 119 ENDIF 120 IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) > 0.0 ) THEN 121 logchl_balinc_ersem_chl3(ji,jj,1) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) + & 122 & tiny ) + logchl_bkginc(ji,jj,3) ) - & 123 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) - tiny 124 ENDIF 125 IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) > 0.0 ) THEN 126 logchl_balinc_ersem_chl4(ji,jj,1) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) + & 127 & tiny ) + logchl_bkginc(ji,jj,4) ) - & 128 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) - tiny 76 IF ( ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) > 0.0 ) .AND. & 77 & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) > 0.0 ) .AND. & 78 & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) > 0.0 ) .AND. & 79 & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) > 0.0 ) ) THEN 80 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) ) + & 81 & logchl_bkginc(ji,jj,1) ) - & 82 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) 83 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) ) + & 84 & logchl_bkginc(ji,jj,2) ) - & 85 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) 86 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) ) + & 87 & logchl_bkginc(ji,jj,3) ) - & 88 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) 89 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) ) + & 90 & logchl_bkginc(ji,jj,4) ) - & 91 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 129 92 ENDIF 130 93 END DO … … 135 98 ! and split between PFTs according to the existing background ratios 136 99 ! 100 IF ( npfts /= 1 ) THEN 101 CALL ctl_stop( 'If assimilating total chlorophyll, nn_asmpfts must be 1' ) 102 ENDIF 137 103 DO jj = 1, jpj 138 104 DO ji = 1, jpi … … 143 109 chl_tot = trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) + trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) + & 144 110 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) + trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 145 chl_inc = 10**( LOG10( chl_tot + tiny ) + logchl_bkginc(ji,jj,1) ) - chl_tot - tiny146 logchl_balinc _ersem_chl1(ji,jj,1) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) / chl_tot147 logchl_balinc _ersem_chl2(ji,jj,1) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) / chl_tot148 logchl_balinc _ersem_chl3(ji,jj,1) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) / chl_tot149 logchl_balinc _ersem_chl4(ji,jj,1) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) / chl_tot111 chl_inc = 10**( LOG10( chl_tot ) + logchl_bkginc(ji,jj,1) ) - chl_tot 112 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) / chl_tot 113 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) / chl_tot 114 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) / chl_tot 115 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) = chl_inc * trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) / chl_tot 150 116 ENDIF 151 117 END DO … … 194 160 ! 195 161 DO jk = 2, jkmax 196 logchl_balinc _ersem_chl1(ji,jj,jk) = logchl_balinc_ersem_chl1(ji,jj,1)197 logchl_balinc _ersem_chl2(ji,jj,jk) = logchl_balinc_ersem_chl2(ji,jj,1)198 logchl_balinc _ersem_chl3(ji,jj,jk) = logchl_balinc_ersem_chl3(ji,jj,1)199 logchl_balinc _ersem_chl4(ji,jj,jk) = logchl_balinc_ersem_chl4(ji,jj,1)162 logchl_balinc(ji,jj,jk,jp_fabm_m1+jp_fabm_chl1) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) 163 logchl_balinc(ji,jj,jk,jp_fabm_m1+jp_fabm_chl2) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) 164 logchl_balinc(ji,jj,jk,jp_fabm_m1+jp_fabm_chl3) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) 165 logchl_balinc(ji,jj,jk,jp_fabm_m1+jp_fabm_chl4) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 200 166 END DO 201 167 ! … … 203 169 END DO 204 170 205 ! Balance P[1-4][c,n,p,s] 206 ! Maintain existing background ratios 207 ! 208 !DO jk = 1, jpk 209 ! DO jj = 1, jpj 210 ! DO ji = 1, jpi 211 ! IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) > 0.0 ) THEN 212 ! logchl_balinc_ersem_p1c(ji,jj,jk) = logchl_balinc_ersem_chl1(ji,jj,jk) * & 213 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p1c) / & 214 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl1) 215 ! logchl_balinc_ersem_p1n(ji,jj,jk) = logchl_balinc_ersem_chl1(ji,jj,jk) * & 216 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p1n) / & 217 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl1) 218 ! logchl_balinc_ersem_p1p(ji,jj,jk) = logchl_balinc_ersem_chl1(ji,jj,jk) * & 219 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p1p) / & 220 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl1) 221 ! logchl_balinc_ersem_p1s(ji,jj,jk) = logchl_balinc_ersem_chl1(ji,jj,jk) * & 222 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p1s) / & 223 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl1) 224 ! ENDIF 225 ! IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) > 0.0 ) THEN 226 ! logchl_balinc_ersem_p2c(ji,jj,jk) = logchl_balinc_ersem_chl2(ji,jj,jk) * & 227 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p2c) / & 228 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl2) 229 ! logchl_balinc_ersem_p2n(ji,jj,jk) = logchl_balinc_ersem_chl2(ji,jj,jk) * & 230 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p2n) / & 231 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl2) 232 ! logchl_balinc_ersem_p2p(ji,jj,jk) = logchl_balinc_ersem_chl2(ji,jj,jk) * & 233 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p2p) / & 234 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl2) 235 ! ENDIF 236 ! IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) > 0.0 ) THEN 237 ! logchl_balinc_ersem_p3c(ji,jj,jk) = logchl_balinc_ersem_chl3(ji,jj,jk) * & 238 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p3c) / & 239 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl3) 240 ! logchl_balinc_ersem_p3n(ji,jj,jk) = logchl_balinc_ersem_chl3(ji,jj,jk) * & 241 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p3n) / & 242 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl3) 243 ! logchl_balinc_ersem_p3p(ji,jj,jk) = logchl_balinc_ersem_chl3(ji,jj,jk) * & 244 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p3p) / & 245 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl3) 246 ! ENDIF 247 ! IF ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) > 0.0 ) THEN 248 ! logchl_balinc_ersem_p4c(ji,jj,jk) = logchl_balinc_ersem_chl4(ji,jj,jk) * & 249 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p4c) / & 250 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl4) 251 ! logchl_balinc_ersem_p4n(ji,jj,jk) = logchl_balinc_ersem_chl4(ji,jj,jk) * & 252 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p4n) / & 253 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl4) 254 ! logchl_balinc_ersem_p4p(ji,jj,jk) = logchl_balinc_ersem_chl4(ji,jj,jk) * & 255 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_p4p) / & 256 ! & trn(ji,jj,jk,jp_fabm_m1+jp_fabm_chl4) 257 ! ENDIF 258 ! END DO 259 ! END DO 260 !END DO 171 ! Multivariate balancing forthcoming... 261 172 262 173 END SUBROUTINE asm_logchl_bal_ersem … … 267 178 !!---------------------------------------------------------------------- 268 179 CONTAINS 269 SUBROUTINE asm_logchl_bal_ersem( ln_logchlpftinc, npfts, & 270 & mld_choice_bgc, logchl_bkginc, & 271 & logchl_balinc_ersem_chl1, logchl_balinc_ersem_chl2, & 272 & logchl_balinc_ersem_chl3, logchl_balinc_ersem_chl4, & 273 & logchl_balinc_ersem_p1c, logchl_balinc_ersem_p1n, & 274 & logchl_balinc_ersem_p1p, logchl_balinc_ersem_p1s, & 275 & logchl_balinc_ersem_p2c, logchl_balinc_ersem_p2n, & 276 & logchl_balinc_ersem_p2p, logchl_balinc_ersem_p3c, & 277 & logchl_balinc_ersem_p3n, logchl_balinc_ersem_p3p, & 278 & logchl_balinc_ersem_p4c, logchl_balinc_ersem_p4n, & 279 & logchl_balinc_ersem_p4p, logchl_balinc_ersem_z4c, & 280 & logchl_balinc_ersem_z5c, logchl_balinc_ersem_z5n, & 281 & logchl_balinc_ersem_z5p, logchl_balinc_ersem_z6c, & 282 & logchl_balinc_ersem_z6n, logchl_balinc_ersem_z6p, & 283 & logchl_balinc_ersem_n1p, logchl_balinc_ersem_n3n, & 284 & logchl_balinc_ersem_n4n, logchl_balinc_ersem_n5s ) 180 SUBROUTINE asm_logchl_bal_ersem( ln_logchlpftinc, npfts, mld_choice_bgc, & 181 & logchl_bkginc, logchl_balinc ) 285 182 LOGICAL :: ln_logchlpftinc 286 183 INTEGER :: npfts 287 184 INTEGER :: mld_choice_bgc 288 185 REAL :: logchl_bkginc(:,:,:) 289 REAL :: logchl_balinc_ersem_chl1(:,:,:), logchl_balinc_ersem_chl2(:,:,:) 290 REAL :: logchl_balinc_ersem_chl3(:,:,:), logchl_balinc_ersem_chl4(:,:,:) 291 REAL :: logchl_balinc_ersem_p1c(:,:,:), logchl_balinc_ersem_p1n(:,:,:) 292 REAL :: logchl_balinc_ersem_p1p(:,:,:), logchl_balinc_ersem_p1s(:,:,:) 293 REAL :: logchl_balinc_ersem_p2c(:,:,:), logchl_balinc_ersem_p2n(:,:,:) 294 REAL :: logchl_balinc_ersem_p2p(:,:,:), logchl_balinc_ersem_p3c(:,:,:) 295 REAL :: logchl_balinc_ersem_p3n(:,:,:), logchl_balinc_ersem_p3p(:,:,:) 296 REAL :: logchl_balinc_ersem_p4c(:,:,:), logchl_balinc_ersem_p4n(:,:,:) 297 REAL :: logchl_balinc_ersem_p4p(:,:,:), logchl_balinc_ersem_z4c(:,:,:) 298 REAL :: logchl_balinc_ersem_z5c(:,:,:), logchl_balinc_ersem_z5n(:,:,:) 299 REAL :: logchl_balinc_ersem_z5p(:,:,:), logchl_balinc_ersem_z6c(:,:,:) 300 REAL :: logchl_balinc_ersem_z6n(:,:,:), logchl_balinc_ersem_z6p(:,:,:) 301 REAL :: logchl_balinc_ersem_n1p(:,:,:), logchl_balinc_ersem_n3n(:,:,:) 302 REAL :: logchl_balinc_ersem_n4n(:,:,:), logchl_balinc_ersem_n5s ) 186 REAL :: logchl_balinc(:,:,:,:) 303 187 WRITE(*,*) 'asm_logchl_bal_ersem: You should not have seen this print! error?' 304 188 END SUBROUTINE asm_logchl_bal_ersem
Note: See TracChangeset
for help on using the changeset viewer.