- Timestamp:
- 2020-11-27T17:26:33+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/tickets_icb_1900
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/tickets_icb_1900
- Property svn:externals
-
NEMO/branches/2020/tickets_icb_1900/src/OCE/DOM/domwri.F90
r13226 r13899 13 13 !!---------------------------------------------------------------------- 14 14 !! dom_wri : create and write mesh and mask file(s) 15 !! dom_uniq : identify unique point of a grid (TUVF)16 15 !! dom_stiff : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 17 16 !!---------------------------------------------------------------------- 18 17 ! 19 18 USE dom_oce ! ocean space and time domain 19 USE domutl ! 20 20 USE phycst , ONLY : rsmall 21 21 USE wet_dry, ONLY : ll_wd ! Wetting and drying … … 74 74 ! ! ============================ 75 75 CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. ) 76 !77 ! ! global domain size78 CALL iom_rstput( 0, 0, inum, 'jpiglo', REAL( jpiglo, wp), ktype = jp_i4 )79 CALL iom_rstput( 0, 0, inum, 'jpjglo', REAL( jpjglo, wp), ktype = jp_i4 )80 CALL iom_rstput( 0, 0, inum, 'jpkglo', REAL( jpkglo, wp), ktype = jp_i4 )81 82 76 ! ! domain characteristics 83 77 CALL iom_rstput( 0, 0, inum, 'jperio', REAL( jperio, wp), ktype = jp_i4 ) … … 100 94 101 95 CALL dom_uniq( zprw, 'T' ) 102 DO_2D _11_1196 DO_2D( 1, 1, 1, 1 ) 103 97 zprt(ji,jj) = ssmask(ji,jj) * zprw(ji,jj) ! ! unique point mask 104 98 END_2D 105 99 CALL iom_rstput( 0, 0, inum, 'tmaskutil', zprt, ktype = jp_i1 ) 106 100 CALL dom_uniq( zprw, 'U' ) 107 DO_2D _11_11101 DO_2D( 1, 1, 1, 1 ) 108 102 zprt(ji,jj) = ssumask(ji,jj) * zprw(ji,jj) ! ! unique point mask 109 103 END_2D 110 104 CALL iom_rstput( 0, 0, inum, 'umaskutil', zprt, ktype = jp_i1 ) 111 105 CALL dom_uniq( zprw, 'V' ) 112 DO_2D _11_11106 DO_2D( 1, 1, 1, 1 ) 113 107 zprt(ji,jj) = ssvmask(ji,jj) * zprw(ji,jj) ! ! unique point mask 114 108 END_2D … … 182 176 ! ! ============================ 183 177 END SUBROUTINE dom_wri 184 185 186 SUBROUTINE dom_uniq( puniq, cdgrd )187 !!----------------------------------------------------------------------188 !! *** ROUTINE dom_uniq ***189 !!190 !! ** Purpose : identify unique point of a grid (TUVF)191 !!192 !! ** Method : 1) aplly lbc_lnk on an array with different values for each element193 !! 2) check which elements have been changed194 !!----------------------------------------------------------------------195 CHARACTER(len=1) , INTENT(in ) :: cdgrd !196 REAL(wp), DIMENSION(:,:), INTENT(inout) :: puniq !197 !198 REAL(wp) :: zshift ! shift value link to the process number199 INTEGER :: ji ! dummy loop indices200 LOGICAL, DIMENSION(SIZE(puniq,1),SIZE(puniq,2),1) :: lldbl ! store whether each point is unique or not201 REAL(wp), DIMENSION(jpi,jpj) :: ztstref202 !!----------------------------------------------------------------------203 !204 ! build an array with different values for each element205 ! in mpp: make sure that these values are different even between process206 ! -> apply a shift value according to the process number207 zshift = jpi * jpj * ( narea - 1 )208 ztstref(:,:) = RESHAPE( (/ (zshift + REAL(ji,wp), ji = 1, jpi*jpj) /), (/ jpi, jpj /) )209 !210 puniq(:,:) = ztstref(:,:) ! default definition211 CALL lbc_lnk( 'domwri', puniq, cdgrd, 1.0_wp ) ! apply boundary conditions212 lldbl(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed213 !214 puniq(:,:) = 1. ! default definition215 ! fill only the inner part of the cpu with llbl converted into real216 puniq(nldi:nlei,nldj:nlej) = REAL( COUNT( lldbl(nldi:nlei,nldj:nlej,:), dim = 3 ) , wp )217 !218 END SUBROUTINE dom_uniq219 178 220 179
Note: See TracChangeset
for help on using the changeset viewer.