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 12963 for branches/UKMO – NEMO

Changeset 12963 for branches/UKMO


Ignore:
Timestamp:
2020-05-22T18:27:18+02:00 (4 years ago)
Author:
clne
Message:

Mask land in surge output fields with fill value rather than 0

Location:
branches/UKMO/dev_r5518_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r5942 r12963  
    128128      INTEGER                      ::   ji, jj, jk              ! dummy loop indices 
    129129      INTEGER                      ::   jkbot                   ! 
    130       REAL(wp)                     ::   zztmp, zztmpx, zztmpy   !  
     130      REAL(wp)                     ::   zztmp, zztmpx, zztmpy, zmdi   !  
    131131      !! 
    132132      REAL(wp), POINTER, DIMENSION(:,:)   :: z2d      ! 2D workspace 
     
    134134      !!---------------------------------------------------------------------- 
    135135      !  
     136      zmdi=1.e+20 !missing data indicator for masking 
     137 
    136138      IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
    137139      !  
     
    152154      ENDIF 
    153155 
    154       CALL iom_put( "ssh" , sshn )                 ! sea surface height 
     156      z2d = sshn(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     157      CALL iom_put( "ssh" , z2d )                 ! sea surface height 
    155158      if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
    156159       
     
    196199          
    197200      CALL iom_put( "uoce", un(:,:,:)         )    ! 3D i-current 
    198       CALL iom_put(  "ssu", un(:,:,1)         )    ! surface i-current 
     201      z2d = un(:,:,1)*umask(:,:,1) + zmdi*(1.0-umask(:,:,1)) 
     202      CALL iom_put(  "ssu", z2d         )    ! surface i-current 
    199203      IF ( iom_use("sbu") ) THEN 
    200204         DO jj = 1, jpj 
     
    213217       
    214218      CALL iom_put( "voce", vn(:,:,:)         )    ! 3D j-current 
    215       CALL iom_put(  "ssv", vn(:,:,1)         )    ! surface j-current 
     219      z2d = vn(:,:,1)*vmask(:,:,1) + zmdi*(1.0-vmask(:,:,1))      
     220      CALL iom_put(  "ssv", z2d         )    ! surface j-current 
    216221      IF ( iom_use("sbv") ) THEN 
    217222         DO jj = 1, jpj 
  • branches/UKMO/dev_r5518_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcsurge.F90

    r6592 r12963  
    151151      ! 
    152152      INTEGER  ::   ji, jj               ! dummy loop indices 
    153       REAL(wp) ::   zztmp                ! local variable 
     153      REAL(wp) ::   zztmp,zmdi                ! local variable 
    154154      REAL(wp) ::   z_z0, z_Cd1          ! local variable 
    155155      REAL(wp) ::   zi                   ! local variable 
    156       REAL(wp), DIMENSION(:,:), POINTER ::   zwnd_i, zwnd_j    ! wind speed components at T-point 
     156      REAL(wp), DIMENSION(:,:), POINTER ::   zwnd_i, zwnd_j, z2d    ! wind speed components at T-point 
    157157      REAL(wp), DIMENSION(:,:), POINTER ::   Cd                ! transfer coefficient for momentum      (tau) 
    158158      !!--------------------------------------------------------------------- 
    159159      ! 
     160      zmdi=1.e+20 !missing data indicator for masking 
     161 
    160162      IF( nn_timing == 1 )  CALL timing_start('surge_oce') 
    161163      ! 
    162       CALL wrk_alloc( jpi,jpj, zwnd_i, zwnd_j ) 
     164      CALL wrk_alloc( jpi,jpj, zwnd_i, zwnd_j, z2d ) 
    163165      CALL wrk_alloc( jpi,jpj, Cd ) 
    164166      ! 
     
    218220      END DO 
    219221 
    220       CALL iom_put( "taum_oce", taum )   ! output wind stress module 
    221       CALL iom_put( "uwnd", uwnd )   ! output wind stress module 
    222       CALL iom_put( "vwnd", vwnd )   ! output wind stress module 
     222      z2d = taum*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     223      CALL iom_put( "taum_oce", z2d )   ! output wind stress module 
     224      z2d = uwnd*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     225      CALL iom_put( "uwnd", z2d )   ! output wind stress module 
     226      z2d = vwnd*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     227      CALL iom_put( "vwnd", z2d )   ! output wind stress module 
    223228 
    224229      ! ... utau, vtau at U- and V_points, resp. 
Note: See TracChangeset for help on using the changeset viewer.