Changeset 10096
- Timestamp:
- 2018-09-07T13:38:22+02:00 (6 years ago)
- Location:
- NEMO/trunk/src/TOP/TRP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/TOP/TRP/trcnxt.F90
r10068 r10096 103 103 IF( l_trdtrc ) THEN ! trends: store now fields before the Asselin filter application 104 104 ALLOCATE( ztrdt(jpi,jpj,jpk,jptra) ) 105 ztrdt(:,:,:,:) = trn(:,:,:,:) 105 ztrdt(:,:,:,:) = 0._wp 106 IF( ln_traldf_iso ) THEN ! diagnose the "pure" Kz diffusive trend 107 DO jn = 1, jptra 108 CALL trd_tra( kt, 'TRC', jn, jptra_zdfp, ztrdt(:,:,:,jn) ) 109 ENDDO 110 ENDIF 111 112 ! total trend for the non-time-filtered variables. 113 zfact = 1.0 / rdttrc 114 ! G Nurser 23 Mar 2017. Recalculate trend as Delta(e3t*T)/e3tn; e3tn cancel from tsn terms 115 IF( ln_linssh ) THEN ! linear sea surface height only 116 DO jn = 1, jptra 117 DO jk = 1, jpkm1 118 ztrdt(:,:,jk,jn) = ( tra(:,:,jk,jn)*e3t_a(:,:,jk) / e3t_n(:,:,jk) - trn(:,:,jk,jn)) * zfact 119 END DO 120 END DO 121 ELSE 122 DO jn = 1, jptra 123 DO jk = 1, jpkm1 124 ztrdt(:,:,jk,jn) = ( tra(:,:,jk,jn) - trn(:,:,jk,jn) ) * zfact 125 END DO 126 END DO 127 ENDIF 128 ! 129 DO jn = 1, jptra 130 CALL trd_tra( kt, 'TRC', jn, jptra_tot, ztrdt(:,:,:,jn) ) 131 ENDDO 132 133 ENDIF 134 ! 135 IF( ln_linssh ) THEN ! linear sea surface height only 136 ! Store now fields before applying the Asselin filter 137 ! in order to calculate Asselin filter trend later. 138 ztrdt(:,:,:,:) = trn(:,:,:,:) 139 ENDIF 140 106 141 ENDIF 107 142 ! ! Leap-Frog + Asselin filter time stepping … … 113 148 END DO 114 149 END DO 150 IF (l_trdtrc .AND. .NOT. ln_linssh ) THEN ! Zero Asselin filter contribution must be explicitly written out since for vvl 151 ! ! Asselin filter is output by tra_nxt_vvl that is not called on this time step 152 ztrdt(:,:,:,:) = 0._wp 153 DO jn = 1, jptra 154 CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt(:,:,:,jn) ) 155 ENDDO 156 END IF 157 ! 115 158 ELSE 116 159 IF( .NOT. l_offline ) THEN ! Leap-Frog + Asselin filter time stepping … … 126 169 ENDIF 127 170 ! 128 IF( l_trdtrc ) THEN ! trends: send Asselin filter trends to trdtra manager for further diagnostics171 IF( l_trdtrc .AND. ln_linssh ) THEN ! trend of the Asselin filter (tb filtered - tb)/dt ) 129 172 DO jn = 1, jptra 130 173 DO jk = 1, jpkm1 131 174 zfact = 1._wp / r2dttrc 132 175 ztrdt(:,:,jk,jn) = ( trb(:,:,jk,jn) - ztrdt(:,:,jk,jn) ) * zfact 133 CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt )134 END DO176 END DO 177 CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt(:,:,:,jn) ) 135 178 END DO 136 DEALLOCATE( ztrdt )137 179 END IF 180 IF( l_trdtrc ) DEALLOCATE( ztrdt ) 138 181 ! 139 182 IF(ln_ctl) THEN ! print mean trends (used for debugging) -
NEMO/trunk/src/TOP/TRP/trdtrc.F90
r10068 r10096 81 81 ! 82 82 SELECT CASE( ktrd ) 83 CASE( jptra_xad ) ; WRITE (cltra,'("XAD_",4a)') 84 CASE( jptra_yad ) ; WRITE (cltra,'("YAD_",4a)') 85 CASE( jptra_zad ) ; WRITE (cltra,'("ZAD_",4a)') 86 CASE( jptra_ldf ) ; WRITE (cltra,'("LDF_",4a)') 87 CASE( jptra_bbl ) ; WRITE (cltra,'("BBL_",4a)') 88 CASE( jptra_nsr ) ; WRITE (cltra,'("FOR_",4a)') 89 CASE( jptra_zdf ) ; WRITE (cltra,'("ZDF_",4a)') 90 CASE( jptra_dmp ) ; WRITE (cltra,'("DMP_",4a)') 91 CASE( jptra_sms ) ; WRITE (cltra,'("SMS_",4a)') 92 CASE( jptra_atf ) ; WRITE (cltra,'("ATF_",4a)') 93 CASE( jptra_radb ) ; WRITE (cltra,'("RDB_",4a)') 94 CASE( jptra_radn ) ; WRITE (cltra,'("RDN_",4a)') 83 CASE( jptra_xad ) ; WRITE (cltra,'("XAD_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 84 CASE( jptra_yad ) ; WRITE (cltra,'("YAD_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 85 CASE( jptra_zad ) ; WRITE (cltra,'("ZAD_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 86 CASE( jptra_ldf ) ; WRITE (cltra,'("LDF_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 87 CASE( jptra_bbl ) ; WRITE (cltra,'("BBL_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 88 CASE( jptra_nsr ) ; WRITE (cltra,'("FOR_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 89 CASE( jptra_zdf ) ; WRITE (cltra,'("ZDF_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 90 CASE( jptra_zdfp ) ; WRITE (cltra,'("ZDP_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 91 CASE( jptra_dmp ) ; WRITE (cltra,'("DMP_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 92 CASE( jptra_sms ) ; WRITE (cltra,'("SMS_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 93 CASE( jptra_tot ) ; WRITE (cltra,'("TOT_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 94 CASE( jptra_atf ) ; WRITE (cltra,'("ATF_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 95 CASE( jptra_radb ) ; WRITE (cltra,'("RDB_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 96 CASE( jptra_radn ) ; WRITE (cltra,'("RDN_",4a)') ; cltra = TRIM(cltra)//TRIM(ctrcnm(kjn)) ; CALL iom_put( cltra, ptrtrd(:,:,:) ) 95 97 END SELECT 96 cltra = TRIM(cltra)//TRIM(ctrcnm(kjn))97 CALL iom_put( cltra, ptrtrd(:,:,:) )98 98 ! 99 99 END IF
Note: See TracChangeset
for help on using the changeset viewer.