- Timestamp:
- 2015-12-18T13:18:27+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5918_nemo_v3_6_STABLE_XIOS2/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r5407 r6119 32 32 REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE :: qsr_arr ! save qsr during TOP time-step 33 33 REAL(wp) :: rdt_sampl 34 INTEGER :: nb_rec_per_day s34 INTEGER :: nb_rec_per_day 35 35 INTEGER :: isecfst, iseclast 36 36 LOGICAL :: llnew … … 123 123 !! of diurnal cycle 124 124 !! 125 !! ** Method : store in TOP the qsr every hour ( or every time-step the latter125 !! ** Method : store in TOP the qsr every hour ( or every time-step if the latter 126 126 !! is greater than 1 hour ) and then, compute the mean with 127 127 !! a moving average over 24 hours. … … 134 134 IF( ln_cpl ) THEN 135 135 rdt_sampl = 86400. / ncpl_qsr_freq 136 nb_rec_per_day s= ncpl_qsr_freq136 nb_rec_per_day = ncpl_qsr_freq 137 137 ELSE 138 138 rdt_sampl = MAX( 3600., rdt * nn_dttrc ) 139 nb_rec_per_day s= INT( 86400 / rdt_sampl )139 nb_rec_per_day = INT( 86400 / rdt_sampl ) 140 140 ENDIF 141 141 ! 142 142 IF( lwp ) THEN 143 143 WRITE(numout,*) 144 WRITE(numout,*) ' Sampling frequency dt = ', rdt_sampl, 's',' Number of sampling per day nrec = ', nb_rec_per_day s144 WRITE(numout,*) ' Sampling frequency dt = ', rdt_sampl, 's',' Number of sampling per day nrec = ', nb_rec_per_day 145 145 WRITE(numout,*) 146 146 ENDIF 147 147 ! 148 ALLOCATE( qsr_arr(jpi,jpj,nb_rec_per_days ) ) 149 DO jn = 1, nb_rec_per_days 150 qsr_arr(:,:,jn) = qsr(:,:) 148 ! !* Restart: read in restart file 149 IF( ln_rsttr .AND. iom_varid( numrtr, 'qsr_mean', ldstop = .FALSE. ) > 0 ) THEN 150 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean read in the restart file' 151 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_mean', qsr_mean ) ! A mean of qsr 152 ELSE !* no restart: set from nit000 values 153 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean set to nit000 values' 154 qsr_mean(:,:) = qsr(:,:) 155 ENDIF 156 ! 157 ALLOCATE( qsr_arr(jpi,jpj,nb_rec_per_day ) ) 158 DO jn = 1, nb_rec_per_day 159 qsr_arr(:,:,jn) = qsr_mean(:,:) 151 160 ENDDO 152 qsr_mean(:,:) = qsr(:,:)153 161 ! 154 162 isecfst = nsec_year + nsec1jan000 ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step … … 163 171 & ' time = ', (iseclast+rdt*nn_dttrc/2.)/3600.,'hours ' 164 172 isecfst = iseclast 165 DO jn = 1, nb_rec_per_day s- 1173 DO jn = 1, nb_rec_per_day - 1 166 174 qsr_arr(:,:,jn) = qsr_arr(:,:,jn+1) 167 175 ENDDO 168 qsr_arr (:,:,nb_rec_per_days) = qsr(:,:) 169 qsr_mean(:,: ) = SUM( qsr_arr(:,:,:), 3 ) / nb_rec_per_days 170 ENDIF 171 ! 176 qsr_arr (:,:,nb_rec_per_day) = qsr(:,:) 177 qsr_mean(:,: ) = SUM( qsr_arr(:,:,:), 3 ) / nb_rec_per_day 178 ENDIF 179 ! 180 IF( lrst_trc ) THEN !* Write the mean of qsr in restart file 181 IF(lwp) WRITE(numout,*) 182 IF(lwp) WRITE(numout,*) 'trc_mean_qsr : write qsr_mean in restart file kt =', kt 183 IF(lwp) WRITE(numout,*) '~~~~~~~' 184 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_mean', qsr_mean(:,:) ) 185 ENDIF 186 ! 172 187 END SUBROUTINE trc_mean_qsr 173 188
Note: See TracChangeset
for help on using the changeset viewer.