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 7222 for branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90 – NEMO

Ignore:
Timestamp:
2016-11-14T15:34:11+01:00 (7 years ago)
Author:
cbricaud
Message:

CRS branch: cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90

    r7217 r7222  
    6262      !!      2. At time of output, rescale [1] by dimension and time 
    6363      !!         to yield the spatial and temporal average. 
    64       !!  See. diawri_dimg.h90, sbcmod.F90 
    6564      !! 
    6665      !! ** Method  :   
    6766      !!---------------------------------------------------------------------- 
    6867      !! 
    69        
    7068      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    7169      !! 
    72       INTEGER               ::   ji, jj, jk              ! dummy loop indices 
    73       !! 
     70      INTEGER                             :: ji, jj, jk              ! dummy loop indices 
     71      REAL(wp)                            :: z2dcrsu, z2dcrsv 
     72      REAL(wp)                            :: z1_2dt 
    7473      REAL(wp), POINTER, DIMENSION(:,:,:) :: zfse3t, zfse3u, zfse3v, zfse3w ! 3D workspace for e3 
    7574      REAL(wp), POINTER, DIMENSION(:,:,:) :: zt, zs , ztmp 
    7675      REAL(wp), POINTER, DIMENSION(:,:)   :: z2d,z2d_crs 
    7776      REAL(wp), POINTER, DIMENSION(:,:,:) :: zt_crs, zs_crs 
    78       REAL(wp):: z2dcrsu, z2dcrsv 
    79       REAL(wp):: z1_2dt 
    80       REAL(wp):: zmin,zmax 
    81       INTEGER :: i,j,ijis,ijie,ijjs,ijje 
    82       INTEGER ::  iji,ijj 
    83       INTEGER :: jl,jm,jn 
    84       !! 
    8577      !!---------------------------------------------------------------------- 
    8678 
     
    216208      CALL crs_dom_e3( e1v, e2v, zfse3v, p_sfc_2d_crs=e1v_crs  , cd_type='V', p_mask=vmask, p_e3_crs=zs_crs, p_e3_max_crs=e3v_max_n_crs) 
    217209 
    218       !cbr ??????????????????? faut pas mettre le profile 1d plutot ??????????? 
    219       WHERE(e3t_max_n_crs == 0._wp) e3t_max_n_crs=r_inf 
    220       WHERE(e3u_max_n_crs == 0._wp) e3u_max_n_crs=r_inf 
    221       WHERE(e3v_max_n_crs == 0._wp) e3v_max_n_crs=r_inf 
    222       WHERE(e3w_max_n_crs == 0._wp) e3w_max_n_crs=r_inf 
     210      DO jk = 1, jpk 
     211         DO ji = 1, jpi_crs 
     212            DO jj = 1, jpj_crs 
     213               IF( e3t_max_n_crs(ji,jj,jk) == 0._wp ) e3t_max_n_crs(ji,jj,jk) = e3t_1d(jk) 
     214               IF( e3w_max_n_crs(ji,jj,jk) == 0._wp ) e3w_max_n_crs(ji,jj,jk) = e3w_1d(jk) 
     215               IF( e3u_max_n_crs(ji,jj,jk) == 0._wp ) e3u_max_n_crs(ji,jj,jk) = e3t_1d(jk) 
     216               IF( e3v_max_n_crs(ji,jj,jk) == 0._wp ) e3v_max_n_crs(ji,jj,jk) = e3t_1d(jk) 
     217            ENDDO 
     218         ENDDO 
     219      ENDDO 
    223220 
    224221      ! depth 
    225222      CALL crs_dom_ope( gdepw_n, 'MAX', 'T', tmask, gdept_n_crs, p_e3=zfse3t, psgn=1.0 ) 
    226223      CALL crs_dom_ope( gdepw_n, 'MAX', 'W', tmask, gdepw_n_crs, p_e3=zfse3w, psgn=1.0 ) 
     224      DO jk = 1, jpk 
     225         DO ji = 1, jpi_crs 
     226            DO jj = 1, jpj_crs 
     227               IF( gdept_n_crs(ji,jj,jk) .LE. 0._wp ) gdept_n_crs(ji,jj,jk) = gdept_1d(jk) 
     228               IF( gdepw_n_crs(ji,jj,jk) .LE. 0._wp ) gdepw_n_crs(ji,jj,jk) = gdepw_1d(jk) 
     229            ENDDO 
     230         ENDDO 
     231      ENDDO 
    227232 
    228233      ! volume and facvol 
     
    257262      !  U-velocity 
    258263      CALL crs_dom_ope( un, 'SUM', 'U', umask, un_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
    259       un_crs(:,:,:) = un_crs(:,:,:)*umask_crs(:,:,:) !cbr utile ?????????????????? 
    260264      CALL iom_put( "uoce"  , un_crs )   ! i-current  
    261265 
    262266      !  V-velocity 
    263267      CALL crs_dom_ope( vn, 'SUM', 'V', vmask, vn_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
    264       vn_crs(:,:,:) = vn_crs(:,:,:)*vmask_crs(:,:,:) !cbr utile ?????????????????? 
    265268      CALL iom_put( "voce"  , vn_crs )   ! i-current  
    266269 
     
    346349      zfse3t(:,:,:) = 1._wp 
    347350      zt(:,:,:) = tmask(:,:,:) 
    348       ssha(:,:) = ssha(:,:) * tmask(:,:,1)  !cbr utile ?????????????????? 
    349351      CALL crs_dom_ope( ssha , 'VOL', 'T', zt, ssha_crs , p_e12=e1e2t,  p_e3=zfse3t , psgn=1.0 ) 
    350352 
     
    371373      ENDDO 
    372374 
    373       !zt_crs=ocean_volume_crs_t ; zs_crs=facvol_t after time !!! ça sert à quoi ??????????????????????????????????????????? 
    374       CALL crs_dom_facvol( tmask, 'T', e1t, e2t, zfse3t, zt_crs, zs_crs ) 
    375  
    376 #endif 
    377  
    378 #if defined key_vvl 
     375#endif 
     376 
     377#if defined key_vvl 
     378 
    379379      z1_2dt = 1._wp / ( 2. * rdt )                         ! set time step size (Euler/Leapfrog) 
    380380      IF( neuler == 0 .AND. kt == nit000 )   z1_2dt = 1._wp / rdt 
     381 
    381382      wn_crs(:,:,jpk) = 0._wp 
    382383      DO jk = jpkm1, 1, -1 
     
    399400 
    400401#endif 
    401       CALL crs_lbc_lnk( wn_crs, 'W', 1.0 )   !!!!!!!pas utile, nan ?????????????????????? 
    402       wn_crs(:,:,:) = wn_crs(:,:,:) * tmask_crs(:,:,:)   !!!!!!!pas utile, nan ?????????????????????? 
    403  
    404402      CALL iom_put( "woce", wn_crs  )   ! vertical velocity 
    405403 
     404      !--------------------------------------------------------------------------------------------------- 
    406405      !  free memory 
    407406      CALL wrk_dealloc( jpi, jpj, jpk, zfse3t, zfse3w ) 
Note: See TracChangeset for help on using the changeset viewer.