Changeset 575 for trunk/NEMO/OPA_SRC
- Timestamp:
- 2006-11-14T09:04:20+01:00 (17 years ago)
- Location:
- trunk/NEMO/OPA_SRC/DYN
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90
r455 r575 4 4 !! Ocean dynamics: surface pressure gradient trend 5 5 !!====================================================================== 6 #if ( defined key_dynspg_exp && ! defined key_mpp_omp )|| defined key_esopa6 #if defined key_dynspg_exp || defined key_esopa 7 7 !!---------------------------------------------------------------------- 8 8 !! 'key_dynspg_exp' free sfce cst vol. without filter nor ts 9 !! NOT 'key_mpp_omp' k-j-i loop (vector opt.)10 9 !!---------------------------------------------------------------------- 11 10 !! dyn_spg_exp : update the momentum trend with the surface 12 11 !! pressure gradient in the free surface constant 13 12 !! volume case with vector optimization 13 !! exp_rst : read/write the explicit restart fields in the ocean restart file 14 14 !!---------------------------------------------------------------------- 15 15 !! * Modules used … … 25 25 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 26 26 USE prtctl ! Print control 27 USE iom ! I/O library 28 USE restart ! only for lrst_oce 27 29 28 30 IMPLICIT NONE … … 31 33 !! * Accessibility 32 34 PUBLIC dyn_spg_exp ! routine called by step.F90 35 PUBLIC exp_rst ! routine called j-k-i subroutine 33 36 34 37 !! * Substitutions … … 101 104 spgu(:,:) = 0.e0 ! surface pressure gradient (i-direction) 102 105 spgv(:,:) = 0.e0 ! surface pressure gradient (j-direction) 106 107 CALL exp_rst( nit000, 'READ' ) ! read or initialize the following fields: 108 ! ! sshb, sshn 109 103 110 ENDIF 104 111 … … 185 192 ! Boundary conditions on sshn 186 193 IF( .NOT. lk_obc ) CALL lbc_lnk( sshn, 'T', 1. ) 194 195 ! write filtered free surface arrays in restart file 196 ! -------------------------------------------------- 197 IF( lrst_oce ) CALL exp_rst( kt, 'WRITE' ) 187 198 188 199 IF(ln_ctl) THEN ! print sum trends (used for debugging) … … 192 203 END SUBROUTINE dyn_spg_exp 193 204 205 SUBROUTINE exp_rst( kt, cdrw ) 206 !!--------------------------------------------------------------------- 207 !! *** ROUTINE exp_rst *** 208 !! 209 !! ** Purpose : Read or write explicit arrays in restart file 210 !!---------------------------------------------------------------------- 211 INTEGER , INTENT(in) :: kt ! ocean time-step 212 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 213 ! 214 !!---------------------------------------------------------------------- 215 ! 216 IF( TRIM(cdrw) == 'READ' ) THEN 217 IF( iom_varid( numror, 'sshn' ) > 0 ) THEN 218 CALL iom_get( numror, jpdom_local, 'sshb' , sshb(:,:) ) 219 CALL iom_get( numror, jpdom_local, 'sshn' , sshn(:,:) ) 220 IF( neuler == 0 ) sshb(:,:) = sshn(:,:) 221 ELSE 222 IF( nn_rstssh == 1 ) THEN 223 sshb(:,:) = 0.e0 224 sshn(:,:) = 0.e0 225 ENDIF 226 ENDIF 227 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 228 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb (:,:) ) 229 CALL iom_rstput( kt, nitrst, numrow, 'sshn' , sshn (:,:) ) 230 ENDIF 231 ! 232 END SUBROUTINE exp_rst 194 233 #else 195 234 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynspg_exp_jki.F90
r455 r575 4 4 !! Ocean dynamics: surface pressure gradient trend 5 5 !!====================================================================== 6 #if ( defined key_dynspg_exp && defined key_mpp_omp )|| defined key_esopa6 #if defined key_dynspg_exp || defined key_esopa 7 7 !!---------------------------------------------------------------------- 8 8 !! 'key_dynspg_exp' explicit free surface 9 !! 'key_mpp_omp' j-k-i loop10 9 !!---------------------------------------------------------------------- 11 10 !! dyn_spg_exp_jki : update the momentum trend with the surface … … 25 24 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 26 25 USE prtctl ! Print control 26 USE dynspg_exp ! surface pressure gradient 27 USE restart ! only for lrst_oce 27 28 28 29 IMPLICIT NONE … … 100 101 spgu(:,:) = 0.e0 ! surface pressure gradient (i-direction) 101 102 spgv(:,:) = 0.e0 ! surface pressure gradient (j-direction) 103 104 CALL exp_rst( nit000, 'READ' ) ! read or initialize the following fields: 105 ! ! sshb, sshn 106 102 107 ENDIF 103 108 … … 183 188 ! Boundary conditions on sshn 184 189 IF( .NOT. lk_obc ) CALL lbc_lnk( sshn, 'T', 1. ) 190 191 ! write filtered free surface arrays in restart file 192 ! -------------------------------------------------- 193 IF( lrst_oce ) CALL exp_rst( kt, 'WRITE' ) 185 194 186 195 IF(ln_ctl) THEN ! print sum trends (used for debugging) -
trunk/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r558 r575 12 12 !! " " ! 06-07 (S. Masson) distributed restart using iom 13 13 !!---------------------------------------------------------------------- 14 #if ( defined key_dynspg_flt && ! defined key_mpp_omp )|| defined key_esopa14 #if defined key_dynspg_flt || defined key_esopa 15 15 !!---------------------------------------------------------------------- 16 16 !! 'key_dynspg_flt' filtered free surface 17 !! NOT 'key_mpp_omp' k-j-i loop (vector opt.)18 17 !!---------------------------------------------------------------------- 19 18 !!---------------------------------------------------------------------- … … 52 51 53 52 PUBLIC dyn_spg_flt ! routine called by step.F90 53 PUBLIC flt_rst ! routine called by j-k-i subroutine 54 54 55 55 !! * Substitutions -
trunk/NEMO/OPA_SRC/DYN/dynspg_flt_jki.F90
r508 r575 4 4 !! Ocean dynamics: surface pressure gradient trend 5 5 !!====================================================================== 6 #if ( defined key_dynspg_flt && defined key_mpp_omp )|| defined key_esopa6 #if defined key_dynspg_flt || defined key_esopa 7 7 !!---------------------------------------------------------------------- 8 8 !! 'key_dynspg_flt' filtered free surface 9 !! 'key_mpp_omp' j-k-i loop (vector opt.)10 9 !!---------------------------------------------------------------------- 11 10 !!---------------------------------------------------------------------- … … 37 36 USE agrif_opa_interp 38 37 USE restart ! only for lrst_oce 39 USE iom 38 USE iom ! I/O library 39 USE dynspg_flt ! surface pressure gradient 40 40 41 41 IMPLICIT NONE … … 375 375 ! 376 376 END SUBROUTINE dyn_spg_flt_jki 377 378 SUBROUTINE flt_rst( kt, cdrw )379 !!---------------------------------------------------------------------380 !! *** ROUTINE ts_rst ***381 !!382 !! ** Purpose : Read or write filtered free surface arrays in restart file383 !!----------------------------------------------------------------------384 INTEGER , INTENT(in) :: kt ! ocean time-step385 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag386 !!----------------------------------------------------------------------387 388 IF( TRIM(cdrw) == 'READ' ) THEN389 IF( iom_varid( numror, 'gcx' ) > 0 ) THEN390 ! Caution : extra-hallow391 ! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)392 CALL iom_get( numror, jpdom_local, 'gcx' , gcx (1:jpi,1:jpj) )393 CALL iom_get( numror, jpdom_local, 'gcxb', gcxb(1:jpi,1:jpj) )394 CALL iom_get( numror, jpdom_local, 'sshb', sshb(:,:) )395 CALL iom_get( numror, jpdom_local, 'sshn', sshn(:,:) )396 IF( neuler == 0 ) THEN397 sshb(:,:) = sshn(:,:)398 gcxb(:,:) = gcx (:,:)399 ENDIF400 ELSE401 gcx (:,:) = 0.e0402 gcxb(:,:) = 0.e0403 sshb(:,:) = 0.e0404 sshn(:,:) = 0.e0405 ENDIF406 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN407 ! Caution : extra-hallow408 ! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)409 CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx( 1:jpi,1:jpj) )410 CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) )411 CALL iom_rstput( kt, nitrst, numrow, 'sshb', sshb(:,:) )412 CALL iom_rstput( kt, nitrst, numrow, 'sshn', sshn(:,:) )413 ENDIF414 !415 END SUBROUTINE flt_rst416 417 377 #else 418 378 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r558 r575 8 8 !! 9.0 ! 06-08 (S. Masson) distributed restart using iom 9 9 !!--------------------------------------------------------------------- 10 #if ( defined key_dynspg_ts && ! defined key_mpp_omp )|| defined key_esopa10 #if defined key_dynspg_ts || defined key_esopa 11 11 !!---------------------------------------------------------------------- 12 12 !! 'key_dynspg_ts' free surface cst volume with time splitting 13 !! NOT 'key_mpp_omp' k-j-i loop (vector opt.)14 13 !!---------------------------------------------------------------------- 15 14 !!---------------------------------------------------------------------- … … 40 39 41 40 PUBLIC dyn_spg_ts ! routine called by step.F90 41 PUBLIC ts_rst ! routine called by j-k-i subroutine 42 42 43 43 REAL(wp), DIMENSION(jpi,jpj) :: ftnw, ftne, & ! triad of coriolis parameter -
trunk/NEMO/OPA_SRC/DYN/dynspg_ts_jki.F90
r455 r575 4 4 !! Ocean dynamics: surface pressure gradient trend 5 5 !!====================================================================== 6 #if ( defined key_dynspg_ts && defined key_mpp_omp )|| defined key_esopa6 #if defined key_dynspg_ts || defined key_esopa 7 7 !!---------------------------------------------------------------------- 8 8 !! 'key_dynspg_ts' free surface with time splitting 9 !! 'key_mpp_omp' j-k-i loop (vector opt.)10 9 !!---------------------------------------------------------------------- 11 10 !! dyn_spg_ts : compute surface pressure gradient trend using a time- … … 26 25 USE prtctl ! Print control 27 26 USE dynspg_oce ! surface pressure gradient variables 27 USE dynspg_ts ! surface pressure gradient 28 28 USE in_out_manager ! I/O manager 29 USE iom ! I/O library 30 USE restart ! only for lrst_oce 29 31 30 32 IMPLICIT NONE … … 114 116 IF(lwp) WRITE(numout,*) ' Number of sub cycle in 1 time-step (2 rdt) : icycle = ', FLOOR( 2*rdt/rdtbt ) 115 117 116 IF( .NOT. ln_rstart ) THEN 117 ! initialize barotropic specific arrays 118 sshb_b(:,:) = sshb(:,:) 119 sshn_b(:,:) = sshn(:,:) 120 un_b(:,:) = 0.e0 121 vn_b(:,:) = 0.e0 122 ! vertical sum 123 DO jk = 1, jpkm1 124 un_b(:,:) = un_b(:,:) + fse3u(:,:,jk) * un(:,:,jk) 125 vn_b(:,:) = vn_b(:,:) + fse3v(:,:,jk) * vn(:,:,jk) 126 END DO 127 ENDIF 118 CALL ts_rst( nit000, 'READ' ) ! read or initialize the following fields: 119 ! ! sshb, sshn, sshb_b, sshn_b, un_b, vn_b 120 128 121 ssha_e(:,:) = sshn(:,:) 129 122 ua_e (:,:) = un_b(:,:) … … 499 492 END DO 500 493 494 ! write filtered free surface arrays in restart file 495 ! -------------------------------------------------- 496 IF( lrst_oce ) CALL ts_rst( kt, 'WRITE' ) 497 501 498 IF(ln_ctl) THEN ! print sum trends (used for debugging) 502 499 CALL prt_ctl(tab2d_1=sshn, clinfo1=' ssh : ', mask1=tmask)
Note: See TracChangeset
for help on using the changeset viewer.