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 7719 – NEMO

Changeset 7719


Ignore:
Timestamp:
2017-02-23T11:00:26+01:00 (7 years ago)
Author:
dford
Message:

Minor updates to logchl assimilation balancing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_v3.4_asm_nemovar_community_bgc_ersem/NEMOGCM/NEMO/OPA_SRC/ASM/asmlogchlbal_ersem.F90

    r7716 r7719  
    2727   PUBLIC asm_logchl_bal_ersem 
    2828 
    29    REAL(wp), PARAMETER :: tiny = 1e-20 
    30  
    3129CONTAINS 
    3230 
     
    3836      !! ** Purpose :   calculate increments to ERSEM from logchl increments 
    3937      !! 
    40       !! ** Method  :   forthcoming... 
    41       !! 
    42       !! ** Action  :   forthcoming... 
     38      !! ** Method  :   convert logchl increments to chl increments 
     39      !!                split between the ERSEM PFTs 
     40      !!                spread through the mixed layer 
     41      !!                [forthcoming: calculate increments to nutrients and zooplankton] 
     42      !! 
     43      !! ** Action  :   populate logchl_balinc 
    4344      !! 
    4445      !! References :   forthcoming... 
     
    6465      ! 2) Take 10^log10(analysis) to get analysis 
    6566      ! 3) Subtract background from analysis to get chl incs 
     67      ! 
     68      ! Only apply increments if all of Chl1-4 background values are > 0 
     69      ! In theory, they always will be, and if any are not that's a sign 
     70      ! that something's going wrong which the assimilation might make worse 
    6671      ! 
    6772      IF ( ln_logchlpftinc ) THEN 
     
    7883                  & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) > 0.0 ) .AND. & 
    7984                  & ( 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) 
     85                  IF ( logchl_bkginc(ji,jj,1) /= 0.0 ) THEN 
     86                     logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) ) + & 
     87                        &                                                   logchl_bkginc(ji,jj,1) )                      - & 
     88                        &                                             trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) 
     89                  ENDIF 
     90                  IF ( logchl_bkginc(ji,jj,2) /= 0.0 ) THEN 
     91                     logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) ) + & 
     92                        &                                                   logchl_bkginc(ji,jj,2) )                      - & 
     93                        &                                             trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) 
     94                  ENDIF 
     95                  IF ( logchl_bkginc(ji,jj,3) /= 0.0 ) THEN 
     96                     logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) ) + & 
     97                        &                                                   logchl_bkginc(ji,jj,3) )                      - & 
     98                        &                                             trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) 
     99                  ENDIF 
     100                  IF ( logchl_bkginc(ji,jj,4) /= 0.0 ) THEN 
     101                     logchl_balinc(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) = 10**( LOG10( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) ) + & 
     102                        &                                                   logchl_bkginc(ji,jj,4) )                      - & 
     103                        &                                             trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 
     104                  ENDIF 
    92105               ENDIF 
    93106            END DO 
     
    103116         DO jj = 1, jpj 
    104117            DO ji = 1, jpi 
    105                IF ( ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) > 0.0 ) .AND. & 
    106                   & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) > 0.0 ) .AND. & 
    107                   & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) > 0.0 ) .AND. & 
    108                   & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) > 0.0 ) ) THEN 
     118               IF ( ( logchl_bkginc(ji,jj,1)               /= 0.0 ) .AND. & 
     119                  & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) >  0.0 ) .AND. & 
     120                  & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) >  0.0 ) .AND. & 
     121                  & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) >  0.0 ) .AND. & 
     122                  & ( trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) >  0.0 ) ) THEN 
    109123                  chl_tot = trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl1) + trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl2) + & 
    110124                     &      trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl3) + trn(ji,jj,1,jp_fabm_m1+jp_fabm_chl4) 
Note: See TracChangeset for help on using the changeset viewer.