Changeset 719 for trunk/NEMO/OPA_SRC/step.F90
- Timestamp:
- 2007-10-16T16:59:56+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/step.F90
- Property svn:keywords changed from Id to Author Date Id Revision
r709 r719 4 4 !! Time-stepping : manager of the ocean, tracer and ice time stepping 5 5 !!====================================================================== 6 !! History : ! 91-03 (G. Madec) Original code 6 !! History : ! 91-03 () Original code 7 !! ! 91-11 (G. Madec) 7 8 !! ! 92-06 (M. Imbard) add a first output record 8 9 !! ! 96-04 (G. Madec) introduction of dynspg … … 19 20 !! " " ! 06-01 (L. Debreu, C. Mazauric) Agrif implementation 20 21 !! " " ! 06-07 (S. Masson) restart using iom 21 !! " " ! 06-08 (G. Madec) surface module22 !!----------------------------------------------------------------------23 24 22 !!---------------------------------------------------------------------- 25 23 !! stp : OPA system time-stepping … … 32 30 USE cpl_oce ! coupled ocean-atmosphere variables 33 31 USE in_out_manager ! I/O manager 34 USE iom !32 USE iom 35 33 USE lbclnk 36 34 … … 39 37 USE dtatem ! ocean temperature data (dta_tem routine) 40 38 USE dtasal ! ocean salinity data (dta_sal routine) 41 USE sbcmod ! surface boundary condition (sbc routine) 42 USE sbcrnf ! surface boundary condition: runoff variables 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) 43 47 USE ocfzpt ! surface ocean freezing point (oc_fz_pt routine) 44 48 … … 93 97 USE zpshde ! partial step: hor. derivative (zps_hde routine) 94 98 USE ice_oce ! sea-ice variable 99 USE icestp ! sea-ice time-stepping (ice_stp routine) 95 100 96 101 USE diawri ! Standard run outputs (dia_wri routine) … … 111 116 USE stpctl ! time stepping control (stp_ctl routine) 112 117 USE restart ! ocean restart (rst_wri routine) 118 USE cpl ! exchanges in coupled mode (cpl_stp routine) 113 119 USE prtctl ! Print control (prt_ctl routine) 114 120 USE domvvl ! variable volume (dom_vvl routine) … … 128 134 !!---------------------------------------------------------------------- 129 135 !! OPA 9.0 , LOCEAN-IPSL (2005) 130 !! $ Id$136 !! $Header$ 131 137 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 132 138 !!---------------------------------------------------------------------- … … 155 161 !! -8- Outputs and diagnostics 156 162 !!---------------------------------------------------------------------- 163 !! * Arguments 157 164 #if defined key_agrif 158 INTEGER ::kstp ! ocean time-step index165 INTEGER :: kstp ! ocean time-step index 159 166 #else 160 INTEGER, INTENT( in) ::kstp ! ocean time-step index167 INTEGER, INTENT( in ) :: kstp ! ocean time-step index 161 168 #endif 162 INTEGER :: jk ! dummy loop indice 169 170 !! * local declarations 163 171 INTEGER :: indic ! error indicator if < 0 164 172 !! --------------------------------------------------------------------- … … 171 179 indic = 1 ! reset to no error condition 172 180 173 !!gm: attention n'est plus ds le step de gm174 181 adatrj = adatrj + rdt/86400._wp 175 !!gm: attention n'est plus ds le step de gm176 182 177 183 CALL day( kstp ) ! Calendar … … 180 186 181 187 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 182 ! Update data, open boundaries , surface boundary condition (including sea-ice)188 ! Update data, open boundaries and Forcings 183 189 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 184 190 185 191 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data 186 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data 187 188 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 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 189 198 190 199 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries 200 191 201 IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries 192 202 193 IF( ninist == 1 ) THEN ! Output the initial state and forcings 194 CALL dia_wri_state( 'output.init' ) 195 ninist = 0 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) 196 234 ENDIF 197 235 … … 206 244 !----------------------------------------------------------------------- 207 245 208 246 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 209 247 210 248 ! ! Vertical eddy viscosity and diffusivity coefficients … … 223 261 ENDIF 224 262 225 IF( nn_runoff /=0 ) THEN ! increase diffusivity at rivers mouths 226 DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + rn_avt_rnf * rnfmsk(:,:) ; END DO 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 270 ENDIF 228 271 229 272 IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity 230 273 231 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp 274 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp) & 232 275 & CALL zdf_ddm( kstp ) ! double diffusive mixing 233 276 … … 242 285 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 243 286 !----------------------------------------------------------------------- 287 244 288 IF( lk_ldfslp ) CALL ldf_slp( kstp, rhd, rn2 ) ! before slope of the lateral mixing 289 245 290 #if defined key_traldf_c2d 246 291 IF( lk_traldf_eiv ) CALL ldf_eiv( kstp ) ! eddy induced velocity coefficient 247 292 #endif 248 293 294 249 295 #if defined key_passivetrc 250 296 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 253 299 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 254 300 !----------------------------------------------------------------------- 301 255 302 CALL trc_stp( kstp, indic ) ! time-stepping 256 #endif 303 304 #endif 305 257 306 258 307 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 261 310 ! N.B. ua, va arrays are used as workspace in this section 262 311 !----------------------------------------------------------------------- 312 263 313 ta(:,:,:) = 0.e0 ! set tracer trends to zero 264 314 sa(:,:,:) = 0.e0 265 315 266 316 CALL tra_sbc ( kstp ) ! surface boundary condition 317 267 318 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 319 268 320 IF( lk_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 321 269 322 IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme 270 323 IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 324 271 325 IF( lk_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 326 272 327 CALL tra_adv ( kstp ) ! horizontal & vertical advection 328 273 329 IF( n_cla == 1 ) CALL tra_cla ( kstp ) ! Cross Land Advection (Update Hor. advection) 330 274 331 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 332 275 333 CALL tra_ldf ( kstp ) ! lateral mixing 276 334 #if defined key_agrif … … 278 336 #endif 279 337 CALL tra_zdf ( kstp ) ! vertical mixing 338 280 339 CALL tra_nxt( kstp ) ! tracer fields at next time step 340 281 341 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update the new (t,s) fields by non 282 342 ! ! penetrative convective adjustment … … 299 359 ! N.B. ta, sa arrays are used as workspace in this section 300 360 !----------------------------------------------------------------------- 361 362 301 363 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 302 364 va(:,:,:) = 0.e0 303 365 304 366 CALL dyn_adv( kstp ) ! advection (vector or flux form) 367 305 368 CALL dyn_vor( kstp ) ! vorticity term including Coriolis 369 306 370 CALL dyn_ldf( kstp ) ! lateral mixing 307 371 #if defined key_agrif … … 309 373 #endif 310 374 CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure 375 311 376 CALL dyn_zdf( kstp ) ! vertical diffusion 377 312 378 IF( lk_dynspg_rl ) THEN 313 379 IF( lk_obc ) CALL obc_spg( kstp ) ! surface pressure gradient at open boundaries 314 380 ENDIF 315 indic=0 381 indic=0 382 !i bug lbc sur emp 383 CALL lbc_lnk( emp, 'T', 1. ) 384 !i 316 385 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 386 317 387 CALL dyn_nxt( kstp ) ! lateral velocity at next time step 388 318 389 IF( lk_vvl ) CALL dom_vvl ! vertical mesh at next time step 319 390 … … 324 395 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 325 396 !----------------------------------------------------------------------- 397 326 398 CALL oc_fz_pt ! ocean surface freezing temperature 399 327 400 CALL div_cur( kstp ) ! Horizontal divergence & Relative vorticity 401 328 402 IF( n_cla == 1 ) CALL div_cla( kstp ) ! Cross Land Advection (Update Hor. divergence) 403 329 404 CALL wzv( kstp ) ! Vertical velocity 330 405 331 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 332 ! Control and restarts 333 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 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 334 414 CALL stp_ctl( kstp, indic ) 335 415 IF( indic < 0 ) CALL ctl_stop( 'step: indic < 0' ) 416 336 417 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 337 418 IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file … … 344 425 !----------------------------------------------------------------------- 345 426 346 IF ( nstop == 0 ) THEN ! Diagnostics:427 IF ( nstop == 0 ) THEN ! Diagnostics 347 428 IF( lk_floats ) CALL flo_stp( kstp ) ! drifting Floats 348 429 IF( lk_trddyn ) CALL trd_dwr( kstp ) ! trends: dynamics … … 356 437 IF( lk_diafwb ) CALL dia_fwb( kstp ) ! Fresh water budget diagnostics 357 438 IF( ln_diaptr ) CALL dia_ptr( kstp ) ! Poleward TRansports diagnostics 358 ! ! outputs 359 CALL dia_wri( kstp, indic ) ! ocean model: outputs 439 440 ! ! Outputs 441 CALL dia_wri ( kstp, indic ) ! ocean model: outputs 360 442 ENDIF 361 443
Note: See TracChangeset
for help on using the changeset viewer.