- Timestamp:
- 2020-04-14T08:14:07+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ICB/icbrst.F90
r12738 r12745 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(nldi) .AND. ii <= mig(nlei) .AND. & 94 & ij >= mjg(nldj) .AND. ij <= mjg(nlej) ) 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)) ) … … 126 126 CALL iom_get( ncid, jpdom_auto, 'calving_hflx', src_calving_hflx ) 127 127 CALL iom_get( ncid, jpdom_auto, 'stored_heat' , berg_grid%stored_heat ) 128 CALL iom_get( ncid, jpdom_auto_xy, 'stored_ice' , berg_grid%stored_ice, kstart=(/1,1,1/), kcount=(/1,1,nclasses/) ) 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(:) ) … … 225 226 226 227 ! Dimensions 227 nret = NF90_DEF_DIM(ncid, 'x', jpi, ix_dim)228 nret = NF90_DEF_DIM(ncid, 'x', nlei-nldi+1, ix_dim) 228 229 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim x failed') 229 230 230 nret = NF90_DEF_DIM(ncid, 'y', jpj, iy_dim)231 nret = NF90_DEF_DIM(ncid, 'y', nlej-nldj+1, iy_dim) 231 232 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim y failed') 232 233 … … 242 243 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number_total' , jpnij ) 243 244 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number' , narea-1 ) 244 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_dimensions_ids' , (/ 1 , 2/) )245 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_global' , (/ jpiglo, jpjglo/) )246 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_local' , (/ jpi , jpj/) )247 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_first' , (/ nimpp , njmpp/) )248 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_last' , (/ nimpp + jpi - 1 , njmpp + jpj - 1/) )249 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_start', (/ nldi - 1 , nldj - 1/) )250 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_end' , (/ jpi - nlei , jpj - nlej/) )245 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_dimensions_ids' , (/ 1 , 2 /) ) 246 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_global' , (/ jpiglo , jpjglo /) ) 247 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_local' , (/ nlei - nldi + 1, nlej - nldj + 1 /) ) 248 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_first' , (/ mig(nldi) , mjg(nldj) /) ) 249 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_last' , (/ mig(nlei) , mjg(nlej) /) ) 250 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_start', (/ 0 , 0 /) ) 251 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_end' , (/ 0 , 0 /) ) 251 252 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_type' , 'BOX' ) 252 253 ENDIF … … 340 341 nstrt3(1) = 1 341 342 nstrt3(2) = 1 342 nlngth3(1) = jpi343 nlngth3(2) = jpj343 nlngth3(1) = nlei - nldi + 1 344 nlngth3(2) = nlej - nldj + 1 344 345 nlngth3(3) = 1 345 346 346 347 DO jn=1,nclasses 347 griddata(:,:,1) = berg_grid%stored_ice(:,:,jn)348 348 nstrt3(3) = jn 349 nret = NF90_PUT_VAR( ncid, nsiceid, griddata, nstrt3, nlngth3 )349 nret = NF90_PUT_VAR( ncid, nsiceid, berg_grid%stored_ice(nldi:nlei,nldj:nlej,jn), nstrt3, nlngth3 ) 350 350 IF (nret .ne. NF90_NOERR) THEN 351 351 IF( lwp ) WRITE(numout,*) TRIM(NF90_STRERROR( nret )) … … 358 358 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var kount failed') 359 359 360 nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat( :,:) )360 nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat(nldi:nlei,nldj:nlej) ) 361 361 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var stored_heat failed') 362 362 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: stored_heat written' 363 363 364 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving( :,:) )364 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving(nldi:nlei,nldj:nlej) ) 365 365 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving failed') 366 nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx( :,:) )366 nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx(nldi:nlei,nldj:nlej) ) 367 367 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving_hflx failed') 368 368 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: calving written'
Note: See TracChangeset
for help on using the changeset viewer.