Changeset 2131
- Timestamp:
- 2010-09-29T17:25:14+02:00 (14 years ago)
- Location:
- branches/devmercator2010_1
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/devmercator2010_1/CONFIG/ORCA2_LIM/EXP00/AA_job
r1782 r2131 117 117 118 118 #- Files for the configuration and ocean dynamics 119 Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3. 2.tar119 Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.1.tar 120 120 121 121 ls -alF -
branches/devmercator2010_1/CONFIG/ORCA2_LIM_PISCES/EXP00/AA_job
r1782 r2131 117 117 118 118 #- Files for the configuration and ocean dynamics 119 Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3. 2.tar119 Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.1.tar 120 120 Rapatrie ${R_TMP} INPUTS_INIT_v3.tar 121 121 Rapatrie ${R_TMP} INPUTS_PISCES_v3.tar -
branches/devmercator2010_1/NEMO/OPA_SRC/DOM/daymod.F90
r1730 r2131 67 67 !! - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth 68 68 !!---------------------------------------------------------------------- 69 INTEGER :: inbday, irest 70 REAL(wp) :: zjul 71 !!---------------------------------------------------------------------- 69 72 70 73 ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0 … … 105 108 ! day since january 1st 106 109 nday_year = nday + SUM( nmonth_len(1:nmonth - 1) ) 107 110 111 !compute number of days between last monday and today 112 IF( nn_leapy==1 )THEN 113 CALL ymds2ju( 1900, 01, 01, 0.0, zjul ) ! compute julian day value of 01.01.1900 (monday) 114 inbday = INT(fjulday) - NINT(zjul) ! compute nb day between 01.01.1900 and current day fjulday 115 irest = MOD(inbday,7) ! compute nb day between last monday and current day fjulday 116 IF(irest==0 )irest = 7 117 ENDIF 118 108 119 ! number of seconds since the beginning of current year/month at the middle of the time-step 109 120 nsec_year = nday_year * nsecd - ndt05 ! 1 time step before the middle of the first time step 110 121 nsec_month = nday * nsecd - ndt05 ! because day will be called at the beginning of step 111 122 nsec_day = nsecd - ndt05 123 nsec_week = 0 124 IF( nn_leapy==1 ) nsec_week = irest * nsecd - ndt05 112 125 113 126 ! control print 114 127 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i6)')' ==============>> 1/2 time step before the start of the run DATE Y/M/D = ', & 115 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day 128 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day, ' nsec_week:', nsec_week 116 129 117 130 ! Up to now, calendar parameters are related to the end of previous run (nit000-1) … … 200 213 nsec_year = nsec_year + ndt 201 214 nsec_month = nsec_month + ndt 215 IF( nn_leapy==1 ) nsec_week = nsec_week + ndt 202 216 nsec_day = nsec_day + ndt 203 217 adatrj = adatrj + rdttra(1) / rday … … 228 242 ndastp = nyear * 10000 + nmonth * 100 + nday ! NEW date 229 243 ! 244 !compute first day of the year in julian days 245 CALL ymds2ju( nyear, 01, 01, 0.0, fjulstartyear ) 246 ! 230 247 IF(lwp) WRITE(numout,'(a,i8,a,i4.4,a,i2.2,a,i2.2,a,i3.3)') '======>> time-step =', kt, & 231 248 & ' New day, DATE Y/M/D = ', nyear, '/', nmonth, '/', nday, ' nday_year = ', nday_year 232 249 IF(lwp) WRITE(numout,'(a,i8,a,i7,a,i5)') ' nsec_year = ', nsec_year, & 233 & ' nsec_month = ', nsec_month, ' nsec_day = ', nsec_day 234 ENDIF 250 & ' nsec_month = ', nsec_month, ' nsec_day = ', nsec_day, ' nsec_week = ', nsec_week 251 ENDIF 252 253 IF( nsec_week .GT. 7*86400 ) nsec_week = ndt05 235 254 236 255 IF(ln_ctl) THEN -
branches/devmercator2010_1/NEMO/OPA_SRC/DOM/dom_oce.F90
r1730 r2131 195 195 !! calendar variables 196 196 !! --------------------------------------------------------------------- 197 INTEGER , PUBLIC :: nyear !: current year 198 INTEGER , PUBLIC :: nmonth !: current month 199 INTEGER , PUBLIC :: nday !: current day of the month 200 INTEGER , PUBLIC :: ndastp !: time step date in yyyymmdd format 201 INTEGER , PUBLIC :: nday_year !: current day counted from jan 1st of the current year 202 INTEGER , PUBLIC :: nsec_year !: current time step counted in second since 00h jan 1st of the current year 203 INTEGER , PUBLIC :: nsec_month !: current time step counted in second since 00h 1st day of the current month 204 INTEGER , PUBLIC :: nsec_day !: current time step counted in second since 00h of the current day 205 REAL(wp), PUBLIC :: fjulday !: julian day 206 REAL(wp), PUBLIC :: adatrj !: number of elapsed days since the begining of the whole simulation 207 ! !: (cumulative duration of previous runs that may have used different time-step size) 197 INTEGER , PUBLIC :: nyear !: current year 198 INTEGER , PUBLIC :: nmonth !: current month 199 INTEGER , PUBLIC :: nday !: current day of the month 200 INTEGER , PUBLIC :: ndastp !: time step date in yyyymmdd format 201 INTEGER , PUBLIC :: nday_year !: current day counted from jan 1st of the current year 202 INTEGER , PUBLIC :: nsec_year !: current time step counted in second since 00h jan 1st of the current year 203 INTEGER , PUBLIC :: nsec_month !: current time step counted in second since 00h 1st day of the current month 204 INTEGER , PUBLIC :: nsec_week !: current time step counted in second since 00h of last monday 205 INTEGER , PUBLIC :: nsec_day !: current time step counted in second since 00h of the current day 206 REAL(wp), PUBLIC :: fjulday !: current julian day 207 REAL(wp), PUBLIC :: fjulstartyear !: first day of the current year in julian days 208 REAL(wp), PUBLIC :: adatrj !: number of elapsed days since the begining of the whole simulation 209 ! !: (cumulative duration of previous runs that may have used different time-step size) 208 210 INTEGER , PUBLIC, DIMENSION(0: 1) :: nyear_len !: length in days of the previous/current year 209 211 INTEGER , PUBLIC, DIMENSION(0:13) :: nmonth_len !: length in days of the months of the current year -
branches/devmercator2010_1/NEMO/OPA_SRC/SBC/fldread.F90
r2130 r2131 15 15 USE oce ! ocean dynamics and tracers 16 16 USE dom_oce ! ocean space and time domain 17 USE ioipsl, ONLY : ymds2ju, ju2ymds ! for calendar 17 18 USE phycst ! ??? 18 19 USE in_out_manager ! I/O manager … … 29 30 LOGICAL :: ln_tint ! time interpolation or not (T/F) 30 31 LOGICAL :: ln_clim ! climatology or not (T/F) 31 CHARACTER(len = 7) :: cltype ! type of data file 'daily', 'monthly' or yearly'32 CHARACTER(len = 8) :: cltype ! type of data file 'daily', 'monthly' or yearly' 32 33 CHARACTER(len = 34) :: wname ! generic name of a NetCDF weights file to be used, blank if not 33 34 CHARACTER(len = 34) :: vcomp ! symbolic component name if a vector that needs rotation … … 43 44 LOGICAL :: ln_tint ! time interpolation or not (T/F) 44 45 LOGICAL :: ln_clim ! climatology or not (T/F) 45 CHARACTER(len = 7) :: cltype ! type of data file 'daily', 'monthly' or yearly'46 CHARACTER(len = 8) :: cltype ! type of data file 'daily', 'monthly' or yearly' 46 47 INTEGER :: num ! iom id of the jpfld files to be read 47 48 INTEGER :: nswap_sec ! swapping time in second since Jan. 1st 00h of nit000 year … … 164 165 ENDIF 165 166 ELSE 166 IF( sd(jf)%cltype == 'monthly' ) THEN ; ireclast = 24 * nmonth_len(nmonth) / sd(jf)%nfreqh 167 ELSEIF( sd(jf)%cltype == 'daily' ) THEN ; ireclast = 24 / sd(jf)%nfreqh 168 ELSE ; ireclast = 24 * nyear_len( 1 ) / sd(jf)%nfreqh 167 IF( sd(jf)%cltype == 'monthly' ) THEN ; ireclast = 24 * nmonth_len(nmonth) / sd(jf)%nfreqh 168 ELSEIF( sd(jf)%cltype(1:4) == 'week' ) THEN ; ireclast = 24.* 7 / sd(jf)%nfreqh 169 ELSEIF( sd(jf)%cltype == 'daily' ) THEN ; ireclast = 24 / sd(jf)%nfreqh 170 ELSE ; ireclast = 24 * nyear_len( 1 ) / sd(jf)%nfreqh 169 171 ENDIF 170 172 ENDIF … … 362 364 TYPE(FLD), INTENT(inout) :: sdjf ! input field related variables 363 365 !! 364 LOGICAL :: llprevyr ! are we reading previous year file? 365 LOGICAL :: llprevmth ! are we reading previous month file? 366 LOGICAL :: llprevday ! are we reading previous day file? 367 LOGICAL :: llprev ! llprevyr .OR. llprevmth .OR. llprevday 368 INTEGER :: idvar ! variable id 369 INTEGER :: inrec ! number of record existing for this variable 366 LOGICAL :: llprevyr ! are we reading previous year file? 367 LOGICAL :: llprevmth ! are we reading previous month file? 368 LOGICAL :: llprevweek ! are we reading previous week file? 369 LOGICAL :: llprevday ! are we reading previous day file? 370 LOGICAL :: llprev ! llprevyr .OR. llprevmth .OR. llprevday 371 INTEGER :: idvar ! variable id 372 INTEGER :: inrec ! number of record existing for this variable 370 373 INTEGER :: kwgt 374 <<<<<<< .working 371 375 INTEGER :: jk !vertical loop variable 372 376 INTEGER :: ipk !number of vertical levels of sdjf%fdta ( 2D: ipk=1 ; 3D: ipk=jpk ) 377 ======= 378 INTEGER :: iyear, imonth, iday ! first day of the current file in yyyy mm dd 379 INTEGER :: isec_week ! number of seconds since start of the weekly file 380 >>>>>>> .merge-right.r2130 373 381 CHARACTER(LEN=1000) :: clfmt ! write format 374 382 !!--------------------------------------------------------------------- 375 383 376 384 ! some default definitions... 377 385 sdjf%num = 0 ! default definition for non-opened file 378 386 IF( sdjf%ln_clim ) sdjf%clname = TRIM( sdjf%clrootname ) ! file name defaut definition, never change in this case 379 llprevyr = .FALSE. 380 llprevmth = .FALSE. 381 llprevday = .FALSE. 387 llprevyr = .FALSE. 388 llprevmth = .FALSE. 389 llprevweek = .FALSE. 390 llprevday = .FALSE. 391 isec_week = 0 382 392 383 393 ! define record informations … … 401 411 llprevmth = .NOT. sdjf%ln_clim ! use previous month file? 402 412 llprevyr = llprevmth .AND. nmonth == 1 ! use previous year file? 413 ELSE IF ( sdjf%cltype(1:4) == 'week' ) THEN !weekly file 414 isec_week = 86400 * 7 415 sdjf%nrec_b(1) = 24. / sdjf%nfreqh * 7 ! last record of previous weekly file 403 416 ELSEIF( sdjf%cltype == 'daily' ) THEN ! daily file 404 417 sdjf%nrec_b(1) = 24 / sdjf%nfreqh ! last record of previous day … … 412 425 ENDIF 413 426 ENDIF 414 llprev = llprevyr .OR. llprevmth .OR. llprevday 415 427 llprev = llprevyr .OR. llprevmth .OR. llprevweek .OR. llprevday 428 429 <<<<<<< .working 416 430 CALL fld_clopn( sdjf, nyear - COUNT((/llprevyr /)) , & 417 431 & nmonth - COUNT((/llprevmth/)) + 12 * COUNT((/llprevyr /)), & 418 432 & nday - COUNT((/llprevday/)) + nmonth_len(nmonth-1) * COUNT((/llprevmth/)), .NOT. llprev ) 419 433 434 ======= 435 IF ( sdjf%cltype(1:4) == 'week' ) THEN 436 isec_week = ksec_week( sdjf%cltype(6:8) ) 437 if(lwp)write(numout,*)'cbr test2 isec_week = ',isec_week 438 llprevmth = ( isec_week .GT. nsec_month ) 439 llprevyr = llprevmth .AND. nmonth==1 440 ENDIF 441 ! 442 iyear = nyear - COUNT((/llprevyr /)) 443 imonth = nmonth - COUNT((/llprevmth/)) + 12* COUNT((/llprevyr /)) 444 iday = nday - COUNT((/llprevday/)) + nmonth_len(nmonth-1) * COUNT((/llprevmth/)) - INT( isec_week )/86400 445 ! 446 CALL fld_clopn( sdjf , iyear , imonth , iday , .NOT. llprev ) 447 448 >>>>>>> .merge-right.r2130 420 449 ! if previous year/month/day file does not exist, we switch to the current year/month/day 421 450 IF( llprev .AND. sdjf%num == 0 ) THEN … … 472 501 ENDIF 473 502 503 <<<<<<< .working 474 504 475 505 IF( sdjf%num == 0 ) CALL fld_clopn( sdjf, nyear, nmonth, nday ) ! make sure current year/month/day file is opened 506 ======= 507 ! make sure current year/month/day file is opened 508 IF( sdjf%num == 0 ) THEN 509 isec_week = 0 510 llprevyr = .FALSE. 511 llprevmth = .FALSE. 512 llprevweek = .FALSE. 513 ! 514 IF ( sdjf%cltype(1:4) == 'week' ) THEN 515 isec_week = ksec_week( sdjf%cltype(6:8) ) 516 llprevmth = ( isec_week .GT. nsec_month ) 517 llprevyr = llprevmth .AND. nmonth==1 518 ENDIF 519 ! 520 iyear = nyear - COUNT((/llprevyr /)) 521 imonth = nmonth - COUNT((/llprevmth/)) + 12* COUNT((/llprevyr /)) 522 iday = nday + nmonth_len(nmonth-1) * COUNT((/llprevmth/)) - isec_week/86400 523 ! 524 CALL fld_clopn( sdjf, iyear, imonth, iday ) 525 ENDIF 526 >>>>>>> .merge-right.r2130 476 527 477 528 sdjf%nswap_sec = nsec_year + nsec1jan000 - 1 ! force read/update the after data in the following part of fld_read 529 <<<<<<< .working 478 530 531 ======= 532 533 >>>>>>> .merge-right.r2130 479 534 END SUBROUTINE fld_init 480 535 … … 494 549 REAL(wp) :: ztmp ! temporary variable 495 550 INTEGER :: ifreq_sec ! frequency mean (in seconds) 551 INTEGER :: isec_week ! number of seconds since the start of the weekly file 496 552 !!---------------------------------------------------------------------- 497 553 ! … … 542 598 ! 543 599 ifreq_sec = sdjf%nfreqh * 3600 ! frequency mean (in seconds) 600 IF( sdjf%cltype(1:4) == 'week' ) isec_week = ksec_week( sdjf%cltype(6:8)) !since the first day of the current week 544 601 ! number of second since the beginning of the file 545 IF( sdjf%cltype == 'monthly' ) THEN ; ztmp = REAL(nsec_month,wp) ! since 00h on the 1st day of the current month 546 ELSEIF( sdjf%cltype == 'daily' ) THEN ; ztmp = REAL(nsec_day ,wp) ! since 00h of the current day 547 ELSE ; ztmp = REAL(nsec_year ,wp) ! since 00h on Jan 1 of the current year 602 IF( sdjf%cltype == 'monthly' ) THEN ; ztmp = REAL(nsec_month ,wp) ! since 00h on the 1st day of the current month 603 ELSEIF( sdjf%cltype(1:4) == 'week' ) THEN ; ztmp = REAL(isec_week ,wp) ! since the first day of the current week 604 ELSEIF( sdjf%cltype == 'daily' ) THEN ; ztmp = REAL(nsec_day ,wp) ! since 00h of the current day 605 ELSE ; ztmp = REAL(nsec_year ,wp) ! since 00h on Jan 1 of the current year 548 606 ENDIF 549 607 IF( sdjf%ln_tint ) THEN ! time interpolation, shift by 1/2 record … … 581 639 ! after record index and second since Jan. 1st 00h of nit000 year 582 640 sdjf%nrec_a(:) = (/ irec, ifreq_sec * irec - ifreq_sec / 2 + nsec1jan000 /) 583 IF( sdjf%cltype == 'monthly' ) & ! add the number of seconds between 00h Jan 1 and the end of previous month641 IF( sdjf%cltype == 'monthly' ) & ! add the number of seconds between 00h Jan 1 and the end of previous month 584 642 sdjf%nrec_a(2) = sdjf%nrec_a(2) + isecd * SUM(nmonth_len(1:nmonth -1)) ! ok if nmonth=1 585 IF( sdjf%cltype == 'daily' ) & ! add the number of seconds between 00h Jan 1 and the end of previous day 643 IF( sdjf%cltype(1:4) == 'week' ) & ! add the number of seconds between 00h Jan 1 and the end of previous week 644 sdjf%nrec_a(2) = sdjf%nrec_a(2) + ( nsec_year - isec_week ) 645 IF( sdjf%cltype == 'daily' ) & ! add the number of seconds between 00h Jan 1 and the end of previous day 586 646 sdjf%nrec_a(2) = sdjf%nrec_a(2) + isecd * ( nday_year - 1 ) 587 647 … … 589 649 irec = irec - 1. ! move back to previous record 590 650 sdjf%nrec_b(:) = (/ irec, ifreq_sec * irec - ifreq_sec / 2 + nsec1jan000 /) 591 IF( sdjf%cltype == 'monthly' ) & ! add the number of seconds between 00h Jan 1 and the end of previous month651 IF( sdjf%cltype == 'monthly' ) & ! add the number of seconds between 00h Jan 1 and the end of previous month 592 652 sdjf%nrec_b(2) = sdjf%nrec_b(2) + isecd * SUM(nmonth_len(1:nmonth -1)) ! ok if nmonth=1 593 IF( sdjf%cltype == 'daily' ) & ! add the number of seconds between 00h Jan 1 and the end of previous day 653 IF( sdjf%cltype(1:4) == 'week' ) & ! add the number of seconds between 00h Jan 1 and the end of previous week 654 sdjf%nrec_b(2) = sdjf%nrec_b(2) + ( nsec_year - isec_week ) 655 IF( sdjf%cltype == 'daily' ) & ! add the number of seconds between 00h Jan 1 and the end of previous day 594 656 sdjf%nrec_b(2) = sdjf%nrec_b(2) + isecd * ( nday_year - 1 ) 595 657 … … 612 674 !! ** Method : 613 675 !!---------------------------------------------------------------------- 614 TYPE(FLD), INTENT(inout) :: sdjf ! input field related variables 615 INTEGER , INTENT(in ) :: kyear ! year value 616 INTEGER , INTENT(in ) :: kmonth ! month value 617 INTEGER , INTENT(in ) :: kday ! day value 618 LOGICAL , INTENT(in ), OPTIONAL :: ldstop ! stop if open to read a non-existing file (default = .TRUE.) 676 TYPE(FLD), INTENT(inout) :: sdjf ! input field related variables 677 INTEGER , INTENT(in ) :: kyear ! year value 678 INTEGER , INTENT(in ) :: kmonth ! month value 679 INTEGER , INTENT(in ) :: kday ! day value 680 LOGICAL , INTENT(in ), OPTIONAL :: ldstop ! stop if open to read a non-existing file (default = .TRUE.) 681 INTEGER :: iyear, imonth, iday ! firt day of the current week in yyyy mm dd 682 REAL(wp) :: zsec, zjul !temp variable 619 683 620 684 IF( sdjf%num /= 0 ) CALL iom_close( sdjf%num ) ! close file if already open 621 685 ! build the new filename if not climatological data 622 IF( .NOT. sdjf%ln_clim ) THEN ; WRITE(sdjf%clname, '(a,"_y",i4.4)' ) TRIM( sdjf%clrootname ), kyear ! add year 623 IF( sdjf%cltype /= 'yearly' ) WRITE(sdjf%clname, '(a,"m" ,i2.2)' ) TRIM( sdjf%clname ), kmonth ! add month 624 IF( sdjf%cltype == 'daily' ) WRITE(sdjf%clname, '(a,"d" ,i2.2)' ) TRIM( sdjf%clname ), kday ! add day 686 sdjf%clname=TRIM(sdjf%clrootname) 687 ! 688 IF( sdjf%cltype(1:4) == 'week' .AND. nn_leapy==0 )CALL ctl_stop( 'fld_clopn: weekly file and nn_leapy=0 are not compatible' ) 689 ! 690 IF( .NOT. sdjf%ln_clim ) THEN 691 WRITE(sdjf%clname, '(a,"_y",i4.4)' ) TRIM( sdjf%clrootname ), kyear ! add year 692 IF( sdjf%cltype /= 'yearly' ) & 693 & WRITE(sdjf%clname, '(a,"m" ,i2.2)' ) TRIM( sdjf%clname ), kmonth ! add month 694 IF( sdjf%cltype == 'daily' .OR. sdjf%cltype(1:4) == 'week' ) & 695 & WRITE(sdjf%clname, '(a,"d" ,i2.2)' ) TRIM( sdjf%clname ), kday ! add day 625 696 ELSE 626 697 ! build the new filename if climatological data … … 1109 1180 1110 1181 END SUBROUTINE fld_interp 1111 1182 1183 FUNCTION ksec_week( cdday ) 1184 !!--------------------------------------------------------------------- 1185 !! *** FUNCTION kshift_week *** 1186 !! 1187 !! ** Purpose : 1188 !! 1189 !! ** Method : 1190 !!--------------------------------------------------------------------- 1191 CHARACTER(len=*), INTENT(in) :: cdday !3 first letters of the first day of the weekly file 1192 !! 1193 INTEGER :: ksec_week ! output variable 1194 INTEGER :: ijul !temp variable 1195 INTEGER :: ishift !temp variable 1196 CHARACTER(len=3),DIMENSION(7) :: cl_week 1197 !!---------------------------------------------------------------------- 1198 cl_week = (/"sun","sat","fri","thu","wed","tue","mon"/) 1199 DO ijul=1,7 1200 IF( cl_week(ijul)==TRIM(cdday) ) EXIT 1201 ENDDO 1202 IF( ijul .GT. 7 ) CALL ctl_stop( 'ksec_week: wrong day for sdjf%cltype(6:8): ',TRIM(cdday) ) 1203 ! 1204 ishift = ( ijul ) * 86400 1205 ! 1206 ksec_week = nsec_week + ishift 1207 ksec_week = MOD( ksec_week , 86400*7 ) 1208 if(lwp)write(numout,*)'cbr ijul ksec_week ',ijul,ksec_week 1209 ! 1210 END FUNCTION ksec_week 1211 1112 1212 END MODULE fldread -
branches/devmercator2010_1/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh
r1781 r2131 196 196 if [ "${USE_IOSERVER}" = "true" ] 197 197 then 198 cp ${ MAINDIR}/modipsl/bin/ioserver ioserver198 cp ${WORK}/../bin/ioserver ioserver 199 199 chmod 777 ioserver 200 200 fi -
branches/devmercator2010_1/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh
r1781 r2131 192 192 if [ "${USE_IOSERVER}" = "true" ] 193 193 then 194 cp ${ MAINDIR}/modipsl/bin/ioserver ioserver194 cp ${WORK}/../bin/ioserver ioserver 195 195 chmod 777 ioserver 196 196 fi
Note: See TracChangeset
for help on using the changeset viewer.