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 14085 for NEMO/branches/2020/dev_r13787_doc_latex_recovery/src/OCE/DIA – NEMO

Ignore:
Timestamp:
2020-12-04T12:36:47+01:00 (4 years ago)
Author:
nicolasmartin
Message:

#2414 Sync merge with trunk

Location:
NEMO/branches/2020/dev_r13787_doc_latex_recovery/src/OCE/DIA
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13787_doc_latex_recovery/src/OCE/DIA/diaar5.F90

    r14066 r14085  
    1010   !!   dia_ar5_init  : initialisation of AR5 diagnostics 
    1111   !!---------------------------------------------------------------------- 
    12    USE oce            ! ocean dynamics and active tracers  
     12   USE oce            ! ocean dynamics and active tracers 
    1313   USE dom_oce        ! ocean space and time domain 
    1414   USE eosbn2         ! equation of state                (eos_bn2 routine) 
     
    3737 
    3838   LOGICAL  :: l_ar5 
    39        
     39 
    4040   !! * Substitutions 
    4141#  include "do_loop_substitute.h90" 
     
    7878      REAL(wp) ::   zaw, zbw, zrw 
    7979      ! 
    80       REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zarea_ssh , zbotpres       ! 2D workspace  
    81       REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: z2d, zpe                   ! 2D workspace  
     80      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zarea_ssh , zbotpres       ! 2D workspace 
     81      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: z2d, zpe                   ! 2D workspace 
    8282      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   :: z3d, zrhd, ztpot, zgdept   ! 3D workspace (zgdept: needed to use the substitute) 
    8383      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztsn                       ! 4D workspace 
     
    8585      !!-------------------------------------------------------------------- 
    8686      IF( ln_timing )   CALL timing_start('dia_ar5') 
    87   
     87 
    8888      IF( kt == nit000 )     CALL dia_ar5_init 
    8989 
    90       IF( l_ar5 ) THEN  
     90      IF( l_ar5 ) THEN 
    9191         ALLOCATE( zarea_ssh(jpi,jpj), zbotpres(jpi,jpj), z2d(jpi,jpj) ) 
    9292         ALLOCATE( zrhd(jpi,jpj,jpk) ) 
     
    9999      CALL iom_put( 'areacello', e1e2t(:,:) ) 
    100100      ! 
    101       IF( iom_use( 'volcello' ) .OR. iom_use( 'masscello' )  ) THEN   
     101      IF( iom_use( 'volcello' ) .OR. iom_use( 'masscello' )  ) THEN 
    102102         zrhd(:,:,jpk) = 0._wp        ! ocean volume ; rhd is used as workspace 
    103103         DO jk = 1, jpkm1 
     
    106106         DO jk = 1, jpk 
    107107            z3d(:,:,jk) =  rho0 * e3t(:,:,jk,Kmm) * tmask(:,:,jk) 
    108          END DO  
     108         END DO 
    109109         CALL iom_put( 'volcello'  , zrhd(:,:,:)  )  ! WARNING not consistent with CMIP DR where volcello is at ca. 2000 
    110110         CALL iom_put( 'masscello' , z3d (:,:,:) )   ! ocean mass 
    111       ENDIF  
     111      ENDIF 
    112112      ! 
    113113      IF( iom_use( 'e3tb' ) )  THEN    ! bottom layer thickness 
     
    117117         END_2D 
    118118         CALL iom_put( 'e3tb', z2d ) 
    119       ENDIF  
    120       ! 
    121       IF( iom_use( 'voltot' ) .OR. iom_use( 'sshtot' )  .OR. iom_use( 'sshdyn' )  ) THEN     
     119      ENDIF 
     120      ! 
     121      IF( iom_use( 'voltot' ) .OR. iom_use( 'sshtot' )  .OR. iom_use( 'sshdyn' )  ) THEN 
    122122         !                                         ! total volume of liquid seawater 
    123          zvolssh = glob_sum( 'diaar5', zarea_ssh(:,:) )  
     123         zvolssh = glob_sum( 'diaar5', zarea_ssh(:,:) ) 
    124124         zvol    = vol0 + zvolssh 
    125        
     125 
    126126         CALL iom_put( 'voltot', zvol               ) 
    127127         CALL iom_put( 'sshtot', zvolssh / area_tot ) 
     
    130130      ENDIF 
    131131 
    132       IF( iom_use( 'botpres' ) .OR. iom_use( 'sshthster' )  .OR. iom_use( 'sshsteric' )  ) THEN     
    133          !                      
     132      IF( iom_use( 'botpres' ) .OR. iom_use( 'sshthster' )  .OR. iom_use( 'sshsteric' )  ) THEN 
     133         ! 
    134134         ztsn(:,:,:,jp_tem) = ts(:,:,:,jp_tem,Kmm)                    ! thermosteric ssh 
    135135         ztsn(:,:,:,jp_sal) = sn0(:,:,:) 
     
    157157!!gm 
    158158         END IF 
    159          !                                          
    160          zarho = glob_sum( 'diaar5', e1e2t(:,:) * zbotpres(:,:) )  
     159         ! 
     160         zarho = glob_sum( 'diaar5', e1e2t(:,:) * zbotpres(:,:) ) 
    161161         zssh_steric = - zarho / area_tot 
    162162         CALL iom_put( 'sshthster', zssh_steric ) 
    163        
     163 
    164164         !                                         ! steric sea surface height 
    165165         zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice 
     
    179179            END IF 
    180180         END IF 
    181          !     
    182          zarho = glob_sum( 'diaar5', e1e2t(:,:) * zbotpres(:,:) )  
     181         ! 
     182         zarho = glob_sum( 'diaar5', e1e2t(:,:) * zbotpres(:,:) ) 
    183183         zssh_steric = - zarho / area_tot 
    184184         CALL iom_put( 'sshsteric', zssh_steric ) 
     
    192192      ENDIF 
    193193 
    194       IF( iom_use( 'masstot' ) .OR. iom_use( 'temptot' )  .OR. iom_use( 'saltot' )  ) THEN     
     194      IF( iom_use( 'masstot' ) .OR. iom_use( 'temptot' )  .OR. iom_use( 'saltot' )  ) THEN 
    195195          !                                         ! Mean density anomalie, temperature and salinity 
    196196          ztsn(:,:,:,:) = 0._wp                    ! ztsn(:,:,1,jp_tem/sal) is used here as 2D Workspace for temperature & salinity 
     
    206206                  DO jj = 1, jpj 
    207207                     iks = mikt(ji,jj) 
    208                      ztsn(ji,jj,1,jp_tem) = ztsn(ji,jj,1,jp_tem) + zarea_ssh(ji,jj) * ts(ji,jj,iks,jp_tem,Kmm)  
    209                      ztsn(ji,jj,1,jp_sal) = ztsn(ji,jj,1,jp_sal) + zarea_ssh(ji,jj) * ts(ji,jj,iks,jp_sal,Kmm)  
     208                     ztsn(ji,jj,1,jp_tem) = ztsn(ji,jj,1,jp_tem) + zarea_ssh(ji,jj) * ts(ji,jj,iks,jp_tem,Kmm) 
     209                     ztsn(ji,jj,1,jp_sal) = ztsn(ji,jj,1,jp_sal) + zarea_ssh(ji,jj) * ts(ji,jj,iks,jp_sal,Kmm) 
    210210                  END DO 
    211211               END DO 
    212212            ELSE 
    213                ztsn(:,:,1,jp_tem) = ztsn(:,:,1,jp_tem) + zarea_ssh(:,:) * ts(:,:,1,jp_tem,Kmm)  
    214                ztsn(:,:,1,jp_sal) = ztsn(:,:,1,jp_sal) + zarea_ssh(:,:) * ts(:,:,1,jp_sal,Kmm)  
     213               ztsn(:,:,1,jp_tem) = ztsn(:,:,1,jp_tem) + zarea_ssh(:,:) * ts(:,:,1,jp_tem,Kmm) 
     214               ztsn(:,:,1,jp_sal) = ztsn(:,:,1,jp_sal) + zarea_ssh(:,:) * ts(:,:,1,jp_sal,Kmm) 
    215215            END IF 
    216216         ENDIF 
     
    218218         ztemp = glob_sum( 'diaar5', ztsn(:,:,1,jp_tem) ) 
    219219         zsal  = glob_sum( 'diaar5', ztsn(:,:,1,jp_sal) ) 
    220          zmass = rho0 * ( zarho + zvol )       
     220         zmass = rho0 * ( zarho + zvol ) 
    221221         ! 
    222222         CALL iom_put( 'masstot', zmass ) 
     
    224224         CALL iom_put( 'saltot' , zsal  / zvol ) 
    225225         ! 
    226       ENDIF      
     226      ENDIF 
    227227 
    228228      IF( ln_teos10 ) THEN        ! ! potential temperature (TEOS-10 case) 
     
    244244                 z2d(:,:) = z2d(:,:) + e1e2t(:,:) * e3t(:,:,jk,Kmm) * ztpot(:,:,jk) 
    245245               END DO 
    246                ztemp = glob_sum( 'diaar5', z2d(:,:)  )  
     246               ztemp = glob_sum( 'diaar5', z2d(:,:)  ) 
    247247               CALL iom_put( 'temptot_pot', ztemp / zvol ) 
    248248             ENDIF 
    249249             ! 
    250250             IF( iom_use( 'ssttot' ) ) THEN   ! Output potential temperature in case we use TEOS-10 
    251                zsst = glob_sum( 'diaar5',  e1e2t(:,:) * ztpot(:,:,1)  )  
     251               zsst = glob_sum( 'diaar5',  e1e2t(:,:) * ztpot(:,:,1)  ) 
    252252               CALL iom_put( 'ssttot', zsst / area_tot ) 
    253253             ENDIF 
     
    258258                  z2d(ji,jj) = z2d(ji,jj) + rho0 * e3t(ji,jj,jk,Kmm) *  ztpot(ji,jj,jk) 
    259259               END_3D 
    260                CALL iom_put( 'tosmint_pot', z2d )  
     260               CALL iom_put( 'tosmint_pot', z2d ) 
    261261            ENDIF 
    262262            DEALLOCATE( ztpot ) 
    263263        ENDIF 
    264       ELSE        
     264      ELSE 
    265265         IF( iom_use('ssttot') ) THEN   ! Output sst in case we use EOS-80 
    266266            zsst  = glob_sum( 'diaar5', e1e2t(:,:) * ts(:,:,1,jp_tem,Kmm) ) 
     
    269269      ENDIF 
    270270 
    271       IF( iom_use( 'tnpeo' )) THEN     
     271      IF( iom_use( 'tnpeo' )) THEN 
    272272        ! Work done against stratification by vertical mixing 
    273273        ! Exclude points where rn2 is negative as convection kicks in here and 
     
    358358         ENDIF 
    359359      ENDIF 
    360      
     360 
    361361   END SUBROUTINE dia_ar5_hst 
    362362 
     
    365365      !!---------------------------------------------------------------------- 
    366366      !!                  ***  ROUTINE dia_ar5_init  *** 
    367       !!                    
     367      !! 
    368368      !! ** Purpose :   initialization for AR5 diagnostic computation 
    369369      !!---------------------------------------------------------------------- 
     
    371371      INTEGER  ::   ik, idep 
    372372      INTEGER  ::   ji, jj, jk  ! dummy loop indices 
    373       REAL(wp) ::   zztmp   
     373      REAL(wp) ::   zztmp 
    374374      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zsaldta   ! Jan/Dec levitus salinity 
    375       REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   zvol0      
     375      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   zvol0 
    376376      ! 
    377377      !!---------------------------------------------------------------------- 
    378378      ! 
    379379      l_ar5 = .FALSE. 
    380       IF(   iom_use( 'voltot'  ) .OR. iom_use( 'sshtot'    )  .OR. iom_use( 'sshdyn' )  .OR.  &  
    381          &  iom_use( 'masstot' ) .OR. iom_use( 'temptot'   )  .OR. iom_use( 'saltot' ) .OR.  &     
     380      IF(   iom_use( 'voltot'  ) .OR. iom_use( 'sshtot'    )  .OR. iom_use( 'sshdyn' )  .OR.  & 
     381         &  iom_use( 'masstot' ) .OR. iom_use( 'temptot'   )  .OR. iom_use( 'saltot' ) .OR.  & 
    382382         &  iom_use( 'botpres' ) .OR. iom_use( 'sshthster' )  .OR. iom_use( 'sshsteric' ) .OR. & 
    383383         &  iom_use( 'uadv_heattr' ) .OR. iom_use( 'udiff_heattr' ) .OR. & 
     
    386386         &  iom_use( 'vadv_salttr' ) .OR. iom_use( 'vdiff_salttr' ) .OR. & 
    387387         &  iom_use( 'rhop' )  ) L_ar5 = .TRUE. 
    388    
     388 
    389389      IF( l_ar5 ) THEN 
    390390         ! 
     
    400400            idep = tmask(ji,jj,jk) * e3t_0(ji,jj,jk) 
    401401            zvol0 (ji,jj) = zvol0 (ji,jj) +  idep * e1e2t(ji,jj) 
    402             thick0(ji,jj) = thick0(ji,jj) +  idep     
     402            thick0(ji,jj) = thick0(ji,jj) +  idep 
    403403         END_3D 
    404404         vol0 = glob_sum( 'diaar5', zvol0 ) 
     
    412412            CALL iom_close( inum ) 
    413413 
    414             sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )         
     414            sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) ) 
    415415            sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:) 
    416416            IF( ln_zps ) THEN               ! z-coord. partial steps 
  • NEMO/branches/2020/dev_r13787_doc_latex_recovery/src/OCE/DIA/diahsb.F90

    r14066 r14085  
    44   !! Ocean diagnostics: Heat, salt and volume budgets 
    55   !!====================================================================== 
    6    !! History :  3.3  ! 2010-09  (M. Leclair)  Original code  
     6   !! History :  3.3  ! 2010-09  (M. Leclair)  Original code 
    77   !!                 ! 2012-10  (C. Rousset)  add iom_put 
    88   !!---------------------------------------------------------------------- 
     
    2121   USE domvvl         ! vertical scale factors 
    2222   USE traqsr         ! penetrative solar radiation 
    23    USE trabbc         ! bottom boundary condition  
     23   USE trabbc         ! bottom boundary condition 
    2424   USE trabbc         ! bottom boundary condition 
    2525   USE restart        ! ocean restart 
     
    4444   REAL(wp) ::   frc_wn_t, frc_wn_s    ! global forcing trends 
    4545   ! 
    46    REAL(wp), DIMENSION(:,:)  , ALLOCATABLE ::   surf  
     46   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE ::   surf 
    4747   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE ::   surf_ini      , ssh_ini          ! 
    4848   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE ::   ssh_hc_loc_ini, ssh_sc_loc_ini   ! 
     
    6262      !!--------------------------------------------------------------------------- 
    6363      !!                  ***  ROUTINE dia_hsb  *** 
    64       !!      
     64      !! 
    6565      !! ** Purpose: Compute the ocean global heat content, salt content and volume conservation 
    66       !!  
     66      !! 
    6767      !! ** Method : - Compute the deviation of heat content, salt content and volume 
    6868      !!             at the current time step from their values at nit000 
     
    7575      INTEGER    ::   ji, jj, jk                  ! dummy loop indice 
    7676      REAL(wp)   ::   zdiff_hc    , zdiff_sc      ! heat and salt content variations 
    77       REAL(wp)   ::   zdiff_hc1   , zdiff_sc1     !  -         -     -        -  
     77      REAL(wp)   ::   zdiff_hc1   , zdiff_sc1     !  -         -     -        - 
    7878      REAL(wp)   ::   zdiff_v1    , zdiff_v2      ! volume variation 
    7979      REAL(wp)   ::   zerr_hc1    , zerr_sc1      ! heat and salt content misfit 
     
    8686      REAL(wp), DIMENSION(jpi,jpj,jpkm1) ::   zwrk         ! 3D workspace 
    8787      !!--------------------------------------------------------------------------- 
    88       IF( ln_timing )   CALL timing_start('dia_hsb')       
     88      IF( ln_timing )   CALL timing_start('dia_hsb') 
    8989      ! 
    9090      ts(:,:,:,1,Kmm) = ts(:,:,:,1,Kmm) * tmask(:,:,:) ; ts(:,:,:,1,Kbb) = ts(:,:,:,1,Kbb) * tmask(:,:,:) ; 
     
    119119            z2d1(:,:) = surf(:,:) * ww(:,:,1) * ts(:,:,1,jp_sal,Kbb) 
    120120         END IF 
    121          z_wn_trd_t = - glob_sum( 'diahsb', z2d0 )  
     121         z_wn_trd_t = - glob_sum( 'diahsb', z2d0 ) 
    122122         z_wn_trd_s = - glob_sum( 'diahsb', z2d1 ) 
    123123      ENDIF 
     
    145145            DO ji = 1, jpi 
    146146               DO jj = 1, jpj 
    147                   z2d0(ji,jj) = surf(ji,jj) * ( ts(ji,jj,mikt(ji,jj),jp_tem,Kmm) * ssh(ji,jj,Kmm) - ssh_hc_loc_ini(ji,jj) )  
    148                   z2d1(ji,jj) = surf(ji,jj) * ( ts(ji,jj,mikt(ji,jj),jp_sal,Kmm) * ssh(ji,jj,Kmm) - ssh_sc_loc_ini(ji,jj) )  
     147                  z2d0(ji,jj) = surf(ji,jj) * ( ts(ji,jj,mikt(ji,jj),jp_tem,Kmm) * ssh(ji,jj,Kmm) - ssh_hc_loc_ini(ji,jj) ) 
     148                  z2d1(ji,jj) = surf(ji,jj) * ( ts(ji,jj,mikt(ji,jj),jp_sal,Kmm) * ssh(ji,jj,Kmm) - ssh_sc_loc_ini(ji,jj) ) 
    149149               END DO 
    150150            END DO 
    151151         ELSE                          ! no under ice-shelf seas 
    152             z2d0(:,:) = surf(:,:) * ( ts(:,:,1,jp_tem,Kmm) * ssh(:,:,Kmm) - ssh_hc_loc_ini(:,:) )  
    153             z2d1(:,:) = surf(:,:) * ( ts(:,:,1,jp_sal,Kmm) * ssh(:,:,Kmm) - ssh_sc_loc_ini(:,:) )  
     152            z2d0(:,:) = surf(:,:) * ( ts(:,:,1,jp_tem,Kmm) * ssh(:,:,Kmm) - ssh_hc_loc_ini(:,:) ) 
     153            z2d1(:,:) = surf(:,:) * ( ts(:,:,1,jp_sal,Kmm) * ssh(:,:,Kmm) - ssh_sc_loc_ini(:,:) ) 
    154154         END IF 
    155          z_ssh_hc = glob_sum_full( 'diahsb', z2d0 )  
    156          z_ssh_sc = glob_sum_full( 'diahsb', z2d1 )  
     155         z_ssh_hc = glob_sum_full( 'diahsb', z2d0 ) 
     156         z_ssh_sc = glob_sum_full( 'diahsb', z2d1 ) 
    157157      ENDIF 
    158158      ! 
     
    181181      zdiff_sc = zdiff_sc - frc_s 
    182182      IF( ln_linssh ) THEN 
    183          zdiff_hc1 = zdiff_hc + z_ssh_hc  
     183         zdiff_hc1 = zdiff_hc + z_ssh_hc 
    184184         zdiff_sc1 = zdiff_sc + z_ssh_sc 
    185185         zerr_hc1  = z_ssh_hc - frc_wn_t 
     
    201201!!gm end 
    202202 
    203       CALL iom_put(   'bgfrcvol' , frc_v    * 1.e-9    )              ! vol - surface forcing (km3)  
    204       CALL iom_put(   'bgfrctem' , frc_t    * rho0 * rcp * 1.e-20 )   ! hc  - surface forcing (1.e20 J)  
    205       CALL iom_put(   'bgfrchfx' , frc_t    * rho0 * rcp /  &         ! hc  - surface forcing (W/m2)  
     203      CALL iom_put(   'bgfrcvol' , frc_v    * 1.e-9    )              ! vol - surface forcing (km3) 
     204      CALL iom_put(   'bgfrctem' , frc_t    * rho0 * rcp * 1.e-20 )   ! hc  - surface forcing (1.e20 J) 
     205      CALL iom_put(   'bgfrchfx' , frc_t    * rho0 * rcp /  &         ! hc  - surface forcing (W/m2) 
    206206         &                       ( surf_tot * kt * rn_Dt )        ) 
    207       CALL iom_put(   'bgfrcsal' , frc_s    * 1.e-9    )              ! sc  - surface forcing (psu*km3)  
     207      CALL iom_put(   'bgfrcsal' , frc_s    * 1.e-9    )              ! sc  - surface forcing (psu*km3) 
    208208 
    209209      IF( .NOT. ln_linssh ) THEN 
    210          CALL iom_put( 'bgtemper' , zdiff_hc / zvol_tot )              ! Temperature drift     (C)  
     210         CALL iom_put( 'bgtemper' , zdiff_hc / zvol_tot )              ! Temperature drift     (C) 
    211211         CALL iom_put( 'bgsaline' , zdiff_sc / zvol_tot )              ! Salinity    drift     (PSU) 
    212          CALL iom_put( 'bgheatco' , zdiff_hc * 1.e-20 * rho0 * rcp )   ! Heat content drift    (1.e20 J)  
    213          CALL iom_put( 'bgheatfx' , zdiff_hc * rho0 * rcp /  &         ! Heat flux drift       (W/m2)  
     212         CALL iom_put( 'bgheatco' , zdiff_hc * 1.e-20 * rho0 * rcp )   ! Heat content drift    (1.e20 J) 
     213         CALL iom_put( 'bgheatfx' , zdiff_hc * rho0 * rcp /  &         ! Heat flux drift       (W/m2) 
    214214            &                       ( surf_tot * kt * rn_Dt )        ) 
    215215         CALL iom_put( 'bgsaltco' , zdiff_sc * 1.e-9    )              ! Salt content drift    (psu*km3) 
    216          CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9    )              ! volume ssh drift      (km3)   
    217          CALL iom_put( 'bgvole3t' , zdiff_v2 * 1.e-9    )              ! volume e3t drift      (km3)   
     216         CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9    )              ! volume ssh drift      (km3) 
     217         CALL iom_put( 'bgvole3t' , zdiff_v2 * 1.e-9    )              ! volume e3t drift      (km3) 
    218218         ! 
    219219         IF( kt == nitend .AND. lwp ) THEN 
     
    228228         ! 
    229229      ELSE 
    230          CALL iom_put( 'bgtemper' , zdiff_hc1 / zvol_tot)              ! Heat content drift    (C)  
     230         CALL iom_put( 'bgtemper' , zdiff_hc1 / zvol_tot)              ! Heat content drift    (C) 
    231231         CALL iom_put( 'bgsaline' , zdiff_sc1 / zvol_tot)              ! Salt content drift    (PSU) 
    232          CALL iom_put( 'bgheatco' , zdiff_hc1 * 1.e-20 * rho0 * rcp )  ! Heat content drift    (1.e20 J)  
    233          CALL iom_put( 'bgheatfx' , zdiff_hc1 * rho0 * rcp /  &        ! Heat flux drift       (W/m2)  
     232         CALL iom_put( 'bgheatco' , zdiff_hc1 * 1.e-20 * rho0 * rcp )  ! Heat content drift    (1.e20 J) 
     233         CALL iom_put( 'bgheatfx' , zdiff_hc1 * rho0 * rcp /  &        ! Heat flux drift       (W/m2) 
    234234            &                       ( surf_tot * kt * rn_Dt )         ) 
    235235         CALL iom_put( 'bgsaltco' , zdiff_sc1 * 1.e-9    )             ! Salt content drift    (psu*km3) 
    236          CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9    )              ! volume ssh drift      (km3)   
     236         CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9    )              ! volume ssh drift      (km3) 
    237237         CALL iom_put( 'bgmistem' , zerr_hc1 / zvol_tot )              ! hc  - error due to free surface (C) 
    238238         CALL iom_put( 'bgmissal' , zerr_sc1 / zvol_tot )              ! sc  - error due to free surface (psu) 
     
    249249      !!--------------------------------------------------------------------- 
    250250      !!                   ***  ROUTINE dia_hsb_rst  *** 
    251       !!                      
     251      !! 
    252252      !! ** Purpose :   Read or write DIA file in restart file 
    253253      !! 
     
    261261      !!---------------------------------------------------------------------- 
    262262      ! 
    263       IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise  
     263      IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise 
    264264         IF( ln_rstart ) THEN                   !* Read the restart file 
    265265            ! 
     
    298298            END DO 
    299299            frc_v = 0._wp                                           ! volume       trend due to forcing 
    300             frc_t = 0._wp                                           ! heat content   -    -   -    -    
    301             frc_s = 0._wp                                           ! salt content   -    -   -    -         
     300            frc_t = 0._wp                                           ! heat content   -    -   -    - 
     301            frc_s = 0._wp                                           ! salt content   -    -   -    - 
    302302            IF( ln_linssh ) THEN 
    303303               IF( ln_isfcav ) THEN 
     
    349349      !!--------------------------------------------------------------------------- 
    350350      !!                  ***  ROUTINE dia_hsb  *** 
    351       !!      
     351      !! 
    352352      !! ** Purpose: Initialization for the heat salt volume budgets 
    353       !!  
     353      !! 
    354354      !! ** Method : Compute initial heat content, salt content and volume 
    355355      !! 
     
    403403      surf_tot  = glob_sum( 'diahsb', surf(:,:) )         ! total ocean surface area 
    404404 
    405       IF( ln_bdy ) CALL ctl_warn( 'dia_hsb_init: heat/salt budget does not consider open boundary fluxes' )          
     405      IF( ln_bdy ) CALL ctl_warn( 'dia_hsb_init: heat/salt budget does not consider open boundary fluxes' ) 
    406406      ! 
    407407      ! ---------------------------------- ! 
  • NEMO/branches/2020/dev_r13787_doc_latex_recovery/src/OCE/DIA/diaptr.F90

    r14066 r14085  
    6666   !!---------------------------------------------------------------------- 
    6767   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    68    !! $Id$  
     68   !! $Id$ 
    6969   !! Software governed by the CeCILL license (see ./LICENSE) 
    7070   !!---------------------------------------------------------------------- 
     
    7575      !!                  ***  ROUTINE dia_ptr  *** 
    7676      !!---------------------------------------------------------------------- 
    77       INTEGER                         , INTENT(in)           ::   kt     ! ocean time-step index      
     77      INTEGER                         , INTENT(in)           ::   kt     ! ocean time-step index 
    7878      INTEGER                         , INTENT(in)           ::   Kmm    ! time level index 
    7979      REAL(wp), DIMENSION(A2D(nn_hls),jpk)    , INTENT(in), OPTIONAL ::   pvtr   ! j-effective transport 
     
    177177 
    178178         IF( iom_use( 'sopstbtr' ) .OR. iom_use( 'sophtbtr' ) ) THEN 
    179             ! Calculate barotropic heat and salt transport here  
     179            ! Calculate barotropic heat and salt transport here 
    180180            ALLOCATE( sjk(jpj,1,nbasin), r1_sjk(jpj,1,nbasin) ) 
    181181            ! 
     
    245245         ! 
    246246         !                                ! Advective and diffusive heat and salt transport 
    247          IF( iom_use( 'sophtadv' ) .OR. iom_use( 'sopstadv' ) ) THEN   
    248             !  
     247         IF( iom_use( 'sophtadv' ) .OR. iom_use( 'sopstadv' ) ) THEN 
     248            ! 
    249249            DO jn = 1, nbasin 
    250250               z3dtr(1,:,jn) = hstr_adv(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     
    263263         ENDIF 
    264264         ! 
    265          IF( iom_use( 'sophtldf' ) .OR. iom_use( 'sopstldf' ) ) THEN   
    266             !  
     265         IF( iom_use( 'sophtldf' ) .OR. iom_use( 'sopstldf' ) ) THEN 
     266            ! 
    267267            DO jn = 1, nbasin 
    268268               z3dtr(1,:,jn) = hstr_ldf(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     
    281281         ENDIF 
    282282         ! 
    283          IF( iom_use( 'sophteiv' ) .OR. iom_use( 'sopsteiv' ) ) THEN   
    284             !  
     283         IF( iom_use( 'sophteiv' ) .OR. iom_use( 'sopsteiv' ) ) THEN 
     284            ! 
    285285            DO jn = 1, nbasin 
    286286               z3dtr(1,:,jn) = hstr_eiv(:,jp_tem,jn) * rc_pwatt  !  (conversion in PW) 
     
    319319            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain 
    320320            CALL iom_get_var(  'uocetr_vsum_op', z2d ) ! get uocetr_vsum_op from xml 
    321             z2d(:,:) = ptr_ci_2d( z2d(:,:) )   
     321            z2d(:,:) = ptr_ci_2d( z2d(:,:) ) 
    322322            CALL iom_put( 'uocetr_vsum_cumul', z2d ) 
    323323            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain 
     
    455455      !!---------------------------------------------------------------------- 
    456456      !!                  ***  ROUTINE dia_ptr_init  *** 
    457       !!                    
     457      !! 
    458458      !! ** Purpose :   Initialization 
    459459      !!---------------------------------------------------------------------- 
     
    472472         &       iom_use( 'sophteiv' ) .OR. iom_use( 'sopsteiv' ) .OR. iom_use( 'sopstvtr' ) .OR.  & 
    473473         &       iom_use( 'sophtvtr' ) .OR. iom_use( 'uocetr_vsum_cumul' ) 
    474        
     474 
    475475      IF(lwp) THEN                     ! Control print 
    476476         WRITE(numout,*) 
     
    480480      ENDIF 
    481481 
    482       IF( l_diaptr ) THEN   
     482      IF( l_diaptr ) THEN 
    483483         ! 
    484484         IF( dia_ptr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_ptr_init : unable to allocate arrays' ) 
     
    489489         IF( lk_mpp )   CALL mpp_ini_znl( numout )     ! Define MPI communicator for zonal sum 
    490490 
    491          btmsk(:,:,1) = tmask_i(:,:)                  
     491         btmsk(:,:,1) = tmask_i(:,:) 
    492492         IF( nbasin == 5 ) THEN   ! nbasin has been initialized in iom_init to define the axis "basin" 
    493493            CALL iom_open( 'subbasins', inum ) 
     
    504504         WHERE( gphit(:,:)*tmask_i(:,:) < -34._wp) 
    505505           zmsk(:,:) = 0._wp      ! mask out Southern Ocean 
    506          ELSE WHERE                   
     506         ELSE WHERE 
    507507           zmsk(:,:) = ssmask(:,:) 
    508508         END WHERE 
    509          btmsk34(:,:,1) = btmsk(:,:,1)                  
     509         btmsk34(:,:,1) = btmsk(:,:,1) 
    510510         DO jn = 2, nbasin 
    511511            btmsk34(:,:,jn) = btmsk(:,:,jn) * zmsk(:,:)                  ! interior domain only 
     
    514514         ! Initialise arrays to zero because diatpr is called before they are first calculated 
    515515         ! Note that this means diagnostics will not be exactly correct when model run is restarted. 
    516          hstr_adv(:,:,:) = 0._wp            
    517          hstr_ldf(:,:,:) = 0._wp            
    518          hstr_eiv(:,:,:) = 0._wp            
    519          hstr_ove(:,:,:) = 0._wp            
     516         hstr_adv(:,:,:) = 0._wp 
     517         hstr_ldf(:,:,:) = 0._wp 
     518         hstr_eiv(:,:,:) = 0._wp 
     519         hstr_ove(:,:,:) = 0._wp 
    520520         hstr_btr(:,:,:) = 0._wp           ! 
    521521         hstr_vtr(:,:,:) = 0._wp           ! 
     
    525525         ll_init = .FALSE. 
    526526         ! 
    527       ENDIF  
    528       !  
     527      ENDIF 
     528      ! 
    529529   END SUBROUTINE dia_ptr_init 
    530530 
    531531 
    532    SUBROUTINE dia_ptr_hst( ktra, cptr, pvflx )  
     532   SUBROUTINE dia_ptr_hst( ktra, cptr, pvflx ) 
    533533      !!---------------------------------------------------------------------- 
    534534      !!                    ***  ROUTINE dia_ptr_hst *** 
     
    727727      ! 
    728728      INTEGER                  ::   ji,jj,jc       ! dummy loop arguments 
    729       INTEGER                  ::   ijpj        ! ???  
     729      INTEGER                  ::   ijpj        ! ??? 
    730730      REAL(wp), DIMENSION(jpi,jpj) :: p_fval ! function value 
    731731      !!-------------------------------------------------------------------- 
    732       !  
     732      ! 
    733733      ijpj = jpj  ! ??? 
    734734      p_fval(:,:) = 0._wp 
     
    738738         END_2D 
    739739      END DO 
    740       !  
     740      ! 
    741741   END FUNCTION ptr_ci_2d 
    742742 
Note: See TracChangeset for help on using the changeset viewer.