Changeset 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/DIA/diawri.F90
- Timestamp:
- 2021-05-05T13:18:04+02:00 (3 years ago)
- Location:
- NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev _r12970_AGRIF_CMEMSext/AGRIF5 ^/vendors/AGRIF/dev@HEAD ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 ^/vendors/PPR@HEAD ext/PPR 8 9 9 10 # SETTE 10 ^/utils/CI/sette@1 3559sette11 ^/utils/CI/sette@14244 sette
-
- Property svn:externals
-
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/DIA/diawri.F90
r13497 r14789 19 19 !! 3.7 ! 2014-01 (G. Madec) remove eddy induced velocity from no-IOM output 20 20 !! ! change name of output variables in dia_wri_state 21 !! 4.0 ! 2020-10 (A. Nasser, S. Techene) add diagnostic for SWE 21 22 !!---------------------------------------------------------------------- 22 23 … … 46 47 USE zdfdrg ! ocean vertical physics: top/bottom friction 47 48 USE zdfmxl ! mixed layer 49 USE zdfosm ! mixed layer 48 50 ! 49 51 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 68 70 PUBLIC dia_wri_state 69 71 PUBLIC dia_wri_alloc ! Called by nemogcm module 70 #if ! defined key_ iomput72 #if ! defined key_xios 71 73 PUBLIC dia_wri_alloc_abl ! Called by sbcabl module (if ln_abl = .true.) 72 74 #endif … … 93 95 CONTAINS 94 96 95 #if defined key_ iomput97 #if defined key_xios 96 98 !!---------------------------------------------------------------------- 97 !! 'key_ iomput' use IOM library99 !! 'key_xios' use IOM library 98 100 !!---------------------------------------------------------------------- 99 101 INTEGER FUNCTION dia_wri_alloc() … … 118 120 INTEGER :: ji, jj, jk ! dummy loop indices 119 121 INTEGER :: ikbot ! local integer 120 REAL(wp):: ze3121 122 REAL(wp):: zztmp , zztmpx ! local scalar 122 123 REAL(wp):: zztmp2, zztmpy ! - - 124 REAL(wp):: ze3 123 125 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 124 126 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d ! 3D workspace … … 137 139 CALL iom_put("e3u_0", e3u_0(:,:,:) ) 138 140 CALL iom_put("e3v_0", e3v_0(:,:,:) ) 139 ! 141 CALL iom_put("e3f_0", e3f_0(:,:,:) ) 142 ! 143 IF ( iom_use("tpt_dep") ) THEN 144 DO jk = 1, jpk 145 z3d(:,:,jk) = gdept(:,:,jk,Kmm) 146 END DO 147 CALL iom_put( "tpt_dep", z3d(:,:,:) ) 148 ENDIF 149 140 150 IF ( iom_use("e3t") .OR. iom_use("e3tdef") ) THEN ! time-varying e3t 141 151 DO jk = 1, jpk … … 163 173 CALL iom_put( "e3w" , z3d(:,:,:) ) 164 174 ENDIF 175 IF ( iom_use("e3f") ) THEN ! time-varying e3f caution here at Kaa 176 DO jk = 1, jpk 177 z3d(:,:,jk) = e3f(:,:,jk) 178 END DO 179 CALL iom_put( "e3f" , z3d(:,:,:) ) 180 ENDIF 165 181 166 182 IF( ll_wd ) THEN ! sea surface height (brought back to the reference used for wetting and drying) 167 CALL iom_put( "ssh" , (ssh(:,:,Kmm)+ssh_ref)* tmask(:,:,1) )183 CALL iom_put( "ssh" , (ssh(:,:,Kmm)+ssh_ref)*ssmask(:,:) ) 168 184 ELSE 169 185 CALL iom_put( "ssh" , ssh(:,:,Kmm) ) ! sea surface height 170 186 ENDIF 171 187 172 IF( iom_use("wetdep") ) & ! wet depth 173 CALL iom_put( "wetdep" , ht_0(:,:) + ssh(:,:,Kmm) ) 188 IF( iom_use("wetdep") ) CALL iom_put( "wetdep" , ht_0(:,:) + ssh(:,:,Kmm) ) ! wet depth 189 190 #if defined key_qco 191 IF( iom_use("ht") ) CALL iom_put( "ht" , ht(:,:) ) ! water column at t-point 192 IF( iom_use("hu") ) CALL iom_put( "hu" , hu(:,:,Kmm) ) ! water column at u-point 193 IF( iom_use("hv") ) CALL iom_put( "hv" , hv(:,:,Kmm) ) ! water column at v-point 194 IF( iom_use("hf") ) CALL iom_put( "hf" , hf_0(:,:)*( 1._wp + r3f(:,:) ) ) ! water column at f-point (caution here at Naa) 195 #endif 174 196 175 197 CALL iom_put( "toce", ts(:,:,:,jp_tem,Kmm) ) ! 3D temperature … … 193 215 ENDIF 194 216 195 #if ! defined key_qco 196 CALL iom_put( "rhop", rhop(:,:,:) ) ! 3D potential density (sigma0) 197 #endif 217 IF( .NOT.lk_SWE ) CALL iom_put( "rhop", rhop(:,:,:) ) ! 3D potential density (sigma0) 198 218 199 219 IF ( iom_use("taubot") ) THEN ! bottom stress … … 231 251 ENDIF 232 252 233 IF( ln_zad_Aimp ) ww = ww + wi ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 234 CALL iom_put( "woce", ww ) ! vertical velocity 253 ! ! vertical velocity 254 IF( ln_zad_Aimp ) THEN ; CALL iom_put( "woce", ww + wi ) ! explicit plus implicit parts 255 ELSE ; CALL iom_put( "woce", ww ) 256 ENDIF 235 257 236 258 IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value 237 ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 238 z2d(:,:) = rho0 * e1e2t(:,:) 259 ! ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 239 260 DO jk = 1, jpk 240 z3d(:,:,jk) = ww(:,:,jk) * z2d(:,:) 261 IF( ln_zad_Aimp ) THEN 262 z3d(:,:,jk) = rho0 * e1e2t(:,:) * ( ww(:,:,jk) + wi(:,:,jk) ) 263 ELSE 264 z3d(:,:,jk) = rho0 * e1e2t(:,:) * ww(:,:,jk) 265 ENDIF 241 266 END DO 242 267 CALL iom_put( "w_masstr" , z3d ) 243 IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 244 ENDIF 245 ! 246 IF( ln_zad_Aimp ) ww = ww - wi ! Remove implicit part of vertical velocity that was added for diagnostic output 268 IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d * z3d ) 269 ENDIF 247 270 248 271 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. … … 325 348 ENDIF 326 349 ! 350 IF ( iom_use("sKE") ) THEN ! surface kinetic energy at T point 351 z2d(:,:) = 0._wp 352 DO_2D( 0, 0, 0, 0 ) 353 z2d(ji,jj) = 0.25_wp * ( uu(ji ,jj,1,Kmm) * uu(ji ,jj,1,Kmm) * e1e2u(ji ,jj) * e3u(ji ,jj,1,Kmm) & 354 & + uu(ji-1,jj,1,Kmm) * uu(ji-1,jj,1,Kmm) * e1e2u(ji-1,jj) * e3u(ji-1,jj,1,Kmm) & 355 & + vv(ji,jj ,1,Kmm) * vv(ji,jj ,1,Kmm) * e1e2v(ji,jj ) * e3v(ji,jj ,1,Kmm) & 356 & + vv(ji,jj-1,1,Kmm) * vv(ji,jj-1,1,Kmm) * e1e2v(ji,jj-1) * e3v(ji,jj-1,1,Kmm) ) & 357 & * r1_e1e2t(ji,jj) / e3t(ji,jj,1,Kmm) * ssmask(ji,jj) 358 END_2D 359 CALL lbc_lnk( 'diawri', z2d, 'T', 1. ) 360 IF ( iom_use("sKE" ) ) CALL iom_put( "sKE" , z2d ) 361 ENDIF 362 ! 363 IF ( iom_use("ssKEf") ) THEN ! surface kinetic energy at F point 364 z2d(:,:) = 0._wp ! CAUTION : only valid in SWE, not with bathymetry 365 DO_2D( 0, 0, 0, 0 ) 366 z2d(ji,jj) = 0.25_wp * ( uu(ji,jj ,1,Kmm) * uu(ji,jj ,1,Kmm) * e1e2u(ji,jj ) * e3u(ji,jj ,1,Kmm) & 367 & + uu(ji,jj+1,1,Kmm) * uu(ji,jj+1,1,Kmm) * e1e2u(ji,jj+1) * e3u(ji,jj+1,1,Kmm) & 368 & + vv(ji ,jj,1,Kmm) * vv(ji,jj ,1,Kmm) * e1e2v(ji ,jj) * e3v(ji ,jj,1,Kmm) & 369 & + vv(ji+1,jj,1,Kmm) * vv(ji+1,jj,1,Kmm) * e1e2v(ji+1,jj) * e3v(ji+1,jj,1,Kmm) ) & 370 & * r1_e1e2f(ji,jj) / e3f(ji,jj,1) * ssfmask(ji,jj) 371 END_2D 372 CALL lbc_lnk( 'diawri', z2d, 'F', 1. ) 373 CALL iom_put( "ssKEf", z2d ) 374 ENDIF 375 ! 327 376 CALL iom_put( "hdiv", hdiv ) ! Horizontal divergence 328 377 … … 424 473 425 474 IF (ln_dia25h) CALL dia_25h( kt, Kmm ) ! 25h averaging 475 476 ! Output of surface vorticity terms 477 IF ( iom_use("ssrelvor") .OR. iom_use("ssplavor") .OR. & 478 & iom_use("ssrelpotvor") .OR. iom_use("ssabspotvor") .OR. & 479 & iom_use("ssEns") ) THEN 480 ! 481 z2d(:,:) = 0._wp 482 ze3 = 0._wp 483 DO_2D( 1, 0, 1, 0 ) 484 z2d(ji,jj) = ( e2v(ji+1,jj ) * vv(ji+1,jj ,1,Kmm) - e2v(ji,jj) * vv(ji,jj,1,Kmm) & 485 & - e1u(ji ,jj+1) * uu(ji ,jj+1,1,Kmm) + e1u(ji,jj) * uu(ji,jj,1,Kmm) ) * r1_e1e2f(ji,jj) 486 END_2D 487 CALL lbc_lnk( 'diawri', z2d, 'F', 1. ) 488 CALL iom_put( "ssrelvor", z2d ) ! relative vorticity ( zeta ) 489 ! 490 CALL iom_put( "ssplavor", ff_f ) ! planetary vorticity ( f ) 491 ! 492 DO_2D( 1, 0, 1, 0 ) 493 ze3 = ( e3t(ji,jj+1,1,Kmm) * e1e2t(ji,jj+1) + e3t(ji+1,jj+1,1,Kmm) * e1e2t(ji+1,jj+1) & 494 & + e3t(ji,jj ,1,Kmm) * e1e2t(ji,jj ) + e3t(ji+1,jj ,1,Kmm) * e1e2t(ji+1,jj ) ) * r1_e1e2f(ji,jj) 495 IF( ze3 /= 0._wp ) THEN ; ze3 = 4._wp / ze3 496 ELSE ; ze3 = 0._wp 497 ENDIF 498 z2d(ji,jj) = ze3 * z2d(ji,jj) 499 END_2D 500 CALL lbc_lnk( 'diawri', z2d, 'F', 1. ) 501 CALL iom_put( "ssrelpotvor", z2d ) ! relative potential vorticity (zeta/h) 502 ! 503 DO_2D( 1, 0, 1, 0 ) 504 ze3 = ( e3t(ji,jj+1,1,Kmm) * e1e2t(ji,jj+1) + e3t(ji+1,jj+1,1,Kmm) * e1e2t(ji+1,jj+1) & 505 & + e3t(ji,jj ,1,Kmm) * e1e2t(ji,jj ) + e3t(ji+1,jj ,1,Kmm) * e1e2t(ji+1,jj ) ) * r1_e1e2f(ji,jj) 506 IF( ze3 /= 0._wp ) THEN ; ze3 = 4._wp / ze3 507 ELSE ; ze3 = 0._wp 508 ENDIF 509 z2d(ji,jj) = ze3 * ff_f(ji,jj) + z2d(ji,jj) 510 END_2D 511 CALL lbc_lnk( 'diawri', z2d, 'F', 1. ) 512 CALL iom_put( "ssabspotvor", z2d ) ! absolute potential vorticity ( q ) 513 ! 514 DO_2D( 1, 0, 1, 0 ) 515 z2d(ji,jj) = 0.5_wp * z2d(ji,jj) * z2d(ji,jj) 516 END_2D 517 CALL lbc_lnk( 'diawri', z2d, 'F', 1. ) 518 CALL iom_put( "ssEns", z2d ) ! potential enstrophy ( 1/2*q2 ) 519 ! 520 ENDIF 426 521 427 522 IF( ln_timing ) CALL timing_stop('dia_wri') … … 997 1092 !! 998 1093 INTEGER :: inum, jk 999 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t, zgdept ! 3D workspace !!st patch to usesubstitution1094 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t, zgdept ! 3D workspace for qco substitution 1000 1095 !!---------------------------------------------------------------------- 1001 1096 ! … … 1076 1171 CALL iom_rstput ( 0, 0, inum, "qz1_abl", tq_abl(:,:,2,nt_a,2) ) ! now first level humidity 1077 1172 ENDIF 1173 IF( ln_zdfosm ) THEN 1174 CALL iom_rstput( 0, 0, inum, 'hbl', hbl*tmask(:,:,1) ) ! now boundary-layer depth 1175 CALL iom_rstput( 0, 0, inum, 'hml', hml*tmask(:,:,1) ) ! now mixed-layer depth 1176 CALL iom_rstput( 0, 0, inum, 'avt_k', avt_k*wmask ) ! w-level diffusion 1177 CALL iom_rstput( 0, 0, inum, 'avm_k', avm_k*wmask ) ! now w-level viscosity 1178 CALL iom_rstput( 0, 0, inum, 'ghamt', ghamt*wmask ) ! non-local t forcing 1179 CALL iom_rstput( 0, 0, inum, 'ghams', ghams*wmask ) ! non-local s forcing 1180 CALL iom_rstput( 0, 0, inum, 'ghamu', ghamu*umask ) ! non-local u forcing 1181 CALL iom_rstput( 0, 0, inum, 'ghamv', ghamv*vmask ) ! non-local v forcing 1182 IF( ln_osm_mle ) THEN 1183 CALL iom_rstput( 0, 0, inum, 'hmle', hmle*tmask(:,:,1) ) ! now transition-layer depth 1184 END IF 1185 ENDIF 1078 1186 ! 1079 1187 CALL iom_close( inum )
Note: See TracChangeset
for help on using the changeset viewer.