Changeset 6967
 Timestamp:
 20161003T08:35:13+02:00 (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r6941 r6967 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 … … 131 131 INTEGER, INTENT(in) :: kt 132 132 INTEGER :: jn 133 REAL(wp) :: z secfst133 REAL(wp) :: zkt 134 134 CHARACTER(len=1) :: cl1 ! 1 character 135 135 CHARACTER(len=2) :: cl2 ! 2 characters … … 137 137 IF( kt == nittrc000 ) THEN 138 138 IF( ln_cpl ) THEN 139 rdt_sampl = 86400./ ncpl_qsr_freq139 rdt_sampl = rday / ncpl_qsr_freq 140 140 nb_rec_per_day = ncpl_qsr_freq 141 141 ELSE 142 rdt_sampl = MAX( 3600., rdt * nn_dttrc)143 nb_rec_per_day = INT( 86400/ rdt_sampl )142 rdt_sampl = MAX( 3600., rdttrc(1) ) 143 nb_rec_per_day = INT( rday / rdt_sampl ) 144 144 ENDIF 145 145 ! … … 155 155 IF( ln_rsttr .AND. iom_varid( numrtr, 'qsr_mean' , ldstop = .FALSE. ) > 0 .AND. & 156 156 iom_varid( numrtr, 'qsr_arr_1', ldstop = .FALSE. ) > 0 .AND. & 157 iom_varid( numrtr, 'zsecfst' , ldstop = .FALSE. ) > 0 ) THEN 158 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean read in the restart file' 157 iom_varid( numrtr, 'ktdcy' , ldstop = .FALSE. ) > 0 ) THEN 158 CALL iom_get( numrtr, 'ktdcy', zkt ) ! A mean of qsr 159 rsecfst = INT( zkt ) * rdttrc(1) 160 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean read in the restart file at timestep rsecfst =', rsecfst, ' s ' 159 161 CALL iom_get( numrtr, jpdom_autoglo, 'qsr_mean', qsr_mean ) ! A mean of qsr 160 CALL iom_get( numrtr, 'zsecfst', zsecfst ) ! A mean of qsr161 isecfst = INT( zsecfst )162 162 DO jn = 1, nb_rec_per_day 163 163 IF( jn <= 9 ) THEN … … 171 171 ELSE !* no restart: set from nit000 values 172 172 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean set to nit000 values' 173 isecfst = nsec_year + nsec1jan000 ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step173 rsecfst = kt * rdttrc(1) 174 174 ! 175 175 qsr_mean(:,:) = qsr(:,:) … … 181 181 ENDIF 182 182 ! 183 iseclast = nsec_year + nsec1jan000184 ! 185 llnew = ( iseclast  isecfst ) > INT( rdt_sampl )! new shortwave to store183 rseclast = kt * rdttrc(1) 184 ! 185 llnew = ( rseclast  rsecfst ) .ge. rdt_sampl ! new shortwave to store 186 186 IF( llnew ) THEN 187 187 IF( lwp ) WRITE(numout,*) ' New shortwave to sample for TOP at time kt = ', kt, & 188 & ' time = ', (iseclast+rdt*nn_dttrc/2.)/3600.,'hours '189 isecfst = iseclast188 & ' time = ', rseclast/3600.,'hours ' 189 rsecfst = rseclast 190 190 DO jn = 1, nb_rec_per_day  1 191 191 qsr_arr(:,:,jn) = qsr_arr(:,:,jn+1) … … 199 199 IF(lwp) WRITE(numout,*) 'trc_mean_qsr : write qsr_mean in restart file kt =', kt 200 200 IF(lwp) WRITE(numout,*) '~~~~~~~' 201 zkt = REAL( kt, wp ) 202 CALL iom_rstput( kt, nitrst, numrtw, 'ktdcy', zkt ) 201 203 DO jn = 1, nb_rec_per_day 202 204 IF( jn <= 9 ) THEN … … 209 211 ENDDO 210 212 CALL iom_rstput( kt, nitrst, numrtw, 'qsr_mean', qsr_mean(:,:) ) 211 zsecfst = REAL( isecfst, wp )212 CALL iom_rstput( kt, nitrst, numrtw, 'zsecfst', zsecfst )213 213 ENDIF 214 214 !
Note: See TracChangeset
for help on using the changeset viewer.