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 12918 for branches/UKMO/AMM15_v3_6_STABLE_package_collate_PS44/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2020-05-13T14:39:24+02:00 (4 years ago)
Author:
petesykes
Message:

Land masking for operational diagnostics

File:
1 edited

Legend:

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

    r12572 r12918  
    138138      REAL(wp), POINTER, DIMENSION(:,:)   :: z2d      ! 2D workspace 
    139139      REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d      ! 3D workspace 
     140      REAL(wp), DIMENSION(jpi,jpj)        :: zw2d  
     141      REAL(wp) :: zmdi 
    140142      REAL(wp), POINTER, DIMENSION(:,:,:) :: zrhd , zrhop  ! 3D workspace 
    141143      !!---------------------------------------------------------------------- 
     
    147149      CALL wrk_alloc( jpi , jpj, jpk , zrhd , zrhop ) 
    148150      ! 
     151      zmdi=1.e+20                               !  missing data indicator for masking 
     152 
    149153      ! Output the initial state and forcings 
    150154      IF( ninist == 1 ) THEN                        
     
    160164      ENDIF 
    161165 
    162       CALL iom_put( "ssh" , sshn )                 ! sea surface height 
     166      zw2d(:,:)=sshn(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     167      CALL iom_put( "ssh" , zw2d )                 ! sea surface height 
    163168      if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
    164169       
     
    169174            DO ji = 1, jpi 
    170175               jkbot = mbkt(ji,jj) 
    171                z2d(ji,jj) = tsn(ji,jj,jkbot,jp_tem) 
     176               z2d(ji,jj) = tsn(ji,jj,jkbot,jp_tem)*tmask(ji,jj,jkbot) + zmdi*(1.0-tmask(ji,jj,jkbot)) 
    172177            END DO 
    173178         END DO 
     
    204209          
    205210      CALL iom_put( "uoce", un(:,:,:)         )    ! 3D i-current 
    206       CALL iom_put(  "ssu", un(:,:,1)         )    ! surface i-current 
     211      zw2d(:,:)=un(:,:,1)*umask(:,:,1) + zmdi*(1.0-umask(:,:,1)) 
     212      CALL iom_put(  "ssu", zw2d(:,:)         )    ! surface i-current 
    207213      IF ( iom_use("sbu") ) THEN 
    208214         DO jj = 1, jpj 
     
    221227       
    222228      CALL iom_put( "voce", vn(:,:,:)         )    ! 3D j-current 
    223       CALL iom_put(  "ssv", vn(:,:,1)         )    ! surface j-current 
     229      zw2d(:,:)=vn(:,:,1)*vmask(:,:,1) + zmdi*(1.0-vmask(:,:,1)) 
     230      CALL iom_put(  "ssv", zw2d(:,:)         )    ! surface j-current 
    224231      IF ( iom_use("sbv") ) THEN 
    225232         DO jj = 1, jpj 
Note: See TracChangeset for help on using the changeset viewer.