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

Changeset 15457


Ignore:
Timestamp:
2021-10-28T15:12:49+02:00 (7 months ago)
Author:
lovato
Message:

update trcopt array names with coding practices and make elements more flexible

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml

    r15249 r15457  
    11221122  <!-- shared variables available with TOP interface --> 
    11231123  <field_group id="top_shared" grid_ref="grid_T_3D"> 
    1124     <field id="xeps"           long_name="Broadband light attenuation"                     unit="-"                            /> 
     1124    <field id="xbla"           long_name="Broadband light attenuation"                     unit="-"                            /> 
    11251125    <field id="Heup"           long_name="Euphotic layer depth"                            unit="m"     grid_ref="grid_T_2D"   /> 
    11261126  </field_group> 
  • NEMO/trunk/src/TOP/trcopt.F90

    r15090 r15457  
    2323 
    2424   LOGICAL  ::   ln_varpar   ! boolean for variable PAR fraction 
    25    REAL(wp) ::   parlux      ! Fraction of shortwave as PAR 
     25   REAL(wp), PUBLIC ::   parlux      ! Fraction of shortwave as PAR 
    2626   CHARACTER (len=25) :: light_loc ! Light location in the water cell ('center', 'integral') 
    2727 
     
    3030   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   par_varsw      ! PAR fraction of shortwave 
    3131   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ekb, ekg, ekr  ! wavelength (Red-Green-Blue) 
    32    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xeps  ! weighted diffusion coefficient 
     32   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:), PUBLIC ::   zeps  ! weighted diffusion coefficient 
    3333 
    3434   INTEGER  ::   nksrp   ! levels below which the light cannot penetrate ( depth larger than 391 m) 
     
    5959      INTEGER, INTENT(in) ::   Kbb, Kmm  ! time level indices 
    6060      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) ::   zchl  ! chlorophyll field 
    61       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(out),OPTIONAL :: ze1, ze2, ze3 ! PAR for individual wavelength 
     61      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(out) :: ze1, ze2, ze3 ! PAR for individual wavelength 
    6262      ! 
    6363      INTEGER  ::   ji, jj, jk, irgb 
     
    149149      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    150150         ztmp = ze1(ji,jj,jk)* ekb(ji,jj,jk) + ze2(ji,jj,jk) * ekg(ji,jj,jk) + ze3(ji,jj,jk) * ekr(ji,jj,jk) 
    151          xeps(ji,jj,jk) = ztmp / e3t(ji,jj,jk,Kmm) / (etot(ji,jj,jk) + rtrn) 
     151         zeps(ji,jj,jk) = ztmp / e3t(ji,jj,jk,Kmm) / (etot(ji,jj,jk) + rtrn) 
    152152      END_3D 
    153       !xeps = (ze1(:,:,:) * ekb(:,:,:) + ze2(:,:,:) * ekg(:,:,:) + ze3(:,:,:) * ekr(:,:,:)) / e3t(:,:,:,Kmm) / (etot(:,:,:) + rtrn) 
     153      !zeps = (ze1(:,:,:) * ekb(:,:,:) + ze2(:,:,:) * ekg(:,:,:) + ze3(:,:,:) * ekr(:,:,:)) / e3t(:,:,:,Kmm) / (etot(:,:,:) + rtrn) 
    154154 
    155155      !     Light at the euphotic depth 
     
    182182      ! 
    183183      IF( lk_iomput ) THEN 
    184          CALL iom_put( "xeps" , xeps(:,:,:) * tmask(:,:,:) ) 
     184         CALL iom_put( "xbla" , zeps(:,:,:) * tmask(:,:,:) ) 
    185185         CALL iom_put( "Heup" , heup(:,:  ) * tmask(:,:,1) ) 
    186186      ENDIF 
     
    263263      IF( ln_timing )  CALL timing_start('trc_opt_sbc') 
    264264      ! 
    265       ! Compute par_varsw at nit000 or only if there is more than 1 time record in par coefficient file 
     265      ! Compute par_varsw at nittrc000 or only if there is more than 1 time record in par coefficient file 
    266266      IF( ln_varpar ) THEN 
    267          IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_par > 1 ) ) THEN 
     267         IF( kt == nittrc000 .OR. ( kt /= nittrc000 .AND. ntimes_par > 1 ) ) THEN 
    268268            CALL fld_read( kt, 1, sf_par ) 
    269269            par_varsw(:,:) = ( sf_par(1)%fnow(:,:,1) ) / 3.0 
     
    350350      ! 
    351351      ALLOCATE( ekb(jpi,jpj,jpk), ekr(jpi,jpj,jpk),  & 
    352                 ekg(jpi,jpj,jpk), xeps(jpi,jpj,jpk), STAT= trc_opt_alloc  )  
     352                ekg(jpi,jpj,jpk),zeps(jpi,jpj,jpk), STAT= trc_opt_alloc  )  
    353353      ! 
    354354      IF( trc_opt_alloc /= 0 ) CALL ctl_stop( 'STOP', 'trc_opt_alloc : failed to allocate arrays.' ) 
Note: See TracChangeset for help on using the changeset viewer.