Changeset 10377 for NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/geo2ocean.F90
 Timestamp:
 20181210T08:45:39+01:00 (22 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/geo2ocean.F90
r10297 r10377 10 10 !! 3.7 ! 112015 (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 tpoint)170 zphi = gphit(ji,jj)165 zlam = plamt(ji,jj) ! north pole direction & modulous (at tpoint) 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 upoint)176 zphi = gphiu(ji,jj)171 zlam = plamu(ji,jj) ! north pole direction & modulous (at upoint) 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 vpoint)182 zphi = gphiv(ji,jj)177 zlam = plamv(ji,jj) ! north pole direction & modulous (at vpoint) 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 fpoint)188 zphi = gphif(ji,jj)183 zlam = plamf(ji,jj) ! north pole direction & modulous (at fpoint) 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 ) ! jdirection: vpoint segment direction (around tpoint)194 zphi = gphiv(ji,jj )195 zlan = glamv(ji,jj1)196 zphh = gphiv(ji,jj1)189 zlam = plamv(ji,jj ) ! jdirection: vpoint segment direction (around tpoint) 190 zphi = pphiv(ji,jj ) 191 zlan = plamv(ji,jj1) 192 zphh = pphiv(ji,jj1) 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.e14 ) 203 199 ! 204 zlam = glamf(ji,jj ) ! jdirection: fpoint segment direction (around upoint)205 zphi = gphif(ji,jj )206 zlan = glamf(ji,jj1)207 zphh = gphif(ji,jj1)200 zlam = plamf(ji,jj ) ! jdirection: fpoint segment direction (around upoint) 201 zphi = pphif(ji,jj ) 202 zlan = plamf(ji,jj1) 203 zphh = pphif(ji,jj1) 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.e14 ) 214 210 ! 215 zlam = glamf(ji ,jj) ! idirection: fpoint segment direction (around vpoint)216 zphi = gphif(ji ,jj)217 zlan = glamf(ji1,jj)218 zphh = gphif(ji1,jj)211 zlam = plamf(ji ,jj) ! idirection: fpoint segment direction (around vpoint) 212 zphi = pphif(ji ,jj) 213 zlan = plamf(ji1,jj) 214 zphh = pphif(ji1,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.e14 ) 225 221 ! 226 zlam = glamu(ji,jj+1) ! jdirection: upoint segment direction (around fpoint)227 zphi = gphiu(ji,jj+1)228 zlan = glamu(ji,jj )229 zphh = gphiu(ji,jj )222 zlam = plamu(ji,jj+1) ! jdirection: upoint segment direction (around fpoint) 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,jj1) ), 360. ) < 1.e8 ) THEN255 IF( MOD( ABS( plamv(ji,jj)  plamv(ji,jj1) ), 360. ) < 1.e8 ) 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,jj1) ), 360. ) < 1.e8 ) THEN259 IF( MOD( ABS( plamf(ji,jj)  plamf(ji,jj1) ), 360. ) < 1.e8 ) THEN 264 260 gsinu(ji,jj) = 0. 265 261 gcosu(ji,jj) = 1. 266 262 ENDIF 267 IF( ABS( gphif(ji,jj)  gphif(ji1,jj) ) < 1.e8 ) THEN263 IF( ABS( pphif(ji,jj)  pphif(ji1,jj) ) < 1.e8 ) 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.e8 ) THEN267 IF( MOD( ABS( plamu(ji,jj)  plamu(ji,jj+1) ), 360. ) < 1.e8 ) 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.