Changeset 359
- Timestamp:
- 2005-12-21T11:46:45+01:00 (19 years ago)
- Location:
- trunk/NEMO
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/C1D_SRC/diawri1d.F90
r355 r359 87 87 !! 8.5 ! 02-09 (G. Madec) F90: Free form and module 88 88 !! 9.0 ! 04-10 (C. Ethe) 1D Configuration 89 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 89 90 !!---------------------------------------------------------------------- 90 91 !! * Modules used … … 193 194 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 194 195 195 #if defined key_dynspg_fsc&& defined key_ice_lim196 #if ! defined key_dynspg_rl && defined key_ice_lim 196 197 ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 197 198 ! internal damping to Levitus that can be diagnosed from others … … 364 365 CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface temperature 365 366 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity 366 #if defined key_dynspg_fsc&& defined key_ice_lim367 #if ! defined key_dynspg_rl && defined key_ice_lim 367 368 CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:) , ndim_hT, ndex_hT ) ! ice=>ocean water flux 368 369 CALL histwrite( nid_T, "sowaflep", it, fmass(:,:) , ndim_hT, ndex_hT ) ! atmos=>ocean water flux -
trunk/NEMO/C1D_SRC/icestp1d.F90
r321 r359 227 227 !! ! 01-03 (D. Ludicone, E. Durand, G. Madec) free surf. 228 228 !! 2.0 ! 02-09 (G. Madec, C. Ethe) F90: Free form and module 229 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 229 230 !!---------------------------------------------------------------------- 230 231 !! * arguments … … 246 247 emps (:,:) = 0.e0 247 248 erp (:,:) = 0.e0 248 #if defined key_dynspg_fsc249 #if ! defined key_dynspg_rl 249 250 dmp (:,:) = 0.e0 250 251 #endif … … 262 263 qsr (:,:) = fsolar(:,:) ! solar flux 263 264 264 #if defined key_dynspg_fsc265 #if ! defined key_dynspg_rl 265 266 ! total concentration/dilution effect (use on SSS) 266 267 emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) + empold … … 313 314 !! History : 314 315 !! 9.0 ! 04-01 (G. Madec, C. Ethe) Original code 316 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 315 317 !!---------------------------------------------------------------------- 316 318 !! * Local declarations 317 319 INTEGER :: ji, jj ! dummy loop indices 318 320 REAL(wp) :: zerp, ztrp, zsrp 319 #if defined key_dynspg_fsc321 #if ! defined key_dynspg_rl 320 322 REAL(wp) :: zwei 321 323 REAL(wp) :: zerpplus(jpi,jpj), zerpminus(jpi,jpj) … … 342 344 zsrp = ztrp * ro0cpr * rauw ! (Kg/m2/s2) 343 345 344 #if defined key_dynspg_fsc346 #if ! defined key_dynspg_rl 345 347 ! Free-surface 346 348 -
trunk/NEMO/LIM_SRC/limflx.F90
r258 r359 72 72 REAL(wp) :: & 73 73 zinda , & ! switch for testing the values of ice concentration 74 z1mthcm , &! 1 - thcm74 z1mthcm ! 1 - thcm 75 75 !! zfcm1 , & ! solar heat fluxes 76 76 !! zfcm2 , & ! non solar heat fluxes 77 77 #if defined key_lim_fdd 78 REAL(wp) :: & 78 79 zfons, & ! salt exchanges at the ice/ocean interface 79 80 zpme ! freshwater exchanges at the ice/ocean interface 80 81 #else 82 REAL(wp) :: & 81 83 zprs , zfons, & ! salt exchanges at the ice/ocean interface 82 84 zpmess ! freshwater exchanges at the ice/ocean interface -
trunk/NEMO/OPA_SRC/DIA/diafwb.F90
r247 r359 4 4 !! Ocean diagnostics: freshwater budget 5 5 !!====================================================================== 6 #if ( defined key_orca_r2 || defined key_orca_r4 ) && defined key_dynspg_fsc&& ! defined key_coupled7 !!---------------------------------------------------------------------- 8 !! "key_dynspg_fsc" and "key_orca_r2 or 4"6 #if ( defined key_orca_r2 || defined key_orca_r4 ) && ! defined key_dynspg_rl && ! defined key_coupled 7 !!---------------------------------------------------------------------- 8 !! NOT "key_dynspg_rl" and "key_orca_r2 or 4" 9 9 !!---------------------------------------------------------------------- 10 10 !! dia_fwb : freshwater budget for global ocean configurations … … 61 61 !! 8.2 ! 01-02 (E. Durand) Original code 62 62 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 63 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 63 64 !!---------------------------------------------------------------------- 64 65 !! * Arguments -
trunk/NEMO/OPA_SRC/DIA/diaspr.F90
r247 r359 96 96 !! ! 98-02 (M. Guyon) FETI method 97 97 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 98 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 98 99 !!---------------------------------------------------------------------- 99 100 !! * Arguments … … 140 141 141 142 ! control 142 # if defined key_dynspg_fsc143 # if ! defined key_dynspg_rl 143 144 IF(lwp) WRITE(numout,cform_err) 144 145 IF(lwp) WRITE(numout,*) ' surface pressure already explicitly computed !!' -
trunk/NEMO/OPA_SRC/DIA/diawri.F90
r352 r359 98 98 !! ! 99-02 (E. Guilyardi) name of netCDF files + variables 99 99 !! 8.5 ! 02-09 (G. Madec) F90: Free form and module 100 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 100 101 !!---------------------------------------------------------------------- 101 102 !! * Modules used … … 237 238 CALL histdef( nid_T, "sosaline", "Sea Surface Salinity" , "PSU" , & ! sss 238 239 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 239 #if defined key_dynspg_fsc 240 #if defined key_dynspg_rl 241 CALL histdef( nid_T, "sobarstf","Barotropic StreamFunction" , "m3/s2" , & ! bsf 242 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 243 #else 240 244 CALL histdef( nid_T, "sossheig", "Sea Surface Height" , "m" , & ! ssh 241 245 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 242 #else 243 CALL histdef( nid_T, "sobarstf","Barotropic StreamFunction" , "m3/s2" , & ! bsf 244 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 245 #endif 246 #if defined key_dynspg_fsc && defined key_ice_lim 246 #endif 247 #if ! defined key_dynspg_rl && defined key_ice_lim 247 248 ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 248 249 ! internal damping to Levitus that can be diagnosed from others … … 325 326 CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! taux 326 327 & jpi, jpj, nh_U, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) 327 #if ! defined key_dynspg_fsc328 #if defined key_dynspg_rl 328 329 CALL histdef( nid_U, "sozospgx", "Zonal Surface Pressure Gradient" , "N/kg" , & ! spgu 329 330 & jpi, jpj, nh_U, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) … … 342 343 CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! tauy 343 344 & jpi, jpj, nh_V, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) 344 #if ! defined key_dynspg_fsc345 #if defined key_dynspg_rl 345 346 CALL histdef( nid_V, "somespgy", "Meridional Surface Pressure Grad." , "N/kg" , & ! spgv 346 347 & jpi, jpj, nh_V, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) … … 407 408 CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface temperature 408 409 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity 409 #if defined key_dynspg_fsc 410 #if defined key_dynspg_rl 411 CALL histwrite( nid_T, "sobarstf", it, bsfn , ndim_hT, ndex_hT ) ! barotropic streamfunction 412 #else 410 413 CALL histwrite( nid_T, "sossheig", it, sshn , ndim_hT, ndex_hT ) ! sea surface height 411 #else 412 CALL histwrite( nid_T, "sobarstf", it, bsfn , ndim_hT, ndex_hT ) ! barotropic streamfunction 413 #endif 414 #if defined key_dynspg_fsc && defined key_ice_lim 414 #endif 415 #if ! defined key_dynspg_rl && defined key_ice_lim 415 416 CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:) , ndim_hT, ndex_hT ) ! ice=>ocean water flux 416 417 CALL histwrite( nid_T, "sowaflep", it, fmass(:,:) , ndim_hT, ndex_hT ) ! atmos=>ocean water flux … … 460 461 #endif 461 462 CALL histwrite( nid_U, "sozotaux", it, taux , ndim_hU, ndex_hU ) ! i-wind stress 462 #if ! defined key_dynspg_fsc463 #if defined key_dynspg_rl 463 464 CALL lbc_lnk( spgu, 'U', -1. ) 464 465 CALL histwrite( nid_U, "sozospgx", it, spgu , ndim_hU, ndex_hU ) ! i-surf. press. grad. … … 471 472 #endif 472 473 CALL histwrite( nid_V, "sometauy", it, tauy , ndim_hV, ndex_hV ) ! j-wind stress 473 #if ! defined key_dynspg_fsc474 #if defined key_dynspg_rl 474 475 CALL lbc_lnk( spgv, 'V', -1. ) 475 476 CALL histwrite( nid_V, "somespgy", it, spgv , ndim_hV, ndex_hV ) ! j-surf. pressure grad. … … 534 535 !! 8.5 ! 02-06 (A.Bozec, E. Durand) Original code (diainit.F) 535 536 !! 9.0 ! 02-12 (G. Madec) merge of diabort and diainit, F90 537 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 536 538 !!---------------------------------------------------------------------- 537 539 !! * Modules used … … 584 586 CALL histdef( id_i, "votemper", "Temperature" , "C" , & ! temperature 585 587 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 588 #if defined key_dynspg_rl 589 CALL histdef( id_i, "sobarstf","Barotropic StreamFunction", "m3/s2" , & ! bsf 590 & jpi, jpj, nh_i, 1 , 1, 1 , nz_i, 32, clop, zsto, zout ) 591 #else 592 CALL histdef( id_i, "sossheig", "Sea Surface Height" , "m" , & ! ssh 593 & jpi, jpj, nh_i, 1 , 1, 1 , nz_i, 32, clop, zsto, zout ) 594 #endif 586 595 CALL histdef( id_i, "vozocrtx", "Zonal Current" , "m/s" , & ! zonal current 587 596 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) … … 615 624 CALL histwrite( id_i, "votemper", 1, tn , jpi*jpj*jpk, idex ) ! now temperature 616 625 CALL histwrite( id_i, "vosaline", 1, sn , jpi*jpj*jpk, idex ) ! now salinity 626 #if defined key_dynspg_rl 627 CALL histwrite( id_i, "sobarstf", 1, bsfn , jpi*jpj , idex ) ! barotropic streamfunction 628 #else 629 CALL histwrite( id_i, "sossheig", 1, sshn , jpi*jpj , idex ) ! sea surface height 630 #endif 617 631 CALL histwrite( id_i, "vozocrtx", 1, un , jpi*jpj*jpk, idex ) ! now i-velocity 618 632 CALL histwrite( id_i, "vomecrty", 1, vn , jpi*jpj*jpk, idex ) ! now j-velocity -
trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90
r320 r359 69 69 !! additions : 97-2002 ( Clipper Group ) dimg files 70 70 !! dec 2003 ( J.M. Molines) f90, mpp output for OPA9.0 71 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 71 72 !!---------------------------------------------------------------------- 72 73 !! * modules used … … 163 164 fsel(:,:,4 ) = fsel(:,:,4 ) + emp (:,:) 164 165 fsel(:,:,5 ) = fsel(:,:,5 ) + tb (:,:,1) - sst(:,:) 165 #if defined key_dynspg_fsc166 #if ! defined key_dynspg_rl 166 167 fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:) ! SSH 167 168 #else … … 240 241 fsel(:,:,5 ) = (tb (:,:,1) -sst(:,:)) *tmask(:,:,1) 241 242 242 #if defined key_dynspg_fsc243 #if ! defined key_dynspg_rl 243 244 fsel(:,:,6 ) = sshn(:,:) 244 245 #else -
trunk/NEMO/OPA_SRC/DOM/dom_oce.F90
r352 r359 182 182 rdtmax = 3600._wp , & !: maximum time step on tracers 183 183 rdth = 800._wp , & !: depth variation of tracer step 184 rdtbt = 90._wp , & !: barotropic time step for the dynamics (lk_dynspg_ts=T) 184 185 atfp = 0.1_wp , & !: asselin time filter parameter 185 186 atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) -
trunk/NEMO/OPA_SRC/DOM/domain.F90
r258 r359 68 68 !! ! 01-05 (E.Durand - G. Madec) insert closed sea 69 69 !! 8.5 ! 02-08 (G. Madec) F90: Free form and module 70 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 70 71 !!---------------------------------------------------------------------- 71 72 !! * Local declarations … … 93 94 ! Local depth or Inverse of the local depth of the water column at u- and v-points 94 95 ! ------------------------------ 95 #if defined key_dynspg_fsc96 96 ! Ocean depth at U- and V-points 97 97 hu(:,:) = 0. 98 98 hv(:,:) = 0. 99 100 99 DO jk = 1, jpk 101 100 hu(:,:) = hu(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 102 101 hv(:,:) = hv(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 103 102 END DO 104 # if defined key_trdvor105 103 ! Inverse of the local depth 106 104 hur(:,:) = fse3u(:,:,1) ! Lower bound : thickness of the first model level 107 105 hvr(:,:) = fse3v(:,:,1) 108 109 106 DO jk = 2, jpk ! Sum of the vertical scale factors 110 107 hur(:,:) = hur(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 111 108 hvr(:,:) = hvr(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 112 109 END DO 113 114 110 ! Compute and mask the inverse of the local depth 115 111 hur(:,:) = 1. / hur(:,:) * umask(:,:,1) 116 112 hvr(:,:) = 1. / hvr(:,:) * vmask(:,:,1) 117 # endif 118 119 #elif defined key_dynspg_rl 120 ! Inverse of the local depth 121 hur(:,:) = fse3u(:,:,1) ! Lower bound : thickness of the first model level 122 hvr(:,:) = fse3v(:,:,1) 123 124 DO jk = 2, jpk ! Sum of the vertical scale factors 125 hur(:,:) = hur(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 126 hvr(:,:) = hvr(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 127 END DO 128 129 ! Compute and mask the inverse of the local depth 130 hur(:,:) = 1. / hur(:,:) * umask(:,:,1) 131 hvr(:,:) = 1. / hvr(:,:) * vmask(:,:,1) 132 #endif 113 133 114 134 115 CALL dom_stp ! Time step … … 163 144 NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, ngrid , nmsh , & 164 145 & nacc , atfp , rdt , rdtmin , rdtmax, & 165 & rdth , nfice , nfbulk, nclosea146 & rdth , rdtbt , nfice , nfbulk , nclosea 166 147 NAMELIST/namcla/ n_cla 167 148 !!---------------------------------------------------------------------- … … 335 316 WRITE(numout,*) ' maximum time step on tracers rdtmax = ', rdtmax 336 317 WRITE(numout,*) ' depth variation tracer step rdth = ', rdth 318 WRITE(numout,*) ' barotropic time step rdtbt = ', rdtbt 337 319 ENDIF 338 320 -
trunk/NEMO/OPA_SRC/DOM/dommsk.F90
r291 r359 18 18 USE lib_mpp 19 19 USE solisl ! ??? 20 USE dynspg_fsc ! 21 USE dynspg_fsc_atsk ! 20 USE dynspg ! choice/control of key cpp for surface pressure gradient 22 21 23 22 IMPLICIT NONE … … 122 121 !! ! 01-09 (J.-M. Molines) Open boundaries 123 122 !! 8.5 ! 02-08 (G. Madec) F90: Free form and module 123 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 124 124 !!---------------------------------------------------------------------- 125 125 !! *Local declarations … … 265 265 266 266 ! Computation 267 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 267 IF( lk_dynspg_rl ) THEN 268 bmask(:,:) = fmask(:,:,1) ! elliptic equation is written at f-point 269 ELSE 268 270 bmask(:,:) = tmask(:,:,1) ! elliptic equation is written at t-point 269 ELSE270 bmask(:,:) = fmask(:,:,1) ! elliptic equation is written at f-point271 271 ENDIF 272 272 … … 285 285 ! north fold : 286 286 IF( nperio == 3 .OR. nperio == 4 ) THEN 287 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 287 IF( lk_dynspg_rl ) THEN 288 ! T-pt pivot and F-pt elliptic eq. : bmask set to 0. on rows jpj-1 and jpj 289 bmask(:,jpj-1) = 0.e0 290 bmask(:,jpj ) = 0.e0 291 ELSE 288 292 ! T-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj and on half jpjglo-1 row 289 293 DO ji = 1, jpi … … 292 296 bmask(ji,jpj ) = 0.e0 293 297 END DO 294 ELSE295 ! T-pt pivot and F-pt elliptic eq. : bmask set to 0. on rows jpj-1 and jpj296 bmask(:,jpj-1) = 0.e0297 bmask(:,jpj ) = 0.e0298 298 ENDIF 299 299 ENDIF 300 300 IF( nperio == 5 .OR. nperio == 6 ) THEN 301 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 302 ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj 303 bmask(:,jpj) = 0.e0 304 ELSE 301 IF( lk_dynspg_rl ) THEN 305 302 ! F-pt pivot and F-pt elliptic eq. : bmask set to 0. on row jpj and on half jpjglo-1 row 306 303 DO ji = 1, jpi … … 309 306 bmask(ji,jpj ) = 0.e0 310 307 END DO 308 ELSE 309 ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj 310 bmask(:,jpj) = 0.e0 311 311 ENDIF 312 312 ENDIF … … 323 323 ! north fold : bmask must be set to 0. on rows jpj-1 and jpj 324 324 IF( npolj == 3 .OR. npolj == 4 ) THEN 325 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 325 IF( lk_dynspg_rl ) THEN 326 DO ji = 1, nlci 327 bmask(ji,nlcj-1) = 0.e0 328 bmask(ji,nlcj ) = 0.e0 329 END DO 330 ELSE 326 331 DO ji = 1, nlci 327 332 ii = ji + nimpp - 1 … … 329 334 bmask(ji,nlcj ) = 0.e0 330 335 END DO 331 ELSE 336 ENDIF 337 ENDIF 338 IF( npolj == 5 .OR. npolj == 6 ) THEN 339 IF( lk_dynspg_rl ) THEN 332 340 DO ji = 1, nlci 333 bmask(ji,nlcj-1) = 0.e0 334 bmask(ji,nlcj ) = 0.e0 335 END DO 336 ENDIF 337 ENDIF 338 IF( npolj == 5 .OR. npolj == 6 ) THEN 339 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 340 DO ji = 1, nlci 341 ii = ji + nimpp - 1 342 bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * fpol(ii) 341 343 bmask(ji,nlcj ) = 0.e0 342 344 END DO 343 345 ELSE 344 346 DO ji = 1, nlci 345 ii = ji + nimpp - 1346 bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * fpol(ii)347 347 bmask(ji,nlcj ) = 0.e0 348 348 END DO -
trunk/NEMO/OPA_SRC/DYN/dynhpg.F90
r258 r359 28 28 !! * Accessibility 29 29 PUBLIC dyn_hpg ! routine called by step.F90 30 31 #if defined key_autotasking32 !!----------------------------------------------------------------------33 !! 'key_autotasking' : j-k-i loop (j-slab)34 !!----------------------------------------------------------------------35 LOGICAL, PUBLIC, PARAMETER :: lk_dynhpg_tsk = .TRUE. !: autotasked hpg flag36 LOGICAL, PUBLIC, PARAMETER :: lk_dynhpg = .FALSE. !: vector hpg flag37 #else38 !!----------------------------------------------------------------------39 !! default case : k-j-i loop (vector opt.)40 !!----------------------------------------------------------------------41 LOGICAL, PUBLIC, PARAMETER :: lk_dynhpg_tsk = .FALSE. !: autotasked hpg flag42 LOGICAL, PUBLIC, PARAMETER :: lk_dynhpg = .TRUE. !: vector hpg flag43 #endif44 30 45 31 !! * Substitutions -
trunk/NEMO/OPA_SRC/DYN/dynnxt.F90
r258 r359 36 36 !! After velocity is compute using a leap-frog scheme environment: 37 37 !! (ua,va) = (ub,vb) + 2 rdt (ua,va) 38 !! Note that if lk_dynspg_f sc=T, the time stepping has already been38 !! Note that if lk_dynspg_flt=T, the time stepping has already been 39 39 !! performed in dynspg module 40 40 !! Time filter applied on now horizontal velocity to avoid the … … 56 56 !! 8.5 ! 02-08 (G. Madec) F90: Free form and module 57 57 !! ! 02-10 (C. Talandier, A-M. Treguier) Open boundary cond. 58 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 58 59 !!---------------------------------------------------------------------- 59 60 !! * Arguments … … 88 89 ! Next velocity 89 90 ! ------------- 90 #if defined key_dynspg_f sc91 #if defined key_dynspg_flt 91 92 ! Leap-frog time stepping already done in dynspg.F routine 92 93 #else -
trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90
r358 r359 34 34 # include "vectopt_loop_substitute.h90" 35 35 !!---------------------------------------------------------------------- 36 !! OPA 9.0 , LODYC-IPSL (2005) 37 !!---------------------------------------------------------------------- 36 !! OPA 9.0 , LOCEAN-IPSL (2005) 37 !! $Header$ 38 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 39 !!---------------------------------------------------------------------- 40 38 41 39 42 CONTAINS -
trunk/NEMO/OPA_SRC/DYN/dynspg_rl.F90
r314 r359 18 18 USE ldfdyn_oce ! ocean dynamics: lateral physics 19 19 USE zdf_oce ! ocean vertical physics 20 USE trdmod ! ocean dynamics trends21 USE trdmod_oce ! ocean variables trends22 USE in_out_manager ! I/O manager23 20 USE sol_oce ! ocean elliptic solver 24 21 USE solpcg ! preconditionned conjugate gradient solver … … 30 27 USE lib_mpp ! distributed memory computing library 31 28 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 29 USE in_out_manager ! I/O manager 32 30 33 31 IMPLICIT NONE … … 36 34 !! * Accessibility 37 35 PUBLIC dyn_spg_rl ! called by step.F90 38 39 !! * Shared module variables40 LOGICAL, PUBLIC, PARAMETER :: lk_dynspg_rl = .TRUE. !: rigid-lid flag41 36 42 37 !! * Substitutions … … 80 75 !! 81 76 !! ** Action : - Update (ua,va) with the surf. pressure gradient trend 82 !! - Save the trends in (ztdua,ztdva) ('key_trddyn')83 77 !! 84 78 !! References : … … 97 91 !! ! 02-11 (C. Talandier, A-M Treguier) Open boundaries 98 92 !! 9.0 ! 04-08 (C. Talandier) New trends organization 93 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 99 94 !!--------------------------------------------------------------------- 100 !! * Modules used101 USE oce, ONLY : ztdua => ta, & ! use ta as 3D workspace102 ztdva => sa ! use sa as 3D workspace103 95 !! * Arguments 104 96 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 532 524 END DO 533 525 534 ! save the surface pressure gradient trends for diagnostic535 ! momentum trends536 IF( l_trddyn ) THEN537 DO jk = 1, jpkm1538 ztdua(:,:,jk) = - spgu(:,:)539 ztdva(:,:,jk) = - spgv(:,:)540 END DO541 542 CALL trd_mod(ztdua, ztdva, jpdtdldf, 'DYN', kt)543 ENDIF544 545 526 END SUBROUTINE dyn_spg_rl 546 527 … … 549 530 !! 'key_dynspg_rl' NO rigid lid 550 531 !!---------------------------------------------------------------------- 551 LOGICAL, PUBLIC, PARAMETER :: lk_dynspg_rl = .FALSE. !: rigid-lid flag552 532 CONTAINS 553 533 SUBROUTINE dyn_spg_rl( kt, kindic ) ! Empty routine -
trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r358 r359 39 39 # include "vectopt_loop_substitute.h90" 40 40 !!---------------------------------------------------------------------- 41 !! OPA 9.0 , LODYC-IPSL (2005) 41 !! OPA 9.0 , LOCEAN-IPSL (2005) 42 !! $Header$ 43 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 42 44 !!---------------------------------------------------------------------- 43 45 -
trunk/NEMO/OPA_SRC/SBC/flxfwb.F90
r247 r359 4 4 !! Ocean fluxes : domain averaged freshwater budget 5 5 !!====================================================================== 6 #if defined key_dynspg_fsc7 !!---------------------------------------------------------------------- 8 !! 'key_dynspg_fsc' No free surface with constant volume6 #if ! defined key_dynspg_rl 7 !!---------------------------------------------------------------------- 8 !! NOT 'key_dynspg_rl' Free surface formulation 9 9 !!---------------------------------------------------------------------- 10 10 !! flx_fwb : freshwater budget for global ocean configurations … … 245 245 !! History : 246 246 !! 9.0 ! 03-09 (G. Madec) Original code 247 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 247 248 !!---------------------------------------------------------------------- 248 249 !! * Local declarations … … 272 273 ENDIF 273 274 ! Option consistency 274 #if ! defined key_dynspg_fsc275 #if defined key_dynspg_rl 275 276 IF(lwp) WRITE ' Rigid-lid option, fwb correction is useless, but valid' 276 277 #endif -
trunk/NEMO/OPA_SRC/SBC/ocesbc.F90
r296 r359 46 46 qrp , & !: heat flux damping (w/m2) 47 47 erp !: evaporation damping (kg/m2/s = mm/s) 48 #if defined key_dynspg_fsc48 #if ! defined key_dynspg_rl 49 49 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 50 50 dmp !: internal dampind term … … 80 80 !! 1.0 ! 00-10 (O. Marti) Original code 81 81 !! 2.0 ! 02-12 (G. Madec) F90: Free form and module 82 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 82 83 !!---------------------------------------------------------------------- 83 84 !! * Arguments … … 101 102 emps (:,:) = 0.e0 102 103 erp (:,:) = 0.e0 103 #if defined key_dynspg_fsc104 #if ! defined key_dynspg_rl 104 105 dmp (:,:) = 0.e0 105 106 #endif … … 135 136 qsr(:,:) = fsolar(:,:) 136 137 137 #if defined key_dynspg_fsc138 #if ! defined key_dynspg_rl 138 139 ! total concentration/dilution effect (use on SSS) 139 140 emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) … … 190 191 !! ! 01-03 (D. Ludicone, E. Durand, G. Madec) free surf. 191 192 !! 2.0 ! 02-09 (G. Madec, C. Ethe) F90: Free form and module 193 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 192 194 !!---------------------------------------------------------------------- 193 195 !! * arguments … … 209 211 emps (:,:) = 0.e0 210 212 erp (:,:) = 0.e0 211 #if defined key_dynspg_fsc213 #if ! defined key_dynspg_rl 212 214 dmp (:,:) = 0.e0 213 215 #endif … … 227 229 qsr (:,:) = fsolar(:,:) ! solar flux 228 230 229 #if defined key_dynspg_fsc231 #if ! defined key_dynspg_rl 230 232 ! total concentration/dilution effect (use on SSS) 231 233 emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) + empold … … 393 395 !! ! 01-03 (D. Ludicone, E. Durand, G. Madec) free surf. 394 396 !! 2.0 ! 02-09 (G. Madec, C. Ethe) F90: Free form and module 397 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 395 398 !!---------------------------------------------------------------------- 396 399 !! * Modules used … … 430 433 emps (:,:) = 0.e0 431 434 erp (:,:) = 0.e0 432 #if defined key_dynspg_fsc435 #if ! defined key_dynspg_rl 433 436 dmp (:,:) = 0.e0 434 437 #endif … … 510 513 END DO 511 514 512 #if defined key_dynspg_fsc515 #if ! defined key_dynspg_rl 513 516 ! Free-surface 514 517 … … 756 759 !! History : 757 760 !! 9.0 ! 04-01 (G. Madec, C. Ethe) Original code 761 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 758 762 !!---------------------------------------------------------------------- 759 763 !! * Local declarations … … 762 766 REAL(wp) :: zerp, ztrp, zsrp 763 767 CHARACTER (len=71) :: charout 764 #if defined key_dynspg_fsc768 #if ! defined key_dynspg_rl 765 769 REAL(wp) :: zwei 766 770 REAL(wp) :: zerpplus(jpi,jpj), zerpminus(jpi,jpj) … … 798 802 ENDIF 799 803 800 #if defined key_dynspg_fsc804 #if ! defined key_dynspg_rl 801 805 ! Free-surface 802 806 -
trunk/NEMO/OPA_SRC/SOL/solfet.F90
r247 r359 37 37 !! Solve the ellipic equation for the barotropic stream function 38 38 !! system (default option) or the transport divergence system 39 !! (lk_dynspg_f sc=T) using a Finite Elements Tearing and39 !! (lk_dynspg_flt=T) using a Finite Elements Tearing and 40 40 !! Interconnecting (FETI) approach. 41 41 !! In the former case, the barotropic stream function trend has a -
trunk/NEMO/OPA_SRC/SOL/solmat.F90
r315 r359 19 19 USE lbclnk ! lateral boudary conditions 20 20 USE lib_mpp ! distributed memory computing 21 USE dynspg_rl22 USE dynspg_fsc23 21 24 22 IMPLICIT NONE … … 46 44 !! The matrix is built for the barotropic stream function system. 47 45 !! a diagonal preconditioning matrix is also defined. 48 !! * lk_dynspg_f sc=T: free surface formulation46 !! * lk_dynspg_flt=T: free surface formulation 49 47 !! The matrix is built for the divergence of the transport system 50 48 !! a diagonal preconditioning matrix is also defined. … … 67 65 !! 8.5 ! 02-08 (G. Madec) F90: Free form 68 66 !! ! 02-11 (C. Talandier, A-M. Treguier) Free surface & Open boundaries 67 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 69 68 !!---------------------------------------------------------------------- 70 69 !! * Local declarations … … 96 95 z2dt = 2. * rdt 97 96 98 #if defined key_dynspg_f sc&& ! defined key_obc99 !!cr IF( lk_dynspg_f sc .AND. .NOT.lk_obc ) THEN !bug missing lk_dynspg_fsc_atsk97 #if defined key_dynspg_flt && ! defined key_obc 98 !!cr IF( lk_dynspg_flt .AND. .NOT.lk_obc ) THEN !bug missing lk_dynspg_flt_atsk 100 99 101 100 ! defined the coefficients for free surface elliptic system … … 117 116 END DO 118 117 119 # elif defined key_dynspg_f sc&& defined key_obc120 !!cr ELSEIF( lk_dynspg_f sc .AND. lk_obc ) THEN !bug missing lk_dynspg_fsc_atsk118 # elif defined key_dynspg_flt && defined key_obc 119 !!cr ELSEIF( lk_dynspg_flt .AND. lk_obc ) THEN !bug missing lk_dynspg_flt_atsk 121 120 122 121 ! defined gcdmat in the case of open boundaries … … 200 199 ! account for the existence of the south symmetric bassin. 201 200 202 !!cr IF( .NOT.lk_dynspg_f sc ) THEN !bug missing lk_dynspg_fsc_atsk203 #if ! defined key_dynspg_f sc201 !!cr IF( .NOT.lk_dynspg_flt ) THEN !bug missing lk_dynspg_flt_atsk 202 #if ! defined key_dynspg_flt 204 203 IF( nperio == 2 ) THEN 205 204 DO ji = 1, jpi -
trunk/NEMO/OPA_SRC/SOL/solpcg.F90
r247 r359 38 38 !! ** Purpose : Solve the ellipic equation for the barotropic stream 39 39 !! function system (lk_dynspg_rl=T) or the transport divergence 40 !! system (lk_dynspg_f sc=T) using a diagonal preconditionned40 !! system (lk_dynspg_flt=T) using a diagonal preconditionned 41 41 !! conjugate gradient method. 42 42 !! In the former case, the barotropic stream function trend has a -
trunk/NEMO/OPA_SRC/SOL/solsor.F90
r247 r359 37 37 !! ** Purpose : Solve the ellipic equation for the barotropic stream 38 38 !! function system (lk_dynspg_rl=T) or the transport divergence 39 !! system (lk_dynspg_f sc=T) using a red-black successive-over-39 !! system (lk_dynspg_flt=T) using a red-black successive-over- 40 40 !! relaxation method. 41 41 !! In the former case, the barotropic stream function trend has a -
trunk/NEMO/OPA_SRC/SOL/solsor_e.F90
r313 r359 37 37 !! ** Purpose : Solve the ellipic equation for the barotropic stream 38 38 !! function system (lk_dynspg_rl=T) or the transport divergence 39 !! system (lk_dynspg_f sc=T) using a red-black successive-over-39 !! system (lk_dynspg_flt=T) using a red-black successive-over- 40 40 !! relaxation method. 41 41 !! In the former case, the barotropic stream function trend has a -
trunk/NEMO/OPA_SRC/SOL/solver.F90
r312 r359 19 19 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 20 20 USE lib_mpp 21 USE dynspg_rl 22 USE dynspg_fsc 23 USE dynspg_fsc_atsk 21 USE dynspg ! choice/control of key cpp for surface pressure gradient 24 22 25 23 IMPLICIT NONE … … 40 38 !! * default option: barotropic stream function system 41 39 !! and islands initialization (if lk_isl=T) 42 !! * lk_dynspg_f sc= T : transport divergence system. No specific40 !! * lk_dynspg_flt = T : transport divergence system. No specific 43 41 !! treatment of islands. 44 42 !! 45 43 !! ** Method : 46 44 !! - Compute the local depth of the water column at u- and v-point 47 !! (lk_dynspg_f sc= T) or its inverse (lk_dynspg_rl = T).45 !! (lk_dynspg_flt = T) or its inverse (lk_dynspg_rl = T). 48 46 !! The local depth of the water column is computed by summing 49 47 !! the vertical scale factors. For its inverse, the thickness of … … 64 62 !! u- and v-point. (lk_dynspg_rl = T) 65 63 !! - hu, hv : masked local depth at u- and v- points 66 !! (lk_dynspg_f sc= T)64 !! (lk_dynspg_flt = T) 67 65 !! - c_solver_pt : nature of the gridpoint at which the 68 66 !! solver is applied … … 77 75 !! ! 98-10 (G. Roullet, G. Madec) free surface 78 76 !! 9.0 ! 03-07 (G. Madec) free form, F90 77 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 79 78 !!---------------------------------------------------------------------- 80 79 !! * Local declarations … … 126 125 ENDIF 127 126 128 IF( lk_dynspg_f sc .OR. lk_dynspg_fsc_tsk) THEN127 IF( lk_dynspg_flt ) THEN 129 128 IF(lwp) WRITE(numout,*) 130 129 IF(lwp) WRITE(numout,*) ' free surface formulation' 131 130 IF( lk_isl ) THEN 132 131 IF(lwp) WRITE(numout,cform_err) 133 IF(lwp) WRITE(numout,*) ' key_islands inconsistent with key_dynspg_f sc'132 IF(lwp) WRITE(numout,*) ' key_islands inconsistent with key_dynspg_flt' 134 133 nstop = nstop + 1 135 134 ENDIF … … 139 138 ELSE 140 139 IF(lwp) WRITE(numout,cform_err) 141 IF(lwp) WRITE(numout,*) ' Chose at least one surface pressure gradient calculation: free surface or rigid-lid' 140 IF(lwp) WRITE(numout,*) ' Choose only one surface pressure gradient calculation: filtered or rigid-lid' 141 IF(lwp) WRITE(numout,*) ' Should not call this routine if dynspg_exp or dynspg_ts has been chosen' 142 142 nstop = nstop + 1 143 143 ENDIF 144 IF( ( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ).AND. lk_dynspg_rl ) THEN144 IF( lk_dynspg_flt .AND. lk_dynspg_rl ) THEN 145 145 IF(lwp) WRITE(numout,cform_err) 146 146 IF(lwp) WRITE(numout,*) ' Chose between free surface or rigid-lid, not both' -
trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90
r258 r359 22 22 USE in_out_manager ! I/O manager 23 23 USE diaptr ! poleward transport diagnostics 24 USE dynspg_fsc ! 25 USE dynspg_fsc_atsk ! 24 USE dynspg ! choice/control of key cpp for surface pressure gradient 26 25 USE prtctl ! Print control 27 26 … … 135 134 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 136 135 !! 9.0 ! 04-08 (C. Talandier) New trends organization 136 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 137 137 !!---------------------------------------------------------------------- 138 138 !! * Modules used … … 332 332 333 333 ! Surface value 334 IF( lk_dynspg_fsc ) THEN 335 ! free surface-constant volume 334 IF( lk_dynspg_rl ) THEN 335 ! rigid lid : flux set to zero 336 zwx(:,:, 1 ) = 0.e0 ; zwy(:,:, 1 ) = 0.e0 337 ELSE 338 ! free surface 336 339 zwx(:,:, 1 ) = zwn(:,:,1) * tn(:,:,1) 337 340 zwy(:,:, 1 ) = zwn(:,:,1) * sn(:,:,1) 338 ELSE339 ! rigid lid : flux set to zero340 zwx(:,:, 1 ) = 0.e0 ; zwy(:,:, 1 ) = 0.e0341 341 ENDIF 342 342 -
trunk/NEMO/OPA_SRC/TRA/traadv_cen2_atsk.h90
r258 r359 79 79 !! zcenu = centered flux = wn * mk(tn) 80 80 !! The surface boundary condition is : 81 !! rigid-lid (lk_dynspg_ frd= T) : zero advective flux82 !! free-surf (lk_dynspg_fsc = T): wn(:,:,1) * tn(:,:,1)81 !! rigid-lid (lk_dynspg_rl = T) : zero advective flux 82 !! free-surf : wn(:,:,1) * tn(:,:,1) 83 83 !! Add this trend now to the general trend of tracer (ta,sa): 84 84 !! (ta,sa) = (ta,sa) + ( zta , zsa ) … … 94 94 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 95 95 !! 9.0 ! 04-08 (C. Talandier) New trends organization 96 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 96 97 !!---------------------------------------------------------------------- 97 98 !! * Modules used … … 286 287 287 288 ! Surface value 288 IF( lk_dynspg_fsc_tsk ) THEN 289 ! free surface-constant volume 289 IF( lk_dynspg_rl ) THEN 290 ! rigid lid : flux set to zero 291 zwz(:,jj, 1 ) = 0.e0 ; zww(:,jj, 1 ) = 0.e0 292 ELSE 293 ! free surface 290 294 zwz(:,jj, 1 ) = zwn(:,jj,1) * tn(:,jj,1) 291 295 zww(:,jj, 1 ) = zwn(:,jj,1) * sn(:,jj,1) 292 ELSE293 ! rigid lid : flux set to zero294 zwz(:,jj, 1 ) = 0.e0 ; zww(:,jj, 1 ) = 0.e0295 296 ENDIF 296 297 -
trunk/NEMO/OPA_SRC/TRA/traadv_ctl.F90
r247 r359 9 9 !!---------------------------------------------------------------------- 10 10 !! * Modules used 11 USE oce ! ocean dynamics and active tracers12 11 USE dom_oce ! ocean space and time domain 13 12 USE in_out_manager ! I/O manager … … 26 25 ln_traadv_muscl2 = .FALSE. ! MUSCL2 scheme flag 27 26 28 !! * Substitutions29 # include "domzgr_substitute.h90"30 # include "vectopt_loop_substitute.h90"31 27 !!---------------------------------------------------------------------- 32 28 !! OPA 9.0 , LOCEAN-IPSL (2005) … … 47 43 !! 8.5 ! 02-11 (G. Madec) Original code 48 44 !!---------------------------------------------------------------------- 49 !! * Modules used50 USE traadv_tvd51 USE traadv_muscl52 USE traadv_muscl253 USE in_out_manager ! I/O manager54 55 45 !! * Local declarations 56 46 INTEGER :: ioptio -
trunk/NEMO/OPA_SRC/TRA/traadv_muscl.F90
r258 r359 15 15 USE trdmod_oce ! ocean variables trends 16 16 USE in_out_manager ! I/O manager 17 USE dynspg_fsc ! surface pressure gradient 18 USE dynspg_fsc_atsk ! autotasked surface pressure gradient 17 USE dynspg ! choice/control of key cpp for surface pressure gradient 19 18 USE trabbl ! tracers: bottom boundary layer 20 19 USE lib_mpp ! distribued memory computing … … 62 61 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 63 62 !! 9.0 ! 04-08 (C. Talandier) New trends organization 63 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 64 64 !!---------------------------------------------------------------------- 65 65 !! * modules used … … 369 369 END DO 370 370 ! surface values 371 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN ! free surface-constant volume 371 IF( lk_dynspg_rl ) THEN ! rigid lid : flux set to zero 372 zt1(:,:, 1 ) = 0.e0 373 zs1(:,:, 1 ) = 0.e0 374 ELSE ! free surface 372 375 zt1(:,:, 1 ) = zwn(:,:,1) * tb(:,:,1) 373 376 zs1(:,:, 1 ) = zwn(:,:,1) * sb(:,:,1) 374 ELSE ! rigid lid : flux set to zero375 zt1(:,:, 1 ) = 0.e0376 zs1(:,:, 1 ) = 0.e0377 377 ENDIF 378 378 -
trunk/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
r258 r359 15 15 USE trdmod_oce ! ocean variables trends 16 16 USE in_out_manager ! I/O manager 17 USE dynspg_fsc ! surface pressure gradient 18 USE dynspg_fsc_atsk ! autotasked surface pressure gradient 17 USE dynspg ! choice/control of key cpp for surface pressure gradient 19 18 USE trabbl ! tracers: bottom boundary layer 20 19 USE lib_mpp … … 62 61 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 63 62 !! 9.0 ! 04-08 (C. Talandier) New trends organization 63 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 64 64 !!---------------------------------------------------------------------- 65 65 !! * modules used … … 443 443 444 444 ! surface values 445 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN ! free surface-constant volume 445 IF( lk_dynspg_rl ) THEN ! rigid lid : flux set to zero 446 zt1(:,:, 1 ) = 0.e0 447 zs1(:,:, 1 ) = 0.e0 448 ELSE ! free surface 446 449 zt1(:,:, 1 ) = zwn(:,:,1) * tb(:,:,1) 447 450 zs1(:,:, 1 ) = zwn(:,:,1) * sb(:,:,1) 448 ELSE ! rigid lid : flux set to zero449 zt1(:,:, 1 ) = 0.e0450 zs1(:,:, 1 ) = 0.e0451 451 ENDIF 452 452 -
trunk/NEMO/OPA_SRC/TRA/traadv_tvd.F90
r282 r359 17 17 USE trdmod_oce ! ocean variables trends 18 18 USE in_out_manager ! I/O manager 19 USE dynspg_fsc ! surface pressure gradient 20 USE dynspg_fsc_atsk ! autotasked surface pressure gradient 19 USE dynspg ! choice/control of key cpp for surface pressure gradient 21 20 USE trabbl ! Advective term of BBL 22 21 USE lib_mpp … … 65 64 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 66 65 !! 9.0 ! 04-01 (A. de Miranda, G. Madec, J.M. Molines ): advective bbl 67 !! 9.0 ! 08-04 (S. Cravatte) add the i-, j- & k- trends computation 66 !! " ! 08-04 (S. Cravatte) add the i-, j- & k- trends computation 67 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 68 68 !!---------------------------------------------------------------------- 69 69 !! * Modules used … … 159 159 ! upstream tracer flux in the k direction 160 160 ! Surface value 161 IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN ! free surface-constant volume 161 IF( lk_dynspg_rl ) THEN ! rigid lid : flux set to zero 162 ztw(:,:,1) = 0.e0 163 zsw(:,:,1) = 0.e0 164 ELSE ! free surface 162 165 DO jj = 1, jpj 163 166 DO ji = 1, jpi … … 167 170 END DO 168 171 END DO 169 ELSE ! rigid lid : flux set to zero170 ztw(:,:,1) = 0.e0171 zsw(:,:,1) = 0.e0172 172 ENDIF 173 173 -
trunk/NEMO/OPA_SRC/istate.F90
r352 r359 78 78 rn2 (:,:,:) = 0.e0 79 79 80 #if defined key_dynspg_fsc81 ! free surface formulation82 sshb(:,:) = 0.e0 ! before sea-surface height83 sshn(:,:) = 0.e0 ! now sea-surface height84 #endif85 80 #if defined key_dynspg_rl 86 81 ! rigid-lid formulation … … 88 83 bsfn(:,:) = 0.e0 ! now barotropic stream-function 89 84 bsfd(:,:) = 0.e0 ! barotropic stream-function trend 90 #endif 85 #endif 86 ! free surface formulation 87 sshb(:,:) = 0.e0 ! before sea-surface height 88 sshn(:,:) = 0.e0 ! now sea-surface height 91 89 92 90 … … 222 220 !! 8.0 ! 01-09 (M. Levy, M. Ben Jelloul) read file for EEL 2 & 6 223 221 !! 9.0 ! 03-09 (G. Madec, C. Talandier) EEL 5 222 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 224 223 !!---------------------------------------------------------------------- 225 224 !! * Modules used … … 239 238 zh1, zh2, zslope, zcst ! temporary scalars 240 239 REAL(wp) :: & 241 zt1 = 12. e0,& ! surface temperature value (EEL R5)242 zt2 = 2. e0,& ! bottom temperature value (EEL R5)243 zsal = 35.5 240 zt1 = 12._wp, & ! surface temperature value (EEL R5) 241 zt2 = 2._wp, & ! bottom temperature value (EEL R5) 242 zsal = 35.5_wp ! constant salinity (EEL R2, R5 and R6) 244 243 REAL(wp) :: & 245 244 zdt, zdate0 ! temporary scalars … … 248 247 REAL(wp), DIMENSION(jpiglo,jpjglo) :: & 249 248 zlamt, zphit ! temporary workspace 250 # if defined key_dynspg_fsc249 # if ! defined key_dynspg_rl 251 250 REAL(wp), DIMENSION(jpiglo,jpjglo) :: & 252 251 zssh ! initial ssh over the global domain … … 290 289 291 290 292 # if defined key_dynspg_fsc291 # if ! defined key_dynspg_rl 293 292 ! set the dynamics: U,V, hdiv, rot (and ssh if necessary) 294 293 ! ---------------- … … 451 450 !! 8.1 ! 01-09 (M. Levy, M. Ben Jelloul) Original code 452 451 !! 8.5 ! 02-09 (G. Madec) F90: Free form 452 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 453 453 !!---------------------------------------------------------------------- 454 454 !! * Modules used 455 455 USE eosbn2 ! eq. of state, Brunt Vaisala frequency (eos routine) 456 USE dynspg_fsc ! surface pressure gradient (dyn_spg_fsc routine) 457 USE dynspg_fsc_atsk ! surface pressure gradient (dyn_spg_fsc_atsk routine) 458 USE dynspg_rl ! surface pressure gradient (dyn_spg_rl routine) 456 USE dynspg ! surface pressure gradient (dyn_spg routine) 459 457 USE divcur ! hor. divergence & rel. vorticity (div_cur routine) 460 458 USE lbclnk ! ocean lateral boundary condition (or mpp link) … … 484 482 DO jk = 2, jpkm1 485 483 zprn(:,:,jk) = zprn(:,:,jk-1) & 486 484 & + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) ) 487 485 END DO 488 486 … … 550 548 va(:,:,:) = vb(:,:,:) / rdt 551 549 552 ! calls dyn_spg. we assume euler time step, st rating from rest.550 ! calls dyn_spg. we assume euler time step, starting from rest. 553 551 indic = 0 554 ! ! surface pressure gradient 555 IF( lk_dynspg_fsc ) CALL dyn_spg_fsc ( nit000, indic ) ! free surface constant volume case 556 IF( lk_dynspg_fsc_tsk ) CALL dyn_spg_fsc_atsk( nit000, indic ) ! autotask free surface constant volume case 557 IF( lk_dynspg_rl ) CALL dyn_spg_rl ( nit000, indic ) ! rigid-lid case 552 CALL dyn_spg( nit000, indic ) ! surface pressure gradient 558 553 559 554 ! the new velocity is ua*rdt -
trunk/NEMO/OPA_SRC/oce.F90
r247 r359 6 6 !! History : 7 7 !! 8.5 ! 02-11 (G. Madec) F90: Free form and module 8 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 8 9 !!---------------------------------------------------------------------- 9 10 !! OPA 9.0 , LOCEAN-IPSL (2005) … … 62 63 #endif 63 64 64 #if defined key_dynspg_fsc || defined key_esopa 65 !! free surface - constant volume formulation 66 !! ------------------------------------------ 65 !! free surface 66 !! ------------ 67 67 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 68 68 sshb, sshn, & !: before, now sea surface height (meters) 69 hu, hv !: depth at u- and v-points (meters) 70 # if defined key_obc 69 hu , hv , & !: depth at u- and v-points (meters) 70 hur , hvr !: inverse of u and v-points ocean depth (1/m) 71 #if defined key_obc 71 72 REAL(wp), PUBLIC :: & !: 72 73 obcsurftot !: Total lateral surface of open boundaries … … 74 75 obcumask, obcvmask !: u-, v- Force filtering mask for the open 75 76 ! ! boundary condition on grad D 76 # endif77 # if defined key_trdvor78 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !:79 hur, hvr !: inverse of u and v-points ocean depth (1/m)80 # endif81 77 #endif 78 82 79 #if defined key_dynspg_rl || defined key_esopa 83 80 !! rigid-lid formulation 84 81 !! --------------------- 85 82 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 86 hur, hvr, & !: inverse of u and v-points ocean depth (1/m)87 83 bsfb, bsfn, & !: before, now barotropic streamfunction (m3/s) 88 84 bsfd !: now trend of barotropic streamfunction (m3/s2) -
trunk/NEMO/OPA_SRC/opa.F90
r300 r359 47 47 48 48 USE step ! OPA time-stepping (stp routine) 49 USE dynspg ! Control choice of surface pressure gradient schemes 49 50 USE prtctl ! Print control (prt_ctl_init routine) 50 51 USE ini1d ! re-initialization of u-v mask for the 1D configuration … … 100 101 !! " ! 04-08 (C. Talandier) New trends organization 101 102 !! " ! 05-06 (C. Ethe) Add the 1D configuration possibility 103 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 102 104 !!---------------------------------------------------------------------- 103 105 !! * Local declarations … … 162 164 IF( lk_obc ) CALL obc_init ! Open boundaries 163 165 164 CALL solver_init ! Elliptic solver 166 IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN 167 CALL solver_init ! Elliptic solver 168 ENDIF 165 169 166 170 CALL day( nit000 ) ! Calendar -
trunk/NEMO/OPA_SRC/par_ORCA_R05.h90
r323 r359 17 17 jpidta = 722, & !: 1st lateral dimension > or = to jpiglo 18 18 jpjdta = 511, & !: 2nd " " > or = to jpjglo 19 jpkdta = 31 , &!: number of levels > or = to jpkglo19 jpkdta = 31 !: number of levels > or = to jpkglo 20 20 21 21 #if defined key_antarctic 22 INTEGER, PARAMETER :: & 22 23 ! zoom domain size !!! * antarctic zoom * 23 24 jpiglo = jpidta, & !: 1st dimension of global domain --> i … … 33 34 34 35 #elif defined key_arctic 36 INTEGER, PARAMETER :: & 35 37 ! zoom domain size !!! * arctic zoom * 36 38 jpiglo = 562, & !: 1st dimension of global domain --> i … … 46 48 47 49 #else 50 INTEGER, PARAMETER :: & 48 51 ! global domain size !!! * full domain * 49 52 jpiglo = jpidta, & !: 1st dimension of global domain --> i -
trunk/NEMO/OPA_SRC/par_ORCA_R2.h90
r323 r359 17 17 jpidta = 182, & !: 1st lateral dimension ( >= jpiglo ) 18 18 jpjdta = 149, & !: 2nd " " ( >= jpjglo ) 19 jpkdta = 31 , & !: number of levels ( >= jpk )19 jpkdta = 31 !: number of levels ( >= jpk ) 20 20 21 21 #if defined key_antarctic 22 22 ! zoom domain size !!! * antarctic zoom * 23 INTEGER, PARAMETER :: & 23 24 jpiglo = jpidta, & !: 1st dimension of global domain --> i 24 25 jpjglo = 50, & !: 2nd " " --> j … … 34 35 #elif defined key_arctic 35 36 ! zoom domain size !!! * arctic zoom * 37 INTEGER, PARAMETER :: & 36 38 jpiglo = 142 , & !: 1st dimension of global domain --> i 37 39 jpjglo = jpjdta-97+1, & !: 2nd " " --> j … … 47 49 #elif defined key_cfg_1d 48 50 ! global domain size !!! * global domain * 51 INTEGER, PARAMETER :: & 49 52 jpiglo = 3 , & !: 1st dimension of global domain --> i 50 53 jpjglo = 3 , & !: 2nd " " --> j … … 71 74 #else 72 75 ! global domain size !!! * global domain * 76 INTEGER, PARAMETER :: & 73 77 jpiglo = jpidta, & !: 1st dimension of global domain --> i 74 78 jpjglo = jpjdta, & !: 2nd " " --> j -
trunk/NEMO/OPA_SRC/par_oce.F90
r311 r359 7 7 !! 4.0 ! 91 (Imbard, Levy, Madec) Original code 8 8 !! 9.0 ! 04-01 (G. Madec, J.-M. Molines) Free form and module 9 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 9 10 !!---------------------------------------------------------------------- 10 11 !! OPA 9.0 , LOCEAN-IPSL (2005) … … 196 197 #endif 197 198 199 #if defined key_autotasking 200 LOGICAL, PUBLIC, PARAMETER :: lk_jki = .TRUE. !: j-k-i loop flag 201 #else 202 LOGICAL, PUBLIC, PARAMETER :: lk_jki = .FALSE. !: k-j-i loop flag 203 #endif 204 198 205 !!====================================================================== 199 206 END MODULE par_oce -
trunk/NEMO/OPA_SRC/restart.F90
r352 r359 21 21 USE blk_oce ! bulk variables 22 22 USE flx_oce ! sea-ice/ocean forcings variables 23 24 USE dynspg_fsc, ONLY : lk_dynspg_fsc ! ( mpp version ) 25 USE dynspg_fsc_atsk, ONLY : lk_dynspg_fsc_tsk ! 23 USE dynspg ! choice/control of key cpp for surface pressure gradient 24 USE dynspg_ts ! free surface time splitting scheme variables 26 25 USE cpl_oce, ONLY : lk_cpl ! 27 26 … … 37 36 crestart = 'initial.nc' ! restart file name 38 37 !!---------------------------------------------------------------------- 38 !! OPA 9.0 , LOCEAN-IPSL (2005) 39 !! $Header$ 40 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 41 !!---------------------------------------------------------------------- 42 39 43 40 44 CONTAINS … … 69 73 !! ! 99-11 (M. Imbard) Original code 70 74 !! 8.5 ! 02-08 (G. Madec) F90: Free form 75 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 71 76 !!---------------------------------------------------------------------- 72 77 !! * Modules used … … 84 89 REAL(wp), DIMENSION(10) :: zinfo(10) 85 90 REAL(wp), DIMENSION(jpi,jpj) :: ztab 86 !!----------------------------------------------------------------------87 !! OPA 9.0 , LOCEAN-IPSL (2005)88 !! $Header$89 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt90 91 !!---------------------------------------------------------------------- 91 92 … … 164 165 ztab(:,:) = gcxb(1:jpi,1:jpj) 165 166 CALL restput( numwrs, 'gcxb' , jpi, jpj, 1 , 0, ztab ) 166 # if defined key_dynspg_fsc 167 CALL restput( numwrs, 'sshb' , jpi, jpj, 1 , 0, sshb ) ! free surface formulation (ssh) 168 CALL restput( numwrs, 'sshn' , jpi, jpj, 1 , 0, sshn ) 169 # else 167 # if defined key_dynspg_rl 170 168 CALL restput( numwrs, 'bsfb' , jpi, jpj, 1 , 0, bsfb ) ! Rigid-lid formulation (bsf) 171 169 CALL restput( numwrs, 'bsfn' , jpi, jpj, 1 , 0, bsfn ) 172 170 CALL restput( numwrs, 'bsfd' , jpi, jpj, 1 , 0, bsfd ) 171 # else 172 CALL restput( numwrs, 'sshb' , jpi, jpj, 1 , 0, sshb ) ! free surface formulation (ssh) 173 CALL restput( numwrs, 'sshn' , jpi, jpj, 1 , 0, sshn ) 174 # if defined key_dynspg_ts 175 CALL restput( numwrs, 'sshb_b' , jpi, jpj, 1 , 0, sshb_b ) ! free surface formulation (ssh) 176 CALL restput( numwrs, 'sshn_b' , jpi, jpj, 1 , 0, sshn_b ) ! issued from barotropic loop 177 CALL restput( numwrs, 'un_b' , jpi, jpj, 1 , 0, un_b ) ! horizontal transports 178 CALL restput( numwrs, 'vn_b' , jpi, jpj, 1 , 0, vn_b ) ! issued from barotropic loop 179 # endif 173 180 # endif 174 181 # if defined key_zdftke || defined key_esopa … … 212 219 !! - prognostic variables on the second record 213 220 !! - elliptic solver arrays 214 !! - barotropic stream function arrays ( default option)215 !! or free surface arrays ("key_dynspg_fsc" defined)221 !! - barotropic stream function arrays ("key_dynspg_rl" defined) 222 !! or free surface arrays 216 223 !! - tke arrays (lk_zdftke=T) 217 224 !! for this last three records, the previous characteristics … … 233 240 !! ! 99-05 (M. Imbard) Original code 234 241 !! 8.5 ! 02-09 (G. Madec) F90: Free form 242 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 235 243 !!---------------------------------------------------------------------- 236 244 !! * Modules used … … 239 247 !! * Local declarations 240 248 LOGICAL :: llog 241 CHARACTER (len=8 ) :: clvnames( 30)249 CHARACTER (len=8 ) :: clvnames(50) 242 250 CHARACTER (len=32) :: clname = 'restart' 243 251 INTEGER :: & … … 354 362 CALL restget( inum, 'gcx' , jpi, jpj, 1 , 0, llog, ztab ) 355 363 gcx(1:jpi,1:jpj) = ztab(:,:) 356 # if defined key_dynspg_fsc 357 CALL restget( inum, 'sshb' , jpi, jpj, 1 , 0, llog, sshb ) ! free surface formulation (ssh) 358 CALL restget( inum, 'sshn' , jpi, jpj, 1 , 0, llog, sshn ) 359 # else 364 # if defined key_dynspg_rl 360 365 CALL restget( inum, 'bsfb' , jpi, jpj, 1 , 0, llog, bsfb ) ! Rigid-lid formulation (bsf) 361 366 CALL restget( inum, 'bsfn' , jpi, jpj, 1 , 0, llog, bsfn ) 362 367 CALL restget( inum, 'bsfd' , jpi, jpj, 1 , 0, llog, bsfd ) 368 # else 369 CALL restget( inum, 'sshb' , jpi, jpj, 1 , 0, llog, sshb ) ! free surface formulation (ssh) 370 CALL restget( inum, 'sshn' , jpi, jpj, 1 , 0, llog, sshn ) 371 # if defined key_dynspg_ts 372 CALL restget( inum, 'sshb_b' , jpi, jpj, 1 , 0, llog, sshb_b ) ! free surface formulation (ssh) 373 CALL restget( inum, 'sshn_b' , jpi, jpj, 1 , 0, llog, sshn_b ) ! issued from barotropic loop 374 CALL restget( inum, 'un_b' , jpi, jpj, 1 , 0, llog, un_b ) ! horizontal transports 375 CALL restget( inum, 'vn_b' , jpi, jpj, 1 , 0, llog, vn_b ) ! issued from barotropic loop 376 # endif 363 377 # endif 364 378 # if defined key_zdftke || defined key_esopa … … 436 450 rotb(:,:,:)=rotn(:,:,:) 437 451 hdivb(:,:,:)=hdivn(:,:,:) 438 #if defined key_dynspg_fsc 452 #if defined key_dynspg_rl 453 ! rigid lid 454 bsfb(:,:)=bsfn(:,:) 455 #else 439 456 ! free surface formulation (eta) 440 457 sshb(:,:)=sshn(:,:) 441 #else442 ! rigid lid443 bsfb(:,:)=bsfn(:,:)444 458 #endif 445 459 ENDIF -
trunk/NEMO/OPA_SRC/restart_dimg.h90
r311 r359 2 2 !! *** restart_dimg.h90 *** 3 3 !!--------------------------------------------------------------------- 4 !! OPA 9.0 , LOCEAN-IPSL (2005) 5 !! $Header$ 6 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 7 !!---------------------------------------------------------------------- 4 8 5 9 SUBROUTINE rst_write(kt) … … 24 28 !! ! 99-11 (M. Imbard) NetCDF FORMAT with ioipsl 25 29 !! 8.5 ! 03-06 (J.M. Molines) F90: Free form, mpp support 30 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 26 31 !!---------------------------------------------------------------------- 27 32 !! * Arguments … … 40 45 41 46 REAL(wp), DIMENSION( 1) :: zfice, zfblk ! used only in case of ice & bulk 42 !!----------------------------------------------------------------------43 !! OPA 9.0 , LOCEAN-IPSL (2005)44 !! $Header$45 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt46 47 !!---------------------------------------------------------------------- 47 48 … … 88 89 IF ( lk_ice_lim ) ios1 = 1 89 90 IF ( l_bulk ) ios2 = 1 90 IF ( lk_dynspg_f sc .OR. lk_dynspg_fsc_tsk) ios3 = 191 IF ( lk_dynspg_flt ) ios3 = 1 91 92 IF ( lk_cpl ) ios4 = 1 92 93 … … 102 103 103 104 ! 'before' fields 104 105 DO jk = 1, jpk 106 WRITE(inum,REC=irec) ub(:,:,jk) 107 irec = irec +1 108 END DO 109 110 DO jk = 1, jpk 111 WRITE(inum,REC=irec) vb(:,:,jk) 112 irec = irec +1 113 END DO 114 115 DO jk = 1, jpk 116 WRITE(inum,REC=irec) tb(:,:,jk) 117 irec = irec +1 118 END DO 119 120 DO jk = 1, jpk 121 WRITE(inum,REC=irec) sb(:,:,jk) 122 irec = irec +1 123 END DO 124 125 DO jk = 1, jpk 126 WRITE(inum,REC=irec) rotb(:,:,jk) 127 irec = irec +1 128 END DO 129 130 DO jk = 1, jpk 131 WRITE(inum,REC=irec) hdivb(:,:,jk) 132 irec = irec +1 105 DO jk = 1, jpk 106 WRITE(inum,REC=irec) ub(:,:,jk) ; irec = irec +1 107 END DO 108 DO jk = 1, jpk 109 WRITE(inum,REC=irec) vb(:,:,jk) ; irec = irec +1 110 END DO 111 DO jk = 1, jpk 112 WRITE(inum,REC=irec) tb(:,:,jk) ; irec = irec +1 113 END DO 114 DO jk = 1, jpk 115 WRITE(inum,REC=irec) sb(:,:,jk) ; irec = irec +1 116 END DO 117 DO jk = 1, jpk 118 WRITE(inum,REC=irec) rotb(:,:,jk) ; irec = irec +1 119 END DO 120 DO jk = 1, jpk 121 WRITE(inum,REC=irec) hdivb(:,:,jk) ; irec = irec +1 133 122 END DO 134 123 135 124 ! 'now' fields 136 137 DO jk = 1, jpk 138 WRITE(inum,REC=irec) un(:,:,jk) 139 irec = irec +1 140 END DO 141 142 DO jk = 1, jpk 143 WRITE(inum,REC=irec) vn(:,:,jk) 144 irec = irec +1 145 END DO 146 147 DO jk = 1, jpk 148 WRITE(inum,REC=irec) tn(:,:,jk) 149 irec = irec +1 150 END DO 151 152 DO jk = 1, jpk 153 WRITE(inum,REC=irec) sn(:,:,jk) 154 irec = irec +1 155 END DO 156 157 DO jk = 1, jpk 158 WRITE(inum,REC=irec) rotn(:,:,jk) 159 irec = irec +1 160 END DO 161 162 DO jk = 1, jpk 163 WRITE(inum,REC=irec) hdivn(:,:,jk) 164 irec = irec +1 125 DO jk = 1, jpk 126 WRITE(inum,REC=irec) un(:,:,jk) ; irec = irec +1 127 END DO 128 DO jk = 1, jpk 129 WRITE(inum,REC=irec) vn(:,:,jk) ; irec = irec +1 130 END DO 131 DO jk = 1, jpk 132 WRITE(inum,REC=irec) tn(:,:,jk) ; irec = irec +1 133 END DO 134 DO jk = 1, jpk 135 WRITE(inum,REC=irec) sn(:,:,jk) ; irec = irec +1 136 END DO 137 DO jk = 1, jpk 138 WRITE(inum,REC=irec) rotn(:,:,jk) ; irec = irec +1 139 END DO 140 DO jk = 1, jpk 141 WRITE(inum,REC=irec) hdivn(:,:,jk) ; irec = irec +1 165 142 END DO 166 143 167 144 ! elliptic solver arrays 168 WRITE(inum,REC=irec ) gcx(1:jpi,1:jpj) 169 irec = irec +1170 171 WRITE(inum,REC=irec ) gcxb(1:jpi,1:jpj)172 irec = irec +1173 174 #if defined key_dynspg_fsc 175 145 WRITE(inum,REC=irec ) gcx(1:jpi,1:jpj) ; irec = irec +1 146 WRITE(inum,REC=irec ) gcxb(1:jpi,1:jpj) ; irec = irec +1 147 #if defined key_dynspg_rl 148 ! Rigid-lid formulation (bsf) 149 WRITE(inum,REC=irec ) bsfb(:,:) ; irec = irec +1 150 WRITE(inum,REC=irec ) bsfn(:,:) ; irec = irec +1 151 WRITE(inum,REC=irec ) bsfd(:,:) ; irec = irec +1 152 # else 176 153 ! free surface formulation (ssh) 177 178 WRITE(inum,REC=irec ) sshb(:,:) 179 irec = irec +1 180 181 WRITE(inum,REC=irec ) sshn(:,:) 182 irec = irec +1 183 #else 184 185 ! Rigid-lid formulation (bsf) 186 187 WRITE(inum,REC=irec ) bsfb(:,:) 188 irec = irec +1 189 190 WRITE(inum,REC=irec ) bsfn(:,:) 191 irec = irec +1 192 193 WRITE(inum,REC=irec ) bsfd(:,:) 194 irec = irec +1 195 154 WRITE(inum,REC=irec ) sshb(:,:) ; irec = irec +1 155 WRITE(inum,REC=irec ) sshn(:,:) ; irec = irec +1 156 # if defined key_dynspg_ts 157 ! free surface formulation issued from barotropic loop 158 WRITE(inum,REC=irec ) sshb_b(:,:) ; irec = irec +1 159 WRITE(inum,REC=irec ) sshn_b(:,:) ; irec = irec +1 160 161 ! horizontal transports issued from barotropic loop 162 WRITE(inum,REC=irec) un_b(:,:) ; irec = irec +1 163 WRITE(inum,REC=irec) vn_b(:,:) ; irec = irec +1 164 # endif 196 165 #endif 197 166 198 167 ! TKE arrays 199 200 168 #if defined key_zdftke 201 169 DO jk = 1, jpk 202 WRITE(inum,REC=irec) en(:,:,jk) ;irec = irec + 1170 WRITE(inum,REC=irec) en(:,:,jk) ; irec = irec + 1 203 171 END DO 204 172 #endif … … 206 174 #if defined key_ice_lim 207 175 zfice(1) = FLOAT( nfice ) ! Louvain La Neuve Sea Ice Model 208 WRITE(inum,REC=irec) zfice(:) ;irec = irec + 1209 WRITE(inum,REC=irec) sst_io(:,:) ;irec = irec + 1210 WRITE(inum,REC=irec) sss_io(:,:) ;irec = irec + 1211 WRITE(inum,REC=irec) u_io (:,:) ;irec = irec + 1212 WRITE(inum,REC=irec) v_io (:,:) ;irec = irec + 1176 WRITE(inum,REC=irec) zfice(:) ; irec = irec + 1 177 WRITE(inum,REC=irec) sst_io(:,:) ; irec = irec + 1 178 WRITE(inum,REC=irec) sss_io(:,:) ; irec = irec + 1 179 WRITE(inum,REC=irec) u_io (:,:) ; irec = irec + 1 180 WRITE(inum,REC=irec) v_io (:,:) ; irec = irec + 1 213 181 # if defined key_coupled 214 WRITE(inum,REC=irec) alb_ice(:,:) ; irec = irec + 1182 WRITE(inum,REC=irec) alb_ice(:,:) ; irec = irec + 1 215 183 # endif 216 184 #endif 217 185 # if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 218 186 zfblk(1) = FLOAT( nfbulk ) ! Bulk 219 WRITE(inum,REC=irec) zfblk(:) ; irec = irec + 1220 WRITE(inum,REC=irec) gsst(:,:) ; irec = irec + 1187 WRITE(inum,REC=irec) zfblk(:) ; irec = irec + 1 188 WRITE(inum,REC=irec) gsst(:,:) ; irec = irec + 1 221 189 # endif 222 190 … … 225 193 226 194 END SUBROUTINE rst_write 195 227 196 228 197 SUBROUTINE rst_read 229 198 !!--------------------------------------------------------------------- 230 !! ROUTINE rst_read 231 !! ****************** 199 !! *** ROUTINE rst_read *** 232 200 !! ** Purpose : 233 201 !! Read restart fields in direct access format, one per process 234 202 !! 235 !! ** Method : 236 !! Just does the oposit than rst_wri 203 !! ** Method : Just does the opposit than rst_wri 237 204 !! 238 205 !! History : … … 245 212 !! ! 99-11 (M. Imbard) NetCDF FORMAT with ioipsl 246 213 !! 8.5 ! 03-06 (J.M. Molines) F90: Free form, mpp support 247 !!---------------------------------------------------------------------- 248 249 214 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 250 215 !!---------------------------------------------------------------------- 251 216 USE lib_mpp … … 264 229 LOGICAL :: lstop 265 230 266 REAL(wp), DIMENSION( 1) :: zfice, zfblk ! used only in case of ice & bulk 267 268 !!---------------------------------------------------------------------- 269 !! OPA 8.5, LODYC-IPSL (2002) 231 REAL(wp), DIMENSION( 1) :: zfice, zfblk ! used only in case of ice & bulk 270 232 !!---------------------------------------------------------------------- 271 233 … … 316 278 ! -------------- 317 279 318 319 READ(inum,REC=1) irecl8, ino1, it1, isor1, ipcg1, itke1, & 320 & iice1, ibulk1, ios1, ios2, ios3, ios4, & 321 & idast1, adatrj0, ipi,ipj,ipk,ipni,ipnj,ipnij,iarea 280 READ(inum,REC=1) irecl8, ino1, it1, isor1, ipcg1, itke1, & 281 & iice1, ibulk1, ios1, ios2, ios3, ios4, & 282 & idast1, adatrj0, ipi,ipj,ipk,ipni,ipnj,ipnij,iarea 322 283 323 284 ! Performs checks on the file … … 393 354 394 355 ! 'before' fields 395 396 DO jk = 1, jpk 397 READ(inum,REC=irec) ub(:,:,jk) 398 irec = irec +1 399 END DO 400 401 DO jk = 1, jpk 402 READ(inum,REC=irec) vb(:,:,jk) 403 irec = irec +1 404 END DO 405 406 DO jk = 1, jpk 407 READ(inum,REC=irec) tb(:,:,jk) 408 irec = irec +1 409 END DO 410 411 DO jk = 1, jpk 412 READ(inum,REC=irec) sb(:,:,jk) 413 irec = irec +1 414 END DO 415 416 DO jk = 1, jpk 417 READ(inum,REC=irec) rotb(:,:,jk) 418 irec = irec +1 419 END DO 420 421 DO jk = 1, jpk 422 READ(inum,REC=irec) hdivb(:,:,jk) 423 irec = irec +1 356 DO jk = 1, jpk 357 READ(inum,REC=irec) ub(:,:,jk) ; irec = irec +1 358 END DO 359 DO jk = 1, jpk 360 READ(inum,REC=irec) vb(:,:,jk) ; irec = irec +1 361 END DO 362 DO jk = 1, jpk 363 READ(inum,REC=irec) tb(:,:,jk) ; irec = irec +1 364 END DO 365 DO jk = 1, jpk 366 READ(inum,REC=irec) sb(:,:,jk) ; irec = irec +1 367 END DO 368 DO jk = 1, jpk 369 READ(inum,REC=irec) rotb(:,:,jk) ; irec = irec +1 370 END DO 371 DO jk = 1, jpk 372 READ(inum,REC=irec) hdivb(:,:,jk) ; irec = irec +1 424 373 END DO 425 374 426 375 ! 'now' fields 427 428 DO jk = 1, jpk 429 READ(inum,REC=irec) un(:,:,jk) 430 irec = irec +1 431 END DO 432 433 DO jk = 1, jpk 434 READ(inum,REC=irec) vn(:,:,jk) 435 irec = irec +1 436 END DO 437 438 DO jk = 1, jpk 439 READ(inum,REC=irec) tn(:,:,jk) 440 irec = irec +1 441 END DO 442 443 DO jk = 1, jpk 444 READ(inum,REC=irec) sn(:,:,jk) 445 irec = irec +1 446 END DO 447 448 DO jk = 1, jpk 449 READ(inum,REC=irec) rotn(:,:,jk) 450 irec = irec +1 451 END DO 452 453 DO jk = 1, jpk 454 READ(inum,REC=irec) hdivn(:,:,jk) 455 irec = irec +1 376 DO jk = 1, jpk 377 READ(inum,REC=irec) un(:,:,jk) ; irec = irec +1 378 END DO 379 DO jk = 1, jpk 380 READ(inum,REC=irec) vn(:,:,jk) ; irec = irec +1 381 END DO 382 DO jk = 1, jpk 383 READ(inum,REC=irec) tn(:,:,jk) ; irec = irec +1 384 END DO 385 DO jk = 1, jpk 386 READ(inum,REC=irec) sn(:,:,jk) ; irec = irec +1 387 END DO 388 DO jk = 1, jpk 389 READ(inum,REC=irec) rotn(:,:,jk) ; irec = irec +1 390 END DO 391 DO jk = 1, jpk 392 READ(inum,REC=irec) hdivn(:,:,jk) ; irec = irec +1 456 393 END DO 457 394 458 395 ! elliptic solver arrays 459 READ(inum,REC=irec ) gcx(1:jpi,1:jpj) 460 irec = irec +1461 462 READ(inum,REC=irec ) gcxb(1:jpi,1:jpj)463 irec = irec +1464 465 #if defined key_dynspg_fsc 466 396 READ(inum,REC=irec ) gcx(1:jpi,1:jpj) ; irec = irec +1 397 READ(inum,REC=irec ) gcxb(1:jpi,1:jpj) ; irec = irec +1 398 #if defined key_dynspg_rl 399 ! Rigid-lid formulation (bsf) 400 READ(inum,REC=irec ) bsfb(:,:) ; irec = irec +1 401 READ(inum,REC=irec ) bsfn(:,:) ; irec = irec +1 402 READ(inum,REC=irec ) bsfd(:,:) ; irec = irec +1 403 #else 467 404 ! free surface formulation (eta) 468 469 READ(inum,REC=irec ) sshb(:,:) 470 irec = irec +1 471 472 READ(inum,REC=irec ) sshn(:,:) 473 irec = irec +1 474 #else 475 476 ! Rigid-lid formulation (bsf) 477 478 READ(inum,REC=irec ) bsfb(:,:) 479 irec = irec +1 480 481 READ(inum,REC=irec ) bsfn(:,:) 482 irec = irec +1 483 484 READ(inum,REC=irec ) bsfd(:,:) 485 irec = irec +1 486 405 READ(inum,REC=irec ) sshb(:,:) ; irec = irec +1 406 READ(inum,REC=irec ) sshn(:,:) ; irec = irec +1 407 # if defined key_dynspg_ts 408 ! free surface formulation issued from barotropic loop 409 READ(inum,REC=irec ) sshb_b(:,:) ; irec = irec +1 410 READ(inum,REC=irec ) sshn_b(:,:) ; irec = irec +1 411 ! horizontal transports issued from barotropic loop 412 READ(inum,REC=irec) un_b(:,:) ; irec = irec +1 413 READ(inum,REC=irec) vn_b(:,:) ; irec = irec +1 414 # endif 487 415 #endif 488 416 489 417 ! TKE arrays 490 491 418 #if defined key_zdftke 492 419 IF ( itke1 == 1 ) THEN 493 420 DO jk = 1, jpk 494 READ(inum,REC=irec) en(:,:,jk) 495 irec = irec +1 421 READ(inum,REC=irec) en(:,:,jk) ; irec = irec +1 496 422 END DO 497 423 ELSE … … 507 433 ! check if it was in the previous run 508 434 IF ( ios1 == 1 ) THEN 509 READ(inum,REC=irec) zfice(:) ;irec = irec + 1510 READ(inum,REC=irec) sst_io(:,:) ;irec = irec + 1511 READ(inum,REC=irec) sss_io(:,:) ;irec = irec + 1512 READ(inum,REC=irec) u_io (:,:) ;irec = irec + 1513 READ(inum,REC=irec) v_io (:,:) ;irec = irec + 1514 # 515 READ(inum,REC=irec) alb_ice(:,:) ;irec = irec + 1516 # 435 READ(inum,REC=irec) zfice(:) ; irec = irec + 1 436 READ(inum,REC=irec) sst_io(:,:) ; irec = irec + 1 437 READ(inum,REC=irec) sss_io(:,:) ; irec = irec + 1 438 READ(inum,REC=irec) u_io (:,:) ; irec = irec + 1 439 READ(inum,REC=irec) v_io (:,:) ; irec = irec + 1 440 # if defined key_coupled 441 READ(inum,REC=irec) alb_ice(:,:) ; irec = irec + 1 442 # endif 517 443 ENDIF 518 444 IF ( zfice(1) /= FLOAT(nfice) .OR. ios1 == 0 ) THEN … … 528 454 END DO 529 455 END DO 530 # 456 # if defined key_coupled 531 457 alb_ice(:,:) = 0.8 * tmask(:,:,1) 532 # endif 533 ENDIF 534 535 #endif 536 # if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 458 # endif 459 ENDIF 460 #endif 461 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 537 462 ! bulk forcing 538 463 IF( ios2 == 1 ) THEN … … 547 472 gsst(:,:) = gsst(:,:) + ( nfbulk-1 )*( tn(:,:,1) + rt0 ) 548 473 ENDIF 549 # 474 #endif 550 475 CLOSE(inum) 551 476 ! In case of restart with neuler = 0 then put all before fields = to now fields … … 557 482 rotb(:,:,:)=rotn(:,:,:) 558 483 hdivb(:,:,:)=hdivn(:,:,:) 559 #if defined key_dynspg_fsc 560 ! free surface formulation (eta) 561 sshb(:,:)=sshn(:,:) 484 #if defined key_dynspg_rl 485 bsfb(:,:)=bsfn(:,:) ! rigid lid 562 486 #else 563 ! rigid lid 564 bsfb(:,:)=bsfn(:,:) 565 #endif 566 ENDIF 567 487 sshb(:,:)=sshn(:,:) ! free surface formulation (eta) 488 #endif 489 ENDIF 568 490 569 491 END SUBROUTINE rst_read -
trunk/NEMO/OPA_SRC/step.F90
r345 r359 35 35 USE dynhpg ! hydrostatic pressure grad. (dyn_hpg routine) 36 36 USE dynhpg_atsk ! hydrostatic pressure grad. (dyn_hpg_atsk routine) 37 USE dynspg_fsc ! surface pressure gradient (dyn_spg_fsc routine) 38 USE dynspg_fsc_atsk ! surface pressure gradient (dyn_spgfsc_atsk routine) 39 USE dynspg_rl ! surface pressure gradient (dyn_spg_rl routine) 37 USE dynspg ! surface pressure gradient (dyn_spg routine) 40 38 USE dynkeg ! kinetic energy gradient (dyn_keg routine) 41 39 USE dynvor ! vorticity term (dyn_vor_... routines) … … 166 164 !! " ! 04-08 (C. Talandier) New trends organization 167 165 !! " ! 05-01 (C. Ethe) Add the KPP closure scheme 166 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization 168 167 !!---------------------------------------------------------------------- 169 168 !! * Arguments … … 369 368 370 369 ! ! horizontal gradient of Hydrostatic pressure 371 IF( lk_dynhpg ) CALL dyn_hpg ( kstp ) ! default case (k-j-i loop) 372 IF( lk_dynhpg_tsk ) CALL dyn_hpg_atsk( kstp ) ! autatask case (j-k-i loop) 370 IF ( lk_jki ) THEN 371 CALL dyn_hpg_atsk( kstp ) ! autotask case (j-k-i loop) 372 ELSE 373 CALL dyn_hpg ( kstp ) ! default case (k-j-i loop) 374 ENDIF 373 375 374 376 CALL dyn_zad ( kstp ) ! vertical advection … … 387 389 CALL lbc_lnk( emp, 'T', 1. ) 388 390 !i 389 ! ! surface pressure gradient 390 IF( lk_dynspg_fsc ) CALL dyn_spg_fsc ( kstp, indic ) ! free surface constant volume case 391 IF( lk_dynspg_fsc_tsk ) CALL dyn_spg_fsc_atsk( kstp, indic ) ! autotask free surface constant volume case 392 IF( lk_dynspg_rl ) CALL dyn_spg_rl ( kstp, indic ) ! rigid-lid case 393 394 CALL dyn_nxt( kstp ) ! lateral velocity at next time step 391 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 392 393 CALL dyn_nxt( kstp ) ! velocity at next time step 395 394 396 395 -
trunk/NEMO/OPA_SRC/stpctl.F90
r247 r359 17 17 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 18 18 USE lib_mpp ! distributed memory computing 19 USE dynspg ! pressure gradient schemes 19 20 20 21 IMPLICIT NONE … … 76 77 77 78 78 ! elliptic solver statistics 79 ! -------------------------- ---80 ! Solver81 IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps82 9200 FORMAT(' it :', i8, ' niter :', i4, ' res :',e20.10,' b :',e20.10) 79 ! elliptic solver statistics (if required) 80 ! -------------------------- 81 IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN 82 ! Solver 83 IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps 83 84 84 ! Islands (if exist)85 IF( lk_isl ) CALL isl_stp_ctl( kt, kindic )85 ! Islands (if exist) 86 IF( lk_isl ) CALL isl_stp_ctl( kt, kindic ) 86 87 87 88 88 ! Output in numwso and numwvo IF kindic<0 89 ! --------------------------------------- 90 ! (i.e. problem for the solver) 91 IF( kindic < 0 ) THEN 92 IF(lwp) THEN 93 WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode' 94 WRITE(numout,*) ' ====== ' 95 WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps 96 WRITE(numout,*) 97 WRITE(numout,*) ' stpctl: output of last fields in numwso' 98 WRITE(numout,*) ' numwvo' 99 WRITE(numout,*) ' ====== *******************************' 89 ! Output in numwso and numwvo IF kindic<0 90 ! --------------------------------------- 91 ! (i.e. problem for the solver) 92 IF( kindic < 0 ) THEN 93 IF(lwp) THEN 94 WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode' 95 WRITE(numout,*) ' ====== ' 96 WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps 97 WRITE(numout,*) 98 WRITE(numout,*) ' stpctl: output of last fields in numwso' 99 WRITE(numout,*) ' numwvo' 100 WRITE(numout,*) ' ====== *******************************' 101 ENDIF 102 CALL dia_wri( kt, kindic ) 100 103 ENDIF 101 CALL dia_wri( kt, kindic )102 104 ENDIF 105 106 9200 FORMAT(' it :', i8, ' niter :', i4, ' res :',e20.10,' b :',e20.10) 103 107 104 108 ! Test maximum of velocity (zonal only)
Note: See TracChangeset
for help on using the changeset viewer.