Changeset 2026 for branches/DEV_r2006_merge_TRA_TRC
- Timestamp:
- 2010-07-29T13:09:48+02:00 (14 years ago)
- Location:
- branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRD
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRD/trdicp.F90
r1708 r2026 55 55 CONTAINS 56 56 57 SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype , clpas)57 SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype ) 58 58 !!--------------------------------------------------------------------- 59 59 !! *** ROUTINE trd_2d *** … … 66 66 INTEGER , INTENT(in ) :: ktrd ! tracer trend index 67 67 CHARACTER(len=3) , INTENT(in ) :: ctype ! momentum ('DYN') or tracers ('TRA') trends 68 CHARACTER(len=3) , INTENT(in ), OPTIONAL :: clpas ! number of passage69 68 !! 70 69 INTEGER :: ji, jj ! loop indices 71 CHARACTER(len=3) :: cpas ! number of passage72 70 REAL(wp) :: zmsku, zbtu, zbt ! temporary scalars 73 71 REAL(wp) :: zmskv, zbtv ! " " 74 72 !!---------------------------------------------------------------------- 75 73 76 ! Control of optional arguments77 cpas = 'fst'78 IF( PRESENT(clpas) ) cpas = clpas79 74 80 75 ! 1. Mask trends … … 123 118 ! 124 119 CASE( 'TRA' ) ! Tracers 125 IF( cpas == 'fst' ) THEN 126 tmo(ktrd) = 0.e0 127 smo(ktrd) = 0.e0 128 ENDIF 120 tmo(ktrd) = 0.e0 121 smo(ktrd) = 0.e0 129 122 DO jj = 1, jpj 130 123 DO ji = 1, jpi … … 156 149 ! 157 150 CASE( 'TRA' ) ! Tracers 158 IF( cpas == 'fst' ) THEN 159 t2(ktrd) = 0.e0 160 s2(ktrd) = 0.e0 161 ENDIF 151 t2(ktrd) = 0.e0 152 s2(ktrd) = 0.e0 162 153 DO jj = 1, jpj 163 154 DO ji = 1, jpi … … 173 164 174 165 175 SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd, ctype , clpas)166 SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd, ctype ) 176 167 !!--------------------------------------------------------------------- 177 168 !! *** ROUTINE trd_3d *** … … 184 175 INTEGER, INTENT(in ) :: ktrd ! momentum or tracer trend index 185 176 CHARACTER(len=3), INTENT(in ) :: ctype ! momentum ('DYN') or tracers ('TRA') trends 186 CHARACTER(len=3), INTENT(in ), OPTIONAL :: clpas ! number of passage187 177 !! 188 178 INTEGER :: ji, jj, jk 189 CHARACTER(len=3) :: cpas ! number of passage190 179 REAL(wp) :: zbt, zbtu, zbtv, zmsku, zmskv ! temporary scalars 191 180 !!---------------------------------------------------------------------- 192 193 ! Control of optional arguments194 cpas = 'fst'195 IF( PRESENT(clpas) ) cpas = clpas196 181 197 182 ! 1. Mask the trends … … 242 227 ! 243 228 CASE( 'TRA' ) ! Tracers 244 IF( cpas == 'fst' ) THEN 245 tmo(ktrd) = 0.e0 246 smo(ktrd) = 0.e0 247 ENDIF 229 tmo(ktrd) = 0.e0 230 smo(ktrd) = 0.e0 248 231 DO jk = 1, jpkm1 249 232 DO jj = 1, jpj … … 279 262 ! 280 263 CASE( 'TRA' ) ! Tracers 281 IF( cpas == 'fst' ) THEN 282 t2(ktrd) = 0.e0 283 s2(ktrd) = 0.e0 284 ENDIF 264 t2(ktrd) = 0.e0 265 s2(ktrd) = 0.e0 285 266 DO jk = 1, jpk 286 267 DO jj = 1, jpj … … 600 581 WRITE (numout,*) 601 582 WRITE (numout,9400) kt 602 WRITE (numout,9401) (tmo(jpicpt_xad)+tmo(jpicpt_yad))/ tvolt, (smo(jpicpt_xad)+smo(jpicpt_yad))/ tvolt 583 WRITE (numout,9401) tmo(jpicpt_xad) / tvolt, smo(jpicpt_xad) / tvolt 584 WRITE (numout,9411) tmo(jpicpt_yad) / tvolt, smo(jpicpt_yad) / tvolt 603 585 WRITE (numout,9402) tmo(jpicpt_zad) / tvolt, smo(jpicpt_zad) / tvolt 604 586 WRITE (numout,9403) tmo(jpicpt_ldf) / tvolt, smo(jpicpt_ldf) / tvolt … … 617 599 9400 FORMAT(' tracer trend at it= ',i6,' : temperature', & 618 600 ' salinity',/' ============================') 619 9401 FORMAT(' horizontal advection ',e20.13,' ',e20.13) 601 9401 FORMAT(' zonal advection ',e20.13,' ',e20.13) 602 9411 FORMAT(' meridional advection ',e20.13,' ',e20.13) 620 603 9402 FORMAT(' vertical advection ',e20.13,' ',e20.13) 621 604 9403 FORMAT(' horizontal diffusion ',e20.13,' ',e20.13) … … 633 616 WRITE (numout,*) 634 617 WRITE (numout,9420) kt 635 WRITE (numout,9421) ( t2(jpicpt_xad)+t2(jpicpt_yad) )/ tvolt, ( s2(jpicpt_xad)+s2(jpicpt_yad) )/ tvolt 618 WRITE (numout,9421) t2(jpicpt_xad) / tvolt, s2(jpicpt_xad) / tvolt 619 WRITE (numout,9431) t2(jpicpt_yad) / tvolt, s2(jpicpt_yad) / tvolt 636 620 WRITE (numout,9422) t2(jpicpt_zad) / tvolt, s2(jpicpt_zad) / tvolt 637 621 WRITE (numout,9423) t2(jpicpt_ldf) / tvolt, s2(jpicpt_ldf) / tvolt … … 650 634 9420 FORMAT(' tracer**2 trend at it= ', i6, ' : temperature', & 651 635 ' salinity', /, ' ===============================') 652 9421 FORMAT(' horizontal advection * t ', e20.13, ' ', e20.13) 636 9421 FORMAT(' zonal advection * t ', e20.13, ' ', e20.13) 637 9431 FORMAT(' meridional advection * t ', e20.13, ' ', e20.13) 653 638 9422 FORMAT(' vertical advection * t ', e20.13, ' ', e20.13) 654 639 9423 FORMAT(' horizontal diffusion * t ', e20.13, ' ', e20.13) … … 705 690 706 691 CONTAINS 707 SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype , clpas) ! Empty routine692 SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype ) ! Empty routine 708 693 REAL, DIMENSION(:,:) :: ptrd2dx, ptrd2dy 709 694 INTEGER , INTENT(in ) :: ktrd ! tracer trend index 710 695 CHARACTER(len=3) , INTENT(in ) :: ctype ! momentum ('DYN') or tracers ('TRA') trends 711 CHARACTER(len=3), INTENT(in), OPTIONAL :: clpas ! number of passage712 696 WRITE(*,*) 'trd_2d: You should not have seen this print! error ?', & 713 & ptrd2dx(1,1), ptrd2dy(1,1), ktrd, ctype , clpas697 & ptrd2dx(1,1), ptrd2dy(1,1), ktrd, ctype 714 698 END SUBROUTINE trd_2d 715 SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd , ctype , clpas) ! Empty routine699 SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd , ctype ) ! Empty routine 716 700 REAL, DIMENSION(:,:,:) :: ptrd3dx, ptrd3dy 717 701 INTEGER , INTENT(in ) :: ktrd ! tracer trend index 718 702 CHARACTER(len=3) , INTENT(in ) :: ctype ! momentum ('DYN') or tracers ('TRA') trends 719 CHARACTER(len=3), INTENT(in), OPTIONAL :: clpas ! number of passage720 703 WRITE(*,*) 'trd_3d: You should not have seen this print! error ?', & 721 & ptrd3dx(1,1,1), ptrd3dy(1,1,1), ktrd, ctype , clpas704 & ptrd3dx(1,1,1), ptrd3dy(1,1,1), ktrd, ctype 722 705 END SUBROUTINE trd_3d 723 706 SUBROUTINE trd_icp_init ! Empty routine -
branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRD/trdmod.F90
r1708 r2026 43 43 CONTAINS 44 44 45 SUBROUTINE trd_mod( ptrdx, ptrdy, ktrd, ctype, kt , cnbpas)45 SUBROUTINE trd_mod( ptrdx, ptrdy, ktrd, ctype, kt ) 46 46 !!--------------------------------------------------------------------- 47 47 !! *** ROUTINE trd_mod *** … … 53 53 INTEGER, INTENT( in ) :: ktrd ! tracer trend index 54 54 CHARACTER(len=3), INTENT( in ) :: ctype ! momentum or tracers trends type 'DYN'/'TRA' 55 CHARACTER(len=3), INTENT( in ), OPTIONAL :: cnbpas ! number of passage56 55 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) :: ptrdx ! Temperature or U trend 57 56 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) :: ptrdy ! Salinity or V trend 58 57 !! 59 58 INTEGER :: ji, jj 60 CHARACTER(len=3) :: ccpas ! number of passage61 59 REAL(wp), DIMENSION(jpi,jpj) :: ztswu, ztswv ! 2D workspace 62 60 REAL(wp), DIMENSION(jpi,jpj) :: ztbfu, ztbfv ! 2D workspace … … 65 63 66 64 z2dx(:,:) = 0.e0 ; z2dy(:,:) = 0.e0 ! initialization of workspace arrays 67 68 ! Control of optional arguments69 ccpas = 'fst'70 IF( PRESENT(cnbpas) ) ccpas = cnbpas71 65 72 66 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdtra (restarting with Euler time stepping) … … 95 89 CASE ( jptra_trd_yad ) ; CALL trd_icp( ptrdx, ptrdy, jpicpt_yad, ctype ) ! y- horiz adv 96 90 CASE ( jptra_trd_zad ) ! z- vertical adv 97 CALL trd_icp( ptrdx, ptrdy, jpicpt_zad, ctype , clpas=ccpas)91 CALL trd_icp( ptrdx, ptrdy, jpicpt_zad, ctype ) 98 92 ! compute the surface flux condition wn(:,:,1)*tn(:,:,1) 99 93 z2dx(:,:) = wn(:,:,1)*tn(:,:,1)/fse3t(:,:,1) … … 235 229 236 230 CONTAINS 237 SUBROUTINE trd_mod(ptrd3dx, ptrd3dy, ktrd , ctype, kt , cnbpas) ! Empty routine231 SUBROUTINE trd_mod(ptrd3dx, ptrd3dy, ktrd , ctype, kt ) ! Empty routine 238 232 REAL, DIMENSION(:,:,:), INTENT( in ) :: & 239 233 ptrd3dx, & ! Temperature or U trend … … 242 236 INTEGER, INTENT( in ) :: kt ! Time step 243 237 CHARACTER(len=3), INTENT( in ) :: ctype ! momentum or tracers trends type 244 CHARACTER(len=3), INTENT( in ), OPTIONAL :: cnbpas ! number of passage245 238 WRITE(*,*) 'trd_3d: You should not have seen this print! error ?', ptrd3dx(1,1,1) 246 239 WRITE(*,*) ' " ": You should not have seen this print! error ?', ptrd3dy(1,1,1) … … 248 241 WRITE(*,*) ' " ": You should not have seen this print! error ?', ctype 249 242 WRITE(*,*) ' " ": You should not have seen this print! error ?', kt 250 WRITE(*,*) ' " ": You should not have seen this print! error ?', cnbpas251 243 END SUBROUTINE trd_mod 252 244 # endif -
branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRD/trdmod_oce.F90
r1601 r2026 24 24 25 25 # if defined key_trdtra || defined key_trdmld 26 LOGICAL , PUBLIC :: l_trdtra = .TRUE. !: tracers trend flag26 LOGICAL , PUBLIC :: l_trdtra = .TRUE. !: tracers trend flag 27 27 # else 28 LOGICAL , PUBLIC :: l_trdtra = .FALSE. !: tracers trend flag28 LOGICAL , PUBLIC :: l_trdtra = .FALSE. !: tracers trend flag 29 29 # endif 30 30 # if defined key_trddyn || defined key_trdvor 31 LOGICAL , PUBLIC :: l_trddyn = .TRUE. !: momentum trend flag31 LOGICAL , PUBLIC :: l_trddyn = .TRUE. !: momentum trend flag 32 32 # else 33 LOGICAL , PUBLIC :: l_trddyn = .FALSE. !: momentum trend flag33 LOGICAL , PUBLIC :: l_trddyn = .FALSE. !: momentum trend flag 34 34 # endif 35 35 # if ( defined key_trdtrc && defined key_iomput ) || defined key_trdmld_trc 36 LOGICAL , PUBLIC :: l_trdtrc = .TRUE. !: tracers trend flag 37 # else 38 LOGICAL , PUBLIC :: l_trdtrc = .FALSE. !: tracers trend flag 39 # endif 36 40 ! !!! Active tracers trends indexes 37 41 INTEGER, PUBLIC, PARAMETER :: jptra_trd_xad = 1 !: x- horizontal advection … … 47 51 INTEGER, PUBLIC, PARAMETER :: jptra_trd_nsr = 11 !: non solar radiation 48 52 INTEGER, PUBLIC, PARAMETER :: jptra_trd_atf = 12 !: Asselin correction 53 #if defined key_top 54 !!* Passive tracers trends indexes 55 INTEGER, PUBLIC, PARAMETER :: jptra_trd_sms = 13 !: sources m. sinks 56 INTEGER, PUBLIC, PARAMETER :: jptra_trd_radn = 14 !: corr. trn<0 in trcrad 57 INTEGER, PUBLIC, PARAMETER :: jptra_trd_radb = 15 !: corr. trb<0 in trcrad (like atf) 58 #endif 49 59 50 60 ! !!! Momentum trends indexes
Note: See TracChangeset
for help on using the changeset viewer.