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 3326 for branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90 – NEMO

Ignore:
Timestamp:
2012-03-14T10:19:21+01:00 (12 years ago)
Author:
gm
Message:

Ediag branche: #927 add Potential Energy trend diagnostics (trdpen.F90)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r3318 r3326  
    1313 
    1414   !!---------------------------------------------------------------------- 
    15    !!   tra_qsr      : trend due to the solar radiation penetration 
    16    !!   tra_qsr_init : solar radiation penetration initialization 
     15   !!   tra_qsr       : trend due to the solar radiation penetration 
     16   !!   tra_qsr_init  : solar radiation penetration initialization 
    1717   !!---------------------------------------------------------------------- 
    18    USE oce             ! ocean dynamics and active tracers 
    19    USE dom_oce         ! ocean space and time domain 
    20    USE sbc_oce         ! surface boundary condition: ocean 
    21    USE trc_oce         ! share SMS/Ocean variables 
    22    USE trd_oce         ! trends: ocean variables 
    23    USE trdtra          ! trends manager: tracers  
    24    USE phycst          ! physical constants 
    25    USE in_out_manager  ! I/O manager 
    26    USE prtctl          ! Print control 
    27    USE iom             ! I/O manager 
    28    USE fldread         ! read input fields 
    29    USE restart         ! ocean restart 
    30    USE lib_mpp         ! MPP library 
     18   USE oce            ! ocean dynamics and active tracers 
     19   USE dom_oce        ! ocean space and time domain 
     20   USE sbc_oce        ! surface boundary condition: ocean 
     21   USE trc_oce        ! share SMS/Ocean variables 
     22   USE trd_oce        ! trends: ocean variables 
     23   USE trdtra         ! trends manager: tracers  
     24   USE phycst         ! physical constants 
     25   USE in_out_manager ! I/O manager 
     26   USE prtctl         ! Print control 
     27   USE iom            ! I/O manager 
     28   USE fldread        ! read input fields 
     29   USE restart        ! ocean restart 
     30   USE lib_mpp        ! MPP library 
    3131   USE wrk_nemo       ! Memory Allocation 
    3232   USE timing         ! Timing 
     
    4848   REAL(wp), PUBLIC ::   rn_si1     = 23.0_wp   !: deepest depth of extinction (water type I)       (2 bands) 
    4949    
    50    ! Module variables 
    51    REAL(wp) ::   xsi0r                           !: inverse of rn_si0 
    52    REAL(wp) ::   xsi1r                           !: inverse of rn_si1 
     50   INTEGER , PUBLIC ::   nksr   !: levels below which the light cannot penetrate ( depth larger than 391 m) 
     51 
     52   REAL(wp)                  ::   xsi0r, xsi1r        ! inverse of rn_si0 and rn_si1, resp. 
     53   REAL(wp), DIMENSION(3,61) ::   rkrgb               ! tabulated attenuation coefficients for RGB absorption 
    5354   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_chl   ! structure of input Chl (file informations, fields read) 
    54    INTEGER, PUBLIC ::   nksr              ! levels below which the light cannot penetrate ( depth larger than 391 m) 
    55    REAL(wp), DIMENSION(3,61) ::   rkrgb   !: tabulated attenuation coefficients for RGB absorption 
    5655 
    5756   !! * Substitutions 
     
    9291      !!              Lengaigne et al. 2007, Clim. Dyn., V28, 5, 503-516. 
    9392      !!---------------------------------------------------------------------- 
    94       ! 
    9593      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
    9694      ! 
     
    116114      ENDIF 
    117115 
    118       IF( l_trdtra ) THEN      ! Save ta and sa trends 
     116      IF( l_trdtra ) THEN      ! Save temperature trend 
    119117         CALL wrk_alloc( jpi, jpj, jpk, ztrdt )  
    120118         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
     
    141139      !                                        Compute now qsr tracer content field 
    142140      !                                        ************************************ 
    143        
    144141      !                                           ! ============================================== ! 
    145142      IF( lk_qsr_bio .AND. ln_qsr_bio ) THEN      !  bio-model fluxes  : all vertical coordinates  ! 
     
    168165            IF( nn_chldta == 1 .OR. lk_vvl ) THEN            !*  Variable Chlorophyll or ocean volume 
    169166               ! 
    170                IF( nn_chldta == 1 ) THEN                             !* Variable Chlorophyll 
     167               IF( nn_chldta == 1 ) THEN                             !- Variable Chlorophyll 
    171168                  ! 
    172169                  CALL fld_read( kt, 1, sf_chl )                         ! Read Chl data and provides it at the current time step 
     
    184181                     END DO 
    185182                  END DO 
    186                ELSE                                            ! Variable ocean volume but constant chrlorophyll 
    187                   zchl = 0.05                                     ! constant chlorophyll 
     183               ELSE                                                  !- Variable ocean volume but constant chrlorophyll 
     184                  zchl = 0.05                                           ! constant chlorophyll 
    188185                  irgb = NINT( 41 + 20.*LOG10( zchl ) + 1.e-15 ) 
    189                   zekb(:,:) = rkrgb(1,irgb)                       ! Separation in R-G-B depending of the chlorophyll  
     186                  zekb(:,:) = rkrgb(1,irgb)                             ! Separation in R-G-B depending of the chlorophyll  
    190187                  zekg(:,:) = rkrgb(2,irgb) 
    191188                  zekr(:,:) = rkrgb(3,irgb) 
    192189               ENDIF 
    193190               ! 
    194                zcoef  = ( 1. - rn_abs ) / 3.e0                        ! equi-partition in R-G-B 
    195                ze0(:,:,1) = rn_abs  * qsr(:,:) 
    196                ze1(:,:,1) = zcoef * qsr(:,:) 
    197                ze2(:,:,1) = zcoef * qsr(:,:) 
    198                ze3(:,:,1) = zcoef * qsr(:,:) 
    199                zea(:,:,1) =         qsr(:,:) 
     191               zcoef  = ( 1. - rn_abs ) / 3.e0                       !- equi-partition in R-G-B 
     192               ze0(:,:,1) = rn_abs * qsr(:,:) 
     193               ze1(:,:,1) =  zcoef * qsr(:,:) 
     194               ze2(:,:,1) =  zcoef * qsr(:,:) 
     195               ze3(:,:,1) =  zcoef * qsr(:,:) 
     196               zea(:,:,1) =          qsr(:,:) 
    200197               ! 
    201198               DO jk = 2, nksr+1 
Note: See TracChangeset for help on using the changeset viewer.