Changeset 2970
- Timestamp:
- 2011-10-20T18:21:47+02:00 (13 years ago)
- Location:
- branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r2715 r2970 33 33 USE sbcssr ! restoring term toward SST/SSS climatology 34 34 USE phycst ! physical constants 35 USE dynadv ! dynamics: vector invariant versus flux form 35 36 USE zdfmxl ! mixed layer 36 37 USE dianam ! build name of file (routine) … … 126 127 !!---------------------------------------------------------------------- 127 128 ! 128 IF( wrk_in_use(2, 1) )THEN129 IF( wrk_in_use(2, 1) )THEN 129 130 CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.') 130 131 RETURN … … 137 138 ENDIF 138 139 139 CALL iom_put( "toce" , tn ) ! temperature 140 CALL iom_put( "soce" , sn ) ! salinity 141 CALL iom_put( "sst" , tn(:,:,1) ) ! sea surface temperature 142 CALL iom_put( "sst2" , tn(:,:,1) * tn(:,:,1) ) ! square of sea surface temperature 143 CALL iom_put( "sss" , sn(:,:,1) ) ! sea surface salinity 144 CALL iom_put( "sss2" , sn(:,:,1) * sn(:,:,1) ) ! square of sea surface salinity 145 CALL iom_put( "uoce" , un ) ! i-current 146 CALL iom_put( "voce" , vn ) ! j-current 147 148 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. 149 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef. 140 IF( lk_vvl ) THEN 141 z3d(:,:,:) = tn(:,:,:) * fse3t_n(:,:,:) 142 CALL iom_put( "toce" , z3d ) ! heat content 143 CALL iom_put( "sst" , z3d(:,:,1) ) ! sea surface heat content 144 CALL iom_put( "sst2" , z3d(:,:,1) * tn(:,:,1) ) ! sea surface content of squared temperature 145 z3d(:,:,:) = sn(:,:,:) * fse3t_n(:,:,:) 146 CALL iom_put( "soce" , z3d ) ! salinity content 147 CALL iom_put( "sss" , z3d(:,:,1) ) ! sea surface salinity content 148 CALL iom_put( "sss2" , z3d(:,:,1) * sn(:,:,1) ) ! sea surface content of squared salinity 149 ELSE 150 CALL iom_put( "toce" , tn ) ! temperature 151 CALL iom_put( "sst" , tn(:,:,1) ) ! sea surface temperature 152 CALL iom_put( "sst2" , tn(:,:,1) * tn(:,:,1) ) ! square of sea surface temperature 153 CALL iom_put( "soce" , sn ) ! salinity 154 CALL iom_put( "sss" , sn(:,:,1) ) ! sea surface salinity 155 CALL iom_put( "sss2" , sn(:,:,1) * sn(:,:,1) ) ! square of sea surface salinity 156 END IF 157 IF( lk_vvl .AND. (.NOT. ln_dynadv_vec) ) THEN 158 CALL iom_put( "uoce" , un(:,:,:) * fse3u_n(:,:,:) ) ! i-transport 159 CALL iom_put( "voce" , vn(:,:,:) * fse3v_n(:,:,:) ) ! j-transport 160 ELSE 161 CALL iom_put( "uoce" , un ) ! i-current 162 CALL iom_put( "voce" , vn ) ! j-current 163 END IF 164 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. 165 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef. 150 166 IF( lk_zdfddm ) THEN 151 CALL iom_put( "avs" , fsavs(:,:,:)) ! S vert. eddy diff. coef.167 CALL iom_put( "avs" , fsavs(:,:,:) ) ! S vert. eddy diff. coef. 152 168 ENDIF 153 169 … … 170 186 z3d(:,:,jpk) = 0.e0 171 187 DO jk = 1, jpkm1 172 z3d(:,:,jk) = rau0 * un(:,:,jk) * e1u(:,:) * fse3u (:,:,jk)188 z3d(:,:,jk) = rau0 * un(:,:,jk) * e1u(:,:) * fse3u_n(:,:,jk) 173 189 END DO 174 190 CALL iom_put( "u_masstr", z3d ) ! mass transport in i-direction … … 185 201 CALL iom_put( "u_heattr", z2d ) ! heat transport in i-direction 186 202 DO jk = 1, jpkm1 187 z3d(:,:,jk) = rau0 * vn(:,:,jk) * e2v(:,:) * fse3v (:,:,jk)203 z3d(:,:,jk) = rau0 * vn(:,:,jk) * e2v(:,:) * fse3v_n(:,:,jk) 188 204 END DO 189 205 CALL iom_put( "v_masstr", z3d ) ! mass transport in j-direction … … 197 213 END DO 198 214 CALL lbc_lnk( z2d, 'V', -1. ) 199 CALL iom_put( "v_heattr", z2d ) ! heat transport in i-direction200 ENDIF 201 ! 202 IF( wrk_not_released(2, 1) )THEN215 CALL iom_put( "v_heattr", z2d ) ! heat transport in j-direction 216 ENDIF 217 ! 218 IF( wrk_not_released(2, 1) ) THEN 203 219 CALL ctl_stop('dia_wri: ERROR - failed to release 2D workspace.') 204 220 RETURN … … 224 240 !! Each nwrite time step, output the instantaneous or mean fields 225 241 !!---------------------------------------------------------------------- 242 USE oce, ONLY : z3d => ta ! use ta as 3D workspace 226 243 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 227 244 USE wrk_nemo, ONLY: zw2d => wrk_2d_1 … … 361 378 CALL histdef( nid_T, "vosaline", "Salinity" , "PSU" , & ! sn 362 379 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 380 #if defined key_vvl 381 CALL histdef( nid_T, "vovvle3t", "Level thickness" , "m" , & ! e3t_n 382 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 383 CALL histdef( nid_T, "vovvldep", "T point depth" , "m" , & ! e3t_n 384 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 385 CALL histdef( nid_T, "vovvldef", "Squared level deformation" , "%^2" , & ! e3t_n 386 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 387 #endif 363 388 ! !!! nid_T : 2D 364 389 CALL histdef( nid_T, "sosstsst", "Sea Surface temperature" , "C" , & ! sst … … 439 464 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 440 465 # endif 441 #endif 466 #endif 442 467 443 468 CALL histend( nid_T, snc4chunks=snc4set ) … … 516 541 517 542 ! Write fields on T grid 518 CALL histwrite( nid_T, "votemper", it, tn , ndim_T , ndex_T ) ! temperature 519 CALL histwrite( nid_T, "vosaline", it, sn , ndim_T , ndex_T ) ! salinity 520 CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface temperature 521 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity 543 IF( lk_vvl ) THEN 544 CALL histwrite( nid_T, "votemper", it, tn(:,:,:) * fse3t_n(:,:,:) , ndim_T , ndex_T ) ! heat content 545 CALL histwrite( nid_T, "vosaline", it, sn(:,:,:) * fse3t_n(:,:,:) , ndim_T , ndex_T ) ! salt content 546 CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1) * fse3t_n(:,:,1) , ndim_hT, ndex_hT ) ! sea surface heat content 547 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1) * fse3t_n(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity content 548 ELSE 549 CALL histwrite( nid_T, "votemper", it, tn , ndim_T , ndex_T ) ! temperature 550 CALL histwrite( nid_T, "vosaline", it, sn , ndim_T , ndex_T ) ! salinity 551 CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface temperature 552 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity 553 554 ENDIF 555 IF( lk_vvl ) THEN 556 z3d(:,:,:) = ( ( fse3t_n(:,:,:) - fse3t_0(:,:,:) ) / fse3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 557 CALL histwrite( nid_T, "vovvle3t", it, fse3t_n (:,:,:) , ndim_T , ndex_T ) ! level thickness 558 CALL histwrite( nid_T, "vovvldep", it, fsdept_n(:,:,:) , ndim_T , ndex_T ) ! t-point depth 559 CALL histwrite( nid_T, "vovvldef", it, z3d , ndim_T , ndex_T ) ! level thickness deformation 560 ENDIF 522 561 CALL histwrite( nid_T, "sossheig", it, sshn , ndim_hT, ndex_hT ) ! sea surface height 523 562 !!$#if defined key_lim3 || defined key_lim2 … … 569 608 #endif 570 609 ! Write fields on U grid 571 CALL histwrite( nid_U, "vozocrtx", it, un , ndim_U , ndex_U ) ! i-current 610 IF( lk_vvl .AND. (.NOT. ln_dynadv_vec) ) THEN 611 CALL histwrite( nid_U, "vozocrtx", it, un(:,:,:) * fse3u_n(:,:,:), ndim_U , ndex_U ) ! i-transport 612 ELSE 613 CALL histwrite( nid_U, "vozocrtx", it, un , ndim_U , ndex_U ) ! i-current 614 ENDIF 572 615 #if defined key_diaeiv 573 616 CALL histwrite( nid_U, "vozoeivu", it, u_eiv , ndim_U , ndex_U ) ! i-eiv current … … 576 619 577 620 ! Write fields on V grid 578 CALL histwrite( nid_V, "vomecrty", it, vn , ndim_V , ndex_V ) ! j-current 621 IF( lk_vvl .AND. (.NOT. ln_dynadv_vec) ) THEN 622 CALL histwrite( nid_V, "vomecrty", it, vn(:,:,:) * fse3v_n(:,:,:), ndim_V , ndex_V ) ! j-transport 623 ELSE 624 CALL histwrite( nid_V, "vomecrty", it, vn , ndim_V , ndex_V ) ! j-current 625 END IF 579 626 #if defined key_diaeiv 580 627 CALL histwrite( nid_V, "vomeeivv", it, v_eiv , ndim_V , ndex_V ) ! j-eiv current … … 676 723 CALL histdef( id_i, "votemper", "Temperature" , "C" , & ! temperature 677 724 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 678 CALL histdef( id_i, "sossheig", "Sea Surface Height" , "m" , & ! ssh725 CALL histdef( id_i, "sossheig", "Sea Surface Height" , "m" , & ! ssh 679 726 & jpi, jpj, nh_i, 1 , 1, 1 , nz_i, 32, clop, zsto, zout ) 680 727 CALL histdef( id_i, "vozocrtx", "Zonal Current" , "m/s" , & ! zonal current … … 696 743 CALL histdef( id_i, "sometauy", "Meridional Wind Stress", "N/m2" , & ! j-wind stress 697 744 & jpi, jpj, nh_i, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 745 IF( lk_vvl ) THEN 746 CALL histdef( id_i, "vovvldep", "T point depth" , "m" , & ! t-point depth 747 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 748 END IF 698 749 699 750 #if defined key_lim2 … … 711 762 712 763 ! Write all fields on T grid 713 CALL histwrite( id_i, "votemper", kt, tn , jpi*jpj*jpk, idex ) ! now temperature714 CALL histwrite( id_i, "vosaline", kt, sn , jpi*jpj*jpk, idex ) ! now salinity764 CALL histwrite( id_i, "votemper", kt, tn , jpi*jpj*jpk, idex ) ! now temperature 765 CALL histwrite( id_i, "vosaline", kt, sn , jpi*jpj*jpk, idex ) ! now salinity 715 766 CALL histwrite( id_i, "sossheig", kt, sshn , jpi*jpj , idex ) ! sea surface height 716 767 CALL histwrite( id_i, "vozocrtx", kt, un , jpi*jpj*jpk, idex ) ! now i-velocity … … 723 774 CALL histwrite( id_i, "sozotaux", kt, utau , jpi*jpj , idex ) ! i-wind stress 724 775 CALL histwrite( id_i, "sometauy", kt, vtau , jpi*jpj , idex ) ! j-wind stress 776 IF( lk_vvl ) THEN 777 CALL histwrite( id_i, "vovvldep", kt, fsdept_n(:,:,:), jpi*jpj*jpk, idex ) ! t-point depth 778 END IF 725 779 726 780 ! 3. Close the file -
branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r2917 r2970 209 209 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 210 210 !!---------------------------------------------------------------------- 211 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released , iwrk_in_use, iwrk_not_released211 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 212 212 USE oce , ONLY: ze3t => ta ! ua used as workspace 213 213 USE wrk_nemo, ONLY: zht => wrk_2d_1 ! 2D REAL workspace … … 521 521 z_e3t_def(:,:,:) = ( ( fse3t_n(:,:,:) - fse3t_0(:,:,:) ) / fse3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 522 522 CALL iom_put( "e3t_n" , fse3t_n (:,:,:) ) 523 CALL iom_put( "dept ", fsdept_n (:,:,:) )523 CALL iom_put( "dept_n" , fsdept_n (:,:,:) ) 524 524 CALL iom_put( "e3tdef" , z_e3t_def(:,:,:) ) 525 525 -
branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r2715 r2970 278 278 LOGICAL :: ll_tra, ll_tra_hpg, ll_traqsr ! local logical 279 279 INTEGER :: ji, jj, jk, jn ! dummy loop indices 280 REAL(wp) :: zfact1, ztc_a , ztc_n , ztc_b, ztc_f , ztc_d ! local scalar281 REAL(wp) :: zfact2, ze3t_b, ze3t_n, ze3t_a,ze3t_f, ze3t_d ! - -280 REAL(wp) :: zfact1, ztc_a, ztc_n, ztc_b, ztc_f , ztc_d ! local scalar 281 REAL(wp) :: zfact2, ze3t_f, ze3t_d ! - - 282 282 !!---------------------------------------------------------------------- 283 283 … … 304 304 DO jj = 1, jpj 305 305 DO ji = 1, jpi 306 ze3t_b = fse3t_b(ji,jj,jk) 307 ze3t_n = fse3t_n(ji,jj,jk) 308 ze3t_a = fse3t_a(ji,jj,jk) 309 ! ! tracer content at Before, now and after 310 ztc_b = ptb(ji,jj,jk,jn) * ze3t_b 311 ztc_n = ptn(ji,jj,jk,jn) * ze3t_n 312 ztc_a = pta(ji,jj,jk,jn) * ze3t_a 313 ! 314 ze3t_d = ze3t_a - 2. * ze3t_n + ze3t_b 306 ! ! tracer content at before, now and after 307 ztc_b = ptb(ji,jj,jk,jn) * fse3t_b(ji,jj,jk) 308 ztc_n = ptn(ji,jj,jk,jn) * fse3t_n(ji,jj,jk) 309 ztc_a = pta(ji,jj,jk,jn) * fse3t_a(ji,jj,jk) 310 ! 311 ze3t_d = fse3t_a(ji,jj,jk) - 2. * fse3t_n(ji,jj,jk) + fse3t_b(ji,jj,jk) 315 312 ztc_d = ztc_a - 2. * ztc_n + ztc_b 316 313 ! 317 ze3t_f = ze3t_n+ atfp * ze3t_d314 ze3t_f = fse3t_n(ji,jj,jk) + atfp * ze3t_d 318 315 ztc_f = ztc_n + atfp * ztc_d 319 316 ! 320 IF( ll_tra .AND. jk == 1 ) THEN ! first level only for T & S321 322 ztc_f = ztc_f - zfact1 * ( sbc_tsc(ji,jj,jn) - sbc_tsc_b(ji,jj,jn) )317 IF( jk == 1 ) THEN ! first level 318 ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 319 IF( ll_tra ) ztc_f = ztc_f - zfact1 * ( sbc_tsc(ji,jj,jn) - sbc_tsc_b(ji,jj,jn) ) ! only T and S 323 320 ENDIF 324 321 IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr ) & ! solar penetration (temperature only) … … 330 327 ! 331 328 IF( ll_tra_hpg ) THEN ! semi-implicit hpg (T & S only) 332 ze3t_d = 1.e0 / ( ze3t_n+ rbcp * ze3t_d )329 ze3t_d = 1.e0 / ( fse3t_n(ji,jj,jk) + rbcp * ze3t_d ) 333 330 pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n + rbcp * ztc_d ) ! ta <-- Brown & Campana average 334 331 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.