Changeset 7803
- Timestamp:
- 2017-03-16T12:18:47+01:00 (8 years ago)
- Location:
- branches/UKMO/dev_r5518_v3.6_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/ASM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_v3.6_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r7731 r7803 131 131 REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: logchl_balinc !: Increment to BGC variables from logchl assim 132 132 #endif 133 REAL(wp) :: rn_maxchlinc = -999.0 !: maximum absolute non-log chlorophyll increment from logchl assimilation 134 !: <= 0 implies no maximum applied (switch turned off) 135 !: > 0 implies maximum absolute chl increment capped at this value 133 136 134 137 INTEGER :: mld_choice = 4 !: choice of mld criteria to use for physics assimilation … … 207 210 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 208 211 & ln_salfix, salfixmin, nn_divdmp, nitavgbkg, mld_choice, & 209 & mld_choice_bgc 212 & mld_choice_bgc, rn_maxchlinc 210 213 !!---------------------------------------------------------------------- 211 214 … … 288 291 WRITE(numout,*) ' Choice of MLD for physics assimilation mld_choice = ', mld_choice 289 292 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 293 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 290 294 ENDIF 291 295 … … 1408 1412 #if defined key_fabm 1409 1413 CALL asm_logchl_bal_ersem( ln_logchlpftinc, nn_asmpfts, mld_choice_bgc, & 1410 & logchl_bkginc, logchl_balinc )1414 & rn_maxchlinc, logchl_bkginc, logchl_balinc ) 1411 1415 #elif defined key_medusa && defined key_foam_medusa 1412 1416 !CALL asm_logchl_bal_medusa() -
branches/UKMO/dev_r5518_v3.6_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/ASM/asmlogchlbal_ersem.F90
r7731 r7803 29 29 CONTAINS 30 30 31 SUBROUTINE asm_logchl_bal_ersem( l n_logchlpftinc, npfts, mld_choice_bgc, &32 & logchl_bkginc, logchl_balinc )31 SUBROUTINE asm_logchl_bal_ersem( ld_logchlpftinc, npfts, mld_choice_bgc, & 32 & k_maxchlinc, logchl_bkginc, logchl_balinc ) 33 33 !!--------------------------------------------------------------------------- 34 34 !! *** ROUTINE asm_logchl_bal_ersem *** … … 46 46 !!--------------------------------------------------------------------------- 47 47 !! 48 LOGICAL, INTENT(in ) :: l n_logchlpftinc48 LOGICAL, INTENT(in ) :: ld_logchlpftinc 49 49 INTEGER, INTENT(in ) :: npfts 50 50 INTEGER, INTENT(in ) :: mld_choice_bgc 51 REAL(wp), INTENT(in ) :: k_maxchlinc 51 52 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,npfts) :: logchl_bkginc 52 53 REAL(wp), INTENT( out), DIMENSION(jpi,jpj,jpk,jptra) :: logchl_balinc … … 65 66 ! 2) Take 10^log10(analysis) to get analysis 66 67 ! 3) Subtract background from analysis to get chl incs 68 ! If k_maxchlinc > 0 then cap total absolute chlorophyll increment at that value 67 69 ! 68 70 ! Only apply increments if all of Chl1-4 background values are > 0 … … 70 72 ! that something's going wrong which the assimilation might make worse 71 73 ! 72 IF ( l n_logchlpftinc ) THEN74 IF ( ld_logchlpftinc ) THEN 73 75 ! 74 76 ! Assimilating separate PFTs, so separately transform each from LogChl to Chl … … 103 105 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 104 106 ENDIF 107 IF (k_maxchlinc > 0.0) THEN 108 chl_inc = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) + & 109 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) + & 110 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) + & 111 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 112 IF ( ABS(chl_inc) > k_maxchlinc ) THEN 113 chl_tot = ABS(chl_inc) / k_maxchlinc 114 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) / chl_tot 115 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) / chl_tot 116 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) / chl_tot 117 logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) = logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) / chl_tot 118 ENDIF 119 ENDIF 105 120 ENDIF 106 121 END DO … … 124 139 & trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) + trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 125 140 chl_inc = 10**( LOG10( chl_tot ) + logchl_bkginc(ji,jj,1) ) - chl_tot 141 IF (k_maxchlinc > 0.0) THEN 142 chl_inc = MAX( -1.0 * k_maxchlinc, MIN( chl_inc, k_maxchlinc ) ) 143 ENDIF 126 144 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 127 145 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 … … 192 210 !!---------------------------------------------------------------------- 193 211 CONTAINS 194 SUBROUTINE asm_logchl_bal_ersem( l n_logchlpftinc, npfts, mld_choice_bgc, &195 & logchl_bkginc, logchl_balinc )196 LOGICAL :: l n_logchlpftinc212 SUBROUTINE asm_logchl_bal_ersem( ld_logchlpftinc, npfts, mld_choice_bgc, & 213 & k_maxchlinc, logchl_bkginc, logchl_balinc ) 214 LOGICAL :: ld_logchlpftinc 197 215 INTEGER :: npfts 198 216 INTEGER :: mld_choice_bgc 217 REAL :: k_maxchlinc 199 218 REAL :: logchl_bkginc(:,:,:) 200 219 REAL :: logchl_balinc(:,:,:,:)
Note: See TracChangeset
for help on using the changeset viewer.