Changeset 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
- Timestamp:
- 2010-12-27T18:33:53+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
- Property svn:eol-style deleted
- Property svn:executable deleted
r1566 r2528 15 15 USE dom_oce ! ocean space and time domain variables 16 16 USE obc_oce ! ocean open boundary conditions 17 USE sbc_oce ! surface boundary condition: ocean 18 USE sbcapr ! surface boundary condition: atmospheric pressure 17 19 USE dynspg_oce ! surface pressure gradient variables 18 20 USE dynspg_exp ! surface pressure gradient (dyn_spg_exp routine) 19 21 USE dynspg_ts ! surface pressure gradient (dyn_spg_ts routine) 20 22 USE dynspg_flt ! surface pressure gradient (dyn_spg_flt routine) 23 USE dynadv ! dynamics: vector invariant versus flux form 21 24 USE trdmod ! ocean dynamics trends 22 25 USE trdmod_oce ! ocean variables trends 23 26 USE prtctl ! Print control (prt_ctl routine) 24 27 USE in_out_manager ! I/O manager 28 USE phycst ! physical constants 25 29 26 30 IMPLICIT NONE 27 31 PRIVATE 28 32 29 PUBLIC dyn_spg ! routine called by step module 33 PUBLIC dyn_spg ! routine called by step module 34 PUBLIC dyn_spg_init ! routine called by opa module 30 35 31 36 INTEGER :: nspg = 0 ! type of surface pressure gradient scheme defined from lk_dynspg_... … … 37 42 !! NEMO/OPA 3.2 , LODYC-IPSL (2009) 38 43 !! $Id$ 39 !! Software governed by the CeCILL licence ( modipsl/doc/NEMO_CeCILL.txt)44 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 40 45 !!---------------------------------------------------------------------- 41 46 … … 47 52 !! 48 53 !! ** Purpose : achieve the momentum time stepping by computing the 49 !! last trend, the surface pressure gradient, and performing 54 !! last trend, the surface pressure gradient including the 55 !! atmospheric pressure forcing (ln_apr_dyn=T), and performing 50 56 !! the Leap-Frog integration. 51 57 !!gm In the current version only the filtered solution provide … … 57 63 !! - split-explicit computation: a time splitting technique is used 58 64 !! 65 !! ln_apr_dyn=T : the atmospheric pressure forcing is applied 66 !! as the gradient of the inverse barometer ssh: 67 !! apgu = - 1/rau0 di[apr] = 0.5*grav di[ssh_ib+ssh_ibb] 68 !! apgv = - 1/rau0 dj[apr] = 0.5*grav dj[ssh_ib+ssh_ibb] 69 !! Note that as all external forcing a time averaging over a two rdt 70 !! period is used to prevent the divergence of odd and even time step. 71 !! 59 72 !! N.B. : When key_esopa is used all the scheme are tested, regardless 60 73 !! of the physical meaning of the results. … … 63 76 INTEGER, INTENT( out) :: kindic ! solver flag 64 77 !! 65 REAL(wp) :: z2dt ! temporary scalar 78 INTEGER :: ji, jj, jk ! dummy loop indices 79 REAL(wp) :: z2dt, zg_2 ! temporary scalar 66 80 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztrdu, ztrdv ! 3D workspace 67 81 !!---------------------------------------------------------------------- … … 74 88 75 89 76 IF( kt == nit000 ) CALL dyn_spg_ctl ! initialisation & control of options77 78 90 IF( l_trddyn ) THEN ! temporary save of ta and sa trends 79 91 ztrdu(:,:,:) = ua(:,:,:) 80 92 ztrdv(:,:,:) = va(:,:,:) 81 93 ENDIF 94 95 IF( ln_apr_dyn ) THEN !== Atmospheric pressure gradient ==! 96 zg_2 = grav * 0.5 97 DO jj = 2, jpjm1 ! gradient of Patm using inverse barometer ssh 98 DO ji = fs_2, fs_jpim1 ! vector opt. 99 spgu(ji,jj) = zg_2 * ( ssh_ib (ji+1,jj) - ssh_ib (ji,jj) & 100 & + ssh_ibb(ji+1,jj) - ssh_ibb(ji,jj) ) /e1u(ji,jj) 101 spgv(ji,jj) = zg_2 * ( ssh_ib (ji,jj+1) - ssh_ib (ji,jj) & 102 & + ssh_ibb(ji,jj+1) - ssh_ib (ji,jj) ) /e2v(ji,jj) 103 END DO 104 END DO 105 DO jk = 1, jpkm1 ! Add the apg to the general trend 106 DO jj = 2, jpjm1 107 DO ji = fs_2, fs_jpim1 ! vector opt. 108 ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 109 va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 110 END DO 111 END DO 112 END DO 113 ENDIF 114 82 115 83 116 SELECT CASE ( nspg ) ! compute surf. pressure gradient trend and add it to the general trend … … 119 152 120 153 121 SUBROUTINE dyn_spg_ ctl154 SUBROUTINE dyn_spg_init 122 155 !!--------------------------------------------------------------------- 123 !! *** ROUTINE dyn_spg_ ctl***156 !! *** ROUTINE dyn_spg_init *** 124 157 !! 125 158 !! ** Purpose : Control the consistency between cpp options for … … 131 164 IF(lwp) THEN ! Control print 132 165 WRITE(numout,*) 133 WRITE(numout,*) 'dyn_spg_ ctl: choice of the surface pressure gradient scheme'166 WRITE(numout,*) 'dyn_spg_init : choice of the surface pressure gradient scheme' 134 167 WRITE(numout,*) '~~~~~~~~~~~' 135 168 WRITE(numout,*) ' Explicit free surface lk_dynspg_exp = ', lk_dynspg_exp … … 164 197 ! ! Control of timestep choice 165 198 IF( lk_dynspg_ts .OR. lk_dynspg_exp ) THEN 166 IF( n_cla == 1 ) & 167 & CALL ctl_stop( ' Crossland advection not implemented for this free surface formulation ' ) 199 IF( nn_cla == 1 ) CALL ctl_stop( 'Crossland advection not implemented for this free surface formulation' ) 200 ENDIF 201 202 ! ! Control of momentum formulation 203 IF( lk_dynspg_ts .AND. lk_vvl ) THEN 204 IF( .NOT.ln_dynadv_vec ) CALL ctl_stop( 'Flux form not implemented for this free surface formulation' ) 168 205 ENDIF 169 206 … … 178 215 #endif 179 216 ! 180 END SUBROUTINE dyn_spg_ ctl217 END SUBROUTINE dyn_spg_init 181 218 182 219 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.