New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2396 for branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90 – NEMO

Ignore:
Timestamp:
2010-11-16T11:18:23+01:00 (13 years ago)
Author:
cbricaud
Message:

add modifications for atmopheric pressure forcing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90

    r2392 r2396  
    1515   USE dom_oce        ! ocean space and time domain variables 
    1616   USE obc_oce        ! ocean open boundary conditions 
     17   USE sbc_oce        ! surface boundary condition: ocean 
     18   USE sbcapr         ! surface boundary condition: atmospheric pressure 
    1719   USE dynspg_oce     ! surface pressure gradient variables 
    1820   USE dynspg_exp     ! surface pressure gradient     (dyn_spg_exp routine) 
    1921   USE dynspg_ts      ! surface pressure gradient     (dyn_spg_ts  routine) 
    2022   USE dynspg_flt     ! surface pressure gradient     (dyn_spg_flt routine) 
    21    USE dynadv          ! dynamics: vector invariant versus flux form 
     23   USE dynadv         ! dynamics: vector invariant versus flux form 
    2224   USE trdmod         ! ocean dynamics trends 
    2325   USE trdmod_oce     ! ocean variables trends 
    2426   USE prtctl         ! Print control                     (prt_ctl routine) 
    2527   USE in_out_manager ! I/O manager 
     28   USE phycst         ! physical constants 
    2629 
    2730   IMPLICIT NONE 
     
    4952      !! 
    5053      !! ** Purpose :   achieve the momentum time stepping by computing the 
    51       !!              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 
    5256      !!              the Leap-Frog integration. 
    5357      !!gm              In the current version only the filtered solution provide 
     
    5963      !!              - split-explicit computation: a time splitting technique is used 
    6064      !! 
     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      !! 
    6172      !! N.B. : When key_esopa is used all the scheme are tested, regardless  
    6273      !!        of the physical meaning of the results.  
     
    6677      !! 
    6778      REAL(wp) ::   z2dt   ! temporary scalar 
     79      INTEGER  ::   ji, jj, jk                             ! dummy loop indices 
     80      REAL(wp) ::   z2dt, zg_2                             ! temporary scalar 
    6881      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ztrdu, ztrdv   ! 3D workspace 
    6982      !!---------------------------------------------------------------------- 
     
    8093         ztrdv(:,:,:) = va(:,:,:) 
    8194      ENDIF 
     95 
     96      IF( ln_apr_dyn ) THEN                   !==  Atmospheric pressure gradient  ==! 
     97         zg_2 = grav * 0.5 
     98         DO jj = 2, jpjm1                          ! gradient of Patm using inverse barometer ssh 
     99            DO ji = fs_2, fs_jpim1   ! vector opt. 
     100               spgu(ji,jj) =  zg_2 * (  ssh_ib (ji+1,jj) - ssh_ib (ji,jj)    & 
     101                  &                   + ssh_ibb(ji+1,jj) - ssh_ibb(ji,jj)  ) /e1u(ji,jj) 
     102               spgv(ji,jj) =  zg_2 * (  ssh_ib (ji,jj+1) - ssh_ib (ji,jj)    & 
     103                  &                   + ssh_ibb(ji,jj+1) - ssh_ib (ji,jj)  ) /e2v(ji,jj) 
     104            END DO 
     105         END DO 
     106         DO jk = 1, jpkm1                          ! Add the apg to the general trend 
     107            DO jj = 2, jpjm1 
     108               DO ji = fs_2, fs_jpim1   ! vector opt. 
     109                  ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 
     110                  va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 
     111               END DO 
     112            END DO 
     113         END DO 
     114      ENDIF 
     115 
    82116 
    83117      SELECT CASE ( nspg )                       ! compute surf. pressure gradient trend and add it to the general trend 
Note: See TracChangeset for help on using the changeset viewer.