Changeset 703 for trunk/NEMO/OPA_SRC/step.F90
- Timestamp:
- 2007-10-10T10:14:32+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/step.F90
r699 r703 4 4 !! Time-stepping : manager of the ocean, tracer and ice time stepping 5 5 !!====================================================================== 6 !! History : ! 91-03 () Original code 7 !! ! 91-11 (G. Madec) 6 !! History : ! 91-03 (G. Madec) Original code 8 7 !! ! 92-06 (M. Imbard) add a first output record 9 8 !! ! 96-04 (G. Madec) introduction of dynspg … … 20 19 !! " " ! 06-01 (L. Debreu, C. Mazauric) Agrif implementation 21 20 !! " " ! 06-07 (S. Masson) restart using iom 21 !! " " ! 06-08 (G. Madec) surface module 22 !!---------------------------------------------------------------------- 23 22 24 !!---------------------------------------------------------------------- 23 25 !! stp : OPA system time-stepping … … 30 32 USE cpl_oce ! coupled ocean-atmosphere variables 31 33 USE in_out_manager ! I/O manager 32 USE iom 34 USE iom ! 33 35 USE lbclnk 34 36 … … 37 39 USE dtatem ! ocean temperature data (dta_tem routine) 38 40 USE dtasal ! ocean salinity data (dta_sal routine) 39 USE dtasst ! ocean sea surface temperature (dta_sst routine) 40 USE dtasss ! ocean sea surface salinity (dta_sss routine) 41 USE taumod ! surface stress (tau routine) 42 USE flxmod ! thermohaline fluxes (flx routine) 43 USE ocesbc ! thermohaline fluxes (oce_sbc routine) 44 USE flxrnf ! runoffs (flx_rnf routine) 45 USE flxfwb ! freshwater budget correction (flx_fwb routine) 46 USE closea ! closed sea freshwater budget (flx_clo routine) 41 USE sbcmod ! surface boundary condition (sbc routine) 42 USE sbcrnf ! surface boundary condition: runoff variables 47 43 USE ocfzpt ! surface ocean freezing point (oc_fz_pt routine) 48 44 … … 161 157 !! -8- Outputs and diagnostics 162 158 !!---------------------------------------------------------------------- 163 !! * Arguments164 159 #if defined key_agrif 165 INTEGER ::kstp ! ocean time-step index160 INTEGER :: kstp ! ocean time-step index 166 161 #else 167 INTEGER, INTENT( in ) ::kstp ! ocean time-step index162 INTEGER, INTENT(in) :: kstp ! ocean time-step index 168 163 #endif 169 170 !! * local declarations 164 INTEGER :: jk ! dummy loop indice 171 165 INTEGER :: indic ! error indicator if < 0 172 166 !! --------------------------------------------------------------------- … … 179 173 indic = 1 ! reset to no error condition 180 174 175 !!gm: attention n'est plus ds le step de gm 181 176 adatrj = adatrj + rdt/86400._wp 177 !!gm: attention n'est plus ds le step de gm 182 178 183 179 CALL day( kstp ) ! Calendar … … 186 182 187 183 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 188 ! Update data, open boundaries and Forcings184 ! Update data, open boundaries, surface boundary condition (including sea-ice) 189 185 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 190 186 191 187 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data 192 193 IF( lk_dtasal ) CALL dta_sal( kstp ) ! Salinity data 194 195 IF( lk_dtasst ) CALL dta_sst( kstp ) ! Sea Surface Temperature data 196 197 IF( lk_dtasss ) CALL dta_sss( kstp ) ! Sea Surface Salinity data 188 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data 189 190 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 198 191 199 192 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries 200 201 193 IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries 202 194 203 IF( .NOT. lk_core ) CALL tau( kstp ) ! wind stress 204 205 CALL flx_rnf( kstp ) ! runoff data 206 207 CALL flx( kstp ) ! heat and freshwater fluxes 208 209 IF( lk_ice_lim ) CALL ice_stp( kstp ) ! sea-ice model (Update stress & fluxes) 210 211 CALL oce_sbc( kstp ) ! ocean surface boudaries 212 213 IF( ln_fwb ) CALL flx_fwb( kstp ) ! freshwater budget 214 215 IF( nclosea == 1 ) CALL flx_clo( kstp ) ! closed sea in the domain (update freshwater fluxes) 216 217 IF( kstp == nit000 ) THEN 218 IF( ninist == 1 ) THEN ! Output the initial state and forcings 219 CALL dia_wri_state( 'output.init' ) 220 ENDIF 221 ENDIF 222 223 IF(ln_ctl) THEN ! print mean trends (used for debugging) 224 CALL prt_ctl(tab2d_1=emp , clinfo1=' emp - : ', mask1=tmask, ovlap=1) 225 CALL prt_ctl(tab2d_1=emps , clinfo1=' emps - : ', mask1=tmask, ovlap=1) 226 CALL prt_ctl(tab2d_1=qt , clinfo1=' qt - : ', mask1=tmask, ovlap=1) 227 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1) 228 CALL prt_ctl(tab2d_1=runoff , clinfo1=' runoff : ', mask1=tmask, ovlap=1) 229 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask : ', mask1=tmask, ovlap=1, kdim=jpk) 230 CALL prt_ctl(tab3d_1=tn , clinfo1=' sst - : ', mask1=tmask, ovlap=1, kdim=1) 231 CALL prt_ctl(tab3d_1=sn , clinfo1=' sss - : ', mask1=tmask, ovlap=1, kdim=1) 232 CALL prt_ctl(tab2d_1=taux , clinfo1=' tau - x : ', mask1=umask, & 233 & tab2d_2=tauy , clinfo2=' - y : ', mask2=vmask,ovlap=1) 195 IF( ninist == 1 ) THEN ! Output the initial state and forcings 196 CALL dia_wri_state( 'output.init' ) 197 ninist = 0 234 198 ENDIF 235 199 … … 244 208 !----------------------------------------------------------------------- 245 209 246 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency210 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 247 211 248 212 ! ! Vertical eddy viscosity and diffusivity coefficients … … 261 225 ENDIF 262 226 263 IF( cp_cfg == "orca" ) THEN ! ORCA: Reduce vertical mixing in some specific areas 264 SELECT CASE ( jp_cfg ) 265 CASE ( 05 ) ! ORCA R2 configuration 266 avt (:,:,2) = avt (:,:,2) + 1.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 267 CASE ( 025 ) ! ORCA R025 configuration 268 avt (:,:,2) = avt (:,:,2) + 2.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 269 END SELECT 227 IF( nn_runoff /=0 ) THEN ! increase diffusivity at rivers mouths 228 DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + rn_avt_rnf * rnfmsk(:,:) ; END DO 270 229 ENDIF 271 230 272 231 IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity 273 232 274 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) &233 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & 275 234 & CALL zdf_ddm( kstp ) ! double diffusive mixing 276 235 … … 285 244 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 286 245 !----------------------------------------------------------------------- 287 288 246 IF( lk_ldfslp ) CALL ldf_slp( kstp, rhd, rn2 ) ! before slope of the lateral mixing 289 290 247 #if defined key_traldf_c2d 291 248 IF( lk_traldf_eiv ) CALL ldf_eiv( kstp ) ! eddy induced velocity coefficient 292 249 #endif 293 250 294 295 251 #if defined key_passivetrc 296 252 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 299 255 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 300 256 !----------------------------------------------------------------------- 301 302 257 CALL trc_stp( kstp, indic ) ! time-stepping 303 304 #endif 305 258 #endif 306 259 307 260 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 310 263 ! N.B. ua, va arrays are used as workspace in this section 311 264 !----------------------------------------------------------------------- 312 313 265 ta(:,:,:) = 0.e0 ! set tracer trends to zero 314 266 sa(:,:,:) = 0.e0 315 267 316 268 CALL tra_sbc ( kstp ) ! surface boundary condition 317 318 269 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 319 320 270 IF( lk_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 321 322 271 IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme 323 272 IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 324 325 273 IF( lk_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 326 327 274 CALL tra_adv ( kstp ) ! horizontal & vertical advection 328 329 275 IF( n_cla == 1 ) CALL tra_cla ( kstp ) ! Cross Land Advection (Update Hor. advection) 330 331 276 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 332 333 277 CALL tra_ldf ( kstp ) ! lateral mixing 334 278 #if defined key_agrif … … 336 280 #endif 337 281 CALL tra_zdf ( kstp ) ! vertical mixing 338 339 282 CALL tra_nxt( kstp ) ! tracer fields at next time step 340 341 283 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update the new (t,s) fields by non 342 284 ! ! penetrative convective adjustment … … 359 301 ! N.B. ta, sa arrays are used as workspace in this section 360 302 !----------------------------------------------------------------------- 361 362 363 303 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 364 304 va(:,:,:) = 0.e0 365 305 366 306 CALL dyn_adv( kstp ) ! advection (vector or flux form) 367 368 307 CALL dyn_vor( kstp ) ! vorticity term including Coriolis 369 370 308 CALL dyn_ldf( kstp ) ! lateral mixing 371 309 #if defined key_agrif … … 373 311 #endif 374 312 CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure 375 376 313 CALL dyn_zdf( kstp ) ! vertical diffusion 377 378 314 IF( lk_dynspg_rl ) THEN 379 315 IF( lk_obc ) CALL obc_spg( kstp ) ! surface pressure gradient at open boundaries 380 316 ENDIF 381 indic=0 382 !i bug lbc sur emp 383 CALL lbc_lnk( emp, 'T', 1. ) 384 !i 317 indic=0 385 318 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 386 387 319 CALL dyn_nxt( kstp ) ! lateral velocity at next time step 388 389 320 IF( lk_vvl ) CALL dom_vvl ! vertical mesh at next time step 390 321 … … 395 326 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 396 327 !----------------------------------------------------------------------- 397 398 328 CALL oc_fz_pt ! ocean surface freezing temperature 399 400 329 CALL div_cur( kstp ) ! Horizontal divergence & Relative vorticity 401 402 330 IF( n_cla == 1 ) CALL div_cla( kstp ) ! Cross Land Advection (Update Hor. divergence) 403 404 331 CALL wzv( kstp ) ! Vertical velocity 405 332 406 407 408 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 409 ! Control, and restarts 410 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 411 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 412 !----------------------------------------------------------------------- 413 ! ! Time loop: control and print 333 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 334 ! Control and restarts 335 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 414 336 CALL stp_ctl( kstp, indic ) 415 337 IF( indic < 0 ) CALL ctl_stop( 'step: indic < 0' ) 416 417 338 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 418 339 IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file … … 425 346 !----------------------------------------------------------------------- 426 347 427 IF ( nstop == 0 ) THEN ! Diagnostics348 IF( nstop == 0 ) THEN ! Diagnostics: 428 349 IF( lk_floats ) CALL flo_stp( kstp ) ! drifting Floats 429 350 IF( lk_trddyn ) CALL trd_dwr( kstp ) ! trends: dynamics … … 437 358 IF( lk_diafwb ) CALL dia_fwb( kstp ) ! Fresh water budget diagnostics 438 359 IF( ln_diaptr ) CALL dia_ptr( kstp ) ! Poleward TRansports diagnostics 439 440 ! ! Outputs 441 CALL dia_wri ( kstp, indic ) ! ocean model: outputs 360 ! ! outputs 361 CALL dia_wri( kstp, indic ) ! ocean model: outputs 442 362 ENDIF 443 363
Note: See TracChangeset
for help on using the changeset viewer.