Changeset 6942
- Timestamp:
- 2016-09-23T11:44:14+02:00 (8 years ago)
- Location:
- trunk/NEMOGCM/NEMO/TOP_SRC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r6309 r6942 100 100 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 101 101 102 IF( ln_rsttr .AND. & ! Restart: read in restart file102 IF( ln_rsttr .AND. .NOT.ln_top_euler .AND. & ! Restart: read in restart file 103 103 iom_varid( numrtr, 'sbc_'//TRIM(ctrcnm(1))//'_b', ldstop = .FALSE. ) > 0 ) THEN 104 104 IF(lwp) WRITE(numout,*) ' nittrc000-nn_dttrc surface tracer content forcing fields red in the restart file' … … 187 187 ! Write in the tracer restar file 188 188 ! ******************************* 189 IF( lrst_trc ) THEN189 IF( lrst_trc .AND. .NOT.ln_top_euler ) THEN 190 190 IF(lwp) WRITE(numout,*) 191 191 IF(lwp) WRITE(numout,*) 'sbc : ocean surface tracer content forcing fields written in tracer restart file ', & -
trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r6140 r6942 108 108 END DO 109 109 IF( lwp ) WRITE(numstr,9300) kt, ztrai / areatot 110 9300 FORMAT(i10, e18.10)110 9300 FORMAT(i10,D23.16) 111 111 ! 112 112 IF( nn_timing == 1 ) CALL timing_stop('trc_stp') 113 113 ! 114 114 END SUBROUTINE trc_stp 115 116 115 117 116 SUBROUTINE trc_mean_qsr( kt ) … … 122 121 !! of diurnal cycle 123 122 !! 124 !! ** Method : store in TOP the qsr every hour ( or every time-step the latter123 !! ** Method : store in TOP the qsr every hour ( or every time-step if the latter 125 124 !! is greater than 1 hour ) and then, compute the mean with 126 125 !! a moving average over 24 hours. … … 129 128 INTEGER, INTENT(in) :: kt 130 129 INTEGER :: jn 131 !!---------------------------------------------------------------------- 132 ! 130 REAL(wp) :: zsecfst 131 CHARACTER(len=1) :: cl1 ! 1 character 132 CHARACTER(len=2) :: cl2 ! 2 characters 133 133 134 IF( kt == nittrc000 ) THEN 134 135 IF( ln_cpl ) THEN 135 136 rdt_sampl = 86400. / ncpl_qsr_freq 136 nb_rec_per_day s= ncpl_qsr_freq137 nb_rec_per_day = ncpl_qsr_freq 137 138 ELSE 138 139 rdt_sampl = MAX( 3600., rdt * nn_dttrc ) 139 nb_rec_per_day s= INT( 86400 / rdt_sampl )140 nb_rec_per_day = INT( 86400 / rdt_sampl ) 140 141 ENDIF 141 142 ! 142 143 IF( lwp ) THEN 143 144 WRITE(numout,*) 144 WRITE(numout,*) ' Sampling frequency dt = ', rdt_sampl, 's',' Number of sampling per day nrec = ', nb_rec_per_day s145 WRITE(numout,*) ' Sampling frequency dt = ', rdt_sampl, 's',' Number of sampling per day nrec = ', nb_rec_per_day 145 146 WRITE(numout,*) 146 147 ENDIF 147 148 ! 148 ALLOCATE( qsr_arr(jpi,jpj,nb_rec_per_days ) ) 149 DO jn = 1, nb_rec_per_days 150 qsr_arr(:,:,jn) = qsr(:,:) 151 ENDDO 152 qsr_mean(:,:) = qsr(:,:) 153 ! 154 isecfst = nsec_year + nsec1jan000 ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 155 iseclast = isecfst 149 ALLOCATE( qsr_arr(jpi,jpj,nb_rec_per_day ) ) 150 ! 151 ! !* Restart: read in restart file 152 IF( ln_rsttr .AND. iom_varid( numrtr, 'qsr_mean' , ldstop = .FALSE. ) > 0 .AND. & 153 iom_varid( numrtr, 'qsr_arr_1', ldstop = .FALSE. ) > 0 .AND. & 154 iom_varid( numrtr, 'zsecfst' , ldstop = .FALSE. ) > 0 ) THEN 155 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean read in the restart file' 156 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_mean', qsr_mean ) ! A mean of qsr 157 CALL iom_get( numrtr, 'zsecfst', zsecfst ) ! A mean of qsr 158 isecfst = INT( zsecfst ) 159 DO jn = 1, nb_rec_per_day 160 IF( jn <= 9 ) THEN 161 WRITE(cl1,'(i1)') jn 162 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_arr_'//cl1, qsr_arr(:,:,jn) ) ! A mean of qsr 163 ELSE 164 WRITE(cl2,'(i2.2)') jn 165 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_arr_'//cl2, qsr_arr(:,:,jn) ) ! A mean of qsr 166 ENDIF 167 ENDDO 168 ELSE !* no restart: set from nit000 values 169 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean set to nit000 values' 170 isecfst = nsec_year + nsec1jan000 ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 171 ! 172 qsr_mean(:,:) = qsr(:,:) 173 DO jn = 1, nb_rec_per_day 174 qsr_arr(:,:,jn) = qsr_mean(:,:) 175 ENDDO 176 ENDIF 156 177 ! 157 178 ENDIF 158 179 ! 159 180 iseclast = nsec_year + nsec1jan000 181 ! 160 182 llnew = ( iseclast - isecfst ) > INT( rdt_sampl ) ! new shortwave to store 161 IF( kt /= nittrc000 .AND.llnew ) THEN183 IF( llnew ) THEN 162 184 IF( lwp ) WRITE(numout,*) ' New shortwave to sample for TOP at time kt = ', kt, & 163 185 & ' time = ', (iseclast+rdt*nn_dttrc/2.)/3600.,'hours ' 164 186 isecfst = iseclast 165 DO jn = 1, nb_rec_per_day s- 1187 DO jn = 1, nb_rec_per_day - 1 166 188 qsr_arr(:,:,jn) = qsr_arr(:,:,jn+1) 167 END DO 168 qsr_arr (:,:,nb_rec_per_days) = qsr(:,:) 169 qsr_mean(:,: ) = SUM( qsr_arr(:,:,:), 3 ) / nb_rec_per_days 189 ENDDO 190 qsr_arr (:,:,nb_rec_per_day) = qsr(:,:) 191 qsr_mean(:,: ) = SUM( qsr_arr(:,:,:), 3 ) / nb_rec_per_day 192 ENDIF 193 ! 194 IF( lrst_trc ) THEN !* Write the mean of qsr in restart file 195 IF(lwp) WRITE(numout,*) 196 IF(lwp) WRITE(numout,*) 'trc_mean_qsr : write qsr_mean in restart file kt =', kt 197 IF(lwp) WRITE(numout,*) '~~~~~~~' 198 DO jn = 1, nb_rec_per_day 199 IF( jn <= 9 ) THEN 200 WRITE(cl1,'(i1)') jn 201 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_arr_'//cl1, qsr_arr(:,:,jn) ) 202 ELSE 203 WRITE(cl2,'(i2.2)') jn 204 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_arr_'//cl2, qsr_arr(:,:,jn) ) 205 ENDIF 206 ENDDO 207 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_mean', qsr_mean(:,:) ) 208 zsecfst = REAL( isecfst, wp ) 209 CALL iom_rstput( kt, nitrst, numrtw, 'zsecfst', zsecfst ) 170 210 ENDIF 171 211 !
Note: See TracChangeset
for help on using the changeset viewer.