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 5208 for branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2015-04-13T15:08:59+02:00 (9 years ago)
Author:
davestorkey
Message:

Merge in changes from trunk up to 5021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r4486 r5208  
    3131   USE bdy_par          
    3232   USE bdydyn2d        ! bdy_ssh routine 
    33    USE diaar5, ONLY:   lk_diaar5 
    3433   USE iom 
    3534#if defined key_agrif 
     
    111110      !  
    112111      z1_rau0 = 0.5_wp * r1_rau0 
    113       ssha(:,:) = (  sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * tmask(:,:,1) 
     112      ssha(:,:) = (  sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:) 
    114113 
    115114#if ! defined key_dynspg_ts 
     
    138137      !                                           !           outputs            ! 
    139138      !                                           !------------------------------! 
    140       CALL iom_put( "ssh" , sshn                  )   ! sea surface height 
    141       CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
     139      CALL iom_put( "ssh" , sshn )   ! sea surface height 
     140      if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
    142141      ! 
    143142      IF(ln_ctl)   CALL prt_ctl( tab2d_1=ssha, clinfo1=' ssha  - : ', mask1=tmask, ovlap=1 ) 
     
    233232      !                                           !------------------------------! 
    234233      CALL iom_put( "woce", wn )   ! vertical velocity 
    235       IF( lk_diaar5 ) THEN                            ! vertical mass transport & its square value 
     234      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
    236235         CALL wrk_alloc( jpi, jpj, z2d )  
    237236         CALL wrk_alloc( jpi, jpj, jpk, z3d )  
     
    241240            z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 
    242241         END DO 
    243          CALL iom_put( "w_masstr" , z3d                      
    244          CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
     242         CALL iom_put( "w_masstr" , z3d  
     243         IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
    245244         CALL wrk_dealloc( jpi, jpj, z2d  )  
    246245         CALL wrk_dealloc( jpi, jpj, jpk, z3d )  
     
    291290      ELSE                                         !** Leap-Frog time-stepping: Asselin filter + swap 
    292291         sshb(:,:) = sshn(:,:) + atfp * ( sshb(:,:) - 2 * sshn(:,:) + ssha(:,:) )     ! before <-- now filtered 
    293          IF( lk_vvl ) sshb(:,:) = sshb(:,:) - atfp * rdt / rau0 * ( emp_b(:,:) - emp(:,:) ) * tmask(:,:,1) 
     292         IF( lk_vvl ) sshb(:,:) = sshb(:,:) - atfp * rdt / rau0 * ( emp_b(:,:) - emp(:,:) ) * ssmask(:,:) 
    294293         sshn(:,:) = ssha(:,:)                           ! now <-- after 
    295294      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.