Changeset 5872
- Timestamp:
- 2015-11-09T19:20:54+01:00 (8 years ago)
- Location:
- branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/CONFIG/SHARED/namelist_ref
r5075 r5872 29 29 nn_itend = 5475 ! last time step (std 5475) 30 30 nn_date0 = 010101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1) 31 nn_time0 = 0 ! initial time of day in h ours31 nn_time0 = 0 ! initial time of day in hhmm 32 32 nn_leapy = 0 ! Leap year calendar (1) or not (0) 33 33 ln_rstart = .false. ! start from rest (F) or from a restart file (T) -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r5075 r5872 11 11 !! - ! 2010-05 (D. Lea) add calc_month_len routine based on day_init 12 12 !! 3.4 ! 2012-10 (A. Weaver and K. Mogensen) Fix for direct initialization 13 !! ! 2014-09 (D. Lea) local calc_date removed use routine from OBS 13 !! ! 2014-09 (D. Lea) Local calc_date removed use routine from OBS 14 !! ! 2015-11 (D. Lea) Handle non-zero initial time of day 14 15 !!---------------------------------------------------------------------- 15 16 … … 378 379 ENDIF 379 380 380 IF ( ( z_inc_dateb < ndastp + nn_time0*0.0 1_wp ) &381 IF ( ( z_inc_dateb < ndastp + nn_time0*0.0001_wp ) & 381 382 & .OR.( z_inc_datef > ditend_date ) ) & 382 383 & CALL ctl_warn( ' Validity time of assimilation increments is ', & -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r5164 r5872 11 11 !! ! 2004-01 (A.M. Treguier) new calculation based on adatrj 12 12 !! ! 2006-08 (G. Madec) surface module major update 13 !! ! 2015-11 (D. Lea) Allow non-zero initial time of day 13 14 !!---------------------------------------------------------------------- 14 15 … … 90 91 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 91 92 92 CALL ymds2ju( nyear, nmonth, nday, nn_time0*3600._wp, fjulday ) 93 nhour = nn_time0 / 100 94 nminute = ( nn_time0 - nhour * 100 ) 95 96 CALL ymds2ju( nyear, nmonth, nday, nhour*3600._wp+nminute*60._wp, fjulday ) 93 97 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < 0.1 / rday ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 94 98 IF( nn_time0*3600 - ndt05 .lt. 0 ) fjulday = fjulday + 1. ! move back to the day at nit000 (and not at nit000 - 1) … … 118 122 119 123 ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step 120 IF (n n_time0*3600-ndt05 .gt. 0) THEN124 IF (nhour*3600+nminute*60-ndt05 .gt. 0) THEN 121 125 ! 1 timestep before current middle of first time step is still the same day 122 nsec_year = (nday_year-1) * nsecd + n n_time0*3600._wp- ndt05123 nsec_month = (nday-1) * nsecd + n n_time0*3600._wp- ndt05126 nsec_year = (nday_year-1) * nsecd + nhour*3600+nminute*60 - ndt05 127 nsec_month = (nday-1) * nsecd + nhour*3600+nminute*60 - ndt05 124 128 ELSE 125 129 ! 1 time step before the middle of the first time step is the previous day 126 nsec_year = nday_year * nsecd + n n_time0*3600._wp- ndt05127 nsec_month = nday * nsecd + n n_time0*3600._wp- ndt05128 ENDIF 129 nsec_week = idweek * nsecd + n n_time0*3600._wp- ndt05130 nsec_day = n n_time0*3600._wp- ndt05130 nsec_year = nday_year * nsecd + nhour*3600+nminute*60 - ndt05 131 nsec_month = nday * nsecd + nhour*3600+nminute*60 - ndt05 132 ENDIF 133 nsec_week = idweek * nsecd + nhour*3600+nminute*60 - ndt05 134 nsec_day = nhour*3600+nminute*60 - ndt05 131 135 IF( nsec_day .lt. 0 ) nsec_day = nsec_day + nsecd 132 136 IF( nsec_week .lt. 0 ) nsec_week = nsec_week + nsecd*7 … … 313 317 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 314 318 ! 315 REAL(wp) :: zkt, zndastp 319 REAL(wp) :: zkt, zndastp, zdayfrac, ksecs, ktime 320 INTEGER :: ihour, iminute 316 321 !!---------------------------------------------------------------------- 317 322 … … 342 347 ndastp = NINT( zndastp ) 343 348 CALL iom_get( numror, 'adatrj', adatrj ) 349 CALL iom_get( numror, 'ntime', ktime ) 350 nn_time0=INT(ktime) 351 ! calculate start time in hours and minutes 352 zdayfrac=adatrj-INT(adatrj) 353 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj 354 ihour = INT(ksecs/3600) 355 iminute = ksecs/60-ihour*60 356 357 ! Add to nn_time0 358 nhour = nn_time0 / 100 359 nminute = ( nn_time0 - nhour * 100 ) 360 nminute=nminute+iminute 361 362 IF( nminute >= 60 ) THEN 363 nminute=nminute-60 364 nhour=nhour+1 365 ENDIF 366 nhour=nhour+ihour 367 IF( nhour >= 24 ) THEN 368 nhour=nhour-24 369 adatrj=adatrj+1 370 ENDIF 371 nn_time0 = nhour * 100 + nminute 372 adatrj = INT(adatrj) ! adatrj set to integer as nn_time0 updated 344 373 ELSE 345 374 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 346 375 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 347 IF( nn_time0*3600-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 376 nhour = nn_time0 / 100 377 nminute = ( nn_time0 - nhour * 100 ) 378 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 348 379 adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 349 380 ! note this is wrong if time step has changed during run … … 352 383 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 353 384 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 354 IF( nn_time0*3600-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 385 nhour = nn_time0 / 100 386 nminute = ( nn_time0 - nhour * 100 ) 387 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 355 388 adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 356 389 ENDIF … … 361 394 WRITE(numout,*) ' date ndastp : ', ndastp 362 395 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj 396 WRITE(numout,*) ' nn_time0 : ',nn_time0 363 397 WRITE(numout,*) 364 398 ENDIF … … 376 410 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj ) ! number of elapsed days since 377 411 ! ! the begining of the run [s] 412 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp) ) ! time 378 413 ENDIF 379 414 ! -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
r5075 r5872 276 276 INTEGER , PUBLIC :: nmonth !: current month 277 277 INTEGER , PUBLIC :: nday !: current day of the month 278 INTEGER , PUBLIC :: nhour !: current hour 279 INTEGER , PUBLIC :: nminute !: current minute 278 280 INTEGER , PUBLIC :: ndastp !: time step date in yyyymmdd format 279 281 INTEGER , PUBLIC :: nday_year !: current day counted from jan 1st of the current year -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r5075 r5872 177 177 WRITE(numout,*) ' number of the last time step nn_itend = ', nn_itend 178 178 WRITE(numout,*) ' initial calendar date aammjj nn_date0 = ', nn_date0 179 WRITE(numout,*) ' initial time of day in h oursnn_time0 = ', nn_time0179 WRITE(numout,*) ' initial time of day in hhmm nn_time0 = ', nn_time0 180 180 WRITE(numout,*) ' leap year calendar (0/1) nn_leapy = ', nn_leapy 181 181 WRITE(numout,*) ' initial state output nn_istate = ', nn_istate -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r5075 r5872 34 34 INTEGER :: nn_itend !: index of the last time step 35 35 INTEGER :: nn_date0 !: initial calendar date aammjj 36 INTEGER :: nn_time0 !: initial time of day in h ours36 INTEGER :: nn_time0 !: initial time of day in hhmm 37 37 INTEGER :: nn_leapy !: Leap year calendar flag (0/1 or 30) 38 38 INTEGER :: nn_istate !: initial state output flag (0/1) -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
r5075 r5872 1452 1452 !! ! 06-10 (G. Smith) Calculates initial date the same as method for final date 1453 1453 !! ! 10-05 (D. Lea) Update to month length calculation for NEMO vn3.2 1454 !! ! 2014-09 (D. Lea) New generic routine now deals with arbitrary start hour1454 !! ! 2014-09 (D. Lea) New generic routine now deals with arbitrary initial time of day 1455 1455 !!---------------------------------------------------------------------- 1456 1456 USE phycst, ONLY : & ! Physical constants … … 1484 1484 imon = ( ndate0 - iyea * 10000 ) / 100 1485 1485 iday = ndate0 - iyea * 10000 - imon * 100 1486 ihou = nn_time01487 imin = 01486 ihou = nn_time0 / 100 1487 imin = ( nn_time0 - ihou * 100 ) 1488 1488 1489 1489 !!---------------------------------------------------------------------- -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90
r4772 r5872 125 125 imon0 = ( ndate0 - iyea0 * 10000 ) / 100 126 126 iday0 = ndate0 - iyea0 * 10000 - imon0 * 100 127 ihou0 = nn_time0128 imin0 = 0127 ihou0 = nn_time0 / 100 128 imin0 = ( nn_time0 - ihou0 * 100 ) 129 129 130 130 icycle = no ! Assimilation cycle … … 397 397 imon0 = ( ndate0 - iyea0 * 10000 ) / 100 398 398 iday0 = ndate0 - iyea0 * 10000 - imon0 * 100 399 ihou0 = nn_time0400 imin0 = 0399 ihou0 = nn_time0 / 100 400 imin0 = ( nn_time0 - ihou0 * 100 ) 401 401 402 402 icycle = no ! Assimilation cycle … … 585 585 imon0 = ( ndate0 - iyea0 * 10000 ) / 100 586 586 iday0 = ndate0 - iyea0 * 10000 - imon0 * 100 587 ihou0 = nn_time0588 imin0 = 0587 ihou0 = nn_time0 / 100 588 imin0 = ( nn_time0 - ihou0 * 100 ) 589 589 590 590 icycle = no ! Assimilation cycle … … 770 770 imon0 = ( ndate0 - iyea0 * 10000 ) / 100 771 771 iday0 = ndate0 - iyea0 * 10000 - imon0 * 100 772 ihou0 = nn_time0773 imin0 = 0772 ihou0 = nn_time0 / 100 773 imin0 = ( nn_time0 - ihou0 * 100 ) 774 774 775 775 icycle = no ! Assimilation cycle … … 968 968 imon0 = ( ndate0 - iyea0 * 10000 ) / 100 969 969 iday0 = ndate0 - iyea0 * 10000 - imon0 * 100 970 ihou0 = nn_time0971 imin0 = 0970 ihou0 = nn_time0 / 100 971 imin0 = ( nn_time0 - ihou0 * 100 ) 972 972 973 973 icycle = no ! Assimilation cycle -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/SETTE/sette.sh
r5075 r5872 637 637 ## Restartability tests for ORCA2_LIM3 638 638 export TEST_NAME="LONG" 639 NUMTS=150 640 NUMTSD2=$(( NUMTS/2 )) 641 NUMTSD2_STR=$(printf "%08d" $NUMTSD2) 639 642 cd ${CONFIG_DIR} 640 643 . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_LONG -r ORCA2_LIM3 -j 8 del_key ${DEL_KEYS} … … 649 652 set_namelist namelist_cfg cn_exp \"O2L3_LONG\" 650 653 set_namelist namelist_cfg nn_it000 1 651 set_namelist namelist_cfg nn_itend 150652 set_namelist namelist_cfg nn_stock 75654 set_namelist namelist_cfg nn_itend $NUMTS 655 set_namelist namelist_cfg nn_stock $NUMTSD2 653 656 set_namelist namelist_cfg ln_clobber .true. 654 657 set_namelist namelist_cfg nn_fwb 0 … … 670 673 cd ${EXE_DIR} 671 674 set_namelist namelist_cfg cn_exp \"O2L3_SHORT\" 672 set_namelist namelist_cfg nn_it000 76673 set_namelist namelist_cfg nn_itend 150674 set_namelist namelist_cfg nn_stock 75675 set_namelist namelist_cfg nn_it000 $(( NUMTSD2+1 )) 676 set_namelist namelist_cfg nn_itend $NUMTS 677 set_namelist namelist_cfg nn_stock $NUMTSD2 675 678 set_namelist namelist_cfg ln_rstart .true. 676 679 set_namelist namelist_cfg nn_rstctl 2 … … 681 684 set_namelist namelist_cfg jpnij 4 682 685 set_namelist namelist_cfg nn_solv 2 683 set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_ 00000075_restart\"684 set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_ 00000075_restart_ice\"686 set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_${NUMTSD2_STR}_restart\" 687 set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_${NUMTSD2_STR}_restart_ice\" 685 688 for (( i=1; i<=$NPROC; i++)) ; do 686 689 L_NPROC=$(( $i - 1 )) 687 690 L_NPROC=`printf "%04d\n" ${L_NPROC}` 688 ln -sf ../LONG/O2L3_LONG_ 00000075_restart_${L_NPROC}.nc .689 ln -sf ../LONG/O2L3_LONG_ 00000075_restart_ice_${L_NPROC}.nc .691 ln -sf ../LONG/O2L3_LONG_${NUMTSD2_STR}_restart_${L_NPROC}.nc . 692 ln -sf ../LONG/O2L3_LONG_${NUMTSD2_STR}_restart_ice_${L_NPROC}.nc . 690 693 done 691 694 if [ ${USING_MPMD} == "yes" ] ; then … … 764 767 ## Restartability tests for AMM12 765 768 export TEST_NAME="LONG" 769 NUMTS=576 770 NUMTSD2=$(( numts/2 )) 771 NUMTSD2_STR=$(printf "%08d" $NUMTSD2) 766 772 cd ${CONFIG_DIR} 767 773 . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS} … … 775 781 cd ${EXE_DIR} 776 782 set_namelist namelist_cfg nn_it000 1 777 set_namelist namelist_cfg nn_itend 576778 set_namelist namelist_cfg nn_stock 288783 set_namelist namelist_cfg nn_itend $NUMTS 784 set_namelist namelist_cfg nn_stock $NUMTSD2 779 785 set_namelist namelist_cfg nn_fwb 0 780 786 set_namelist namelist_cfg ln_ctl .false. … … 795 801 . ./prepare_exe_dir.sh 796 802 cd ${EXE_DIR} 797 set_namelist namelist_cfg nn_it000 289798 set_namelist namelist_cfg nn_itend 576803 set_namelist namelist_cfg nn_it000 $(( NUMTSD2+1 )) 804 set_namelist namelist_cfg nn_itend $NUMTS 799 805 set_namelist namelist_cfg nn_fwb 0 800 806 set_namelist namelist_cfg ln_ctl .false. … … 805 811 set_namelist namelist_cfg ln_rstart .true. 806 812 set_namelist namelist_cfg nn_rstctl 2 807 set_namelist namelist_cfg cn_ocerst_in \"AMM12_ 00000288_restart_oce_out\"813 set_namelist namelist_cfg cn_ocerst_in \"AMM12_${NUMTSD2_STR}_restart_oce_out\" 808 814 set_namelist namelist_cfg nn_date0 20120102 809 815 for (( i=1; i<=$NPROC; i++)) ; do 810 816 L_NPROC=$(( $i - 1 )) 811 817 L_NPROC=`printf "%04d\n" ${L_NPROC}` 812 ln -sf ../LONG/AMM12_ 00000288_restart_oce_out_${L_NPROC}.nc .818 ln -sf ../LONG/AMM12_${NUMTSD2_STR}_restart_oce_out_${L_NPROC}.nc . 813 819 done 814 820 if [ ${USING_MPMD} == "yes" ] ; then
Note: See TracChangeset
for help on using the changeset viewer.