Changeset 9299
- Timestamp:
- 2018-02-01T13:12:00+01:00 (7 years ago)
- Location:
- branches/UKMO/r6232_tracer_advection/NEMOGCM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r6232_tracer_advection/NEMOGCM/CONFIG/SHARED/field_def.xml
r5517 r9299 23 23 <field_group id="grid_T" grid_ref="grid_T_2D" > 24 24 <field id="e3t" long_name="T-cell thickness" standard_name="cell_thickness" unit="m" grid_ref="grid_T_3D"/> 25 <field id="e3t_surf" long_name="T-cell thickness" field_ref="e3t" standard_name="cell_thickness" unit="m" grid_ref="grid_T_SFC"/> 25 26 26 27 <field id="toce" long_name="temperature" standard_name="sea_water_potential_temperature" unit="degC" grid_ref="grid_T_3D"/> … … 613 614 --> 614 615 615 <field_group id="trendT" grid_ref="grid_T_3D">616 616 <!-- variables available with ln_tra_trd --> 617 <field id="ttrd_xad" long_name="temperature-trend: i-advection" unit="degC/s" /> 617 618 <!-- Asselin trends calculated on odd time steps--> 619 <field_group id="trendT_odd" grid_ref="grid_T_3D"> 620 <field id="ttrd_atf" long_name="temperature-trend: asselin time filter" unit="degree_C/s" /> 621 <field id="strd_atf" long_name="salinity -trend: asselin time filter" unit="0.001/s" /> 622 <!-- Thickness weighted versions: --> 623 <field id="ttrd_atf_e3t" unit="degC/s * m" > ttrd_atf * e3t </field> 624 <field id="strd_atf_e3t" unit="1e-3/s * m" > strd_atf * e3t </field> 625 <!-- OMIP layer-integrated trends --> 626 <field id="ttrd_atf_li" long_name="layer integrated heat-trend: asselin time filter " unit="W/m^2" > ttrd_atf_e3t * 1026.0 * 3991.86795711963 </field> 627 <field id="strd_atf_li" long_name="layer integrated salt -trend: asselin time filter " unit="kg/(m^2 s)" > strd_atf_e3t * 1026.0 * 0.001 </field> 628 </field_group> 629 630 <!-- Other trends calculated on even time steps--> 631 <field_group id="trendT_even" grid_ref="grid_T_3D"> 632 <field id="ttrd_xad" long_name="temperature-trend: i-advection" unit="degC/s" /> 618 633 <field id="strd_xad" long_name="salinity -trend: i-advection" unit="1e-3/s" /> 619 634 <field id="ttrd_yad" long_name="temperature-trend: j-advection" unit="degC/s" /> … … 630 645 <field id="strd_zdf" long_name="salinity -trend: vertical diffusion" standard_name="tendency_of_sea_water_salinity_due_to_vertical_mixing" unit="1e-3/s" /> 631 646 647 <field id="strd_evd_e3t" unit="1e-3/s * m" > strd_evd * e3t </field> 648 632 649 <!-- ln_traldf_iso=T only (iso-neutral diffusion) --> 633 650 <field id="ttrd_zdfp" long_name="temperature-trend: pure vert. diffusion" unit="degC/s" /> … … 641 658 <field id="ttrd_npc" long_name="temperature-trend: non-penetrative conv." unit="degC/s" /> 642 659 <field id="strd_npc" long_name="salinity -trend: non-penetrative conv." unit="1e-3/s" /> 643 <field id="ttrd_qns" long_name="temperature-trend: non-solar flux + runoff" unit="degC/s" />644 <field id="strd_cdt" long_name="salinity -trend: C/D term + runoff" unit="degC/s" />660 <field id="ttrd_qns" long_name="temperature-trend: non-solar flux + runoff" unit="degC/s" grid_ref="grid_T_2D" /> 661 <field id="strd_cdt" long_name="salinity -trend: C/D term + runoff" unit="degC/s" grid_ref="grid_T_2D" /> 645 662 <field id="ttrd_qsr" long_name="temperature-trend: solar penetr. heating" unit="degC/s" /> 646 663 <field id="ttrd_bbc" long_name="temperature-trend: geothermal heating" unit="degC/s" /> 647 <field id="ttrd_atf" long_name="temperature-trend: asselin time filter" unit="degC/s" /> 648 <field id="strd_atf" long_name="salinity -trend: asselin time filter" unit="1e-3/s" /> 649 664 665 <!-- OMIP layer-integrated trends --> 666 <field id="ttrd_totad_li" long_name="layer integrated heat-trend : total advection" unit="W/m^2" > ttrd_totad_e3t * 1026.0 * 3991.86795711963 </field> 667 <field id="strd_totad_li" long_name="layer integrated salt -trend : total advection" unit="kg/(m^2 s)" > strd_totad_e3t * 1026.0 * 0.001 </field> 668 <field id="ttrd_evd_li" long_name="layer integrated heat-trend : EVD convection" unit="W/m^2" > ttrd_evd_e3t * 1026.0 * 3991.86795711963 </field> 669 <field id="strd_evd_li" long_name="layer integrated salt -trend : EVD convection" unit="kg/(m^2 s)" > strd_evd_e3t * 1026.0 * 0.001 </field> 670 <field id="ttrd_iso_li" long_name="layer integrated heat-trend : isopycnal diffusion" unit="W/m^2" > ttrd_iso_e3t * 1026.0 * 3991.86795711963 </field> 671 <field id="strd_iso_li" long_name="layer integrated salt -trend : isopycnal diffusion" unit="kg/(m^2 s)" > strd_iso_e3t * 1026.0 * 0.001 </field> 672 <field id="ttrd_zdfp_li" long_name="layer integrated heat-trend : pure vert. diffusion" unit="W/m^2" > ttrd_zdfp_e3t * 1026.0 * 3991.86795711963 </field> 673 <field id="strd_zdfp_li" long_name="layer integrated salt -trend : pure vert. diffusion" unit="kg/(m^2 s)" > strd_zdfp_e3t * 1026.0 * 0.001 </field> 674 <field id="ttrd_qns_li" long_name="layer integrated heat-trend : non-solar flux + runoff" unit="W/m^2" grid_ref="grid_T_2D"> ttrd_qns_e3t * 1026.0 * 3991.86795711963 </field> 675 <field id="ttrd_qsr_li" long_name="layer integrated heat-trend : solar flux" unit="W/m^2" grid_ref="grid_T_3D"> ttrd_qsr_e3t * 1026.0 * 3991.86795711963 </field> 676 <field id="ttrd_bbl_li" long_name="layer integrated heat-trend: bottom boundary layer " unit="W/m^2" > ttrd_bbl_e3t * 1026.0 * 3991.86795711963 </field> 677 <field id="strd_bbl_li" long_name="layer integrated salt -trend: bottom boundary layer " unit="kg/(m^2 s)" > strd_bbl_e3t * 1026.0 * 0.001 </field> 678 <field id="ttrd_evd_li" long_name="layer integrated heat -trend: evd convection " unit="W/m^2" >ttrd_evd_e3t * 1026.0 * 3991.86795711963 </field> 679 <field id="strd_evd_li" long_name="layer integrated salt -trend: evd convection " unit="kg/(m^2 s)" > strd_evd_e3t * 1026.0 * 0.001 </field> 680 </field_group> 681 682 <!-- Total trends calculated every time step--> 683 <field_group id="trendT" grid_ref="grid_T_3D"> 684 <field id="ttrd_tot" long_name="temperature-trend: total model trend" unit="degC/s" /> 685 <field id="strd_tot" long_name="salinity -trend: total model trend" unit="1e-3/s" /> 686 <!-- Thickness weighted versions: --> 687 <!-- OMIP layer-integrated total trends --> 688 <field id="ttrd_tot_li" long_name="layer integrated heat-trend: total model trend :" unit="W/m^2" > ttrd_tot_e3t * 1026.0 * 3991.86795711963 </field> 689 <field id="strd_tot_li" long_name="layer integrated salt -trend: total model trend :" unit="kg/(m^2 s)" > strd_tot_e3t * 1026.0 * 0.001 </field> 690 691 <!-- **** these trends have not been apportioned to all/even/odd ts yet **** --> 650 692 <!-- variables available with ln_KE_trd --> 651 693 <field id="ketrd_hpg" long_name="ke-trend: hydrostatic pressure gradient" unit="W/s^3" /> … … 946 988 --> 947 989 990 <field_group id="TRD" > 991 <field field_ref="ttrd_totad_li" name="opottempadvect" /> 992 <field field_ref="ttrd_iso_li" name="opottemppmdiff" /> 993 <field field_ref="ttrd_zdfp_li" name="opottempdiff" /> 994 <field field_ref="ttrd_evd_li" name="opottempevd" /> 995 <field field_ref="strd_evd_li" name="osaltevd" /> 996 <field field_ref="ttrd_qns_li" name="opottempqns" /> 997 <field field_ref="ttrd_qsr_li" name="rsdoabsorb" operation="accumulate" /> 998 <field field_ref="strd_totad_li" name="osaltadvect" /> 999 <field field_ref="strd_iso_li" name="osaltpmdiff" /> 1000 <field field_ref="strd_zdfp_li" name="osaltdiff" /> 1001 </field_group> 1002 948 1003 <field_group id="mooring" > 949 1004 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> -
branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r9295 r9299 1590 1590 #if ! defined key_xios2 1591 1591 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op=cl1//'ts', freq_offset='0ts') 1592 WRITE(cl1,'(i1)') 2 ; CALL iom_set_field_attr('trendT_even' , freq_op=cl1//'ts', freq_offset='0ts') 1593 WRITE(cl1,'(i1)') 2 ; CALL iom_set_field_attr('trendT_odd' , freq_op=cl1//'ts', freq_offset='-1ts') 1592 1594 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op=cl1//'ts', freq_offset='0ts') 1593 1595 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC_scalar' , freq_op=cl1//'ts', freq_offset='0ts') … … 1596 1598 #else 1597 1599 f_op%timestep = 1 ; f_of%timestep = 0 ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 1600 f_op%timestep = 2 ; f_of%timestep = 0 ; CALL iom_set_field_attr('trendT_even' , freq_op=f_op, freq_offset=f_of) 1601 f_op%timestep = 2 ; f_of%timestep = -1 ; CALL iom_set_field_attr('trendT_odd' , freq_op=f_op, freq_offset=f_of) 1598 1602 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC' , freq_op=f_op, freq_offset=f_of) 1599 1603 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op=f_op, freq_offset=f_of) -
branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
r9295 r9299 548 548 zmbk(:,:) = REAL( mbkv_d(:,:), wp ) ; CALL lbc_lnk(zmbk,'V',1.) ; mbkv_d(:,:) = MAX( INT( zmbk(:,:) ), 1 ) 549 549 550 !* sign of grad(H) at u- and v-points 551 mgrhu( jpi,:) = 0 ; mgrhu(:,jpj) = 0 ; mgrhv(jpi,:) = 0 ; mgrhv(:,jpj) = 0550 !* sign of grad(H) at u- and v-points; zero if grad(H) = 0 551 mgrhu(:,:) = 0 ; mgrhv(:,:) = 0 552 552 DO jj = 1, jpjm1 553 553 DO ji = 1, jpim1 554 mgrhu(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 555 mgrhv(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 554 IF( gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN 555 mgrhu(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 556 ENDIF 557 ! 558 IF( gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN 559 mgrhv(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 560 ENDIF 556 561 END DO 557 562 END DO -
branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r9295 r9299 129 129 IF( l_trdtra ) THEN ! store now fields before applying the Asselin filter 130 130 CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 131 ztrdt(:,:, :) = tsn(:,:,:,jp_tem)132 ztrds(:,:, :) = tsn(:,:,:,jp_sal)131 ztrdt(:,:,jpk) = 0._wp 132 ztrds(:,:,jpk) = 0._wp 133 133 IF( ln_traldf_iso ) THEN ! diagnose the "pure" Kz diffusive trend 134 134 CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt ) 135 135 CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdfp, ztrds ) 136 136 ENDIF 137 ENDIF 138 137 ! total trend for the non-time-filtered variables. 138 ! G Nurser 23 Mar 2017. Recalculate trend as Delta(e3t*T)/e3tn; e3tn cancel from tsn terms 139 IF( lk_vvl ) THEN 140 DO jk = 1, jpkm1 141 zfact = 1.0 / rdttra(jk) 142 ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem)*fse3t_a(:,:,jk) / fse3t_n(:,:,jk) - tsn(:,:,jk,jp_tem)) * zfact 143 ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal)*fse3t_a(:,:,jk) / fse3t_n(:,:,jk) - tsn(:,:,jk,jp_sal)) * zfact 144 END DO 145 ELSE 146 DO jk = 1, jpkm1 147 zfact = 1.0 / rdttra(jk) 148 ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact 149 ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact 150 END DO 151 END IF 152 CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 153 CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 154 IF( .NOT.lk_vvl ) THEN 155 ! Store now fields before applying the Asselin filter 156 ! in order to calculate Asselin filter trend later. 157 ztrdt(:,:,:) = tsn(:,:,:,jp_tem) 158 ztrds(:,:,:) = tsn(:,:,:,jp_sal) 159 END IF 160 END IF 161 ! 139 162 IF( neuler == 0 .AND. kt == nit000 ) THEN ! Euler time-stepping at first time-step (only swap) 140 163 DO jn = 1, jpts … … 143 166 END DO 144 167 END DO 168 IF (l_trdtra.AND.lk_vvl) THEN ! Zero Asselin filter contribution must be explicitly written out since for vvl 169 ! Asselin filter is output by tra_nxt_vvl that is not called on this time step 170 ztrdt(:,:,:) = 0._wp 171 ztrds(:,:,:) = 0._wp 172 CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 173 CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 174 END IF 145 175 ELSE ! Leap-Frog + Asselin filter time stepping 146 176 ! … … 152 182 ! 153 183 ! trends computation 154 IF( l_trdtra 184 IF( l_trdtra.AND..NOT.lk_vvl) THEN ! trend of the Asselin filter (tb filtered - tb)/dt 155 185 DO jk = 1, jpkm1 156 186 zfact = 1._wp / r2dtra(jk) … … 160 190 CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 161 191 CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 162 CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds )163 192 END IF 164 !193 IF( l_trdtra) CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) 165 194 ! ! control print 166 195 IF(ln_ctl) CALL prt_ctl( tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' nxt - Tn: ', mask1=tmask, & … … 277 306 LOGICAL :: ll_tra_hpg, ll_traqsr, ll_rnf, ll_isf ! local logical 278 307 INTEGER :: ji, jj, jk, jn ! dummy loop indices 279 REAL(wp) :: zfact 1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar308 REAL(wp) :: zfact, zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar 280 309 REAL(wp) :: zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d ! - - 310 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrd_atf 281 311 !!---------------------------------------------------------------------- 282 312 ! … … 303 333 ENDIF 304 334 ! 335 IF( ( l_trdtra .AND. cdtype == 'TRA' ) .OR. ( l_trdtrc .AND. cdtype == 'TRC' ) ) THEN 336 CALL wrk_alloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 337 ztrd_atf(:,:,:,:) = 0.0_wp 338 ENDIF 305 339 DO jn = 1, kjpt 306 340 DO jk = 1, jpkm1 341 zfact = 1._wp / p2dt(jk) 307 342 zfact1 = atfp * p2dt(jk) 308 343 zfact2 = zfact1 / rau0 … … 359 394 pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n + rbcp * ztc_d ) ! ta <-- Brown & Campana average 360 395 ENDIF 396 IF( ( l_trdtra .AND. cdtype == 'TRA' ) .OR. ( l_trdtrc .AND. cdtype == 'TRC' ) ) THEN 397 ztrd_atf(ji,jj,jk,jn) = (ztc_f - ztc_n) * zfact/ze3t_n 398 ENDIF 361 399 END DO 362 400 END DO … … 365 403 END DO 366 404 ! 405 IF( l_trdtra .AND. cdtype == 'TRA' ) THEN 406 CALL trd_tra( kt, cdtype, jp_tem, jptra_atf, ztrd_atf(:,:,:,jp_tem) ) 407 CALL trd_tra( kt, cdtype, jp_sal, jptra_atf, ztrd_atf(:,:,:,jp_sal) ) 408 CALL wrk_dealloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 409 ENDIF 410 IF( l_trdtrc .AND. cdtype == 'TRC' ) THEN 411 DO jn = 1, kjpt 412 CALL trd_tra( kt, cdtype, jn, jptra_atf, ztrd_atf(:,:,:,jn) ) 413 END DO 414 CALL wrk_dealloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 415 ENDIF 416 367 417 END SUBROUTINE tra_nxt_vvl 368 418 -
branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
r9295 r9299 94 94 95 95 IF( l_trdtra ) THEN ! save the vertical diffusive trends for further diagnostics 96 DO jk = 1, jpkm1 97 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dtra(jk) ) - ztrdt(:,:,jk) 98 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk) 99 END DO 96 ! G Nurser 23 Mar 2017. Recalculate trend as Delta(e3t*T)/e3tn. 97 IF( lk_vvl ) THEN 98 DO jk = 1, jpkm1 99 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem)*fse3t_a(:,:,jk) - tsb(:,:,jk,jp_tem)*fse3t_b(:,:,jk) ) & 100 & / (fse3t_n(:,:,jk)*r2dtra(jk)) ) - ztrdt(:,:,jk) 101 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal)*fse3t_a(:,:,jk) - tsb(:,:,jk,jp_sal)*fse3t_b(:,:,jk) ) & 102 & / (fse3t_n(:,:,jk)*r2dtra(jk)) ) - ztrds(:,:,jk) 103 END DO 104 ELSE 105 DO jk = 1, jpkm1 106 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dtra(jk) ) - ztrdt(:,:,jk) 107 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk) 108 END DO 109 END IF 100 110 CALL lbc_lnk( ztrdt, 'T', 1. ) 101 111 CALL lbc_lnk( ztrds, 'T', 1. ) -
branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
r9295 r9299 285 285 !! ** Purpose : output 3D tracer trends using IOM 286 286 !!---------------------------------------------------------------------- 287 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: ptrdx ! Temperature or U trend 288 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: ptrdy ! Salinity or V trend 289 INTEGER , INTENT(in ) :: ktrd ! tracer trend index 290 INTEGER , INTENT(in ) :: kt ! time step 291 !! 292 INTEGER :: ji, jj, jk ! dummy loop indices 293 INTEGER :: ikbu, ikbv ! local integers 294 REAL(wp), POINTER, DIMENSION(:,:) :: z2dx, z2dy ! 2D workspace 295 !!---------------------------------------------------------------------- 296 ! 297 !!gm Rq: mask the trends already masked in trd_tra, but lbc_lnk should probably be added 298 ! 299 SELECT CASE( ktrd ) 300 CASE( jptra_xad ) ; CALL iom_put( "ttrd_xad" , ptrdx ) ! x- horizontal advection 301 CALL iom_put( "strd_xad" , ptrdy ) 302 CASE( jptra_yad ) ; CALL iom_put( "ttrd_yad" , ptrdx ) ! y- horizontal advection 303 CALL iom_put( "strd_yad" , ptrdy ) 304 CASE( jptra_zad ) ; CALL iom_put( "ttrd_zad" , ptrdx ) ! z- vertical advection 305 CALL iom_put( "strd_zad" , ptrdy ) 306 IF( .NOT. lk_vvl ) THEN ! cst volume : adv flux through z=0 surface 307 CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 308 z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / fse3t(:,:,1) 309 z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / fse3t(:,:,1) 310 CALL iom_put( "ttrd_sad", z2dx ) 311 CALL iom_put( "strd_sad", z2dy ) 312 CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 313 ENDIF 314 CASE( jptra_ldf ) ; CALL iom_put( "ttrd_ldf" , ptrdx ) ! lateral diffusion 315 CALL iom_put( "strd_ldf" , ptrdy ) 316 CASE( jptra_zdf ) ; CALL iom_put( "ttrd_zdf" , ptrdx ) ! vertical diffusion (including Kz contribution) 317 CALL iom_put( "strd_zdf" , ptrdy ) 318 CASE( jptra_zdfp ) ; CALL iom_put( "ttrd_zdfp", ptrdx ) ! PURE vertical diffusion (no isoneutral contribution) 319 CALL iom_put( "strd_zdfp", ptrdy ) 320 CASE( jptra_dmp ) ; CALL iom_put( "ttrd_dmp" , ptrdx ) ! internal restoring (damping) 321 CALL iom_put( "strd_dmp" , ptrdy ) 322 CASE( jptra_bbl ) ; CALL iom_put( "ttrd_bbl" , ptrdx ) ! bottom boundary layer 323 CALL iom_put( "strd_bbl" , ptrdy ) 324 CASE( jptra_npc ) ; CALL iom_put( "ttrd_npc" , ptrdx ) ! static instability mixing 325 CALL iom_put( "strd_npc" , ptrdy ) 326 CASE( jptra_nsr ) ; CALL iom_put( "ttrd_qns" , ptrdx ) ! surface forcing + runoff (ln_rnf=T) 327 CALL iom_put( "strd_cdt" , ptrdy ) 328 CASE( jptra_qsr ) ; CALL iom_put( "ttrd_qsr" , ptrdx ) ! penetrative solar radiat. (only on temperature) 329 CASE( jptra_bbc ) ; CALL iom_put( "ttrd_bbc" , ptrdx ) ! geothermal heating (only on temperature) 330 CASE( jptra_atf ) ; CALL iom_put( "ttrd_atf" , ptrdx ) ! asselin time Filter 331 CALL iom_put( "strd_atf" , ptrdy ) 332 END SELECT 333 ! 287 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: ptrdx ! Temperature or U trend 288 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: ptrdy ! Salinity or V trend 289 INTEGER , INTENT(in ) :: ktrd ! tracer trend index 290 INTEGER , INTENT(in ) :: kt ! time step 291 !! 292 INTEGER :: ji, jj, jk ! dummy loop indices 293 INTEGER :: ikbu, ikbv ! local integers 294 REAL(wp), POINTER, DIMENSION(:,:) :: z2dx, z2dy ! 2D workspace 295 !!---------------------------------------------------------------------- 296 ! 297 !!gm Rq: mask the trends already masked in trd_tra, but lbc_lnk should probably be added 298 ! 299 ! These trends are done every second time step. When 1ts output is selected must go different (2ts) file from standard T-file 300 IF( MOD( kt, 2 ) == 0 ) THEN 301 SELECT CASE( ktrd ) 302 CASE( jptra_xad ) ; CALL iom_put( "ttrd_xad" , ptrdx ) ! x- horizontal advection 303 CALL iom_put( "strd_xad" , ptrdy ) 304 CASE( jptra_yad ) ; CALL iom_put( "ttrd_yad" , ptrdx ) ! y- horizontal advection 305 CALL iom_put( "strd_yad" , ptrdy ) 306 CASE( jptra_zad ) ; CALL iom_put( "ttrd_zad" , ptrdx ) ! z- vertical advection 307 CALL iom_put( "strd_zad" , ptrdy ) 308 IF( .NOT. lk_vvl ) THEN ! cst volume : adv flux through z=0 surface 309 CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 310 z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / fse3t(:,:,1) 311 z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / fse3t(:,:,1) 312 CALL iom_put( "ttrd_sad", z2dx ) 313 CALL iom_put( "strd_sad", z2dy ) 314 CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 315 ENDIF 316 CASE( jptra_ldf ) ; CALL iom_put( "ttrd_ldf" , ptrdx ) ! lateral diffusion 317 CALL iom_put( "strd_ldf" , ptrdy ) 318 CASE( jptra_zdf ) ; CALL iom_put( "ttrd_zdf" , ptrdx ) ! vertical diffusion (including Kz contribution) 319 CALL iom_put( "strd_zdf" , ptrdy ) 320 CASE( jptra_zdfp ) ; CALL iom_put( "ttrd_zdfp", ptrdx ) ! PURE vertical diffusion (no isoneutral contribution) 321 CALL iom_put( "strd_zdfp", ptrdy ) 322 CASE( jptra_dmp ) ; CALL iom_put( "ttrd_dmp" , ptrdx ) ! internal restoring (damping) 323 CALL iom_put( "strd_dmp" , ptrdy ) 324 CASE( jptra_bbl ) ; CALL iom_put( "ttrd_bbl" , ptrdx ) ! bottom boundary layer 325 CALL iom_put( "strd_bbl" , ptrdy ) 326 CASE( jptra_npc ) ; CALL iom_put( "ttrd_npc" , ptrdx ) ! static instability mixing 327 CALL iom_put( "strd_npc" , ptrdy ) 328 CASE( jptra_bbc ) ; CALL iom_put( "ttrd_bbc" , ptrdx ) ! geothermal heating (only on temperature) 329 CASE( jptra_nsr ) ; CALL iom_put( "ttrd_qns" , ptrdx(:,:,1) ) ! surface forcing + runoff (ln_rnf=T) 330 CALL iom_put( "strd_cdt" , ptrdy(:,:,1) ) ! output as 2D surface fields 331 CASE( jptra_qsr ) ; CALL iom_put( "ttrd_qsr" , ptrdx ) ! penetrative solar radiat. (only on temperature) 332 END SELECT 333 ! the Asselin filter trend is also every other time step but needs to be lagged one time step 334 ! Even when 1ts output is selected can go to the same (2ts) file as the trends plotted every even time step. 335 ELSE IF( MOD( kt, 2 ) == 1 ) THEN 336 SELECT CASE( ktrd ) 337 CASE( jptra_atf ) ; CALL iom_put( "ttrd_atf" , ptrdx ) ! asselin time Filter 338 CALL iom_put( "strd_atf" , ptrdy ) 339 END SELECT 340 END IF 341 ! 334 342 END SUBROUTINE trd_tra_iom 335 343
Note: See TracChangeset
for help on using the changeset viewer.