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 15052 – NEMO

Changeset 15052


Ignore:
Timestamp:
2021-06-24T16:39:14+02:00 (3 years ago)
Author:
smasson
Message:

trunk: call lbc_lnk for variables defined with usr_def_*, #2701

Location:
NEMO/trunk/src/OCE/DOM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DOM/domhgr.F90

    r13286 r15052  
    112112            &              ie1e2u_v      , e1e2u , e1e2v     )    ! u- & v-surfaces (if gridsize reduction is used in strait(s)) 
    113113         ! 
    114       ENDIF 
     114         ! make sure that periodicities are properly applied  
     115         CALL lbc_lnk( 'dom_hgr', glamt, 'T', 1._wp, glamu, 'U', 1._wp, glamv, 'V', 1._wp, glamf, 'F', 1._wp,   & 
     116            &                     gphit, 'T', 1._wp, gphiu, 'U', 1._wp, gphiv, 'V', 1._wp, gphif, 'F', 1._wp,   & 
     117            &                       e1t, 'T', 1._wp,   e1u, 'U', 1._wp,   e1v, 'V', 1._wp,   e1f, 'F', 1._wp,   &    
     118            &                       e2t, 'T', 1._wp,   e2u, 'U', 1._wp,   e2v, 'V', 1._wp,   e2f, 'F', 1._wp,   & 
     119            &                     kfillmode = jpfillnothing )   ! do not put 0 over closed boundaries 
     120         ! 
     121      ENDIF 
     122      ! 
    115123      !                             !==  Coriolis parameter  ==!   (if necessary) 
    116124      ! 
    117125      IF( iff == 0 ) THEN                 ! Coriolis parameter has not been defined  
    118126         IF(lwp) WRITE(numout,*) '          Coriolis parameter calculated on the sphere from gphif & gphit' 
    119          ff_f(:,:) = 2. * omega * SIN( rad * gphif(:,:) )     ! compute it on the sphere at f-point 
    120          ff_t(:,:) = 2. * omega * SIN( rad * gphit(:,:) )     !    -        -       -    at t-point 
     127         ff_f(:,:) = 2._wp * omega * SIN( rad * gphif(:,:) )     ! compute it on the sphere at f-point 
     128         ff_t(:,:) = 2._wp * omega * SIN( rad * gphit(:,:) )     !    -        -       -    at t-point 
    121129      ELSE 
    122130         IF( ln_read_cfg ) THEN 
    123131            IF(lwp) WRITE(numout,*) '          Coriolis parameter have been read in ', TRIM( cn_domcfg ), ' file' 
    124132         ELSE 
     133            CALL lbc_lnk( 'dom_hgr', ff_t, 'T', 1._wp, ff_f, 'F', 1._wp, kfillmode = jpfillnothing )   ! do not put 0 if closed 
    125134            IF(lwp) WRITE(numout,*) '          Coriolis parameter have been set in usr_def_hgr routine' 
    126135         ENDIF 
     
    141150         e1e2v (:,:) = e1v(:,:) * e2v(:,:)  
    142151      ELSE 
    143          IF(lwp) WRITE(numout,*) '          u- & v-surfaces have been read in "mesh_mask" file:' 
    144          IF(lwp) WRITE(numout,*) '                     grid size reduction in strait(s) is used' 
     152         IF( ln_read_cfg ) THEN 
     153            IF(lwp) WRITE(numout,*) '          u- & v-surfaces have been read in ', TRIM( cn_domcfg ), ' file:' 
     154            IF(lwp) WRITE(numout,*) '                     grid size reduction in strait(s) is used' 
     155         ELSE 
     156            CALL lbc_lnk( 'dom_hgr', e1e2u, 'U', 1._wp, e1e2v, 'V', 1._wp, kfillmode = jpfillnothing )   ! do not put 0 if closed 
     157            IF(lwp) WRITE(numout,*) '          u- & v-surfaces have been have been set in usr_def_hgr routine' 
     158         ENDIF 
    145159      ENDIF 
    146160      r1_e1e2u(:,:) = 1._wp / e1e2u(:,:)     ! compute their invert in any cases 
     
    187201      CALL iom_open( cn_domcfg, inum ) 
    188202      ! 
    189       CALL iom_get( inum, jpdom_global, 'glamt', plamt, cd_type = 'T', psgn = 1._wp ) 
    190       CALL iom_get( inum, jpdom_global, 'glamu', plamu, cd_type = 'U', psgn = 1._wp ) 
    191       CALL iom_get( inum, jpdom_global, 'glamv', plamv, cd_type = 'V', psgn = 1._wp ) 
    192       CALL iom_get( inum, jpdom_global, 'glamf', plamf, cd_type = 'F', psgn = 1._wp ) 
    193       ! 
    194       CALL iom_get( inum, jpdom_global, 'gphit', pphit, cd_type = 'T', psgn = 1._wp ) 
    195       CALL iom_get( inum, jpdom_global, 'gphiu', pphiu, cd_type = 'U', psgn = 1._wp ) 
    196       CALL iom_get( inum, jpdom_global, 'gphiv', pphiv, cd_type = 'V', psgn = 1._wp ) 
    197       CALL iom_get( inum, jpdom_global, 'gphif', pphif, cd_type = 'F', psgn = 1._wp ) 
     203      CALL iom_get( inum, jpdom_global, 'glamt', plamt, cd_type = 'T', psgn = 1._wp, kfill = jpfillnothing ) 
     204      CALL iom_get( inum, jpdom_global, 'glamu', plamu, cd_type = 'U', psgn = 1._wp, kfill = jpfillnothing ) 
     205      CALL iom_get( inum, jpdom_global, 'glamv', plamv, cd_type = 'V', psgn = 1._wp, kfill = jpfillnothing ) 
     206      CALL iom_get( inum, jpdom_global, 'glamf', plamf, cd_type = 'F', psgn = 1._wp, kfill = jpfillnothing ) 
     207      ! 
     208      CALL iom_get( inum, jpdom_global, 'gphit', pphit, cd_type = 'T', psgn = 1._wp, kfill = jpfillnothing ) 
     209      CALL iom_get( inum, jpdom_global, 'gphiu', pphiu, cd_type = 'U', psgn = 1._wp, kfill = jpfillnothing ) 
     210      CALL iom_get( inum, jpdom_global, 'gphiv', pphiv, cd_type = 'V', psgn = 1._wp, kfill = jpfillnothing ) 
     211      CALL iom_get( inum, jpdom_global, 'gphif', pphif, cd_type = 'F', psgn = 1._wp, kfill = jpfillnothing ) 
    198212      ! 
    199213      CALL iom_get( inum, jpdom_global, 'e1t'  , pe1t , cd_type = 'T', psgn = 1._wp, kfill = jpfillcopy ) 
     
    210224         & iom_varid( inum, 'ff_t', ldstop = .FALSE. ) > 0    ) THEN 
    211225         IF(lwp) WRITE(numout,*) '           Coriolis factor at f- and t-points read in ', TRIM( cn_domcfg ), ' file' 
    212          CALL iom_get( inum, jpdom_global, 'ff_f', pff_f, cd_type = 'F', psgn = 1._wp ) 
    213          CALL iom_get( inum, jpdom_global, 'ff_t', pff_t, cd_type = 'T', psgn = 1._wp ) 
     226         CALL iom_get( inum, jpdom_global, 'ff_f', pff_f, cd_type = 'F', psgn = 1._wp, kfill = jpfillnothing ) 
     227         CALL iom_get( inum, jpdom_global, 'ff_t', pff_t, cd_type = 'T', psgn = 1._wp, kfill = jpfillnothing ) 
    214228         kff = 1 
    215229      ELSE 
  • NEMO/trunk/src/OCE/DOM/domzgr.F90

    r15014 r15052  
    7575      INTEGER  ::   ioptio, ibat, ios   ! local integer 
    7676      REAL(wp) ::   zrefdep             ! depth of the reference level (~10m) 
    77       REAL(wp), DIMENSION(jpi,jpj) ::   zmsk 
     77      REAL(wp), DIMENSION(jpi,jpj  ) ::   zmsk 
     78      REAL(wp), DIMENSION(jpi,jpj,2) ::   ztopbot 
    7879      !!---------------------------------------------------------------------- 
    7980      ! 
     
    108109            &              e3w_0   , e3uw_0  , e3vw_0           ,   &    ! vertical scale factors 
    109110            &              k_top   , k_bot            )                  ! 1st & last ocean level 
     111         ! 
     112         ! make sure that periodicities are properly applied  
     113         CALL lbc_lnk( 'dom_zgr', gdept_0, 'T', 1._wp, gdepw_0, 'W', 1._wp,                                         & 
     114            &                       e3t_0, 'T', 1._wp,   e3u_0, 'U', 1._wp,  e3v_0, 'V', 1._wp, e3f_0, 'F', 1._wp,   & 
     115            &                       e3w_0, 'W', 1._wp,  e3uw_0, 'U', 1._wp, e3vw_0, 'V', 1._wp,   &    
     116            &                     kfillmode = jpfillcopy )   ! do not put 0 over closed boundaries 
     117         ztopbot(:,:,1) = REAL(k_top, wp) 
     118         ztopbot(:,:,2) = REAL(k_bot, wp) 
     119         CALL lbc_lnk( 'dom_zgr', ztopbot, 'T', 1._wp, kfillmode = jpfillcopy )   ! do not put 0 over closed boundaries 
     120         k_top(:,:) = NINT(ztopbot(:,:,1)) 
     121         k_bot(:,:) = NINT(ztopbot(:,:,2)) 
    110122         ! 
    111123      ENDIF 
     
    168180      ! 
    169181      !                                ! ice shelf draft and bathymetry 
    170       DO_2D( 1, 1, 1, 1 ) 
     182      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    171183         ikt = mikt(ji,jj) 
    172184         ikb = mbkt(ji,jj) 
  • NEMO/trunk/src/OCE/DOM/istate.F90

    r15023 r15052  
    3333   USE iom             ! I/O library 
    3434   USE lib_mpp         ! MPP library 
     35   USE lbclnk         ! lateal boundary condition / mpp exchanges 
    3536   USE restart         ! restart 
    3637 
     
    128129                  zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
    129130               END DO 
    130                CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) )          
     131               CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) ) 
     132               ! make sure that periodicities are properly applied  
     133               CALL lbc_lnk( 'istate', ts(:,:,:,jp_tem,Kbb), 'T',  1._wp, ts(:,:,:,jp_sal,Kbb), 'T',  1._wp,   & 
     134                  &                    uu(:,:,:,       Kbb), 'U', -1._wp, vv(:,:,:,       Kbb), 'V', -1._wp ) 
    131135            ENDIF 
    132136            ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
Note: See TracChangeset for help on using the changeset viewer.