Changeset 9939 for NEMO/branches/2018/dev_r9838_ENHANCE04_RK3/src/SAS
- Timestamp:
- 2018-07-13T09:28:50+02:00 (6 years ago)
- Location:
- NEMO/branches/2018/dev_r9838_ENHANCE04_RK3
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r9838_ENHANCE04_RK3/src/SAS/daymod.F90
r9598 r9939 20 20 !! ------------------------------- 21 21 !! sbcmod assume that the time step is dividing the number of second of 22 !! in a day, i.e. ===> MOD( rday, r dt ) == 022 !! in a day, i.e. ===> MOD( rday, rn_Dt ) == 0 23 23 !! except when user defined forcing is used (see sbcmod.F90) 24 24 !!---------------------------------------------------------------------- … … 72 72 ! 73 73 ! max number of seconds between each restart 74 IF( REAL( nitend - nit000 + 1 ) * r dt > REAL( HUGE( nsec1jan000 ) ) ) THEN74 IF( REAL( nitend - nit000 + 1 ) * rn_Dt > REAL( HUGE( nsec1jan000 ) ) ) THEN 75 75 CALL ctl_stop( 'The number of seconds between each restart exceeds the integer 4 max value: 2^31-1. ', & 76 76 & 'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 77 77 ENDIF 78 nsecd = NINT( rday )79 nsecd05 = NINT( 0.5 * rday )80 ndt = NINT( r dt)81 ndt05 = NINT( 0.5 * r dt)78 nsecd = NINT( rday ) 79 nsecd05 = NINT( 0.5 * rday ) 80 ndt = NINT( rn_Dt ) 81 ndt05 = NINT( 0.5 * rn_Dt ) 82 82 83 83 IF( .NOT. l_offline ) CALL day_rst( nit000, 'READ' ) … … 237 237 nsec_week = nsec_week + ndt 238 238 nsec_day = nsec_day + ndt 239 adatrj = adatrj + r dt / rday240 fjulday = fjulday + r dt / rday239 adatrj = adatrj + rn_Dt / rday 240 fjulday = fjulday + rn_Dt / rday 241 241 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 242 242 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error … … 307 307 !! In both those options, the exact duration of the experiment 308 308 !! since the beginning (cumulated duration of all previous restart runs) 309 !! is not stored in the restart and is assumed to be (nit000-1)*r dt.309 !! is not stored in the restart and is assumed to be (nit000-1)*rn_Dt. 310 310 !! This is valid is the time step has remained constant. 311 311 !! … … 376 376 nminute = ( nn_time0 - nhour * 100 ) 377 377 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 378 adatrj = ( REAL( nit000-1, wp ) * r dt ) / rday378 adatrj = ( REAL( nit000-1, wp ) * rn_Dt ) / rday 379 379 ! note this is wrong if time step has changed during run 380 380 ENDIF … … 385 385 nminute = ( nn_time0 - nhour * 100 ) 386 386 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 387 adatrj = ( REAL( nit000-1, wp ) * r dt ) / rday387 adatrj = ( REAL( nit000-1, wp ) * rn_Dt ) / rday 388 388 ENDIF 389 389 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error -
NEMO/branches/2018/dev_r9838_ENHANCE04_RK3/src/SAS/diawri.F90
r9652 r9939 158 158 ENDIF 159 159 #if defined key_diainstant 160 zsto = nwrite * r dt160 zsto = nwrite * rn_Dt 161 161 clop = "inst("//TRIM(clop)//")" 162 162 #else 163 zsto =rdt163 zsto = rn_Dt 164 164 clop = "ave("//TRIM(clop)//")" 165 165 #endif 166 zout = nwrite * r dt167 zmax = ( nitend - nit000 + 1 ) * r dt166 zout = nwrite * rn_Dt 167 zmax = ( nitend - nit000 + 1 ) * rn_Dt 168 168 169 169 ! Define indices of the horizontal output zoom and vertical limit storage … … 185 185 186 186 ! Compute julian date from starting date of the run 187 CALL ymds2ju( nyear, nmonth, nday, r dt, zjulian )187 CALL ymds2ju( nyear, nmonth, nday, rn_Dt, zjulian ) 188 188 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment 189 189 IF(lwp)WRITE(numout,*) … … 207 207 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 208 208 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 209 & nit000-1, zjulian, r dt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )209 & nit000-1, zjulian, rn_Dt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 210 210 CALL histvert( nid_T, "deptht", "Vertical T levels", & ! Vertical grid: gdept 211 211 & "m", ipk, gdept_1d, nz_T, "down" ) … … 219 219 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu 220 220 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 221 & nit000-1, zjulian, r dt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )221 & nit000-1, zjulian, rn_Dt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 222 222 CALL histvert( nid_U, "depthu", "Vertical U levels", & ! Vertical grid: gdept 223 223 & "m", ipk, gdept_1d, nz_U, "down" ) … … 231 231 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv 232 232 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 233 & nit000-1, zjulian, r dt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )233 & nit000-1, zjulian, rn_Dt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 234 234 CALL histvert( nid_V, "depthv", "Vertical V levels", & ! Vertical grid : gdept 235 235 & "m", ipk, gdept_1d, nz_V, "down" ) … … 360 360 clname = cdfile_name 361 361 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname) 362 zsto = r dt362 zsto = rn_Dt 363 363 clop = "inst(x)" ! no use of the mask value (require less cpu time) 364 zout = r dt365 zmax = ( nitend - nit000 + 1 ) * r dt364 zout = rn_Dt 365 zmax = ( nitend - nit000 + 1 ) * rn_Dt 366 366 367 367 IF(lwp) WRITE(numout,*) … … 375 375 376 376 ! Compute julian date from starting date of the run 377 CALL ymds2ju( nyear, nmonth, nday, r dt, zjulian ) ! time axis377 CALL ymds2ju( nyear, nmonth, nday, rn_Dt, zjulian ) ! time axis 378 378 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment 379 379 CALL histbeg( clname, jpi, glamt, jpj, gphit, & 380 1, jpi, 1, jpj, nit000-1, zjulian, r dt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit380 1, jpi, 1, jpj, nit000-1, zjulian, rn_Dt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 381 381 CALL histvert( id_i, "deptht", "Vertical T levels", & ! Vertical grid : gdept 382 382 "m", jpk, gdept_1d, nz_i, "down")
Note: See TracChangeset
for help on using the changeset viewer.