- Timestamp:
- 2014-09-17T19:19:59+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r4624 r4772 17 17 !!---------------------------------------------------------------------- 18 18 !! asm_inc_init : Initialize the increment arrays and IAU weights 19 !! calc_date : Compute the calendar date YYYYMMDD on a given step19 !! calc_date : Compute the calendar date YYYYMMDDHH on a given step 20 20 !! tra_asm_inc : Apply the tracer (T and S) increments 21 21 !! dyn_asm_inc : Apply the dynamic (u and v) increments … … 45 45 46 46 PUBLIC asm_inc_init !: Initialize the increment arrays and IAU weights 47 PUBLIC calc_date !: Compute the calendar date YYYYMMDD on a given step47 PUBLIC calc_date !: Compute the calendar date YYYYMMDDHH on a given step 48 48 PUBLIC tra_asm_inc !: Apply the tracer (T and S) increments 49 49 PUBLIC dyn_asm_inc !: Apply the dynamic (u and v) increments … … 115 115 INTEGER :: iiauper ! Number of time steps in the IAU period 116 116 INTEGER :: icycper ! Number of time steps in the cycle 117 INTEGER :: iitend_date ! Date YYYYMMDD of final time step118 INTEGER :: iitbkg_date ! Date YYYYMMDD of background time step for Jb term119 INTEGER :: iitdin_date ! Date YYYYMMDD of background time step for DI120 INTEGER :: iitiaustr_date ! Date YYYYMMDD of IAU interval start time step121 INTEGER :: iitiaufin_date ! Date YYYYMMDD of IAU interval final time step117 INTEGER :: iitend_date ! Date YYYYMMDDHH of final time step 118 INTEGER :: iitbkg_date ! Date YYYYMMDDHH of background time step for Jb term 119 INTEGER :: iitdin_date ! Date YYYYMMDDHH of background time step for DI 120 INTEGER :: iitiaustr_date ! Date YYYYMMDDHH of IAU interval start time step 121 INTEGER :: iitiaufin_date ! Date YYYYMMDDHH of IAU interval final time step 122 122 INTEGER :: ios ! Local integer output status for namelist read 123 123 … … 556 556 !! *** ROUTINE calc_date *** 557 557 !! 558 !! ** Purpose : Compute the calendar date YYYYMMDD at a given time step.559 !! 560 !! ** Method : Compute the calendar date YYYYMMDD at a given time step.558 !! ** Purpose : Compute the calendar date YYYYMMDDHH at a given time step. 559 !! 560 !! ** Method : Compute the calendar date YYYYMMDDHH at a given time step. 561 561 !! 562 562 !! ** Action : … … 570 570 INTEGER :: imon0 ! Initial month 571 571 INTEGER :: iday0 ! Initial day 572 INTEGER :: ihou0 ! Initial hour 572 573 INTEGER :: iyea ! Current year 573 574 INTEGER :: imon ! Current month 574 575 INTEGER :: iday ! Current day 576 INTEGER :: ihou ! Current hour 575 577 INTEGER :: idaystp ! Number of days between initial and current date 578 INTEGER :: ihoustp ! Number of hours 576 579 INTEGER :: idaycnt ! Day counter 577 580 … … 579 582 580 583 !----------------------------------------------------------------------- 581 ! Compute the calendar date YYYYMMDD 584 ! Compute the calendar date YYYYMMDDHH 582 585 !----------------------------------------------------------------------- 583 586 … … 585 588 iyea0 = kdate0 / 10000 586 589 imon0 = ( kdate0 - ( iyea0 * 10000 ) ) / 100 587 iday0 = kdate0 - ( iyea0 * 10000 ) - ( imon0 * 100 ) 590 iday0 = kdate0 - ( iyea0 * 10000 ) - ( imon0 * 100 ) 591 ihou0 = nn_time0 588 592 589 593 ! Check that kt >= kit000 - 1 590 594 IF ( kt < kit000 - 1 ) CALL ctl_stop( ' kt must be >= kit000 - 1') 591 595 592 ! If kt = kit000 - 1 then set the date to the restart date593 IF ( kt == kit000 - 1 ) THEN594 595 kdate = ndastp596 RETURN597 598 ENDIF599 600 596 ! Compute the number of days from the initial date 601 597 idaystp = INT( REAL( kt - kit000 ) * rdt / 86400. ) 602 598 ihoustp = INT( REAL( kt - kit000 ) * rdt / 3600. ) - ( idaystp * 24 ) 599 603 600 iday = iday0 604 601 imon = imon0 605 602 iyea = iyea0 603 ihou = ihou0 606 604 idaycnt = 0 605 606 ! Increment hours 607 ihou = ihou + ihoustp 608 IF ( ihou >= 24 ) THEN 609 ihou = ihou - 24 610 iday = iday + 1 611 ENDIF 607 612 608 613 CALL calc_month_len( iyea, imonth_len ) … … 611 616 iday = iday + 1 612 617 IF ( iday > imonth_len(imon) ) THEN 613 iday = 1618 iday = iday - imonth_len(imon) 614 619 imon = imon + 1 615 620 ENDIF … … 622 627 END DO 623 628 ! 624 kdate = iyea * 10000 + imon * 100 + iday629 kdate = iyea * 1000000 + imon * 10000 + iday * 100 + ihou 625 630 ! 626 631 END SUBROUTINE
Note: See TracChangeset
for help on using the changeset viewer.