Changeset 8581
- Timestamp:
- 2017-10-03T10:03:41+02:00 (7 years ago)
- Location:
- branches/2015/nemo_v3_6_STABLE/NEMOGCM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/SAS_SRC/daymod.F90
r5564 r8581 2 2 !!====================================================================== 3 3 !! *** MODULE daymod *** 4 !! Ocean : calendar 4 !! Ocean : calendar 5 5 !!===================================================================== 6 6 !! History : OPA ! 1994-09 (M. Pontaud M. Imbard) Original code 7 7 !! ! 1997-03 (O. Marti) 8 !! ! 1997-05 (G. Madec) 8 !! ! 1997-05 (G. Madec) 9 9 !! ! 1997-08 (M. Imbard) 10 10 !! NEMO 1.0 ! 2003-09 (G. Madec) F90 + nyear, nmonth, nday 11 11 !! ! 2004-01 (A.M. Treguier) new calculation based on adatrj 12 12 !! ! 2006-08 (G. Madec) surface module major update 13 !!---------------------------------------------------------------------- 13 !!---------------------------------------------------------------------- 14 14 15 15 !!---------------------------------------------------------------------- 16 16 !! day : calendar 17 !! 17 !! 18 18 !! ------------------------------- 19 19 !! ----------- WARNING ----------- … … 24 24 !! ----------- WARNING ----------- 25 25 !! ------------------------------- 26 !! 26 !! 27 27 !!---------------------------------------------------------------------- 28 28 USE dom_oce ! ocean space and time domain 29 29 USE phycst ! physical constants 30 30 USE in_out_manager ! I/O manager 31 USE iom ! 31 USE iom ! 32 32 USE ioipsl, ONLY : ymds2ju ! for calendar 33 33 USE prtctl ! Print control 34 USE restart !34 USE trc_oce, ONLY : lk_offline ! offline flag 35 35 USE timing ! Timing 36 USE restart ! restart 36 37 37 38 IMPLICIT NONE … … 40 41 PUBLIC day ! called by step.F90 41 42 PUBLIC day_init ! called by istate.F90 42 43 INTEGER :: nsecd, nsecd05, ndt, ndt05 43 PUBLIC day_mth ! Needed by TAM 44 45 INTEGER, PUBLIC :: nsecd, nsecd05, ndt, ndt05 ! (PUBLIC for TAM) 44 46 45 47 !!---------------------------------------------------------------------- … … 53 55 !!---------------------------------------------------------------------- 54 56 !! *** ROUTINE day_init *** 55 !! 56 !! ** Purpose : Initialization of the calendar values to their values 1 time step before nit000 57 !! 58 !! ** Purpose : Initialization of the calendar values to their values 1 time step before nit000 57 59 !! because day will be called at the beginning of step 58 60 !! … … 85 87 ndt05 = NINT(0.5 * rdttra(1)) 86 88 87 ! ==> clem: here we read the ocean restart for the date (only if it exists) 88 ! It is not clean and another solution should be found 89 CALL day_rst( nit000, 'READ' ) 90 ! ==> 91 92 ! set the calendar from ndastp (read in restart file and namelist) 89 IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 90 91 ! set the calandar from ndastp (read in restart file and namelist) 93 92 94 93 nyear = ndastp / 10000 95 94 nmonth = ( ndastp - (nyear * 10000) ) / 100 96 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 95 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 97 96 98 97 CALL ymds2ju( nyear, nmonth, nday, 0.0, fjulday ) ! we assume that we start run at 00:00 … … 102 101 nsec1jan000 = 0 103 102 CALL day_mth 104 103 105 104 IF ( nday == 0 ) THEN ! for ex if ndastp = ndate0 - 1 106 nmonth = nmonth - 1 105 nmonth = nmonth - 1 107 106 nday = nmonth_len(nmonth) 108 107 ENDIF … … 113 112 IF( nleapy == 1 ) CALL day_mth 114 113 ENDIF 115 114 116 115 ! day since january 1st 117 116 nday_year = nday + SUM( nmonth_len(1:nmonth - 1) ) 118 117 119 !compute number of days between last monday and today 118 !compute number of days between last monday and today 120 119 CALL ymds2ju( 1900, 01, 01, 0.0, zjul ) ! compute julian day value of 01.01.1900 (our reference that was a Monday) 121 inbday = NINT(fjulday - zjul) ! compute nb day between 01.01.1900 and current day 122 idweek = MOD(inbday, 7) ! compute nb day between last monday and current day 120 inbday = NINT(fjulday - zjul) ! compute nb day between 01.01.1900 and current day 121 idweek = MOD(inbday, 7) ! compute nb day between last monday and current day 123 122 124 123 ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step … … 142 141 !!---------------------------------------------------------------------- 143 142 !! *** ROUTINE day_init *** 144 !! 143 !! 145 144 !! ** Purpose : calendar values related to the months 146 145 !! … … 154 153 155 154 ! length of the month of the current year (from nleapy, read in namelist) 156 IF ( nleapy < 2 ) THEN 155 IF ( nleapy < 2 ) THEN 157 156 nmonth_len(:) = (/ 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 /) 158 157 nyear_len(:) = 365 … … 177 176 ! time since Jan 1st 0 1 2 ... 11 12 13 178 177 ! ---------*--|--*--|--*--| ... |--*--|--*--|--*--|-------------------------------------- 179 ! <---> <---> <---> ... <---> <---> <---> 178 ! <---> <---> <---> ... <---> <---> <---> 180 179 ! month number 0 1 2 ... 11 12 13 181 180 ! … … 190 189 nmonth_end(jm) = nmonth_end(jm-1) + nsecd * nmonth_len(jm) 191 190 END DO 192 ! 193 END SUBROUTINE 191 ! 192 END SUBROUTINE 194 193 195 194 … … 197 196 !!---------------------------------------------------------------------- 198 197 !! *** ROUTINE day *** 199 !! 198 !! 200 199 !! ** Purpose : Compute the date with a day iteration IF necessary. 201 200 !! … … 209 208 !! - adatrj : date in days since the beginning of the run 210 209 !! - nsec_year : current time of the year (in second since 00h, jan 1st) 211 !!---------------------------------------------------------------------- 210 !!---------------------------------------------------------------------- 212 211 INTEGER, INTENT(in) :: kt ! ocean time-step indices 213 212 ! … … 220 219 zprec = 0.1 / rday 221 220 ! ! New time-step 222 nsec_year = nsec_year + ndt 223 nsec_month = nsec_month + ndt 221 nsec_year = nsec_year + ndt 222 nsec_month = nsec_month + ndt 224 223 nsec_week = nsec_week + ndt 225 nsec_day = nsec_day + ndt 224 nsec_day = nsec_day + ndt 226 225 adatrj = adatrj + rdttra(1) / rday 227 226 fjulday = fjulday + rdttra(1) / rday 228 227 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 229 228 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error 230 229 231 230 IF( nsec_day > nsecd ) THEN ! New day 232 231 ! … … 261 260 262 261 IF( nsec_week > 7*nsecd ) nsec_week = ndt05 ! New week 263 262 264 263 IF(ln_ctl) THEN 265 264 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear … … 267 266 ENDIF 268 267 269 ! since we no longer call rst_opn, need to define nitrst here, used by ice restart routine 270 IF( kt == nit000 ) nitrst = nitend 271 IF( MOD( kt - 1, nstock ) == 0 ) THEN 272 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 273 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing 274 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 275 ENDIF 276 268 IF( .NOT. lk_offline ) CALL rst_opn( kt ) ! Open the restart file if needed and control lrst_oce 269 IF( lrst_oce ) CALL day_rst( kt, 'WRITE' ) ! write day restart information 270 ! 277 271 IF( nn_timing == 1 ) CALL timing_stop('day') 278 272 ! … … 372 366 ! 373 367 END SUBROUTINE day_rst 368 374 369 !!====================================================================== 375 370 END MODULE daymod -
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r7760 r8581 64 64 #endif 65 65 USE bdy_par 66 66 USE restart 67 68 67 69 IMPLICIT NONE 68 70 PRIVATE … … 357 359 IF( ln_ctl ) CALL prt_ctl_init ! Print control 358 360 CALL day_init ! model calendar (using both namelist and restart infos) 361 IF( ln_rstart ) CALL rst_read_open 359 362 360 363 CALL sbc_init ! Forcings : surface module … … 363 366 ! the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules. 364 367 ! This is not clean and should be changed in the future. 368 #if defined key_bdy 365 369 IF( lk_bdy ) CALL bdy_init 366 370 IF( lk_bdy ) CALL bdy_dta_init 367 371 ! ==> 372 #endif 368 373 369 374 IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler -
branches/2015/nemo_v3_6_STABLE/NEMOGCM/SETTE/sette.sh
r6459 r8581 88 88 # 89 89 # Compiler among those in NEMOGCM/ARCH 90 COMPILER= X64_ADA91 export BATCH_COMMAND_PAR=" llsubmit"90 COMPILER=openmpi_NAVITI_MERCATOR 91 export BATCH_COMMAND_PAR="qsub" 92 92 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 93 93 export INTERACT_FLAG="no" … … 143 143 # ORCA2_AGRIF_LIM :16 & 17 144 144 # 18 & 19 145 for config in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16145 for config in 11 146 146 147 147 do … … 897 897 set_namelist namelist_cfg cn_exp \"SAS\" 898 898 set_namelist namelist_cfg nn_it000 1 899 set_namelist namelist_cfg nn_itend 100900 set_namelist namelist_cfg nn_stock 50899 set_namelist namelist_cfg nn_itend 240 900 set_namelist namelist_cfg nn_stock 120 901 901 set_namelist namelist_cfg ln_ctl .false. 902 902 set_namelist namelist_cfg ln_clobber .true. … … 918 918 cd ${EXE_DIR} 919 919 set_namelist namelist_cfg cn_exp \"SAS\" 920 set_namelist namelist_cfg nn_it000 51921 set_namelist namelist_cfg nn_itend 100920 set_namelist namelist_cfg nn_it000 121 921 set_namelist namelist_cfg nn_itend 240 922 922 set_namelist namelist_cfg ln_ctl .false. 923 923 set_namelist namelist_cfg ln_clobber .true. … … 926 926 set_namelist namelist_cfg jpnj 4 927 927 set_namelist namelist_cfg jpnij 32 928 set_namelist namelist_cfg ln_rstart .true. 928 929 set_namelist namelist_cfg nn_rstctl 2 929 set_namelist namelist_cfg cn_ocerst_in \"SAS_00000050_restart\" 930 set_namelist namelist_cfg nn_date0 010106 931 set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\" 932 set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\" 930 933 for (( i=1; i<=$NPROC; i++)) ; do 931 934 L_NPROC=$(( $i - 1 )) 932 935 L_NPROC=`printf "%04d\n" ${L_NPROC}` 933 ln -sf ../LONG/SAS_00000050_restart_${L_NPROC}.nc . 936 ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc . 937 ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc . 934 938 done 935 939 if [ ${USING_MPMD} == "yes" ] ; then
Note: See TracChangeset
for help on using the changeset viewer.