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 7791 for branches – NEMO

Changeset 7791 for branches


Ignore:
Timestamp:
2017-03-14T16:13:59+01:00 (7 years ago)
Author:
dford
Message:

Code to implement maximum chlorophyll increment option.

Location:
branches/UKMO/dev_r5518_v3.6_asm_nemovar_community_maxchlinc/NEMOGCM/NEMO/OPA_SRC/ASM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_v3.6_asm_nemovar_community_maxchlinc/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r7731 r7791  
    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_maxchlinc/NEMOGCM/NEMO/OPA_SRC/ASM/asmlogchlbal_ersem.F90

    r7731 r7791  
    3030 
    3131   SUBROUTINE asm_logchl_bal_ersem( ln_logchlpftinc, npfts, mld_choice_bgc, & 
    32       &                             logchl_bkginc, logchl_balinc ) 
     32      &                             rn_maxchlinc, logchl_bkginc, logchl_balinc ) 
    3333      !!--------------------------------------------------------------------------- 
    3434      !!                    ***  ROUTINE asm_logchl_bal_ersem  *** 
     
    4949      INTEGER,  INTENT(in   )                               :: npfts 
    5050      INTEGER,  INTENT(in   )                               :: mld_choice_bgc 
     51      REAL(wp), INTENT(in   )                               :: rn_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 rn_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 
     
    103105                        &                                             trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 
    104106                  ENDIF 
     107                  IF (rn_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) > rn_maxchlinc ) THEN 
     113                        chl_tot = ABS(chl_inc) / rn_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 (rn_maxchlinc > 0.0) THEN 
     142                     chl_inc = MAX( -1.0 * rn_maxchlinc, MIN( chl_inc, rn_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 
Note: See TracChangeset for help on using the changeset viewer.