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

Changeset 13649


Ignore:
Timestamp:
2020-10-21T13:07:18+02:00 (4 years ago)
Author:
dford
Message:

Allow RGB chlorophyll to be taken from MEDUSA or HadOCC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_FOAMv14_biophys/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r13355 r13649  
    3434   USE timing         ! Timing 
    3535   USE stopack 
     36#if defined key_medusa 
     37   USE trc, ONLY: trn      ! MEDUSA variables 
     38   USE par_medusa, ONLY: & ! MEDUSA parameters 
     39      & jpchn, & 
     40      & jpchd 
     41#elif defined key_hadocc 
     42   USE trc, ONLY: &        ! HadOCC chlorophyll 
     43      & HADOCC_CHL 
     44#endif 
    3645 
    3746   IMPLICIT NONE 
     
    200209            !                                             ! ------------------------- ! 
    201210            ! Set chlorophyl concentration 
    202             IF( nn_chldta == 1 .OR. nn_chldta == 2 .OR. lk_vvl ) THEN    !*  Variable Chlorophyll or ocean volume 
     211            IF( nn_chldta == 1 .OR. nn_chldta == 2 .OR. nn_chldta == 3 .OR. lk_vvl ) THEN    !*  Variable Chlorophyll or ocean volume 
    203212               ! 
    204213               IF( nn_chldta == 1 ) THEN        !*  2D Variable Chlorophyll 
     
    236245                   END DO 
    237246                     ! 
     247               ELSE IF( nn_chldta == 3 ) THEN 
     248                  ! 
     249#if defined key_medusa 
     250                  zchl3d(:,:,:) = trn(:,:,:,jpchn) + trn(:,:,:,jpchd) 
     251#elif defined key_hadocc 
     252                  zchl3d(:,:,:) = HADOCC_CHL(:,:,:) 
     253#else 
     254                  CALL ctl_stop( 'tra_qsr: Trying to take chlorophyll from MEDUSA or HadOCC', & 
     255                     &           'but neither MEDUSA nor HadOCC defined' ) 
     256#endif 
     257                  ! 
    238258               ELSE                              !* Variable ocean volume but constant chrlorophyll 
    239259                  DO jk = 1, nksr + 1 
     
    465485         WRITE(numout,*) '      bio-model            light penetration   ln_qsr_bio = ', ln_qsr_bio 
    466486         WRITE(numout,*) '      light penetration for ice-model LIM3     ln_qsr_ice = ', ln_qsr_ice 
    467          WRITE(numout,*) '      RGB : Chl data (=1/2) or cst value (=0)  nn_chldta = ', nn_chldta 
     487         WRITE(numout,*) '      RGB: model (3) file (2/1) or cst (0) chl  nn_chldta = ', nn_chldta 
    468488         WRITE(numout,*) '      RGB & 2 bands: fraction of light (rn_si1)    rn_abs = ', rn_abs 
    469489         WRITE(numout,*) '      RGB & 2 bands: shortess depth of extinction  rn_si0 = ', rn_si0 
     
    490510         IF( ln_qsr_rgb .AND. nn_chldta == 1 )   nqsr =  2 
    491511         IF( ln_qsr_rgb .AND. nn_chldta == 2 )   nqsr =  3 
    492          IF( ln_qsr_2bd                      )   nqsr =  4 
    493          IF( ln_qsr_bio                      )   nqsr =  5 
     512         IF( ln_qsr_rgb .AND. nn_chldta == 3 )   nqsr =  4 
     513         IF( ln_qsr_2bd                      )   nqsr =  5 
     514         IF( ln_qsr_bio                      )   nqsr =  6 
    494515         ! 
    495516         IF(lwp) THEN                   ! Print the choice 
     
    498519            IF( nqsr ==  2 )   WRITE(numout,*) '         R-G-B   light penetration - 2D Chl data ' 
    499520            IF( nqsr ==  3 )   WRITE(numout,*) '         R-G-B   light penetration - 3D Chl data ' 
    500             IF( nqsr ==  4 )   WRITE(numout,*) '         2 bands light penetration' 
    501             IF( nqsr ==  5 )   WRITE(numout,*) '         bio-model light penetration' 
    502          ENDIF 
     521            IF( nqsr ==  4 )   WRITE(numout,*) '         R-G-B   light penetration - 3D Chl from BGC model ' 
     522            IF( nqsr ==  5 )   WRITE(numout,*) '         2 bands light penetration' 
     523            IF( nqsr ==  6 )   WRITE(numout,*) '         bio-model light penetration' 
     524         ENDIF 
     525#if ! (defined key_medusa || defined key_hadocc) 
     526         ! 
     527         IF( nqsr ==  4 ) THEN 
     528            CALL ctl_stop( 'nn_chldta=3 so trying to use BGC model chlorophyll for light penetration', & 
     529               &           'but not running with MEDUSA or HadOCC' ) 
     530         ENDIF 
     531#endif 
    503532         ! 
    504533      ENDIF 
     
    536565                  &                                         'Solar penetration function of read chlorophyll', 'namtra_qsr' ) 
    537566               ! 
     567            ELSEIF( nn_chldta == 3 ) THEN       !* Chl data will be got from model at each time step 
     568               IF(lwp) WRITE(numout,*) 
     569               IF(lwp) WRITE(numout,*) '        Chlorophyll will be taken from model at each time step' 
    538570            ELSE                                !* constant Chl : compute once for all the distribution of light (etot3) 
    539571               IF(lwp) WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.