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/diaopfoam.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/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 
Note: See TracChangeset for help on using the changeset viewer.