- Timestamp:
- 2014-10-08T15:49:12+02:00 (10 years ago)
- Location:
- branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/CONFIG/SHARED/1_namelist_ref
r4347 r4811 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 hours 31 32 nn_leapy = 0 ! Leap year calendar (1) or not (0) 32 33 ln_rstart = .false. ! start from rest (F) or from a restart file (T) … … 1067 1068 ! ln_ssh Logical switch for SSH observations 1068 1069 1069 ln_sst = . true. ! Logical switch for SST observations1070 ln_reysst = . true. ! ln_reysst Logical switch for Reynolds observations1070 ln_sst = .false. ! Logical switch for SST observations 1071 ln_reysst = .false. ! ln_reysst Logical switch for Reynolds observations 1071 1072 ln_ghrsst = .false. ! ln_ghrsst Logical switch for GHRSST observations 1072 1073 1073 1074 ln_sstfb = .false. ! Logical switch for feedback SST data 1074 1075 ! ln_sss Logical switch for SSS observations 1075 ! ln_seaiceLogical switch for Sea Ice observations1076 ln_seaice = .false. ! Logical switch for Sea Ice observations 1076 1077 ! ln_vel3d Logical switch for velocity observations 1077 1078 ! ln_velavcur Logical switch for velocity daily av. cur. … … 1094 1095 ! sstfiles GHRSST input observation file name 1095 1096 ! ! sstfbfiles: Feedback SST input observation file name 1096 sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc'1097 sstfbfiles = 'sst_01.nc' 1097 1098 ! seaicefiles Sea Ice input observation file name 1099 seaicefiles = 'seaice_01.nc' 1098 1100 ! velavcurfiles Vel. cur. daily av. input file name 1099 1101 ! velhvcurfiles Vel. cur. high freq. input file name -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/CONFIG/SHARED/namelist_ref
r4384 r4811 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 hours 31 32 nn_leapy = 0 ! Leap year calendar (1) or not (0) 32 33 ln_rstart = .false. ! start from rest (F) or from a restart file (T) … … 1085 1086 ! ln_ssh Logical switch for SSH observations 1086 1087 1087 ln_sst = . true. ! Logical switch for SST observations1088 ln_reysst = . true. ! ln_reysst Logical switch for Reynolds observations1088 ln_sst = .false. ! Logical switch for SST observations 1089 ln_reysst = .false. ! ln_reysst Logical switch for Reynolds observations 1089 1090 ln_ghrsst = .false. ! ln_ghrsst Logical switch for GHRSST observations 1090 1091 1091 1092 ln_sstfb = .false. ! Logical switch for feedback SST data 1092 1093 ! ln_sss Logical switch for SSS observations 1093 ! ln_seaiceLogical switch for Sea Ice observations1094 ln_seaice = .false. ! Logical switch for Sea Ice observations 1094 1095 ! ln_vel3d Logical switch for velocity observations 1095 1096 ! ln_velavcur Logical switch for velocity daily av. cur. … … 1112 1113 ! sstfiles GHRSST input observation file name 1113 1114 ! ! sstfbfiles: Feedback SST input observation file name 1114 sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc' 1115 ! seaicefiles Sea Ice input observation file name 1115 sstfbfiles = 'sst_01.nc' 1116 ! seaicefiles Sea Ice input observation file names 1117 seaicefiles = 'seaice_01.nc' 1116 1118 ! velavcurfiles Vel. cur. daily av. input file name 1117 1119 ! velhvcurfiles Vel. cur. high freq. input file name -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OFF_SRC/domain.F90
r4624 r4811 117 117 INTEGER :: ios ! Local integer output status for namelist read 118 118 NAMELIST/namrun/ nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, & 119 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 120 & nn_write, ln_dimgnnn, ln_mskland , ln_clobber , nn_chunksz, nn_euler 119 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 120 & nn_stock, nn_write, ln_dimgnnn , ln_mskland , ln_clobber, nn_chunksz, & 121 & nn_euler 121 122 NAMELIST/namdom/ nn_bathy , rn_bathy, rn_e3zps_min, rn_e3zps_rat, nn_msh , rn_hmin, & 122 123 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & … … 153 154 WRITE(numout,*) ' number of the last time step nn_itend = ', nn_itend 154 155 WRITE(numout,*) ' initial calendar date aammjj nn_date0 = ', nn_date0 156 WRITE(numout,*) ' initial time of day in hours nn_time0 = ', nn_time0 155 157 WRITE(numout,*) ' leap year calendar (0/1) nn_leapy = ', nn_leapy 156 158 WRITE(numout,*) ' initial state output nn_istate = ', nn_istate -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r4772 r4811 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 14 !!---------------------------------------------------------------------- 14 15 … … 17 18 !!---------------------------------------------------------------------- 18 19 !! asm_inc_init : Initialize the increment arrays and IAU weights 19 !! calc_date : Compute the calendar date YYYYMMDDHH on a given step20 20 !! tra_asm_inc : Apply the tracer (T and S) increments 21 21 !! dyn_asm_inc : Apply the dynamic (u and v) increments … … 40 40 #endif 41 41 USE sbc_oce ! Surface boundary condition variables. 42 USE diaobs, ONLY: calc_date ! Compute the calendar date on a given step 42 43 43 44 IMPLICIT NONE … … 45 46 46 47 PUBLIC asm_inc_init !: Initialize the increment arrays and IAU weights 47 PUBLIC calc_date !: Compute the calendar date YYYYMMDDHH on a given step48 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 YYYYMMDDHH of final time step118 INTEGER :: iitbkg_date ! Date YYYYMMDDHH of background time step for Jb term119 INTEGER :: iitdin_date ! Date YYYYMMDDHH of background time step for DI120 INTEGER :: iitiaustr_date ! Date YYYYMMDDHH of IAU interval start time step121 INTEGER :: iitiaufin_date ! Date YYYYMMDDHH of IAU interval final time step122 117 INTEGER :: ios ! Local integer output status for namelist read 118 119 REAL(KIND=dp) :: ditend_date ! Date YYYYMMDD.HHMMSS of final time step 120 REAL(KIND=dp) :: ditbkg_date ! Date YYYYMMDD.HHMMSS of background time step for Jb term 121 REAL(KIND=dp) :: ditdin_date ! Date YYYYMMDD.HHMMSS of background time step for DI 122 REAL(KIND=dp) :: ditiaustr_date ! Date YYYYMMDD.HHMMSS of IAU interval start time step 123 REAL(KIND=dp) :: ditiaufin_date ! Date YYYYMMDD.HHMMSS of IAU interval final time step 123 124 124 125 REAL(wp) :: znorm ! Normalization factor for IAU weights … … 187 188 188 189 ! Date of final time step 189 CALL calc_date( nit 000, nitend, ndate0, iitend_date )190 CALL calc_date( nitend, ditend_date ) 190 191 191 192 ! Background time for Jb referenced to ndate0 192 CALL calc_date( nit 000, nitbkg_r, ndate0, iitbkg_date )193 CALL calc_date( nitbkg_r, ditbkg_date ) 193 194 194 195 ! Background time for DI referenced to ndate0 195 CALL calc_date( nit 000, nitdin_r, ndate0, iitdin_date )196 CALL calc_date( nitdin_r, ditdin_date ) 196 197 197 198 ! IAU start time referenced to ndate0 198 CALL calc_date( nit 000, nitiaustr_r, ndate0, iitiaustr_date )199 CALL calc_date( nitiaustr_r, ditiaustr_date ) 199 200 200 201 ! IAU end time referenced to ndate0 201 CALL calc_date( nit 000, nitiaufin_r, ndate0, iitiaufin_date )202 CALL calc_date( nitiaufin_r, ditiaufin_date ) 202 203 203 204 IF(lwp) THEN … … 215 216 WRITE(numout,*) ' ndastp = ', ndastp 216 217 WRITE(numout,*) ' ndate0 = ', ndate0 217 WRITE(numout,*) ' iitend_date = ', iitend_date 218 WRITE(numout,*) ' iitbkg_date = ', iitbkg_date 219 WRITE(numout,*) ' iitdin_date = ', iitdin_date 220 WRITE(numout,*) ' iitiaustr_date = ', iitiaustr_date 221 WRITE(numout,*) ' iitiaufin_date = ', iitiaufin_date 218 WRITE(numout,*) ' nn_time0 = ', nn_time0 219 WRITE(numout,*) ' ditend_date = ', ditend_date 220 WRITE(numout,*) ' ditbkg_date = ', ditbkg_date 221 WRITE(numout,*) ' ditdin_date = ', ditdin_date 222 WRITE(numout,*) ' ditiaustr_date = ', ditiaustr_date 223 WRITE(numout,*) ' ditiaufin_date = ', ditiaufin_date 222 224 ENDIF 223 225 … … 236 238 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 237 239 & ' Inconsistent options') 238 239 IF ( ( ln_bkgwri ).AND.( ( ln_asmdin ).OR.( ln_asmiau ) ) ) &240 & CALL ctl_stop( ' ln_bkgwri and either ln_asmdin or ln_asmiau are set to .true.:', &241 & ' The background state must be written before applying the increments')242 240 243 241 IF ( ( niaufn /= 0 ).AND.( niaufn /= 1 ) ) & … … 381 379 WRITE(numout,*) 382 380 WRITE(numout,*) 'asm_inc_init : Assimilation increments valid ', & 383 & ' between dates ', NINT( z_inc_dateb ),' and ', &384 & NINT( z_inc_datef )381 & ' between dates ', z_inc_dateb,' and ', & 382 & z_inc_datef 385 383 WRITE(numout,*) '~~~~~~~~~~~~' 386 384 ENDIF 387 385 388 IF ( ( NINT( z_inc_dateb ) < ndastp) &389 & .OR.( NINT( z_inc_datef ) > iitend_date ) ) &386 IF ( ( z_inc_dateb < ndastp + nn_time0*0.01_wp ) & 387 & .OR.( z_inc_datef > ditend_date ) ) & 390 388 & CALL ctl_warn( ' Validity time of assimilation increments is ', & 391 389 & ' outside the assimilation interval' ) 392 390 393 IF ( ( ln_asmdin ).AND.( NINT( zdate_inc ) /= iitdin_date ) ) &391 IF ( ( ln_asmdin ).AND.( zdate_inc /= ditdin_date ) ) & 394 392 & CALL ctl_warn( ' Validity time of assimilation increments does ', & 395 393 & ' not agree with Direct Initialization time' ) … … 518 516 WRITE(numout,*) 519 517 WRITE(numout,*) 'asm_inc_init : Assimilation background state valid at : ', & 520 & NINT( zdate_bkg )518 & zdate_bkg 521 519 WRITE(numout,*) '~~~~~~~~~~~~' 522 520 ENDIF 523 521 524 IF ( NINT( zdate_bkg ) /= iitdin_date ) &522 IF ( zdate_bkg /= ditdin_date ) & 525 523 & CALL ctl_warn( ' Validity time of assimilation background state does', & 526 524 & ' not agree with Direct Initialization time' ) … … 550 548 ! 551 549 END SUBROUTINE asm_inc_init 552 553 554 SUBROUTINE calc_date( kit000, kt, kdate0, kdate )555 !!----------------------------------------------------------------------556 !! *** ROUTINE calc_date ***557 !!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 !!562 !! ** Action :563 !!----------------------------------------------------------------------564 INTEGER, INTENT(IN) :: kit000 ! Initial time step565 INTEGER, INTENT(IN) :: kt ! Current time step referenced to kit000566 INTEGER, INTENT(IN) :: kdate0 ! Initial date567 INTEGER, INTENT(OUT) :: kdate ! Current date reference to kdate0568 !569 INTEGER :: iyea0 ! Initial year570 INTEGER :: imon0 ! Initial month571 INTEGER :: iday0 ! Initial day572 INTEGER :: ihou0 ! Initial hour573 INTEGER :: iyea ! Current year574 INTEGER :: imon ! Current month575 INTEGER :: iday ! Current day576 INTEGER :: ihou ! Current hour577 INTEGER :: idaystp ! Number of days between initial and current date578 INTEGER :: ihoustp ! Number of hours579 INTEGER :: idaycnt ! Day counter580 581 INTEGER, DIMENSION(12) :: imonth_len !: length in days of the months of the current year582 583 !-----------------------------------------------------------------------584 ! Compute the calendar date YYYYMMDDHH585 !-----------------------------------------------------------------------586 587 ! Initial date588 iyea0 = kdate0 / 10000589 imon0 = ( kdate0 - ( iyea0 * 10000 ) ) / 100590 iday0 = kdate0 - ( iyea0 * 10000 ) - ( imon0 * 100 )591 ihou0 = nn_time0592 593 ! Check that kt >= kit000 - 1594 IF ( kt < kit000 - 1 ) CALL ctl_stop( ' kt must be >= kit000 - 1')595 596 ! Compute the number of days from the initial date597 idaystp = INT( REAL( kt - kit000 ) * rdt / 86400. )598 ihoustp = INT( REAL( kt - kit000 ) * rdt / 3600. ) - ( idaystp * 24 )599 600 iday = iday0601 imon = imon0602 iyea = iyea0603 ihou = ihou0604 idaycnt = 0605 606 ! Increment hours607 ihou = ihou + ihoustp608 IF ( ihou >= 24 ) THEN609 ihou = ihou - 24610 iday = iday + 1611 ENDIF612 613 CALL calc_month_len( iyea, imonth_len )614 615 DO WHILE ( idaycnt < idaystp )616 iday = iday + 1617 IF ( iday > imonth_len(imon) ) THEN618 iday = iday - imonth_len(imon)619 imon = imon + 1620 ENDIF621 IF ( imon > 12 ) THEN622 imon = 1623 iyea = iyea + 1624 CALL calc_month_len( iyea, imonth_len ) ! update month lengths625 ENDIF626 idaycnt = idaycnt + 1627 END DO628 !629 kdate = iyea * 1000000 + imon * 10000 + iday * 100 + ihou630 !631 END SUBROUTINE632 633 634 SUBROUTINE calc_month_len( iyear, imonth_len )635 !!----------------------------------------------------------------------636 !! *** ROUTINE calc_month_len ***637 !!638 !! ** Purpose : Compute the number of days in a months given a year.639 !!640 !! ** Method :641 !!----------------------------------------------------------------------642 INTEGER, DIMENSION(12) :: imonth_len !: length in days of the months of the current year643 INTEGER :: iyear !: year644 !!----------------------------------------------------------------------645 !646 ! length of the month of the current year (from nleapy, read in namelist)647 IF ( nleapy < 2 ) THEN648 imonth_len(:) = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /)649 IF ( nleapy == 1 ) THEN ! we are using calendar with leap years650 IF ( MOD(iyear, 4) == 0 .AND. ( MOD(iyear, 400) == 0 .OR. MOD(iyear, 100) /= 0 ) ) THEN651 imonth_len(2) = 29652 ENDIF653 ENDIF654 ELSE655 imonth_len(:) = nleapy ! all months with nleapy days per year656 ENDIF657 !658 END SUBROUTINE659 660 550 661 551 SUBROUTINE tra_asm_inc( kt ) -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r4772 r4811 83 83 84 84 IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 85 86 ! If we are starting at 00Z then need to wind back to previous day for calendar initialisation87 IF( nn_time0 .eq. 0 ) ndastp = ndastp - 188 85 89 86 ! set the calandar from ndastp (read in restart file and namelist) -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r4772 r4811 138 138 & nn_it000, nn_itend, nn_date0 , nn_time0 , nn_leapy , nn_istate , & 139 139 & nn_stock, nn_write, ln_dimgnnn , ln_mskland , ln_clobber, nn_chunksz, & 140 & nn_euler 140 & nn_euler 141 141 NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, & 142 142 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
r4772 r4811 12 12 !! dia_obs : Compute model equivalent to observations 13 13 !! dia_obs_wri : Write observational diagnostics 14 !! calc_date : Compute the date of timestep in YYYYMMDD.HHMMSS format 14 15 !! ini_date : Compute the initial date YYYYMMDD.HHMMSS 15 16 !! fin_date : Compute the final date YYYYMMDD.HHMMSS … … 50 51 & dia_obs, & ! Compute model equivalent to observations 51 52 & dia_obs_wri, & ! Write model equivalent to observations 52 & dia_obs_dealloc ! Deallocate dia_obs data 53 & dia_obs_dealloc, & ! Deallocate dia_obs data 54 & calc_date ! Compute the date of a timestep 53 55 54 56 !! * Shared Module variables … … 208 210 !----------------------------------------------------------------------- 209 211 212 !Initalise all values in namelist arrays 213 enactfiles(:) = '' 214 coriofiles(:) = '' 215 profbfiles(:) = '' 216 slafilesact(:) = '' 217 slafilespas(:) = '' 218 slafbfiles(:) = '' 219 sstfiles(:) = '' 220 sstfbfiles(:) = '' 221 seaicefiles(:) = '' 210 222 velcurfiles(:) = '' 211 223 veladcpfiles(:) = '' 224 velavcurfiles(:) = '' 225 velhrcurfiles(:) = '' 226 velavadcpfiles(:) = '' 227 velhradcpfiles(:) = '' 228 velfbfiles(:) = '' 229 velcurfiles(:) = '' 230 veladcpfiles(:) = '' 231 endailyavtypes(:) = -1 232 endailyavtypes(1) = 820 233 ln_profb_ena(:) = .FALSE. 234 ln_profb_enatim(:) = .TRUE. 235 ln_velfb_av(:) = .FALSE. 236 ln_ignmis = .FALSE. 237 212 238 CALL ini_date( dobsini ) 213 239 CALL fin_date( dobsend ) -
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/OBS/jul2greg.h90
r2287 r4811 16 16 !! ! 06-05 (A. Vidard) Reformatted and refdate 17 17 !! ! 06-10 (A. Weaver) Cleanup 18 !! ! 2014-09 (D. Lea) Change to use FLOOR to deal with negative prelday 18 19 !!----------------------------------------------------------------------- 19 20 … … 82 83 83 84 zday = prelday 84 ksec = NINT( 86400. * MOD( zday, 1. ) )85 ksec = FLOOR( 86400. * MOD( zday, 1. ) ) 85 86 86 87 IF ( ksec < 0. ) ksec = 86400. + ksec
Note: See TracChangeset
for help on using the changeset viewer.