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 6140 for trunk/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90 – NEMO

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (8 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90

    r5836 r6140  
    3333 
    3434   !! * Substitutions 
    35 #  include "zdfddm_substitute.h90" 
    36 #  include "domzgr_substitute.h90" 
    3735#  include "vectopt_loop_substitute.h90" 
    3836   !!---------------------------------------------------------------------- 
     
    5250      !!      2. At time of output, rescale [1] by dimension and time 
    5351      !!         to yield the spatial and temporal average. 
    54       !!  See. diawri_dimg.h90, sbcmod.F90 
     52      !!  See. sbcmod.F90 
    5553      !! 
    5654      !! ** Method  :   
     
    6159      REAL(wp) ::   z2dcrsu, z2dcrsv  ! local scalars 
    6260      ! 
    63       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zfse3t, zfse3u, zfse3v, zfse3w   ! 3D workspace for e3 
     61      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ze3t, ze3u, ze3v, ze3w   ! 3D workspace for e3 
    6462      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zt, zt_crs 
    6563      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zs, zs_crs   
     
    6967 
    7068      !  Initialize arrays 
    71       CALL wrk_alloc( jpi,jpj,jpk,   zfse3t, zfse3w ) 
    72       CALL wrk_alloc( jpi,jpj,jpk,   zfse3u, zfse3v ) 
    73       CALL wrk_alloc( jpi,jpj,jpk,   zt    , zs     ) 
    74       ! 
    75       CALL wrk_alloc( jpi_crs, jpj_crs, jpk, zt_crs, zs_crs ) 
     69      CALL wrk_alloc( jpi,jpj,jpk,   ze3t, ze3w ) 
     70      CALL wrk_alloc( jpi,jpj,jpk,   ze3u, ze3v ) 
     71      CALL wrk_alloc( jpi,jpj,jpk,   zt  , zs   ) 
     72      ! 
     73      CALL wrk_alloc( jpi_crs,jpj_crs,jpk,  zt_crs, zs_crs ) 
    7674 
    7775      ! Depth work arrrays 
    78       zfse3t(:,:,:) = fse3t(:,:,:) 
    79       zfse3u(:,:,:) = fse3u(:,:,:) 
    80       zfse3v(:,:,:) = fse3v(:,:,:) 
    81       zfse3w(:,:,:) = fse3w(:,:,:) 
     76      ze3t(:,:,:) = e3t_n(:,:,:) 
     77      ze3u(:,:,:) = e3u_n(:,:,:) 
     78      ze3v(:,:,:) = e3v_n(:,:,:) 
     79      ze3w(:,:,:) = e3w_n(:,:,:) 
    8280 
    8381      IF( kt == nit000  ) THEN 
     
    107105      !  Temperature 
    108106      zt(:,:,:) = tsn(:,:,:,jp_tem)  ;      zt_crs(:,:,:) = 0._wp 
    109       CALL crs_dom_ope( zt, 'VOL', 'T', tmask, zt_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 ) 
     107      CALL crs_dom_ope( zt, 'VOL', 'T', tmask, zt_crs, p_e12=e1e2t, p_e3=ze3t, psgn=1.0 ) 
    110108      tsn_crs(:,:,:,jp_tem) = zt_crs(:,:,:) 
    111109 
     
    116114      !  Salinity 
    117115      zs(:,:,:) = tsn(:,:,:,jp_sal)  ;      zs_crs(:,:,:) = 0._wp 
    118       CALL crs_dom_ope( zs, 'VOL', 'T', tmask, zs_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 ) 
     116      CALL crs_dom_ope( zs, 'VOL', 'T', tmask, zs_crs, p_e12=e1e2t, p_e3=ze3t, psgn=1.0 ) 
    119117      tsn_crs(:,:,:,jp_sal) = zt_crs(:,:,:) 
    120118 
     
    123121 
    124122      !  U-velocity 
    125       CALL crs_dom_ope( un, 'SUM', 'U', umask, un_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
     123      CALL crs_dom_ope( un, 'SUM', 'U', umask, un_crs, p_e12=e2u, p_e3=ze3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
    126124      ! 
    127125      zt(:,:,:) = 0._wp     ;    zs(:,:,:) = 0._wp  ;   zt_crs(:,:,:) = 0._wp   ;    zs_crs(:,:,:) = 0._wp 
     
    134132         END DO 
    135133      END DO 
    136       CALL crs_dom_ope( zt, 'SUM', 'U', umask, zt_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
    137       CALL crs_dom_ope( zs, 'SUM', 'U', umask, zs_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
     134      CALL crs_dom_ope( zt, 'SUM', 'U', umask, zt_crs, p_e12=e2u, p_e3=ze3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
     135      CALL crs_dom_ope( zs, 'SUM', 'U', umask, zs_crs, p_e12=e2u, p_e3=ze3u, p_surf_crs=e2e3u_msk, psgn=-1.0 ) 
    138136 
    139137      CALL iom_put( "uoce"  , un_crs )   ! i-current  
     
    142140 
    143141      !  V-velocity 
    144       CALL crs_dom_ope( vn, 'SUM', 'V', vmask, vn_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
     142      CALL crs_dom_ope( vn, 'SUM', 'V', vmask, vn_crs, p_e12=e1v, p_e3=ze3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
    145143      !                                                                                  
    146144      zt(:,:,:) = 0._wp     ;    zs(:,:,:) = 0._wp  ;   zt_crs(:,:,:) = 0._wp   ;    zs_crs(:,:,:) = 0._wp 
     
    153151         END DO 
    154152      END DO 
    155       CALL crs_dom_ope( zt, 'SUM', 'V', vmask, zt_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
    156       CALL crs_dom_ope( zs, 'SUM', 'V', vmask, zs_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
     153      CALL crs_dom_ope( zt, 'SUM', 'V', vmask, zt_crs, p_e12=e1v, p_e3=ze3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
     154      CALL crs_dom_ope( zs, 'SUM', 'V', vmask, zs_crs, p_e12=e1v, p_e3=ze3v, p_surf_crs=e1e3v_msk, psgn=-1.0 ) 
    157155  
    158156      CALL iom_put( "voce"  , vn_crs )   ! i-current  
     
    162160      
    163161      !  Kinetic energy 
    164       CALL crs_dom_ope( rke, 'VOL', 'T', tmask, rke_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 ) 
     162      CALL crs_dom_ope( rke, 'VOL', 'T', tmask, rke_crs, p_e12=e1e2t, p_e3=ze3t, psgn=1.0 ) 
    165163      CALL iom_put( "eken", rke_crs ) 
    166164 
     
    188186      IF( ln_crs_wn ) THEN 
    189187         CALL crs_dom_ope( wn, 'SUM', 'W', tmask, wn_crs, p_e12=e1e2t, p_surf_crs=e1e2w_msk, psgn=1.0 ) 
    190        !  CALL crs_dom_ope( wn, 'VOL', 'W', tmask, wn_crs, p_e12=e1e2t, p_e3=zfse3w ) 
     188       !  CALL crs_dom_ope( wn, 'VOL', 'W', tmask, wn_crs, p_e12=e1e2t, p_e3=ze3w ) 
    191189      ELSE 
    192190        wn_crs(:,:,jpk) = 0._wp 
     
    199197 
    200198      !  avt, avs 
     199!!gm BUG   TOP always uses avs !!! 
    201200      SELECT CASE ( nn_crs_kz ) 
    202201         CASE ( 0 ) 
    203             CALL crs_dom_ope( avt, 'VOL', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 ) 
     202            CALL crs_dom_ope( avt, 'VOL', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=ze3w, psgn=1.0 ) 
    204203         CASE ( 1 ) 
    205             CALL crs_dom_ope( avt, 'MAX', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 ) 
     204            CALL crs_dom_ope( avt, 'MAX', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=ze3w, psgn=1.0 ) 
    206205         CASE ( 2 ) 
    207             CALL crs_dom_ope( avt, 'MIN', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 ) 
     206            CALL crs_dom_ope( avt, 'MIN', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=ze3w, psgn=1.0 ) 
    208207      END SELECT 
    209208      ! 
     
    211210       
    212211      !  sbc fields   
    213       CALL crs_dom_ope( sshn , 'VOL', 'T', tmask, sshn_crs , p_e12=e1e2t, p_e3=zfse3t         , psgn=1.0 )   
     212      CALL crs_dom_ope( sshn , 'VOL', 'T', tmask, sshn_crs , p_e12=e1e2t, p_e3=ze3t           , psgn=1.0 )   
    214213      CALL crs_dom_ope( utau , 'SUM', 'U', umask, utau_crs , p_e12=e2u  , p_surf_crs=e2u_crs  , psgn=1.0 ) 
    215214      CALL crs_dom_ope( vtau , 'SUM', 'V', vmask, vtau_crs , p_e12=e1v  , p_surf_crs=e1v_crs  , psgn=1.0 ) 
     
    233232 
    234233      !  free memory 
    235       CALL wrk_dealloc( jpi, jpj, jpk, zfse3t, zfse3w ) 
    236       CALL wrk_dealloc( jpi, jpj, jpk, zfse3u, zfse3v ) 
    237       CALL wrk_dealloc( jpi, jpj, jpk, zt, zs       ) 
    238       CALL wrk_dealloc( jpi_crs, jpj_crs, jpk, zt_crs, zs_crs ) 
     234      CALL wrk_dealloc( jpi,jpj,jpk,   ze3t, ze3w ) 
     235      CALL wrk_dealloc( jpi,jpj,jpk,   ze3u, ze3v ) 
     236      CALL wrk_dealloc( jpi,jpj,jpk,   zt  , zs   ) 
     237      CALL wrk_dealloc( jpi_crs,jpj_crs,jpk,  zt_crs, zs_crs ) 
    239238      ! 
    240239      CALL iom_swap( "nemo" )     ! return back on high-resolution grid 
Note: See TracChangeset for help on using the changeset viewer.