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 3402 for branches/2012/dev_r3385_NOCS04_HAMF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90 – NEMO

Ignore:
Timestamp:
2012-05-25T18:43:49+02:00 (12 years ago)
Author:
acc
Message:

Branch: dev_r3385_NOCS04_HAMF; #665. Stage 2 of 2012 development: suppression of emps array and introduction of sfx (salt flux) array with associated code to setup the options for embedding the seaice into the ocean

File:
1 edited

Legend:

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

    r3322 r3402  
    8181      ! 
    8282      INTEGER  ::   ji, jj, jk                             ! dummy loop indices 
    83       REAL(wp) ::   z2dt, zg_2                             ! temporary scalar 
     83      REAL(wp) ::   z2dt, zg_2, zintp, zgrau0r             ! temporary scalar 
    8484      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv 
     85      REAL(wp), POINTER, DIMENSION(:,:)   ::  zpice 
    8586      !!---------------------------------------------------------------------- 
    8687      ! 
     
    117118            END DO 
    118119         END DO 
     120      ENDIF 
     121 
     122      IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: Pressure gradient due to snow-ice mass ==! 
     123         CALL wrk_alloc( jpi, jpj, zpice ) 
     124         !                                             
     125         zintp = REAL( MOD( kt-1, nn_fsbc ) ) / REAL( nn_fsbc ) 
     126         zgrau0r     = - grav * r1_rau0 
     127         zpice(:,:) = (  zintp * snwice_mass(:,:) + ( 1.- zintp ) * snwice_mass_b(:,:)  ) * zgrau0r 
     128         DO jj = 2, jpjm1 
     129            DO ji = fs_2, fs_jpim1   ! vector opt. 
     130               spgu(ji,jj) = ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj) 
     131               spgv(ji,jj) = ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj) 
     132            END DO 
     133         END DO 
     134         DO jk = 1, jpkm1                             ! Add the surface pressure trend to the general trend 
     135            DO jj = 2, jpjm1 
     136               DO ji = fs_2, fs_jpim1   ! vector opt. 
     137                  ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 
     138                  va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 
     139               END DO 
     140            END DO 
     141         END DO 
     142         ! 
     143         CALL wrk_dealloc( jpi, jpj, zpice ) 
    119144      ENDIF 
    120145 
Note: See TracChangeset for help on using the changeset viewer.