New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7803 – NEMO

Changeset 7803


Ignore:
Timestamp:
2017-03-16T12:18:47+01:00 (7 years ago)
Author:
dford
Message:

Merge in changes to allow a maximum chlorophyll assimilation increment to be specified. See internal UKMO ticket 690.

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  
    131131   REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: logchl_balinc  !: Increment to BGC variables from logchl assim 
    132132#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 
    133136 
    134137   INTEGER :: mld_choice        = 4   !: choice of mld criteria to use for physics assimilation 
     
    207210         &                 nitbkg, nitdin, nitiaustr, nitiaufin, niaufn,   & 
    208211         &                 ln_salfix, salfixmin, nn_divdmp, nitavgbkg, mld_choice, & 
    209          &                 mld_choice_bgc 
     212         &                 mld_choice_bgc, rn_maxchlinc 
    210213      !!---------------------------------------------------------------------- 
    211214 
     
    288291         WRITE(numout,*) '      Choice of MLD for physics assimilation                  mld_choice = ', mld_choice 
    289292         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 
    290294      ENDIF 
    291295 
     
    14081412#if defined key_fabm 
    14091413         CALL asm_logchl_bal_ersem( ln_logchlpftinc, nn_asmpfts, mld_choice_bgc, & 
    1410             &                       logchl_bkginc, logchl_balinc ) 
     1414            &                       rn_maxchlinc, logchl_bkginc, logchl_balinc ) 
    14111415#elif defined key_medusa && defined key_foam_medusa 
    14121416         !CALL asm_logchl_bal_medusa() 
  • branches/UKMO/dev_r5518_v3.6_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/ASM/asmlogchlbal_ersem.F90

    r7731 r7803  
    2929CONTAINS 
    3030 
    31    SUBROUTINE asm_logchl_bal_ersem( ln_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 ) 
    3333      !!--------------------------------------------------------------------------- 
    3434      !!                    ***  ROUTINE asm_logchl_bal_ersem  *** 
     
    4646      !!--------------------------------------------------------------------------- 
    4747      !! 
    48       LOGICAL,  INTENT(in   )                               :: ln_logchlpftinc 
     48      LOGICAL,  INTENT(in   )                               :: ld_logchlpftinc 
    4949      INTEGER,  INTENT(in   )                               :: npfts 
    5050      INTEGER,  INTENT(in   )                               :: mld_choice_bgc 
     51      REAL(wp), INTENT(in   )                               :: k_maxchlinc 
    5152      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj,npfts)     :: logchl_bkginc 
    5253      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj,jpk,jptra) :: logchl_balinc 
     
    6566      ! 2) Take 10^log10(analysis) to get analysis 
    6667      ! 3) Subtract background from analysis to get chl incs 
     68      ! If k_maxchlinc > 0 then cap total absolute chlorophyll increment at that value 
    6769      ! 
    6870      ! Only apply increments if all of Chl1-4 background values are > 0 
     
    7072      ! that something's going wrong which the assimilation might make worse 
    7173      ! 
    72       IF ( ln_logchlpftinc ) THEN 
     74      IF ( ld_logchlpftinc ) THEN 
    7375         ! 
    7476         ! Assimilating separate PFTs, so separately transform each from LogChl to Chl 
     
    103105                        &                                             trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 
    104106                  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 
    105120               ENDIF 
    106121            END DO 
     
    124139                     &      trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) + trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 
    125140                  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 
    126144                  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 
    127145                  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 
     
    192210   !!---------------------------------------------------------------------- 
    193211CONTAINS 
    194    SUBROUTINE asm_logchl_bal_ersem( ln_logchlpftinc, npfts, mld_choice_bgc, & 
    195       &                             logchl_bkginc, logchl_balinc ) 
    196       LOGICAL :: ln_logchlpftinc 
     212   SUBROUTINE asm_logchl_bal_ersem( ld_logchlpftinc, npfts, mld_choice_bgc, & 
     213      &                             k_maxchlinc, logchl_bkginc, logchl_balinc ) 
     214      LOGICAL :: ld_logchlpftinc 
    197215      INTEGER :: npfts 
    198216      INTEGER :: mld_choice_bgc 
     217      REAL    :: k_maxchlinc 
    199218      REAL    :: logchl_bkginc(:,:,:) 
    200219      REAL    :: logchl_balinc(:,:,:,:) 
Note: See TracChangeset for help on using the changeset viewer.