- Timestamp:
- 2015-03-25T10:01:32+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
r3711 r5168 10 10 !! 8.0 ! 2001-09 (M. Levy, M. Ben Jelloul) istate_uvg 11 11 !! NEMO 1.0 ! 2003-08 (G. Madec, C. Talandier) F90: Free form, modules + EEL R5 12 !! - ! 2004-05 (A. Koch-Larrouy) istate_gyre 12 !! - ! 2004-05 (A. Koch-Larrouy) istate_gyre 13 13 !! 2.0 ! 2006-07 (S. Masson) distributed restart using iom 14 14 !! 3.3 ! 2010-10 (C. Ethe) merge TRC-TRA 15 !! 3.4 ! 2011-04 (G. Madec) Merge of dtatem and dtasal & suppression of tb,tn/sb,sn 15 !! 3.4 ! 2011-04 (G. Madec) Merge of dtatem and dtasal & suppression of tb,tn/sb,sn 16 16 !!---------------------------------------------------------------------- 17 17 … … 24 24 !! istate_uvg : initial velocity in geostropic balance 25 25 !!---------------------------------------------------------------------- 26 USE oce ! ocean dynamics and active tracers 27 USE dom_oce ! ocean space and time domain 26 USE oce ! ocean dynamics and active tracers 27 USE dom_oce ! ocean space and time domain 28 28 USE daymod ! calendar 29 29 USE eosbn2 ! eq. of state, Brunt Vaisala frequency (eos routine) … … 46 46 USE wrk_nemo ! Memory allocation 47 47 USE timing ! Timing 48 USE asminc 48 49 49 50 IMPLICIT NONE … … 65 66 !!---------------------------------------------------------------------- 66 67 !! *** ROUTINE istate_init *** 67 !! 68 !! 68 69 !! ** Purpose : Initialization of the dynamics and tracer fields. 69 70 !!---------------------------------------------------------------------- … … 83 84 rhd (:,:,: ) = 0.e0 84 85 rhop (:,:,: ) = 0.e0 85 rn2 (:,:,: ) = 0.e0 86 tsa (:,:,:,:) = 0.e0 86 rn2 (:,:,: ) = 0.e0 87 tsa (:,:,:,:) = 0.e0 87 88 88 89 IF( ln_rstart ) THEN ! Restart from a file … … 100 101 CALL day_init ! model calendar (using both namelist and restart infos) 101 102 ! ! Initialization of ocean to zero 102 ! before fields ! now fields 103 ! before fields ! now fields 103 104 sshb (:,:) = 0._wp ; sshn (:,:) = 0._wp 104 105 ub (:,:,:) = 0._wp ; un (:,:,:) = 0._wp 105 vb (:,:,:) = 0._wp ; vn (:,:,:) = 0._wp 106 vb (:,:,:) = 0._wp ; vn (:,:,:) = 0._wp 106 107 rotb (:,:,:) = 0._wp ; rotn (:,:,:) = 0._wp 107 108 hdivb(:,:,:) = 0._wp ; hdivn(:,:,:) = 0._wp … … 109 110 IF( cp_cfg == 'eel' ) THEN 110 111 CALL istate_eel ! EEL configuration : start from pre-defined U,V T-S fields 111 ELSEIF( cp_cfg == 'gyre' ) THEN 112 ELSEIF( cp_cfg == 'gyre' ) THEN 112 113 CALL istate_gyre ! GYRE configuration : start from pre-defined T-S fields 113 114 ELSEIF( ln_tsd_init ) THEN ! Initial T-S fields read in files … … 124 125 & rhd, gru , grv ) ! of t,s,rd at ocean bottom 125 126 #endif 126 ! 127 ! 127 128 ! - ML - sshn could be modified by istate_eel, so that initialization of fse3t_b is done here 128 129 IF( lk_vvl ) THEN … … 133 134 ! ! define e3u_b, e3v_b from e3t_b initialized in domzgr 134 135 CALL dom_vvl_2( nit000, fse3u_b(:,:,:), fse3v_b(:,:,:) ) 135 ! 136 ! 136 137 ENDIF 137 138 ! … … 146 147 ENDIF 147 148 ! 149 IF ( lk_asminc .AND. ln_asmdin ) THEN 150 neuler = 0 ! restart with an euler from the corrected background 151 ENDIF 152 148 153 IF( nn_timing == 1 ) CALL timing_stop('istate_init') 149 154 ! … … 153 158 !!--------------------------------------------------------------------- 154 159 !! *** ROUTINE istate_t_s *** 155 !! 156 !! ** Purpose : Intialization of the temperature field with an 160 !! 161 !! ** Purpose : Intialization of the temperature field with an 157 162 !! analytical profile or a file (i.e. in EEL configuration) 158 163 !! … … 184 189 !!---------------------------------------------------------------------- 185 190 !! *** ROUTINE istate_eel *** 186 !! 191 !! 187 192 !! ** Purpose : Initialization of the dynamics and tracers for EEL R5 188 193 !! configuration (channel with or without a topographic bump) … … 195 200 USE divcur ! hor. divergence & rel. vorticity (div_cur routine) 196 201 USE iom 197 202 198 203 INTEGER :: inum ! temporary logical unit 199 204 INTEGER :: ji, jj, jk ! dummy loop indices … … 207 212 !!---------------------------------------------------------------------- 208 213 209 SELECT CASE ( jp_cfg ) 214 SELECT CASE ( jp_cfg ) 210 215 ! ! ==================== 211 216 CASE ( 5 ) ! EEL R5 configuration … … 244 249 ! set the dynamics: U,V, hdiv, rot (and ssh if necessary) 245 250 ! ---------------- 246 ! Start EEL5 configuration with barotropic geostrophic velocities 251 ! Start EEL5 configuration with barotropic geostrophic velocities 247 252 ! according the sshb and sshn SSH imposed. 248 253 ! we assume a uniform grid (hence the use of e1t(1,1) for delta_y) 249 ! we use the Coriolis frequency at mid-channel. 254 ! we use the Coriolis frequency at mid-channel. 250 255 ub(:,:,:) = zueel * umask(:,:,:) 251 256 un(:,:,:) = ub(:,:,:) … … 254 259 ! 255 260 DO jj = 1, jpjglo 256 zssh(:,jj) = - (FLOAT(jj)- FLOAT(jpjglo-1)/2.)*zueel*e1t(1,1)*zfcor/grav 261 zssh(:,jj) = - (FLOAT(jj)- FLOAT(jpjglo-1)/2.)*zueel*e1t(1,1)*zfcor/grav 257 262 END DO 258 263 ! … … 273 278 sshn(:,:) = sshb(:,:) ! set now ssh to the before value 274 279 ! 275 IF( nn_rstssh /= 0 ) THEN 276 nn_rstssh = 0 ! hand-made initilization of ssh 280 IF( nn_rstssh /= 0 ) THEN 281 nn_rstssh = 0 ! hand-made initilization of ssh 277 282 CALL ctl_warn( 'istate_eel: force nn_rstssh = 0' ) 278 283 ENDIF … … 326 331 !!---------------------------------------------------------------------- 327 332 !! *** ROUTINE istate_gyre *** 328 !! 333 !! 329 334 !! ** Purpose : Initialization of the dynamics and tracers for GYRE 330 335 !! configuration (double gyre with rotated domain) … … 351 356 & * (-TANH( (500-fsdept(ji,jj,jk)) / 150 ) + 1) / 2 & 352 357 & + ( 15. * ( 1. - TANH( (fsdept(ji,jj,jk)-50.) / 1500.) ) & 353 & - 1.4 * TANH((fsdept(ji,jj,jk)-100.) / 100.) & 354 & + 7. * (1500. - fsdept(ji,jj,jk)) / 1500. ) & 358 & - 1.4 * TANH((fsdept(ji,jj,jk)-100.) / 100.) & 359 & + 7. * (1500. - fsdept(ji,jj,jk)) / 1500. ) & 355 360 & * (-TANH( (fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 356 361 tsn(ji,jj,jk,jp_tem) = tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) … … 363 368 & + 0.2 * TANH( (fsdept(ji,jj,jk) - 35. ) / 100. ) & 364 369 & + 0.2 * TANH( (fsdept(ji,jj,jk) - 1000.) / 5000.) ) & 365 & * (-TANH((fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 370 & * (-TANH((fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 366 371 tsn(ji,jj,jk,jp_sal) = tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk) 367 372 tsb(ji,jj,jk,jp_sal) = tsn(ji,jj,jk,jp_sal) … … 379 384 ! ---------------------- 380 385 CALL iom_open ( 'data_tem', inum ) 381 CALL iom_get ( inum, jpdom_data, 'votemper', tsn(:,:,:,jp_tem) ) 386 CALL iom_get ( inum, jpdom_data, 'votemper', tsn(:,:,:,jp_tem) ) 382 387 CALL iom_close( inum ) 383 388 384 tsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) * tmask(:,:,:) 389 tsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) * tmask(:,:,:) 385 390 tsb(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) 386 391 … … 388 393 ! ------------------- 389 394 CALL iom_open ( 'data_sal', inum ) 390 CALL iom_get ( inum, jpdom_data, 'vosaline', tsn(:,:,:,jp_sal) ) 395 CALL iom_get ( inum, jpdom_data, 'vosaline', tsn(:,:,:,jp_sal) ) 391 396 CALL iom_close( inum ) 392 397 393 tsn(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) * tmask(:,:,:) 398 tsn(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) * tmask(:,:,:) 394 399 tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) 395 400 … … 412 417 !! ** Purpose : Compute the geostrophic velocities from (tn,sn) fields 413 418 !! 414 !! ** Method : Using the hydrostatic hypothesis the now hydrostatic 419 !! ** Method : Using the hydrostatic hypothesis the now hydrostatic 415 420 !! pressure is computed by integrating the in-situ density from the 416 421 !! surface to the bottom. … … 429 434 CALL wrk_alloc( jpi, jpj, jpk, zprn) 430 435 ! 431 IF(lwp) WRITE(numout,*) 436 IF(lwp) WRITE(numout,*) 432 437 IF(lwp) WRITE(numout,*) 'istate_uvg : Start from Geostrophy' 433 438 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' … … 437 442 438 443 zalfg = 0.5 * grav * rau0 439 444 440 445 zprn(:,:,1) = zalfg * fse3w(:,:,1) * ( 1 + rhd(:,:,1) ) ! Surface value 441 446 … … 443 448 zprn(:,:,jk) = zprn(:,:,jk-1) & 444 449 & + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) ) 445 END DO 450 END DO 446 451 447 452 ! Compute geostrophic balance … … 485 490 CALL lbc_lnk( un, 'U', -1. ) 486 491 CALL lbc_lnk( vn, 'V', -1. ) 487 492 488 493 ub(:,:,:) = un(:,:,:) 489 494 vb(:,:,:) = vn(:,:,:) 490 495 491 496 ! WARNING !!!!! 492 497 ! after initializing u and v, we need to calculate the initial streamfunction bsf. … … 516 521 un(:,:,:) = ub(:,:,:) 517 522 vn(:,:,:) = vb(:,:,:) 518 523 519 524 ! Compute the divergence and curl 520 525
Note: See TracChangeset
for help on using the changeset viewer.