Changeset 888 for trunk/NEMO/OPA_SRC/step.F90
- Timestamp:
- 2008-04-11T19:05:03+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/step.F90
r833 r888 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 … … 96 92 USE zpshde ! partial step: hor. derivative (zps_hde routine) 97 93 USE ice_oce ! sea-ice variable 98 #if defined key_lim3 99 USE icestp ! sea-ice time-stepping (ice_stp routine) 100 #endif 101 #if defined key_lim2 102 USE icestp_2 ! sea-ice time-stepping (ice_stp_2 routine) 103 #endif 94 104 95 USE diawri ! Standard run outputs (dia_wri routine) 105 96 USE trdicp ! Ocean momentum/tracers trends (trd_wri routine) … … 119 110 USE stpctl ! time stepping control (stp_ctl routine) 120 111 USE restart ! ocean restart (rst_wri routine) 121 USE cpl ! exchanges in coupled mode (cpl_stp routine)122 112 USE prtctl ! Print control (prt_ctl routine) 123 113 USE domvvl ! variable volume (dom_vvl routine) … … 137 127 !!---------------------------------------------------------------------- 138 128 !! OPA 9.0 , LOCEAN-IPSL (2005) 139 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/step.F90,v 1.35 2007/06/01 16:55:39 opalod Exp $129 !! $Id$ 140 130 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 141 131 !!---------------------------------------------------------------------- … … 166 156 !! * Arguments 167 157 #if defined key_agrif 168 INTEGER ::kstp ! ocean time-step index158 INTEGER :: kstp ! ocean time-step index 169 159 #else 170 INTEGER, INTENT( in ) ::kstp ! ocean time-step index160 INTEGER, INTENT(in) :: kstp ! ocean time-step index 171 161 #endif 172 173 !! * local declarations 162 INTEGER :: jk ! dummy loop indice 174 163 INTEGER :: indic ! error indicator if < 0 175 164 !! --------------------------------------------------------------------- … … 182 171 indic = 1 ! reset to no error condition 183 172 184 adatrj = adatrj + rdt/86400._wp185 186 173 CALL day( kstp ) ! Calendar 187 174 … … 189 176 190 177 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 191 ! Update data, open boundaries and Forcings178 ! Update data, open boundaries, surface boundary condition (including sea-ice) 192 179 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 193 180 194 181 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data 195 196 IF( lk_dtasal ) CALL dta_sal( kstp ) ! Salinity data 197 198 IF( lk_dtasst ) CALL dta_sst( kstp ) ! Sea Surface Temperature data 199 200 IF( lk_dtasss ) CALL dta_sss( kstp ) ! Sea Surface Salinity data 182 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data 183 184 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 201 185 202 186 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries 203 204 187 IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries 205 188 206 IF( .NOT. lk_core ) CALL tau( kstp ) ! wind stress 207 208 CALL flx_rnf( kstp ) ! runoff data 209 210 CALL flx( kstp ) ! heat and freshwater fluxes 211 212 #if defined key_lim3 213 CALL ice_stp( kstp ) ! sea-ice model (Update stress & fluxes) 214 #endif 215 #if defined key_lim2 216 CALL ice_stp_2( kstp ) ! sea-ice model (Update stress & fluxes) 217 #endif 218 219 CALL oce_sbc( kstp ) ! ocean surface boudaries 220 221 IF( ln_fwb ) CALL flx_fwb( kstp ) ! freshwater budget 222 223 IF( nclosea == 1 ) CALL flx_clo( kstp ) ! closed sea in the domain (update freshwater fluxes) 224 225 IF( kstp == nit000 ) THEN 226 IF( ninist == 1 ) THEN ! Output the initial state and forcings 227 CALL dia_wri_state( 'output.init' ) 228 ENDIF 229 ENDIF 230 231 IF(ln_ctl) THEN ! print mean trends (used for debugging) 232 CALL prt_ctl(tab2d_1=emp , clinfo1=' emp - : ', mask1=tmask, ovlap=1) 233 CALL prt_ctl(tab2d_1=emps , clinfo1=' emps - : ', mask1=tmask, ovlap=1) 234 CALL prt_ctl(tab2d_1=qt , clinfo1=' qt - : ', mask1=tmask, ovlap=1) 235 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1) 236 CALL prt_ctl(tab2d_1=runoff , clinfo1=' runoff : ', mask1=tmask, ovlap=1) 237 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask : ', mask1=tmask, ovlap=1, kdim=jpk) 238 CALL prt_ctl(tab3d_1=tn , clinfo1=' sst - : ', mask1=tmask, ovlap=1, kdim=1) 239 CALL prt_ctl(tab3d_1=sn , clinfo1=' sss - : ', mask1=tmask, ovlap=1, kdim=1) 240 CALL prt_ctl(tab2d_1=taux , clinfo1=' tau - x : ', mask1=umask, & 241 & tab2d_2=tauy , clinfo2=' - y : ', mask2=vmask,ovlap=1) 189 IF( ninist == 1 ) THEN ! Output the initial state and forcings 190 CALL dia_wri_state( 'output.init' ) 191 ninist = 0 242 192 ENDIF 243 193 … … 252 202 !----------------------------------------------------------------------- 253 203 254 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency204 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 255 205 256 206 ! ! Vertical eddy viscosity and diffusivity coefficients … … 267 217 ENDIF 268 218 269 IF( cp_cfg == "orca" ) THEN ! ORCA: Reduce vertical mixing in some specific areas 270 SELECT CASE ( jp_cfg ) 271 CASE ( 05 ) ! ORCA R2 configuration 272 avt (:,:,2) = avt (:,:,2) + 1.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 273 CASE ( 025 ) ! ORCA R025 configuration 274 avt (:,:,2) = avt (:,:,2) + 2.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 275 END SELECT 219 IF( nn_runoff /=0 ) THEN ! increase diffusivity at rivers mouths 220 DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + rn_avt_rnf * rnfmsk(:,:) ; END DO 276 221 ENDIF 277 222 278 223 IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity 279 224 280 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) &225 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & 281 226 & CALL zdf_ddm( kstp ) ! double diffusive mixing 282 227 … … 291 236 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 292 237 !----------------------------------------------------------------------- 293 294 238 IF( lk_ldfslp ) CALL ldf_slp( kstp, rhd, rn2 ) ! before slope of the lateral mixing 295 296 239 #if defined key_traldf_c2d 297 240 IF( lk_traldf_eiv ) CALL ldf_eiv( kstp ) ! eddy induced velocity coefficient 298 241 #endif 299 242 300 301 243 #if defined key_passivetrc 302 244 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 305 247 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 306 248 !----------------------------------------------------------------------- 307 308 249 CALL trc_stp( kstp, indic ) ! time-stepping 309 310 #endif 311 250 #endif 312 251 313 252 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 316 255 ! N.B. ua, va arrays are used as workspace in this section 317 256 !----------------------------------------------------------------------- 318 319 257 ta(:,:,:) = 0.e0 ! set tracer trends to zero 320 258 sa(:,:,:) = 0.e0 321 259 322 260 CALL tra_sbc ( kstp ) ! surface boundary condition 323 324 261 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 325 326 262 IF( lk_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 327 328 263 IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme 329 264 IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 330 331 265 IF( lk_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 332 333 266 CALL tra_adv ( kstp ) ! horizontal & vertical advection 334 335 267 IF( n_cla == 1 ) CALL tra_cla ( kstp ) ! Cross Land Advection (Update Hor. advection) 336 337 268 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 338 339 269 CALL tra_ldf ( kstp ) ! lateral mixing 340 270 #if defined key_agrif … … 342 272 #endif 343 273 CALL tra_zdf ( kstp ) ! vertical mixing 344 345 274 CALL tra_nxt( kstp ) ! tracer fields at next time step 346 347 275 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update the new (t,s) fields by non 348 276 ! ! penetrative convective adjustment … … 365 293 ! N.B. ta, sa arrays are used as workspace in this section 366 294 !----------------------------------------------------------------------- 367 368 369 295 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 370 296 va(:,:,:) = 0.e0 371 297 372 298 CALL dyn_adv( kstp ) ! advection (vector or flux form) 373 374 299 CALL dyn_vor( kstp ) ! vorticity term including Coriolis 375 376 300 CALL dyn_ldf( kstp ) ! lateral mixing 377 301 #if defined key_agrif … … 379 303 #endif 380 304 CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure 381 382 305 CALL dyn_zdf( kstp ) ! vertical diffusion 383 384 306 IF( lk_dynspg_rl ) THEN 385 307 IF( lk_obc ) CALL obc_spg( kstp ) ! surface pressure gradient at open boundaries 386 308 ENDIF 387 indic=0 388 !i bug lbc sur emp 389 CALL lbc_lnk( emp, 'T', 1. ) 390 !i 309 indic=0 391 310 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 392 393 311 CALL dyn_nxt( kstp ) ! lateral velocity at next time step 394 395 312 IF( lk_vvl ) CALL dom_vvl ! vertical mesh at next time step 396 313 … … 401 318 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 402 319 !----------------------------------------------------------------------- 403 404 320 CALL oc_fz_pt ! ocean surface freezing temperature 405 406 321 CALL div_cur( kstp ) ! Horizontal divergence & Relative vorticity 407 408 322 IF( n_cla == 1 ) CALL div_cla( kstp ) ! Cross Land Advection (Update Hor. divergence) 409 410 323 CALL wzv( kstp ) ! Vertical velocity 411 324 412 413 414 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 415 ! Control, and restarts 416 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 417 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 418 !----------------------------------------------------------------------- 419 ! ! Time loop: control and print 325 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 326 ! Control and restarts 327 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 420 328 CALL stp_ctl( kstp, indic ) 421 329 IF( indic < 0 ) CALL ctl_stop( 'step: indic < 0' ) 422 423 330 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 424 331 IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file … … 431 338 !----------------------------------------------------------------------- 432 339 433 IF ( nstop == 0 ) THEN ! Diagnostics340 IF( nstop == 0 ) THEN ! Diagnostics: 434 341 IF( lk_floats ) CALL flo_stp( kstp ) ! drifting Floats 435 342 IF( lk_trddyn ) CALL trd_dwr( kstp ) ! trends: dynamics … … 443 350 IF( lk_diafwb ) CALL dia_fwb( kstp ) ! Fresh water budget diagnostics 444 351 IF( ln_diaptr ) CALL dia_ptr( kstp ) ! Poleward TRansports diagnostics 445 446 ! ! Outputs 447 CALL dia_wri ( kstp, indic ) ! ocean model: outputs 352 ! ! outputs 353 CALL dia_wri( kstp, indic ) ! ocean model: outputs 448 354 ENDIF 449 355
Note: See TracChangeset
for help on using the changeset viewer.