Changeset 6968
 Timestamp:
 20161003T08:39:14+02:00 (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r6954 r6968 33 33 REAL(wp) :: rdt_sampl 34 34 INTEGER :: nb_rec_per_day 35 INTEGER :: isecfst, iseclast35 REAL(wp) :: rsecfst, rseclast 36 36 LOGICAL :: llnew 37 37 … … 128 128 INTEGER, INTENT(in) :: kt 129 129 INTEGER :: jn 130 REAL(wp) :: z secfst130 REAL(wp) :: zkt 131 131 CHARACTER(len=1) :: cl1 ! 1 character 132 132 CHARACTER(len=2) :: cl2 ! 2 characters … … 134 134 IF( kt == nittrc000 ) THEN 135 135 IF( ln_cpl ) THEN 136 rdt_sampl = 86400./ ncpl_qsr_freq136 rdt_sampl = rday / ncpl_qsr_freq 137 137 nb_rec_per_day = ncpl_qsr_freq 138 138 ELSE 139 rdt_sampl = MAX( 3600., rdt * nn_dttrc)140 nb_rec_per_day = INT( 86400/ rdt_sampl )139 rdt_sampl = MAX( 3600., rdttrc(1) ) 140 nb_rec_per_day = INT( rday / rdt_sampl ) 141 141 ENDIF 142 142 ! … … 152 152 IF( ln_rsttr .AND. iom_varid( numrtr, 'qsr_mean' , ldstop = .FALSE. ) > 0 .AND. & 153 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' 154 iom_varid( numrtr, 'ktdcy' , ldstop = .FALSE. ) > 0 ) THEN 155 CALL iom_get( numrtr, 'ktdcy', zkt ) ! A mean of qsr 156 rsecfst = INT( zkt ) * rdttrc(1) 157 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean read in the restart file at timestep rsecfst =', rsecfst, ' s ' 156 158 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_mean', qsr_mean ) ! A mean of qsr 157 CALL iom_get( numrtr, 'zsecfst', zsecfst ) ! A mean of qsr158 isecfst = INT( zsecfst )159 159 DO jn = 1, nb_rec_per_day 160 160 IF( jn <= 9 ) THEN … … 168 168 ELSE !* no restart: set from nit000 values 169 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 step170 rsecfst = kt * rdttrc(1) 171 171 ! 172 172 qsr_mean(:,:) = qsr(:,:) … … 178 178 ENDIF 179 179 ! 180 iseclast = nsec_year + nsec1jan000181 ! 182 llnew = ( iseclast  isecfst ) > INT( rdt_sampl )! new shortwave to store180 rseclast = kt * rdttrc(1) 181 ! 182 llnew = ( rseclast  rsecfst ) .ge. rdt_sampl ! new shortwave to store 183 183 IF( llnew ) THEN 184 184 IF( lwp ) WRITE(numout,*) ' New shortwave to sample for TOP at time kt = ', kt, & 185 & ' time = ', (iseclast+rdt*nn_dttrc/2.)/3600.,'hours '186 isecfst = iseclast185 & ' time = ', rseclast/3600.,'hours ' 186 rsecfst = rseclast 187 187 DO jn = 1, nb_rec_per_day  1 188 188 qsr_arr(:,:,jn) = qsr_arr(:,:,jn+1) … … 196 196 IF(lwp) WRITE(numout,*) 'trc_mean_qsr : write qsr_mean in restart file kt =', kt 197 197 IF(lwp) WRITE(numout,*) '~~~~~~~' 198 zkt = REAL( kt, wp ) 199 CALL iom_rstput( kt, nitrst, numrtw, 'ktdcy', zkt ) 198 200 DO jn = 1, nb_rec_per_day 199 201 IF( jn <= 9 ) THEN … … 206 208 ENDDO 207 209 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_mean', qsr_mean(:,:) ) 208 zsecfst = REAL( isecfst, wp )209 CALL iom_rstput( kt, nitrst, numrtw, 'zsecfst', zsecfst )210 210 ENDIF 211 211 !
Note: See TracChangeset
for help on using the changeset viewer.