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

Changeset 12918 for branches/UKMO


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

Land masking for operational diagnostics

Location:
branches/UKMO/AMM15_v3_6_STABLE_package_collate_PS44/NEMOGCM/NEMO/OPA_SRC
Files:
4 edited

Legend:

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

    r10390 r12918  
    267267      INTEGER                          ::   i_steps                               ! no of timesteps per hour 
    268268      REAL(wp), DIMENSION(jpi,jpj    ) ::   zw2d, un_dm, vn_dm                    ! temporary workspace 
     269      REAL(wp), DIMENSION(jpi,jpj    ) ::   zw2d_inst, zw2d_temp 
    269270      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d                                  ! temporary workspace 
    270271      REAL(wp), DIMENSION(jpi,jpj,3)   ::   zwtmb                                 ! temporary workspace 
    271272      INTEGER                          ::   iyear0, nimonth0,iday0                ! start year,imonth,day 
     273      INTEGER :: jkbot, jj, ji 
    272274 
    273275      !!---------------------------------------------------------------------- 
     
    388390            zw3d(:,:,:) = rinsitu_t_25h(:,:,:)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
    389391            CALL iom_put("tempis25h", zw3d)   ! in-situ temperature 
    390             zw2d(:,:) = insitu_bot_25h(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
    391             CALL iom_put("tempisbot25h", zw2d) ! bottom in-situ temperature 
    392             zw2d(:,:) = temp_bot_25h(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
    393             CALL iom_put("temperbot25h",zw2d) ! bottom potential temperature 
     392            DO jj = 1, jpj 
     393               DO ji = 1, jpi 
     394                  jkbot = mbkt(ji,jj) 
     395                  zw2d_inst(ji,jj) = insitu_bot_25h(ji,jj)*tmask(ji,jj,jkbot) + zmdi*(1.0-tmask(ji,jj,jkbot)) 
     396                  zw2d_temp(ji,jj) = temp_bot_25h(ji,jj)*tmask(ji,jj,jkbot) + zmdi*(1.0-tmask(ji,jj,jkbot)) 
     397               ENDDO 
     398            ENDDO 
     399            CALL iom_put("tempisbot25h", zw2d_inst) ! bottom in-situ temperature 
     400            CALL iom_put("temperbot25h",zw2d_temp) ! bottom potential temperature 
    394401            zw3d(:,:,:) = sn_25h(:,:,:)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
    395402            CALL iom_put( "salin25h", zw3d  )   ! salinity 
  • branches/UKMO/AMM15_v3_6_STABLE_package_collate_PS44/NEMOGCM/NEMO/OPA_SRC/DIA/diaopfoam.F90

    r12536 r12918  
    111111          
    112112         CALL theta2t 
    113          CALL iom_put( "insitut_op" , rinsitu_t(:,:,:)                      )    ! insitu temperature 
    114          CALL iom_put( "toce_op"   , tsn(:,:,:,jp_tem)                     )    ! temperature 
    115          CALL iom_put( "soce_op"   , tsn(:,:,:,jp_sal)                     )    ! salinity 
     113         zw3d(:,:,:)=rinsitu_t(:,:,:)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:))  
     114         CALL iom_put( "insitut_op" , zw3d(:,:,:)                        )    ! insitu temperature 
     115         zw3d(:,:,:)=tsn(:,:,:,jp_tem)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
     116         CALL iom_put( "toce_op"    , zw3d(:,:,:)                        )    ! temperature 
     117         zw3d(:,:,:)=tsn(:,:,:,jp_sal)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
     118         CALL iom_put( "soce_op"    , zw3d(:,:,:)                        )    ! salinity 
    116119         IF (ln_diurnal) THEN 
    117             CALL iom_put( "sst_wl_op"   , x_dsst                             )    ! warm layer  
    118             CALL iom_put( "sst_cs_op"   , x_csdsst                           )    ! cool skin  
     120            CALL iom_put( "sst_wl_op"   , x_dsst                         )    ! warm layer  
     121            CALL iom_put( "sst_cs_op"   , x_csdsst                       )    ! cool skin  
    119122         ENDIF 
    120123         zw2d(:,:)=sshn(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
    121          CALL iom_put( "ssh_op"  , zw2d(:,:)                          ) ! sea surface height 
    122          CALL iom_put( "uoce_op"   , un                                    )    ! i-current       
    123          CALL iom_put( "voce_op"   , vn                                    )    ! j-current 
    124          !CALL iom_put( "woce_op"   , wn                                    )    ! k-current 
     124         CALL iom_put( "ssh_op"  , zw2d(:,:)                             ) ! sea surface height 
     125         zw3d(:,:,:)=un(:,:,:)*umask(:,:,:) + zmdi*(1.0-umask(:,:,:)) 
     126         CALL iom_put( "uoce_op"   , zw3d                                )    ! i-current 
     127         zw3d(:,:,:)=vn(:,:,:)*vmask(:,:,:) + zmdi*(1.0-vmask(:,:,:))       
     128         CALL iom_put( "voce_op"   , zw3d                                )    ! j-current 
     129         !CALL iom_put( "woce_op"   , wn                                 )    ! k-current 
    125130         CALL calc_max_cur(zwu,zwv,zwz,zmdi) 
    126          CALL iom_put( "maxu" , zwu                                     ) ! max u current 
    127          CALL iom_put( "maxv" , zwv                                     ) ! max v current 
    128          CALL iom_put( "maxz" , zwz                                     ) ! max current depth 
     131         zw2d(:,:)=zwu(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     132         CALL iom_put( "maxu" , zw2d                                     ) ! max u current 
     133         zw2d(:,:)=zwv(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     134         CALL iom_put( "maxv" , zw2d                                     ) ! max v current 
     135         zw2d(:,:)=zwz(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     136         CALL iom_put( "maxz" , zw2d                                     ) ! max current depth 
    129137      ENDIF 
    130138   END SUBROUTINE dia_diaopfoam 
     
    340348 
    341349      idex(1) = 1 
    342       CALL histwrite( nid_T, "votemper", kt, tsn(:,:,:,jp_tem), jpi*jpj*jpk, idex )    ! now temperature 
    343       CALL histwrite( nid_T, "vosaline", kt, tsn(:,:,:,jp_sal), jpi*jpj*jpk, idex )    ! now salinity 
    344       CALL histwrite( nid_T, "sossheig", kt, sshn             , jpi*jpj    , idex )    ! sea surface height 
     350      zw3d(:,:,:)=tsn(:,:,:,jp_tem)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
     351      CALL histwrite( nid_T, "votemper", kt, zw3d(:,:,:)      , jpi*jpj*jpk, idex )    ! now temperature 
     352      zw3d(:,:,:)=tsn(:,:,:,jp_sal)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
     353      CALL histwrite( nid_T, "vosaline", kt, zw3d(:,:,:)      , jpi*jpj*jpk, idex )    ! now salinity 
     354      zw2d(:,:)=sshn(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     355      CALL histwrite( nid_T, "sossheig", kt, zw2d(:,:)        , jpi*jpj    , idex )    ! sea surface height 
    345356      CALL theta2t 
    346       CALL histwrite( nid_T, "votempis", kt, rinsitu_t(:,:,:) , jpi*jpj*jpk, idex )    ! now insitu-temperature 
     357      zw3d(:,:,:)=rinsitu_t(:,:,:)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:)) 
     358      CALL histwrite( nid_T, "votempis", kt, zw3d(:,:,:)      , jpi*jpj*jpk, idex )    ! now insitu-temperature 
    347359      CALL calc_max_cur(zwu,zwv,zwz,zmdi) 
    348360      CALL lbc_lnk( zwu, 'T', 1. ) 
    349361      CALL lbc_lnk( zwv, 'T', 1. ) 
    350362      CALL lbc_lnk( zwz, 'T', 1. ) 
    351       CALL histwrite( nid_T, "maxu"    , kt, zwu              , jpi*jpj    , idex )    ! max u-current 
    352       CALL histwrite( nid_T, "maxv"    , kt, zwv              , jpi*jpj    , idex )    ! max v-current 
    353       CALL histwrite( nid_T, "maxz"    , kt, zwz              , jpi*jpj    , idex )    ! max current depth 
     363      zw2d(:,:)=zwu(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     364      CALL histwrite( nid_T, "maxu"    , kt, zw2d             , jpi*jpj    , idex )    ! max u-current 
     365      zw2d(:,:)=zwv(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     366      CALL histwrite( nid_T, "maxv"    , kt, zw2d             , jpi*jpj    , idex )    ! max v-current 
     367      zw2d(:,:)=zwz(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     368      CALL histwrite( nid_T, "maxz"    , kt, zw2d             , jpi*jpj    , idex )    ! max current depth 
    354369      DO jj = 1, jpj 
    355370         DO ji = 1, jpi 
    356371            jkbot = mbkt(ji,jj) 
    357             z2d(ji,jj) = tsn(ji,jj,jkbot,jp_tem) 
     372            z2d(ji,jj) = tsn(ji,jj,jkbot,jp_tem)*tmask(ji,jj,jkbot) + zmdi*(1.0-tmask(ji,jj,jkbot)) 
    358373         END DO 
    359374      END DO 
    360375      CALL histwrite( nid_T, "sbt"     , kt, z2d              , jpi*jpj    , idex )    ! sbt 
    361376      ! U file 
    362       CALL histwrite( nid_U, "vozocrtx", kt, un              , jpi*jpj*jpk, idex )     ! now i-velocity 
     377      zw3d(:,:,:)=un(:,:,:)*umask(:,:,:) + zmdi*(1.0-umask(:,:,:)) 
     378      CALL histwrite( nid_U, "vozocrtx", kt, zw3d(:,:,:)     , jpi*jpj*jpk, idex )     ! now i-velocity 
    363379      ! V file 
    364       CALL histwrite( nid_V, "vomecrty", kt, vn              , jpi*jpj*jpk, idex )     ! now j-velocity 
     380      zw3d(:,:,:)=vn(:,:,:)*vmask(:,:,:) + zmdi*(1.0-vmask(:,:,:)) 
     381      CALL histwrite( nid_V, "vomecrty", kt, zw3d(:,:,:)     , jpi*jpj*jpk, idex )     ! now j-velocity 
    365382 
    366383 
  • 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 
  • branches/UKMO/AMM15_v3_6_STABLE_package_collate_PS44/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90

    r12881 r12918  
    501501 
    502502      REAL(wp) :: zdt             ! timestep variable   
     503      REAL(wp) :: zmdi 
     504      REAL(wp), DIMENSION(jpi,jpj    ) :: zw2d 
    503505 
    504506      CHARACTER(len=1) :: cmld 
     
    510512 
    511513      !!---------------------------------------------------------------------- 
    512        
     514      zmdi=1.e+20                               !  missing data indicator for masking 
     515 
    513516      IF( kt == nit000 ) THEN 
    514517         REWIND( numnam_ref )              ! Namelist namzdf_mldzint in reference namelist  
     
    550553 
    551554               IF( iom_use( "mldzint_"//cmld ) ) THEN 
    552                   CALL iom_put( "mldzint_"//cmld, hmld_zint(:,:) ) 
     555                  zw2d(:,:) = hmld_zint(:,:)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     556                  CALL iom_put( "mldzint_"//cmld, zw2d(:,:) ) 
    553557               ENDIF 
    554558 
     
    582586                        WRITE(numout,*) 'zdf_mxl_zint (25h) : Outputting 25h data at i_cnt_25h=',i_cnt_25h 
    583587                     ENDIF 
    584                      CALL iom_put( "mldzint25h_"//cmld , hmld_zint_25h(:,:,jn) / 25._wp   ) 
     588                     zw2d(:,:) = (hmld_zint_25h(:,:,jn)/25._wp)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1)) 
     589                     CALL iom_put( "mldzint25h_"//cmld , zw2d(:,:) ) 
    585590                     ! Reset array 
    586591                     hmld_zint_25h(:,:,jn) = hmld_zint(:,:) 
Note: See TracChangeset for help on using the changeset viewer.