Changeset 9987 for branches/UKMO/dev_r5518_obs_oper_update_icethick/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
- Timestamp:
- 2018-07-23T11:33:03+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_obs_oper_update_icethick/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r7960 r9987 39 39 USE zdfmxl ! mixed layer 40 40 USE dianam ! build name of file (routine) 41 USE zdftke ! vertical physics: one-equation scheme 41 42 USE zdfddm ! vertical physics: double diffusion 42 43 USE diahth ! thermocline diagnostics … … 46 47 USE iom 47 48 USE ioipsl 48 USE dynspg_oce, ONLY: un_adv, vn_adv ! barotropic velocities 49 49 USE dynspg_oce, ONLY: un_adv, vn_adv ! barotropic velocities 50 USE insitu_tem, ONLY: insitu_t, theta2t 50 51 #if defined key_lim2 51 52 USE limwri_2 … … 145 146 ENDIF 146 147 147 IF( .NOT.lk_vvl ) THEN 148 CALL iom_put( "e3t" , fse3t_n(:,:,:) ) 149 CALL iom_put( "e3u" , fse3u_n(:,:,:) ) 150 CALL iom_put( "e3v" , fse3v_n(:,:,:) ) 151 CALL iom_put( "e3w" , fse3w_n(:,:,:) ) 152 ENDIF 148 ! Output of initial vertical scale factor 149 CALL iom_put("e3t_0", e3t_0(:,:,:) ) 150 CALL iom_put("e3u_0", e3t_0(:,:,:) ) 151 CALL iom_put("e3v_0", e3t_0(:,:,:) ) 152 ! 153 CALL iom_put( "e3t" , fse3t_n(:,:,:) ) 154 CALL iom_put( "e3u" , fse3u_n(:,:,:) ) 155 CALL iom_put( "e3v" , fse3v_n(:,:,:) ) 156 CALL iom_put( "e3w" , fse3w_n(:,:,:) ) 157 IF( iom_use("e3tdef") ) & 158 CALL iom_put( "e3tdef" , ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 ) 159 CALL iom_put("tpt_dep", fsdept_n(:,:,:) ) 160 CALL iom_put("wpt_dep", fsdepw_n(:,:,:) ) 161 153 162 154 163 CALL iom_put( "ssh" , sshn ) ! sea surface height 155 if( iom_use('ssh2') ) CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) ) ! square of sea surface height156 164 157 165 CALL iom_put( "toce", tsn(:,:,:,jp_tem) ) ! 3D temperature 166 CALL theta2t ! in-situ temperature conversion 167 CALL iom_put( "tinsitu", insitu_t(:,:,:)) ! in-situ temperature 158 168 CALL iom_put( "sst", tsn(:,:,1,jp_tem) ) ! surface temperature 159 169 IF ( iom_use("sbt") ) THEN … … 194 204 CALL iom_put( "taubot", z2d ) 195 205 ENDIF 196 206 197 207 CALL iom_put( "uoce", un(:,:,:) ) ! 3D i-current 198 208 CALL iom_put( "ssu", un(:,:,1) ) ! surface i-current … … 242 252 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. 243 253 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef. 254 IF( lk_zdftke ) THEN 255 CALL iom_put( "tke" , en ) ! TKE budget: Turbulent Kinetic Energy 256 CALL iom_put( "tke_niw" , e_niw ) ! TKE budget: Near-inertial waves 257 ENDIF 244 258 CALL iom_put( "avs" , fsavs(:,:,:) ) ! S vert. eddy diff. coef. (useful only with key_zdfddm) 259 ! Log of eddy diff coef 260 IF( iom_use('logavt') ) CALL iom_put( "logavt", LOG( MAX( 1.e-20_wp, avt (:,:,:) ) ) ) 261 IF( iom_use('logavs') ) CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, fsavs(:,:,:) ) ) ) 245 262 246 263 IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN … … 307 324 CALL iom_put( "eken", rke ) 308 325 ENDIF 309 310 IF( iom_use("u_masstr") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN 326 ! 327 CALL iom_put( "hdiv", hdivn ) ! Horizontal divergence 328 ! 329 IF( iom_use("u_masstr") .OR. iom_use("u_masstr_vint") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN 311 330 z3d(:,:,jpk) = 0.e0 331 z2d(:,:) = 0.e0 312 332 DO jk = 1, jpkm1 313 333 z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * fse3u(:,:,jk) * umask(:,:,jk) 334 z2d(:,:) = z2d(:,:) + z3d(:,:,jk) 314 335 END DO 315 336 CALL iom_put( "u_masstr", z3d ) ! mass transport in i-direction 337 CALL iom_put( "u_masstr_vint", z2d ) ! mass transport in i-direction vertical sum 316 338 ENDIF 317 339 … … 376 398 CALL iom_put( "v_salttr", 0.5 * z2d ) ! heat transport in j-direction 377 399 ENDIF 400 401 ! Vertical integral of temperature 402 IF( iom_use("tosmint") ) THEN 403 z2d(:,:)=0._wp 404 DO jk = 1, jpkm1 405 DO jj = 2, jpjm1 406 DO ji = fs_2, fs_jpim1 ! vector opt. 407 z2d(ji,jj) = z2d(ji,jj) + rau0 * fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) 408 END DO 409 END DO 410 END DO 411 CALL lbc_lnk( z2d, 'T', -1. ) 412 CALL iom_put( "tosmint", z2d ) 413 ENDIF 414 415 ! Vertical integral of salinity 416 IF( iom_use("somint") ) THEN 417 z2d(:,:)=0._wp 418 DO jk = 1, jpkm1 419 DO jj = 2, jpjm1 420 DO ji = fs_2, fs_jpim1 ! vector opt. 421 z2d(ji,jj) = z2d(ji,jj) + rau0 * fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) 422 END DO 423 END DO 424 END DO 425 CALL lbc_lnk( z2d, 'T', -1. ) 426 CALL iom_put( "somint", z2d ) 427 ENDIF 428 429 CALL iom_put( "bn2", rn2 ) !Brunt-Vaisala buoyancy frequency (N^2) 378 430 ! 379 431 CALL wrk_dealloc( jpi , jpj , z2d ) … … 438 490 zdt = rdt 439 491 IF( nacc == 1 ) zdt = rdtmin 440 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 441 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) 442 ENDIF 492 clop = "x" ! no use of the mask value (require less cpu time, and otherwise the model crashes) 443 493 #if defined key_diainstant 444 494 zsto = nwrite * zdt … … 1020 1070 CALL histdef( id_i, "vovvldep", "T point depth" , "m" , & ! t-point depth 1021 1071 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 1072 CALL histdef( id_i, "vovvle3t", "T point thickness" , "m" , & ! t-point depth 1073 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 1022 1074 END IF 1023 1075 … … 1050 1102 CALL histwrite( id_i, "sozotaux", kt, utau , jpi*jpj , idex ) ! i-wind stress 1051 1103 CALL histwrite( id_i, "sometauy", kt, vtau , jpi*jpj , idex ) ! j-wind stress 1104 IF( lk_vvl ) THEN 1105 CALL histwrite( id_i, "vovvldep", kt, fsdept_n(:,:,:), jpi*jpj*jpk, idex )! T-cell depth 1106 CALL histwrite( id_i, "vovvle3t", kt, fse3t_n (:,:,:), jpi*jpj*jpk, idex )! T-cell thickness 1107 END IF 1052 1108 1053 1109 ! 3. Close the file … … 1062 1118 ENDIF 1063 1119 #endif 1120 1121 IF (cdfile_name == "output.abort") THEN 1122 CALL ctl_stop('MPPSTOP', 'NEMO abort from dia_wri_state') 1123 END IF 1064 1124 1065 1125 ! IF( nn_timing == 1 ) CALL timing_stop('dia_wri_state') ! not sure this works for routines not called in first timestep
Note: See TracChangeset
for help on using the changeset viewer.