Changeset 10370 for NEMO/trunk
- Timestamp:
- 2018-12-04T11:37:31+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/SBC/geo2ocean.F90
r10068 r10370 10 10 !! 3.7 ! 11-2015 (G. Madec) remove the unused repere and repcmo routines 11 11 !!---------------------------------------------------------------------- 12 #if defined key_agrif13 !clem: these lines do not seem necessary anymore14 !!DIR$ OPTIMIZE (-O 1) ! cray formulation15 # if defined __INTEL_COMPILER16 !acc: still breaks on at least one Ivybridge cluster with ifort 17.0.4 without this directive17 !DIR$ OPTIMIZE:1 ! intel formulation18 # endif19 #endif20 12 !!---------------------------------------------------------------------- 21 13 !! rot_rep : Rotate the Repere: geographic grid <==> stretched coordinates grid … … 81 73 IF(lwp) WRITE(numout,*) ' ~~~~~~~~ ' 82 74 ! 83 CALL angle ! initialization of the transformation75 CALL angle( glamt, gphit, glamu, gphiu, glamv, gphiv, glamf, gphif ) ! initialization of the transformation 84 76 lmust_init = .FALSE. 85 77 ENDIF … … 126 118 127 119 128 SUBROUTINE angle 120 SUBROUTINE angle( plamt, pphit, plamu, pphiu, plamv, pphiv, plamf, pphif ) 129 121 !!---------------------------------------------------------------------- 130 122 !! *** ROUTINE angle *** … … 138 130 !! ** Action : - gsint, gcost, gsinu, gcosu, gsinv, gcosv, gsinf, gcosf 139 131 !!---------------------------------------------------------------------- 132 ! WARNING: for an unexplained reason, we need to pass all glam, gphi arrays as input parameters in 133 ! order to get AGRIF working with -03 compilation option 134 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: plamt, pphit, plamu, pphiu, plamv, pphiv, plamf, pphif 135 ! 140 136 INTEGER :: ji, jj ! dummy loop indices 141 137 INTEGER :: ierr ! local integer … … 167 163 DO ji = fs_2, jpi ! vector opt. 168 164 ! 169 zlam = glamt(ji,jj) ! north pole direction & modulous (at t-point)170 zphi = gphit(ji,jj)165 zlam = plamt(ji,jj) ! north pole direction & modulous (at t-point) 166 zphi = pphit(ji,jj) 171 167 zxnpt = 0. - 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 172 168 zynpt = 0. - 2. * SIN( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 173 169 znnpt = zxnpt*zxnpt + zynpt*zynpt 174 170 ! 175 zlam = glamu(ji,jj) ! north pole direction & modulous (at u-point)176 zphi = gphiu(ji,jj)171 zlam = plamu(ji,jj) ! north pole direction & modulous (at u-point) 172 zphi = pphiu(ji,jj) 177 173 zxnpu = 0. - 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 178 174 zynpu = 0. - 2. * SIN( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 179 175 znnpu = zxnpu*zxnpu + zynpu*zynpu 180 176 ! 181 zlam = glamv(ji,jj) ! north pole direction & modulous (at v-point)182 zphi = gphiv(ji,jj)177 zlam = plamv(ji,jj) ! north pole direction & modulous (at v-point) 178 zphi = pphiv(ji,jj) 183 179 zxnpv = 0. - 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 184 180 zynpv = 0. - 2. * SIN( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 185 181 znnpv = zxnpv*zxnpv + zynpv*zynpv 186 182 ! 187 zlam = glamf(ji,jj) ! north pole direction & modulous (at f-point)188 zphi = gphif(ji,jj)183 zlam = plamf(ji,jj) ! north pole direction & modulous (at f-point) 184 zphi = pphif(ji,jj) 189 185 zxnpf = 0. - 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 190 186 zynpf = 0. - 2. * SIN( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) 191 187 znnpf = zxnpf*zxnpf + zynpf*zynpf 192 188 ! 193 zlam = glamv(ji,jj ) ! j-direction: v-point segment direction (around t-point)194 zphi = gphiv(ji,jj )195 zlan = glamv(ji,jj-1)196 zphh = gphiv(ji,jj-1)189 zlam = plamv(ji,jj ) ! j-direction: v-point segment direction (around t-point) 190 zphi = pphiv(ji,jj ) 191 zlan = plamv(ji,jj-1) 192 zphh = pphiv(ji,jj-1) 197 193 zxvvt = 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) & 198 194 & - 2. * COS( rad*zlan ) * TAN( rpi/4. - rad*zphh/2. ) … … 202 198 znvvt = MAX( znvvt, 1.e-14 ) 203 199 ! 204 zlam = glamf(ji,jj ) ! j-direction: f-point segment direction (around u-point)205 zphi = gphif(ji,jj )206 zlan = glamf(ji,jj-1)207 zphh = gphif(ji,jj-1)200 zlam = plamf(ji,jj ) ! j-direction: f-point segment direction (around u-point) 201 zphi = pphif(ji,jj ) 202 zlan = plamf(ji,jj-1) 203 zphh = pphif(ji,jj-1) 208 204 zxffu = 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) & 209 205 & - 2. * COS( rad*zlan ) * TAN( rpi/4. - rad*zphh/2. ) … … 213 209 znffu = MAX( znffu, 1.e-14 ) 214 210 ! 215 zlam = glamf(ji ,jj) ! i-direction: f-point segment direction (around v-point)216 zphi = gphif(ji ,jj)217 zlan = glamf(ji-1,jj)218 zphh = gphif(ji-1,jj)211 zlam = plamf(ji ,jj) ! i-direction: f-point segment direction (around v-point) 212 zphi = pphif(ji ,jj) 213 zlan = plamf(ji-1,jj) 214 zphh = pphif(ji-1,jj) 219 215 zxffv = 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) & 220 216 & - 2. * COS( rad*zlan ) * TAN( rpi/4. - rad*zphh/2. ) … … 224 220 znffv = MAX( znffv, 1.e-14 ) 225 221 ! 226 zlam = glamu(ji,jj+1) ! j-direction: u-point segment direction (around f-point)227 zphi = gphiu(ji,jj+1)228 zlan = glamu(ji,jj )229 zphh = gphiu(ji,jj )222 zlam = plamu(ji,jj+1) ! j-direction: u-point segment direction (around f-point) 223 zphi = pphiu(ji,jj+1) 224 zlan = plamu(ji,jj ) 225 zphh = pphiu(ji,jj ) 230 226 zxuuf = 2. * COS( rad*zlam ) * TAN( rpi/4. - rad*zphi/2. ) & 231 227 & - 2. * COS( rad*zlan ) * TAN( rpi/4. - rad*zphh/2. ) … … 257 253 DO jj = 2, jpjm1 258 254 DO ji = fs_2, jpi ! vector opt. 259 IF( MOD( ABS( glamv(ji,jj) - glamv(ji,jj-1) ), 360. ) < 1.e-8 ) THEN255 IF( MOD( ABS( plamv(ji,jj) - plamv(ji,jj-1) ), 360. ) < 1.e-8 ) THEN 260 256 gsint(ji,jj) = 0. 261 257 gcost(ji,jj) = 1. 262 258 ENDIF 263 IF( MOD( ABS( glamf(ji,jj) - glamf(ji,jj-1) ), 360. ) < 1.e-8 ) THEN259 IF( MOD( ABS( plamf(ji,jj) - plamf(ji,jj-1) ), 360. ) < 1.e-8 ) THEN 264 260 gsinu(ji,jj) = 0. 265 261 gcosu(ji,jj) = 1. 266 262 ENDIF 267 IF( ABS( gphif(ji,jj) - gphif(ji-1,jj) ) < 1.e-8 ) THEN263 IF( ABS( pphif(ji,jj) - pphif(ji-1,jj) ) < 1.e-8 ) THEN 268 264 gsinv(ji,jj) = 0. 269 265 gcosv(ji,jj) = 1. 270 266 ENDIF 271 IF( MOD( ABS( glamu(ji,jj) - glamu(ji,jj+1) ), 360. ) < 1.e-8 ) THEN267 IF( MOD( ABS( plamu(ji,jj) - plamu(ji,jj+1) ), 360. ) < 1.e-8 ) THEN 272 268 gsinf(ji,jj) = 0. 273 269 gcosf(ji,jj) = 1. … … 457 453 IF(lwp) WRITE(numout,*) ' obs_rot : geographic <--> stretched' 458 454 IF(lwp) WRITE(numout,*) ' ~~~~~~~ coordinate transformation' 459 CALL angle ! initialization of the transformation455 CALL angle( glamt, gphit, glamu, gphiu, glamv, gphiv, glamf, gphif ) ! initialization of the transformation 460 456 lmust_init = .FALSE. 461 457 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.