Changeset 6140 for trunk/NEMOGCM/NEMO/SAS_SRC
- Timestamp:
- 2015-12-21T12:35:23+01:00 (8 years ago)
- Location:
- trunk/NEMOGCM/NEMO/SAS_SRC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/SAS_SRC/daymod.F90
r5563 r6140 20 20 !! 21 21 !! we suppose that the time step is deviding the number of second of in a day 22 !! ---> MOD( rday, rdt tra(1)) == 022 !! ---> MOD( rday, rdt ) == 0 23 23 !! 24 24 !! ----------- WARNING ----------- … … 76 76 & 'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 77 77 ENDIF 78 ! all calendar staff is based on the fact that MOD( rday, rdt tra(1)) == 079 IF( MOD( rday , rdttra(1)) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' )80 IF( MOD( rday , 2.) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' )81 IF( MOD( rdt tra(1), 2.) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' )82 nsecd = NINT(rday 83 nsecd05 = NINT(0.5 * rday 84 ndt = NINT( rdt tra(1))85 ndt05 = NINT(0.5 * rdt tra(1))78 ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 79 IF( MOD( rday , rdt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 80 IF( MOD( rday , 2. ) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' ) 81 IF( MOD( rdt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' ) 82 nsecd = NINT(rday ) 83 nsecd05 = NINT(0.5 * rday ) 84 ndt = NINT( rdt ) 85 ndt05 = NINT(0.5 * rdt ) 86 86 87 87 ! ==> clem: here we read the ocean restart for the date (only if it exists) … … 224 224 nsec_week = nsec_week + ndt 225 225 nsec_day = nsec_day + ndt 226 adatrj = adatrj + rdt tra(1)/ rday227 fjulday = fjulday + rdt tra(1)/ rday226 adatrj = adatrj + rdt / rday 227 fjulday = fjulday + rdt / rday 228 228 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 229 229 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error … … 340 340 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 341 341 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 342 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday342 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 343 343 ! note this is wrong if time step has changed during run 344 344 ENDIF … … 346 346 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 347 347 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 348 adatrj = ( REAL( nit000-1, wp ) * rdt tra(1)) / rday348 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 349 349 ENDIF 350 350 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error -
trunk/NEMOGCM/NEMO/SAS_SRC/diawri.F90
r5930 r6140 36 36 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 37 37 USE in_out_manager ! I/O manager 38 USE diadimg ! dimg direct access file format output39 38 USE diaar5, ONLY : lk_diaar5 40 39 USE iom … … 61 60 62 61 !! * Substitutions 63 # include "zdfddm_substitute.h90"64 # include "domzgr_substitute.h90"65 62 # include "vectopt_loop_substitute.h90" 66 63 !!---------------------------------------------------------------------- … … 81 78 END FUNCTION dia_wri_alloc 82 79 83 #if defined key_dimgout84 !!----------------------------------------------------------------------85 !! 'key_dimgout' DIMG output file86 !!----------------------------------------------------------------------87 # include "diawri_dimg.h90"88 89 #else90 80 !!---------------------------------------------------------------------- 91 81 !! Default option NetCDF output file 92 82 !!---------------------------------------------------------------------- 93 # 83 #if defined key_iomput 94 84 !!---------------------------------------------------------------------- 95 85 !! 'key_iomput' use IOM library … … 106 96 !! ** Method : use iom_put 107 97 !!---------------------------------------------------------------------- 108 !! 109 INTEGER, INTENT( in ) :: kt ! ocean time-step index 98 INTEGER, INTENT(in) :: kt ! ocean time-step index 110 99 !!---------------------------------------------------------------------- 111 100 ! … … 140 129 INTEGER :: ierr ! error code return from allocation 141 130 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 142 REAL(wp) :: zsto, zout, zmax, zjulian , zdt! local scalars131 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars 143 132 !!---------------------------------------------------------------------- 144 133 ! … … 159 148 160 149 ! Define frequency of output and means 161 zdt = rdt162 IF( nacc == 1 ) zdt = rdtmin163 150 IF( ln_mskland ) THEN ; clop = "only(x)" ! put 1.e+20 on land (very expensive!!) 164 151 ELSE ; clop = "x" ! no use of the mask value (require less cpu time) 165 152 ENDIF 166 153 #if defined key_diainstant 167 zsto = nwrite * zdt154 zsto = nwrite * rdt 168 155 clop = "inst("//TRIM(clop)//")" 169 156 #else 170 zsto= zdt157 zsto=rdt 171 158 clop = "ave("//TRIM(clop)//")" 172 159 #endif 173 zout = nwrite * zdt174 zmax = ( nitend - nit000 + 1 ) * zdt160 zout = nwrite * rdt 161 zmax = ( nitend - nit000 + 1 ) * rdt 175 162 176 163 ! Define indices of the horizontal output zoom and vertical limit storage … … 214 201 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 215 202 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 216 & nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )203 & nit000-1, zjulian, rdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 217 204 CALL histvert( nid_T, "deptht", "Vertical T levels", & ! Vertical grid: gdept 218 205 & "m", ipk, gdept_1d, nz_T, "down" ) … … 226 213 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu 227 214 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 228 & nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )215 & nit000-1, zjulian, rdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 229 216 CALL histvert( nid_U, "depthu", "Vertical U levels", & ! Vertical grid: gdept 230 217 & "m", ipk, gdept_1d, nz_U, "down" ) … … 238 225 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv 239 226 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 240 & nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )227 & nit000-1, zjulian, rdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 241 228 CALL histvert( nid_V, "depthv", "Vertical V levels", & ! Vertical grid : gdept 242 229 & "m", ipk, gdept_1d, nz_V, "down" ) … … 334 321 ! 335 322 END SUBROUTINE dia_wri 336 # endif337 338 323 #endif 339 324 … … 358 343 INTEGER :: id_i , nz_i, nh_i 359 344 INTEGER, DIMENSION(1) :: idex ! local workspace 360 REAL(wp) :: zsto, zout, zmax, zjulian , zdt345 REAL(wp) :: zsto, zout, zmax, zjulian 361 346 !!---------------------------------------------------------------------- 362 347 ! … … 369 354 clname = cdfile_name 370 355 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname) 371 zdt = rdt372 356 zsto = rdt 373 357 clop = "inst(x)" ! no use of the mask value (require less cpu time) 374 358 zout = rdt 375 zmax = ( nitend - nit000 + 1 ) * zdt359 zmax = ( nitend - nit000 + 1 ) * rdt 376 360 377 361 IF(lwp) WRITE(numout,*) … … 388 372 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment 389 373 CALL histbeg( clname, jpi, glamt, jpj, gphit, & 390 1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit374 1, jpi, 1, jpj, nit000-1, zjulian, rdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 391 375 CALL histvert( id_i, "deptht", "Vertical T levels", & ! Vertical grid : gdept 392 376 "m", jpk, gdept_1d, nz_i, "down") … … 431 415 ! ----------------- 432 416 CALL histclo( id_i ) 433 #if ! defined key_iomput && ! defined key_dimgout417 #if ! defined key_iomput 434 418 IF( ninist /= 1 ) THEN 435 419 CALL histclo( nid_T ) -
trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r5510 r6140 184 184 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 185 185 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 186 & nn_bench, nn_timing 186 & nn_bench, nn_timing, nn_diacfl 187 187 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 188 188 & jpizoom, jpjzoom, jperio, ln_use_jattr -
trunk/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90
r5407 r6140 88 88 ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1) ! u-velocity 89 89 ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 90 IF( lk_vvl) e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! v-velocity90 IF( .NOT.ln_linssh ) e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! v-velocity 91 91 ELSE 92 92 ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1) ! u-velocity 93 93 ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 94 IF( lk_vvl) e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! v-velocity94 IF( .NOT.ln_linssh ) e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! v-velocity 95 95 ENDIF 96 96 ! … … 115 115 CALL prt_ctl(tab2d_1=ssv_m, clinfo1=' ssv_m - : ', mask1=vmask, ovlap=1 ) 116 116 CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' ssh_m - : ', mask1=tmask, ovlap=1 ) 117 IF( lk_vvl) CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m - : ', mask1=tmask, ovlap=1 )118 IF( ln_read_frq ) CALL prt_ctl(tab2d_1=frq_m, clinfo1=' frq_m - : ', mask1=tmask, ovlap=1 )117 IF( .NOT.ln_linssh ) CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m - : ', mask1=tmask, ovlap=1 ) 118 IF( ln_read_frq ) CALL prt_ctl(tab2d_1=frq_m, clinfo1=' frq_m - : ', mask1=tmask, ovlap=1 ) 119 119 ENDIF 120 120 ! … … 125 125 CALL iom_put( 'sss_m', sss_m ) 126 126 CALL iom_put( 'ssh_m', ssh_m ) 127 IF( lk_vvl) CALL iom_put( 'e3t_m', e3t_m )128 IF( ln_read_frq ) CALL iom_put( 'frq_m', frq_m )127 IF( .NOT.ln_linssh ) CALL iom_put( 'e3t_m', e3t_m ) 128 IF( ln_read_frq ) CALL iom_put( 'frq_m', frq_m ) 129 129 ENDIF 130 130 ! … … 216 216 IF( ln_3d_uve ) THEN 217 217 jf_usp = 1 ; jf_vsp = 2 ; jf_e3t = 3 ! define 3D fields index 218 nfld_3d = 2 + COUNT( (/ lk_vvl/) ) ! number of 3D fields to read218 nfld_3d = 2 + COUNT( (/.NOT.ln_linssh/) ) ! number of 3D fields to read 219 219 nfld_2d = 3 + COUNT( (/ln_read_frq/) ) ! number of 2D fields to read 220 220 ELSE 221 jf_usp = 4 ; jf_vsp = 5 ; jf_e3t = 6 ; jf_frq = 6 + COUNT( (/ lk_vvl/) ) ! update 2D fields index221 jf_usp = 4 ; jf_vsp = 5 ; jf_e3t = 6 ; jf_frq = 6 + COUNT( (/.NOT.ln_linssh/) ) ! update 2D fields index 222 222 nfld_3d = 0 ! no 3D fields to read 223 nfld_2d = 5 + COUNT( (/ lk_vvl/) ) + COUNT( (/ln_read_frq/) ) ! number of 2D fields to read223 nfld_2d = 5 + COUNT( (/.NOT.ln_linssh/) ) + COUNT( (/ln_read_frq/) ) ! number of 2D fields to read 224 224 ENDIF 225 225 … … 231 231 slf_3d(jf_usp) = sn_usp 232 232 slf_3d(jf_vsp) = sn_vsp 233 IF( lk_vvl) slf_3d(jf_e3t) = sn_e3t233 IF( .NOT.ln_linssh ) slf_3d(jf_e3t) = sn_e3t 234 234 ENDIF 235 235 … … 243 243 IF( .NOT. ln_3d_uve ) THEN 244 244 slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 245 IF( lk_vvl) slf_2d(jf_e3t) = sn_e3t245 IF( .NOT.ln_linssh ) slf_2d(jf_e3t) = sn_e3t 246 246 ENDIF 247 247 ENDIF -
trunk/NEMOGCM/NEMO/SAS_SRC/step.F90
r5510 r6140 16 16 USE oce ! ocean dynamics and tracers variables 17 17 USE dom_oce ! ocean space and time domain variables 18 USE in_out_manager ! I/O manager19 USE sbc_oce20 USE sbccpl21 USE iom !22 USE lbclnk23 #if defined key_iomput24 USE xios25 #endif26 27 18 USE daymod ! calendar (day routine) 28 19 USE sbc_oce ! surface boundary condition: fields 29 20 USE sbcmod ! surface boundary condition (sbc routine) 30 21 USE sbcrnf ! surface boundary condition: runoff variables 31 22 USE sbccpl ! surface boundary condition: coupled interface 32 23 USE eosbn2 ! equation of state (eos_bn2 routine) 33 34 24 USE diawri ! Standard run outputs (dia_wri routine) 35 USE stpctl ! time stepping control (stp_ctl routine)36 USE prtctl ! Print control (prt_ctl routine)37 38 USE timing ! Timing39 40 25 USE bdy_par ! clem: mandatory for LIM3 41 26 #if defined key_bdy 42 27 USE bdydta ! clem: mandatory for LIM3 28 #endif 29 USE stpctl ! time stepping control (stp_ctl routine) 30 ! 31 USE in_out_manager ! I/O manager 32 USE prtctl ! Print control (prt_ctl routine) 33 USE iom ! 34 USE lbclnk ! 35 USE timing ! Timing 36 #if defined key_iomput 37 USE xios 43 38 #endif 44 39 … … 46 41 PRIVATE 47 42 48 PUBLIC stp ! called by opa.F9043 PUBLIC stp ! called by nemogcm.F90 49 44 50 !! * Substitutions51 # include "domzgr_substitute.h90"52 # include "zdfddm_substitute.h90"53 45 !!---------------------------------------------------------------------- 54 46 !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Note: See TracChangeset
for help on using the changeset viewer.