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

Changeset 6861


Ignore:
Timestamp:
2016-08-09T17:55:10+02:00 (8 years ago)
Author:
clevy
Message:

Add north south cyclic boundaries option, see ticket 1761

Location:
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/CONFIG/SHARED/namelist_ref

    r6763 r6861  
    386386!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    387387!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
     388   l_sasread   = .TRUE.   ! Read fields in a file if .TRUE. , or initlise to 0. in sbcssm.F90 if .FALSE. 
    388389   sn_usp      = 'sas_grid_U' ,    120           , 'vozocrtx' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    389390   sn_vsp      = 'sas_grid_V' ,    120           , 'vomecrty' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90

    r4667 r6861  
    5656         IF( jperio == 5 )   WRITE(numout,*) '      jperio= 5, north fold with F-point pivot' 
    5757         IF( jperio == 6 )   WRITE(numout,*) '      jperio= 6, cyclic east-west and north fold with F-point pivot' 
    58       ENDIF 
    59       ! 
    60       IF( jperio <  0 .OR. jperio > 6 )   CALL ctl_stop( 'jperio is out of range' ) 
     58         IF( jperio == 7 )   WRITE(numout,*) '      jperio= 7, cyclic east-west and north-south' 
     59      ENDIF 
     60      ! 
     61      IF( jperio <  0 .OR. jperio > 7 )   CALL ctl_stop( 'jperio is out of range' ) 
    6162      ! 
    6263      CALL dom_glo                   ! global domain versus zoom and/or local domain 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r6204 r6861  
    466466            idta( 1    , :    ) = 0                 ;      zdta( 1    , :    ) =  0._wp 
    467467            idta(jpidta, :    ) = 0                 ;      zdta(jpidta, :    ) =  0._wp 
     468         ELSEIF( jperio == 7 ) THEN 
     469!           Nothing to do here 
    468470         ELSE 
    469471            ih = 0                                  ;      zh = 0._wp 
     
    730732         IF( lk_mpp ) THEN 
    731733            IF( nbondi == -1 .OR. nbondi == 2 ) THEN 
    732                IF( jperio /= 1 )   mbathy(1,:) = 0 
     734               IF( jperio /= 1 .AND. jperio /= 7 )   mbathy(1,:) = 0 
    733735            ENDIF 
    734736            IF( nbondi == 1 .OR. nbondi == 2 ) THEN 
    735                IF( jperio /= 1 )   mbathy(nlci,:) = 0 
     737               IF( jperio /= 1 .AND. jperio /= 7 )   mbathy(nlci,:) = 0 
    736738            ENDIF 
    737739         ELSE 
     
    748750         mbathy( 1 ,:) = mbathy(jpim1,:) 
    749751         mbathy(jpi,:) = mbathy(  2  ,:) 
     752         IF (jperio == 7) THEN 
     753            IF(lwp) WRITE(numout,*)' north south boundary conditions on mbathy: jperio = ', jperio 
     754            mbathy( : ,1) = mbathy(:, jpjm1) 
     755            mbathy(:, jpj)= mbathy(:,2) 
     756         ENDIF 
    750757      ELSEIF( nperio == 2 ) THEN 
    751758         IF(lwp) WRITE(numout,*) '   equatorial boundary conditions on mbathy: nperio = ', nperio 
     
    779786      ENDIF 
    780787 
    781       IF( lwp .AND. nprint == 1 ) THEN      ! control print 
     788!!      IF( lwp .AND. nprint == 1 ) THEN      ! control print 
     789      IF( lwp ) THEN 
    782790         WRITE(numout,*) 
    783791         WRITE(numout,*) ' bathymetric field :   number of non-zero T-levels ' 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r6476 r6861  
    405405                                         ptab(nlci-jpreci+1:jpi   ,:,:) = zland    ! north 
    406406         ENDIF 
    407          !                                   ! North-South boundaries (always closed) 
    408          IF( .NOT. cd_type == 'F' )   ptab(:,     1       :jprecj,:) = zland       ! south except F-point 
    409                                       ptab(:,nlcj-jprecj+1:jpj   ,:) = zland       ! north 
     407                                          ! North-south cyclic 
     408         IF ( nbondj == 2 .AND. jperio == 7 )    THEN !* cyclic north south only with no mpp split in latitude 
     409            ptab(:,1 , :) = ptab(:, jpjm1,:) 
     410            ptab(:,jpj,:) = ptab(:,     2,:) 
     411         ELSE   !                                   ! North-South boundaries (closed) 
     412            IF( .NOT. cd_type == 'F' )   ptab(:,     1       :jprecj,:) = zland       ! south except F-point 
     413            ptab(:,nlcj-jprecj+1:jpj   ,:) = zland       ! north 
     414         ENDIF 
    410415         ! 
    411416      ENDIF 
     
    614619                                                   pt2d_array(ii)%pt2d(nlci-jpreci+1 : jpi   ,:) = zland    ! north 
    615620            ENDIF 
    616             !                                   ! North-South boundaries (always closed) 
     621                                                ! Noth-South boundaries 
     622            IF ( nbondj == 2 .AND. jperio == 7 )    THEN !* cyclic north south 
     623               pt2d_array(ii)%pt2d(:, 1 ) =   pt2d_array(ii)%pt2d(:, jpjm1 ) 
     624               pt2d_array(ii)%pt2d(:, jpj ) =   pt2d_array(ii)%pt2d(:, 2 )           
     625            ELSE   !              
     626               !                                   ! North-South boundaries (closed) 
    617627               IF( .NOT. type_array(ii) == 'F' )   pt2d_array(ii)%pt2d(:,             1:jprecj ) = zland    ! south except F-point 
    618628                                                   pt2d_array(ii)%pt2d(:, nlcj-jprecj+1:jpj    ) = zland    ! north 
    619629            ! 
    620          ENDIF 
     630            ENDIF 
     631           ENDIF 
    621632      END DO 
    622633 
     
    896907                                         pt2d(nlci-jpreci+1:jpi   ,:) = zland    ! north 
    897908         ENDIF 
    898          !                                   ! North-South boundaries (always closed) 
     909                                            ! North-South boudaries 
     910         IF ( nbondj == 2 .AND. jperio == 7 )    THEN !* cyclic north south 
     911            pt2d(:,  1 ) = pt2d(:,jpjm1) 
     912            pt2d(:, jpj) = pt2d(:,    2) 
     913         ELSE     
     914         !                                   ! North-South boundaries (closed) 
    899915            IF( .NOT. cd_type == 'F' )   pt2d(:,     1       :jprecj) = zland    !south except F-point 
    900916                                         pt2d(:,nlcj-jprecj+1:jpj   ) = zland    ! north 
    901          ! 
     917         ENDIF      
    902918      ENDIF 
    903919 
     
    10811097                                       ptab2(nlci-jpreci+1:jpi   ,:,:) = 0.e0 
    10821098      ENDIF 
    1083  
    1084  
    1085       !                                      ! North-South boundaries 
     1099                                            ! North-South boundaries 
     1100      IF ( nbondj == 2 .AND. jperio == 7 )    THEN !* cyclic north south 
     1101         ptab1(:,     1       ,:) = ptab1(: ,  jpjm1 , :) 
     1102         ptab1(:,   jpj       ,:) = ptab1(: ,      2 , :) 
     1103         ptab2(:,     1       ,:) = ptab2(: ,  jpjm1 , :) 
     1104         ptab2(:,   jpj       ,:) = ptab2(: ,      2 , :) 
     1105      ELSE      
     1106      !                                      ! North-South boundaries closed 
    10861107      IF( .NOT. cd_type1 == 'F' )   ptab1(:,     1       :jprecj,:) = 0.e0    ! south except at F-point 
    10871108      IF( .NOT. cd_type2 == 'F' )   ptab2(:,     1       :jprecj,:) = 0.e0 
    10881109                                    ptab1(:,nlcj-jprecj+1:jpj   ,:) = 0.e0    ! north 
    10891110                                    ptab2(:,nlcj-jprecj+1:jpj   ,:) = 0.e0 
    1090  
     1111      ENDIF      
    10911112 
    10921113      ! 2. East and west directions exchange 
     
    12771298      ! Order matters Here !!!! 
    12781299      ! 
    1279       !                                      !* North-South boundaries (always colsed) 
     1300                                           ! North-South cyclic 
     1301      IF ( nbondj == 2 .AND. jperio == 7 )    THEN !* cyclic north south 
     1302         pt2d(: ,  1-jprj   :  1  )      = pt2d ( :, jpjm1-jprj:jpjm1) 
     1303         pt2d(:, jpj  :jpj+jprj) = pt2d ( :, 2      :2+jprj) 
     1304      ELSE 
     1305         
     1306      !                                      !* North-South boundaries (closed) 
    12801307      IF( .NOT. cd_type == 'F' )   pt2d(:,  1-jprj   :  jprecj  ) = 0.e0    ! south except at F-point 
    12811308                                   pt2d(:,nlcj-jprecj+1:jpj+jprj) = 0.e0    ! north 
    1282  
     1309      ENDIF 
     1310                                 
    12831311      !                                      ! East-West boundaries 
    12841312      !                                           !* Cyclic east-west 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90

    r6413 r6861  
    7979          &              'the domain is lay out for distributed memory computing! ' ) 
    8080 
     81      IF( jperio == 7 ) CALL ctl_stop( ' jperio = 7 needs distributed memory computing ',   & 
     82          &              ' with 1 process. Add key_mpp_mpi in the list of active cpp keys ' ) 
    8183   END SUBROUTINE mpp_init 
    8284 
     
    382384      ! w a r n i n g  narea (zone) /= nproc (processors)! 
    383385 
    384       IF( jperio == 1 .OR. jperio == 4 .OR. jperio == 6 ) THEN 
     386      IF( jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 ) THEN 
    385387         IF( jpni == 1 )THEN 
    386388            nbondi = 2 
     
    449451      ENDIF 
    450452 
     453      IF( jperio == 7 .AND. ( jpni /= 1 .OR. jpnj /= 1 ) ) & 
     454         &                  CALL ctl_stop( ' mpp_init: error jperio = 7 works only with jpni = jpnj = 1' ) 
    451455      IF( nperio == 1 .AND. jpni /= 1 ) CALL ctl_stop( ' mpp_init: error on cyclicity' ) 
    452456 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90

    r5407 r6861  
    3939   LOGICAL              ::   ln_3d_uve     !: specify whether input velocity data is 3D 
    4040   LOGICAL              ::   ln_read_frq   !: specify whether we must read frq or not 
     41   LOGICAL              ::   l_sasread     !: Ice intilisation: read a file (.TRUE.) or anaytical initilaistion in namelist &namsbc_sas 
    4142   LOGICAL              ::   l_initdone = .false. 
    4243   INTEGER     ::   nfld_3d 
     
    8283      IF( nn_timing == 1 )  CALL timing_start( 'sbc_ssm') 
    8384 
     85  IF ( l_sasread ) THEN 
    8486      IF( nfld_3d > 0 ) CALL fld_read( kt, 1, sf_ssm_3d )      !==   read data at kt time step   ==! 
    8587      IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d )      !==   read data at kt time step   ==! 
     
    99101      ssh_m(:,:) = sf_ssm_2d(jf_ssh)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height 
    100102      IF( ln_read_frq )   frq_m(:,:) = sf_ssm_2d(jf_frq)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height 
     103 
     104   ELSE 
     105      sst_m(:,:) = 0. 
     106      sss_m(:,:) = 0. 
     107      ssu_m(:,:) = 0. 
     108      ssv_m(:,:) = 0. 
     109      ssh_m(:,:) = 0. 
     110   ENDIF 
    101111      ! 
    102112      IF ( nn_ice == 1 ) THEN 
     
    155165      TYPE(FLD_N) :: sn_ssh, sn_e3t, sn_frq 
    156166      ! 
    157       NAMELIST/namsbc_sas/cn_dir, ln_3d_uve, ln_read_frq, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq 
    158       !!---------------------------------------------------------------------- 
    159        
     167      NAMELIST/namsbc_sas/l_sasread, cn_dir, ln_3d_uve, ln_read_frq, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq 
     168      !!---------------------------------------------------------------------- 
     169 
    160170      IF( ln_rstart .AND. nn_components == jp_iam_sas ) RETURN 
    161171       
     
    176186         WRITE(numout,*) '~~~~~~~~~~~ ' 
    177187         WRITE(numout,*) '   Namelist namsbc_sas' 
     188         WRITE(numout,*) '      Initialisation using an input file  = ',l_sasread  
    178189         WRITE(numout,*) '      Are we supplying a 3D u,v and e3 field                             ln_3d_uve   = ', ln_3d_uve 
    179190         WRITE(numout,*) '      Are we reading frq (fraction of qsr absorbed in the 1st T level)   ln_read_frq = ', ln_read_frq 
     
    204215         nn_closea = 0 
    205216      ENDIF 
     217      IF (l_sasread) THEN 
    206218      !  
    207219      !! following code is a bit messy, but distinguishes between when u,v are 3d arrays and 
     
    285297      IF( nfld_2d > 0 ) DEALLOCATE( slf_2d, STAT=ierr ) 
    286298 
     299   ENDIF 
     300  
    287301      CALL sbc_ssm( nit000 )   ! need to define ss?_m arrays used in limistate 
    288302      IF( .NOT. ln_read_frq )   frq_m(:,:) = 1. 
    289       l_initdone = .TRUE. 
     303      l_initdone = .TRUE.     
    290304      ! 
    291305   END SUBROUTINE sbc_ssm_init 
Note: See TracChangeset for help on using the changeset viewer.