Changeset 6043 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
- Timestamp:
- 2015-12-14T10:27:28+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
r5034 r6043 10 10 !! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge 11 11 !!---------------------------------------------------------------------- 12 #if defined key_bdy && defined key_dynspg_flt12 #if defined key_bdy 13 13 !!---------------------------------------------------------------------- 14 !! 'key_bdy' AND unstructured open boundary conditions 15 !! 'key_dynspg_flt' filtered free surface 14 !! 'key_bdy' unstructured open boundary conditions 16 15 !!---------------------------------------------------------------------- 17 USE timing ! Timing18 16 USE oce ! ocean dynamics and tracers 19 USE sbcisf ! ice shelf 17 USE bdy_oce ! ocean open boundary conditions 18 USE sbc_oce ! ocean surface boundary conditions 20 19 USE dom_oce ! ocean space and time domain 21 20 USE phycst ! physical constants 22 USE bdy_oce ! ocean open boundary conditions 21 USE sbcisf ! ice shelf 22 ! 23 USE in_out_manager ! I/O manager 23 24 USE lib_mpp ! for mppsum 24 USE in_out_manager ! I/O manager25 USE sbc_oce ! ocean surface boundary conditions25 USE timing ! Timing 26 USE lib_fortran ! Fortran routines library 26 27 27 28 IMPLICIT NONE 28 29 PRIVATE 29 30 30 PUBLIC bdy_vol ! routine called by dynspg_flt.h9031 PUBLIC bdy_vol 31 32 32 33 !! * Substitutions 33 34 # include "domzgr_substitute.h90" 34 35 !!---------------------------------------------------------------------- 35 !! NEMO/OPA 3. 3 , NEMO Consortium (2010)36 !! NEMO/OPA 3.6 , NEMO Consortium (2014) 36 37 !! $Id$ 37 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 43 44 !! *** ROUTINE bdyvol *** 44 45 !! 45 !! ** Purpose : This routine is called in dynspg_flt to control46 !! the volume of the system.A correction velocity is calculated46 !! ** Purpose : This routine controls the volume of the system. 47 !! A correction velocity is calculated 47 48 !! to correct the total transport through the unstructured OBC. 48 49 !! The total depth used is constant (H0) to be consistent with the … … 78 79 TYPE(OBC_INDEX), POINTER :: idx 79 80 !!----------------------------------------------------------------------------- 80 81 IF( nn_timing == 1 ) CALL timing_start('bdy_vol')82 81 ! 82 IF( nn_timing == 1 ) CALL timing_start('bdy_vol') 83 ! 83 84 IF( ln_vol ) THEN 84 85 ! 85 86 IF( kt == nit000 ) THEN 86 87 IF(lwp) WRITE(numout,*) … … 91 92 ! Calculate the cumulate surface Flux z_cflxemp (m3/s) over all the domain 92 93 ! ----------------------------------------------------------------------- 93 z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:)+rdivisf*fwfisf(:,:) ) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) ) / rau0 94 !!gm replace these lines : 95 z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:)+fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau0 94 96 IF( lk_mpp ) CALL mpp_sum( z_cflxemp ) ! sum over the global domain 97 !!gm by : 98 !!gm z_cflxemp = glob_sum( ( emp(:,:)-rnf(:,:)+fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau0 99 !!gm 95 100 96 101 ! Transport through the unstructured open boundary 97 102 ! ------------------------------------------------ 98 zubtpecor = 0. e0103 zubtpecor = 0._wp 99 104 DO ib_bdy = 1, nb_bdy 100 105 idx => idx_bdy(ib_bdy) 101 106 ! 102 107 jgrd = 2 ! cumulate u component contribution first 103 108 DO jb = 1, idx%nblenrim(jgrd) … … 116 121 END DO 117 122 END DO 118 123 ! 119 124 END DO 120 125 IF( lk_mpp ) CALL mpp_sum( zubtpecor ) ! sum over the global domain … … 123 128 ! ------------------------------ 124 129 IF( nn_volctl==1 ) THEN ; zubtpecor = ( zubtpecor - z_cflxemp) / bdysurftot 125 ELSE ; zubtpecor = zubtpecor / bdysurftot130 ELSE ; zubtpecor = zubtpecor / bdysurftot 126 131 END IF 127 132 128 133 ! Correction of the total velocity on the unstructured boundary to respect the mass flux conservation 129 134 ! ------------------------------------------------------------- 130 ztranst = 0. e0135 ztranst = 0._wp 131 136 DO ib_bdy = 1, nb_bdy 132 137 idx => idx_bdy(ib_bdy) 133 138 ! 134 139 jgrd = 2 ! correct u component 135 140 DO jb = 1, idx%nblenrim(jgrd) … … 150 155 END DO 151 156 END DO 152 157 ! 153 158 END DO 154 159 IF( lk_mpp ) CALL mpp_sum( ztranst ) ! sum over the global domain … … 169 174 ! 170 175 END IF ! ln_vol 171 176 ! 172 177 END SUBROUTINE bdy_vol 173 178
Note: See TracChangeset
for help on using the changeset viewer.