- Timestamp:
- 2012-04-30T12:50:36+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90
r3371 r3372 12 12 !!---------------------------------------------------------------------- 13 13 !!---------------------------------------------------------------------- 14 !! icb_init 15 !! icb_ gen: generate test icebergs16 !! icb_nam 14 !! icb_init : initialise icebergs 15 !! icb_ini_gen : generate test icebergs 16 !! icb_nam : read iceberg namelist 17 17 !!---------------------------------------------------------------------- 18 18 USE dom_oce ! ocean domain … … 34 34 35 35 PUBLIC icb_init ! routine called in nemogcm.F90 module 36 PUBLIC icb_gen ! routine called in icbclv.F90 module37 36 38 37 CHARACTER(len=100) :: cn_dir = './' ! Root directory for location of icb files … … 244 243 245 244 IF( .NOT.ln_rstart ) THEN 246 IF( nn_test_icebergs > 0 ) CALL icb_ gen()245 IF( nn_test_icebergs > 0 ) CALL icb_ini_gen() 247 246 ELSE 248 247 IF( nn_test_icebergs > 0 ) THEN 249 CALL icb_ gen()248 CALL icb_ini_gen() 250 249 ELSE 251 CALL ic ebergs_read_restart()252 253 ENDIF 254 ENDIF 255 ! 256 IF( nn_sample_rate .GT. 0 ) CALL traj_init( nitend )257 ! 258 CALL icb_ budget_init()259 ! 260 IF( nn_verbose_level >= 2 ) CALL print_bergs('icb_init, initial status', nit000-1)250 CALL icb_rst_read() 251 l_restarted_bergs = .TRUE. 252 ENDIF 253 ENDIF 254 ! 255 IF( nn_sample_rate .GT. 0 ) CALL icb_trj_init( nitend ) 256 ! 257 CALL icb_dia_init() 258 ! 259 IF( nn_verbose_level >= 2 ) CALL icb_utl_print('icb_init, initial status', nit000-1) 261 260 ! 262 261 END SUBROUTINE icb_init 263 262 264 SUBROUTINE icb_ gen()265 !!---------------------------------------------------------------------- 266 !! *** ROUTINE icb_ gen ***263 SUBROUTINE icb_ini_gen() 264 !!---------------------------------------------------------------------- 265 !! *** ROUTINE icb_ini_gen *** 267 266 !! 268 267 !! ** Purpose : iceberg generation 269 268 !! 270 !! ** Method : - blah blah 269 !! ** Method : - at each grid point of the test box supplied in the namelist 270 !! generate an iceberg in one class determined by the value of 271 !! parameter nn_test_icebergs 271 272 !!---------------------------------------------------------------------- 272 273 INTEGER :: ji, jj, ibergs … … 301 302 localpt%xi = REAL( nimpp+ji-1, wp ) 302 303 localpt%yj = REAL( njmpp+jj-1, wp ) 303 localpt%lon = bilin(glamt, localpt%xi, localpt%yj, 'T', 0, 0 )304 localpt%lat = bilin(gphit, localpt%xi, localpt%yj, 'T', 0, 0 )304 localpt%lon = icb_utl_bilin(glamt, localpt%xi, localpt%yj, 'T', 0, 0 ) 305 localpt%lat = icb_utl_bilin(gphit, localpt%xi, localpt%yj, 'T', 0, 0 ) 305 306 localpt%mass = rn_initial_mass (iberg) 306 307 localpt%thickness = rn_initial_thickness(iberg) … … 313 314 localpt%uvel = 0._wp 314 315 localpt%vvel = 0._wp 315 CALL i ncrement_kounter()316 CALL icb_utl_incr() 316 317 localberg%number(:) = num_bergs(:) 317 call add_new_berg_to_list(localberg, localpt)318 call icb_utl_add(localberg, localpt) 318 319 ENDIF 319 320 END DO 320 321 END DO 321 322 ! 322 ibergs = count_bergs()323 ibergs = icb_utl_count() 323 324 IF( lk_mpp ) CALL mpp_sum(ibergs) 324 WRITE(numicb,'(a,i6,a)') 'diamonds, icb_ gen: ',ibergs,' were generated'325 ! 326 END SUBROUTINE icb_ gen325 WRITE(numicb,'(a,i6,a)') 'diamonds, icb_ini_gen: ',ibergs,' were generated' 326 ! 327 END SUBROUTINE icb_ini_gen 327 328 328 329 SUBROUTINE icb_nam … … 381 382 IF( zfact < 1._wp ) THEN 382 383 IF( zfact <= 0._wp ) THEN 383 CALL ctl_stop( 'icb_ init: sum of berg distribution equal to zero' )384 CALL ctl_stop( 'icb_nam: sum of berg distribution equal to zero' ) 384 385 ELSE 385 386 rn_distribution(:) = rn_distribution(:) / zfact 386 CALL ctl_warn( 'icb_ init: sum of berg input distribution not equal to one and so RESCALED' )387 CALL ctl_warn( 'icb_nam: sum of berg input distribution not equal to one and so RESCALED' ) 387 388 ENDIF 388 389 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.