Changeset 13286 for NEMO/trunk/src/OCE/ICB
- Timestamp:
- 2020-07-09T17:48:29+02:00 (4 years ago)
- Location:
- NEMO/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk
- Property svn:externals
-
old new 2 2 ^/utils/build/makenemo@HEAD makenemo 3 3 ^/utils/build/mk@HEAD mk 4 ^/utils/tools /@HEADtools4 ^/utils/tools@HEAD tools 5 5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM … … 8 8 9 9 # SETTE 10 ^/utils/CI/ sette@12931sette10 ^/utils/CI/r12931_sette_ticket2366@HEAD sette
-
- Property svn:externals
-
NEMO/trunk/src/OCE/ICB/icb_oce.F90
r13281 r13286 147 147 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nicbfldexpect !: nfold expected number of bergs 148 148 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nicbfldreq !: nfold message handle (immediate send) 149 150 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: griddata !: work array for icbrst151 152 149 !!---------------------------------------------------------------------- 153 150 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 197 194 icb_alloc = icb_alloc + ill 198 195 199 ALLOCATE( griddata(jpi,jpj,1), STAT=ill )200 icb_alloc = icb_alloc + ill201 202 196 CALL mpp_sum ( 'icb_oce', icb_alloc ) 203 197 IF( icb_alloc > 0 ) CALL ctl_warn('icb_alloc: allocation of arrays failed') -
NEMO/trunk/src/OCE/ICB/icbini.F90
r13281 r13286 133 133 ! first entry with narea for this processor is left hand interior index 134 134 ! last entry is right hand interior index 135 jj = nlcj/2135 jj = jpj/2 136 136 nicbdi = -1 137 137 nicbei = -1 … … 149 149 ! 150 150 ! repeat for j direction 151 ji = nlci/2151 ji = jpi/2 152 152 nicbdj = -1 153 153 nicbej = -1 … … 166 166 ! special for east-west boundary exchange we save the destination index 167 167 i1 = MAX( nicbdi-1, 1) 168 i3 = INT( src_calving(i1, nlcj/2) )168 i3 = INT( src_calving(i1,jpj/2) ) 169 169 jj = INT( i3/nicbpack ) 170 170 ricb_left = REAL( i3 - nicbpack*jj, wp ) 171 171 i1 = MIN( nicbei+1, jpi ) 172 i3 = INT( src_calving(i1, nlcj/2) )172 i3 = INT( src_calving(i1,jpj/2) ) 173 173 jj = INT( i3/nicbpack ) 174 174 ricb_right = REAL( i3 - nicbpack*jj, wp ) … … 203 203 WRITE(numicb,*) 'processor ', narea 204 204 WRITE(numicb,*) 'jpi, jpj ', jpi, jpj 205 WRITE(numicb,*) ' nldi, nlei ', nldi, nlei206 WRITE(numicb,*) ' nldj, nlej ', nldj, nlej205 WRITE(numicb,*) 'Nis0, Nie0 ', Nis0, Nie0 206 WRITE(numicb,*) 'Njs0, Nje0 ', Njs0, Nje0 207 207 WRITE(numicb,*) 'berg i interior ', nicbdi, nicbei 208 208 WRITE(numicb,*) 'berg j interior ', nicbdj, nicbej 209 209 WRITE(numicb,*) 'berg left ', ricb_left 210 210 WRITE(numicb,*) 'berg right ', ricb_right 211 jj = nlcj/2211 jj = jpj/2 212 212 WRITE(numicb,*) "central j line:" 213 213 WRITE(numicb,*) "i processor" … … 215 215 WRITE(numicb,*) "i point" 216 216 WRITE(numicb,*) (INT(src_calving(ji,jj)), ji=1,jpi) 217 ji = nlci/2217 ji = jpi/2 218 218 WRITE(numicb,*) "central i line:" 219 219 WRITE(numicb,*) "j processor" … … 256 256 ivar = iom_varid( inum, 'maxclass', ldstop=.FALSE. ) 257 257 IF( ivar > 0 ) THEN 258 CALL iom_get ( inum, jpdom_ data, 'maxclass', src_calving ) ! read the max distribution array258 CALL iom_get ( inum, jpdom_global, 'maxclass', src_calving ) ! read the max distribution array 259 259 berg_grid%maxclass(:,:) = INT( src_calving ) 260 260 src_calving(:,:) = 0._wp -
NEMO/trunk/src/OCE/ICB/icbrst.F90
r13062 r13286 91 91 ij = INT( localpt%yj + 0.5 ) 92 92 ! 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) THEN95 96 CALL iom_get( ncid, jpdom_unknown, 'number' 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/) ) 97 97 localberg%number(:) = INT(zdata(:)) 98 98 imax_icb = MAX( imax_icb, INT(zdata(1)) ) … … 123 123 124 124 ! 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/) ) 129 130 130 131 CALL iom_get( ncid, jpdom_unknown, 'kount' , zdata(:) ) … … 229 230 230 231 ! Dimensions 231 nret = NF90_DEF_DIM(ncid, 'x', jpi, ix_dim)232 nret = NF90_DEF_DIM(ncid, 'x', Ni_0, ix_dim) 232 233 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim x failed') 233 234 234 nret = NF90_DEF_DIM(ncid, 'y', jpj, iy_dim)235 nret = NF90_DEF_DIM(ncid, 'y', Nj_0, iy_dim) 235 236 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim y failed') 236 237 … … 244 245 IF( lk_mpp ) THEN 245 246 ! 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' ) 256 257 ENDIF 257 258 … … 344 345 nstrt3(1) = 1 345 346 nstrt3(2) = 1 346 nlngth3(1) = jpi347 nlngth3(2) = jpj347 nlngth3(1) = Ni_0 348 nlngth3(2) = Nj_0 348 349 nlngth3(3) = 1 349 350 350 351 DO jn=1,nclasses 351 griddata(:,:,1) = berg_grid%stored_ice(:,:,jn)352 352 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 ) 354 354 IF (nret .ne. NF90_NOERR) THEN 355 355 IF( lwp ) WRITE(numout,*) TRIM(NF90_STRERROR( nret )) … … 362 362 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var kount failed') 363 363 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) ) 365 365 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var stored_heat failed') 366 366 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: stored_heat written' 367 367 368 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving( :,:) )368 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving(Nis0:Nie0,Njs0:Nje0) ) 369 369 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) ) 371 371 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving_hflx failed') 372 372 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: calving written'
Note: See TracChangeset
for help on using the changeset viewer.