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 13286 for NEMO/trunk/src/OCE/ICB – NEMO

Ignore:
Timestamp:
2020-07-09T17:48:29+02:00 (4 years ago)
Author:
smasson
Message:

trunk: merge extra halos branch in trunk, see #2366

Location:
NEMO/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        22^/utils/build/makenemo@HEAD   makenemo 
        33^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools/@HEAD           tools 
         4^/utils/tools@HEAD            tools 
        55^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
         
        88 
        99# SETTE 
        10 ^/utils/CI/sette@12931        sette 
         10^/utils/CI/r12931_sette_ticket2366@HEAD  sette 
  • NEMO/trunk/src/OCE/ICB/icb_oce.F90

    r13281 r13286  
    147147   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)       ::   nicbfldexpect                    !: nfold expected number of bergs 
    148148   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)       ::   nicbfldreq                       !: nfold message handle (immediate send) 
    149  
    150    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   :: griddata                           !: work array for icbrst 
    151  
    152149   !!---------------------------------------------------------------------- 
    153150   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    197194      icb_alloc = icb_alloc + ill 
    198195 
    199       ALLOCATE( griddata(jpi,jpj,1), STAT=ill ) 
    200       icb_alloc = icb_alloc + ill 
    201  
    202196      CALL mpp_sum ( 'icb_oce', icb_alloc ) 
    203197      IF( icb_alloc > 0 )   CALL ctl_warn('icb_alloc: allocation of arrays failed') 
  • NEMO/trunk/src/OCE/ICB/icbini.F90

    r13281 r13286  
    133133      ! first entry with narea for this processor is left hand interior index 
    134134      ! last  entry                               is right hand interior index 
    135       jj = nlcj/2 
     135      jj = jpj/2 
    136136      nicbdi = -1 
    137137      nicbei = -1 
     
    149149      ! 
    150150      ! repeat for j direction 
    151       ji = nlci/2 
     151      ji = jpi/2 
    152152      nicbdj = -1 
    153153      nicbej = -1 
     
    166166      ! special for east-west boundary exchange we save the destination index 
    167167      i1 = MAX( nicbdi-1, 1) 
    168       i3 = INT( src_calving(i1,nlcj/2) ) 
     168      i3 = INT( src_calving(i1,jpj/2) ) 
    169169      jj = INT( i3/nicbpack ) 
    170170      ricb_left = REAL( i3 - nicbpack*jj, wp ) 
    171171      i1 = MIN( nicbei+1, jpi ) 
    172       i3 = INT( src_calving(i1,nlcj/2) ) 
     172      i3 = INT( src_calving(i1,jpj/2) ) 
    173173      jj = INT( i3/nicbpack ) 
    174174      ricb_right = REAL( i3 - nicbpack*jj, wp ) 
     
    203203         WRITE(numicb,*) 'processor ', narea 
    204204         WRITE(numicb,*) 'jpi, jpj   ', jpi, jpj 
    205          WRITE(numicb,*) 'nldi, nlei ', nldi, nlei 
    206          WRITE(numicb,*) 'nldj, nlej ', nldj, nlej 
     205         WRITE(numicb,*) 'Nis0, Nie0 ', Nis0, Nie0 
     206         WRITE(numicb,*) 'Njs0, Nje0 ', Njs0, Nje0 
    207207         WRITE(numicb,*) 'berg i interior ', nicbdi, nicbei 
    208208         WRITE(numicb,*) 'berg j interior ', nicbdj, nicbej 
    209209         WRITE(numicb,*) 'berg left       ', ricb_left 
    210210         WRITE(numicb,*) 'berg right      ', ricb_right 
    211          jj = nlcj/2 
     211         jj = jpj/2 
    212212         WRITE(numicb,*) "central j line:" 
    213213         WRITE(numicb,*) "i processor" 
     
    215215         WRITE(numicb,*) "i point" 
    216216         WRITE(numicb,*) (INT(src_calving(ji,jj)), ji=1,jpi) 
    217          ji = nlci/2 
     217         ji = jpi/2 
    218218         WRITE(numicb,*) "central i line:" 
    219219         WRITE(numicb,*) "j processor" 
     
    256256         ivar = iom_varid( inum, 'maxclass', ldstop=.FALSE. ) 
    257257         IF( ivar > 0 ) THEN 
    258             CALL iom_get  ( inum, jpdom_data, 'maxclass', src_calving )   ! read the max distribution array 
     258            CALL iom_get  ( inum, jpdom_global, 'maxclass', src_calving )   ! read the max distribution array 
    259259            berg_grid%maxclass(:,:) = INT( src_calving ) 
    260260            src_calving(:,:) = 0._wp 
  • NEMO/trunk/src/OCE/ICB/icbrst.F90

    r13062 r13286  
    9191            ij = INT( localpt%yj + 0.5 ) 
    9292            ! Only proceed if this iceberg is on the local processor (excluding halos). 
    93             IF ( ii .GE. nldi+nimpp-1 .AND. ii .LE. nlei+nimpp-1 .AND. & 
    94            &     ij .GE. nldj+njmpp-1 .AND. ij .LE. nlej+njmpp-1 ) THEN            
    95  
    96                CALL iom_get( ncid, jpdom_unknown, 'number'       , zdata(:) , ktime=jn, kstart=(/1/), kcount=(/nkounts/) ) 
     93            IF ( ii >= mig(Nis0) .AND. ii <= mig(Nie0) .AND.  & 
     94           &     ij >= mjg(Njs0) .AND. ij <= mjg(Nje0) ) THEN            
     95 
     96               CALL iom_get( ncid, jpdom_unknown, 'number', zdata(:) , ktime=jn, kstart=(/1/), kcount=(/nkounts/) ) 
    9797               localberg%number(:) = INT(zdata(:)) 
    9898               imax_icb = MAX( imax_icb, INT(zdata(1)) ) 
     
    123123 
    124124      ! Gridded variables 
    125       CALL iom_get( ncid, jpdom_autoglo,    'calving'     , src_calving  ) 
    126       CALL iom_get( ncid, jpdom_autoglo,    'calving_hflx', src_calving_hflx  ) 
    127       CALL iom_get( ncid, jpdom_autoglo,    'stored_heat' , berg_grid%stored_heat  ) 
    128       CALL iom_get( ncid, jpdom_autoglo_xy, 'stored_ice'  , berg_grid%stored_ice, kstart=(/1,1,1/), kcount=(/1,1,nclasses/) ) 
     125      CALL iom_get( ncid, jpdom_auto,    'calving'     , src_calving  ) 
     126      CALL iom_get( ncid, jpdom_auto,    'calving_hflx', src_calving_hflx  ) 
     127      CALL iom_get( ncid, jpdom_auto,    'stored_heat' , berg_grid%stored_heat  ) 
     128      ! with jpdom_auto_xy, ue use only the third element of kstart and kcount. 
     129      CALL iom_get( ncid, jpdom_auto_xy, 'stored_ice'  , berg_grid%stored_ice, kstart=(/-99,-99,1/), kcount=(/-99,-99,nclasses/) ) 
    129130       
    130131      CALL iom_get( ncid, jpdom_unknown, 'kount' , zdata(:) ) 
     
    229230    
    230231         ! Dimensions 
    231          nret = NF90_DEF_DIM(ncid, 'x', jpi, ix_dim) 
     232         nret = NF90_DEF_DIM(ncid, 'x', Ni_0, ix_dim) 
    232233         IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim x failed') 
    233234    
    234          nret = NF90_DEF_DIM(ncid, 'y', jpj, iy_dim) 
     235         nret = NF90_DEF_DIM(ncid, 'y', Nj_0, iy_dim) 
    235236         IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim y failed') 
    236237    
     
    244245         IF( lk_mpp ) THEN 
    245246            ! Set domain parameters (assume jpdom_local_full) 
    246             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number_total'   , jpnij              ) 
    247             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number'         , narea-1            ) 
    248             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_dimensions_ids' , (/1     , 2     /) ) 
    249             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_global'    , (/jpiglo, jpjglo/) ) 
    250             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_local'     , (/jpi   , jpj   /) ) 
    251             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_first' , (/nimpp , njmpp /) ) 
    252             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_last'  , (/nimpp + jpi - 1 , njmpp + jpj - 1 /) ) 
    253             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_start', (/nldi - 1        , nldj - 1         /) ) 
    254             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_end'  , (/jpi - nlei      , jpj - nlej       /) ) 
    255             nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_type'           , 'BOX'              ) 
     247            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number_total'   , jpnij                        ) 
     248            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number'         , narea-1                      ) 
     249            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_dimensions_ids' , (/ 1         , 2          /) ) 
     250            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_global'    , (/ Ni0glo    , Nj0glo     /) ) 
     251            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_local'     , (/ Ni_0      , Nj_0       /) ) 
     252            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_first' , (/ mig0(Nis0), mjg0(Njs0) /) ) 
     253            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_last'  , (/ mig0(Nie0), mjg0(Nje0) /) ) 
     254            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_start', (/ 0         , 0          /) ) 
     255            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_end'  , (/ 0         , 0          /) ) 
     256            nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_type'           , 'BOX'                        ) 
    256257         ENDIF 
    257258          
     
    344345         nstrt3(1) = 1 
    345346         nstrt3(2) = 1 
    346          nlngth3(1) = jpi 
    347          nlngth3(2) = jpj 
     347         nlngth3(1) = Ni_0 
     348         nlngth3(2) = Nj_0 
    348349         nlngth3(3) = 1 
    349350    
    350351         DO jn=1,nclasses 
    351             griddata(:,:,1) = berg_grid%stored_ice(:,:,jn) 
    352352            nstrt3(3) = jn 
    353             nret = NF90_PUT_VAR( ncid, nsiceid, griddata, nstrt3, nlngth3 ) 
     353            nret = NF90_PUT_VAR( ncid, nsiceid, berg_grid%stored_ice(Nis0:Nie0,Njs0:Nje0,jn), nstrt3, nlngth3 ) 
    354354            IF (nret .ne. NF90_NOERR) THEN 
    355355               IF( lwp ) WRITE(numout,*) TRIM(NF90_STRERROR( nret )) 
     
    362362         IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var kount failed') 
    363363    
    364          nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat(:,:) ) 
     364         nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat(Nis0:Nie0,Njs0:Nje0) ) 
    365365         IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var stored_heat failed') 
    366366         IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: stored_heat written' 
    367367    
    368          nret = NF90_PUT_VAR( ncid, ncalvid , src_calving(:,:) ) 
     368         nret = NF90_PUT_VAR( ncid, ncalvid , src_calving(Nis0:Nie0,Njs0:Nje0) ) 
    369369         IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving failed') 
    370          nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx(:,:) ) 
     370         nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx(Nis0:Nie0,Njs0:Nje0) ) 
    371371         IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving_hflx failed') 
    372372         IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: calving written' 
Note: See TracChangeset for help on using the changeset viewer.