- Timestamp:
- 2012-11-19T16:51:17+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r3294 r3609 32 32 USE sbc_oce ! Surface boundary condition: ocean fields 33 33 USE sbc_ice ! Surface boundary condition: ice fields 34 USE icb_oce ! Icebergs 35 USE icbdia ! Iceberg budgets 34 36 USE sbcssr ! restoring term toward SST/SSS climatology 35 37 USE phycst ! physical constants … … 59 61 60 62 INTEGER :: nid_T, nz_T, nh_T, ndim_T, ndim_hT ! grid_T file 63 INTEGER :: nb_T , ndim_bT ! grid_T file 61 64 INTEGER :: nid_U, nz_U, nh_U, ndim_U, ndim_hU ! grid_U file 62 65 INTEGER :: nid_V, nz_V, nh_V, ndim_V, ndim_hV ! grid_V file … … 65 68 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_hT, ndex_hU, ndex_hV 66 69 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_T, ndex_U, ndex_V 70 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_bT 67 71 68 72 !! * Substitutions … … 234 238 INTEGER :: ierr ! error code return from allocation 235 239 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 240 INTEGER :: jn, ierror ! local integers 236 241 REAL(wp) :: zsto, zout, zmax, zjulian, zdt ! local scalars 237 242 !! … … 320 325 CALL wheneq( jpi*jpj*ipk, tmask, 1, 1., ndex_T , ndim_T ) ! volume 321 326 CALL wheneq( jpi*jpj , tmask, 1, 1., ndex_hT, ndim_hT ) ! surface 327 ! 328 IF( ln_icebergs ) THEN 329 ! 330 !! allocation cant go in dia_wri_alloc because ln_icebergs is only set after 331 !! that routine is called from nemogcm, so do it here immediately before its needed 332 ALLOCATE( ndex_bT(jpi*jpj*nclasses), STAT=ierror ) 333 IF( lk_mpp ) CALL mpp_sum( ierror ) 334 IF( ierror /= 0 ) THEN 335 CALL ctl_stop('dia_wri: failed to allocate iceberg diagnostic array') 336 RETURN 337 ENDIF 338 ! 339 !! iceberg vertical coordinate is class number 340 CALL histvert( nid_T, "class", "Iceberg class", & ! Vertical grid: class 341 & "number", nclasses, class_num, nb_T ) 342 ! 343 !! each class just needs the surface index pattern 344 ndim_bT = 3 345 DO jn = 1,nclasses 346 ndex_bT((jn-1)*jpi*jpj+1:jn*jpi*jpj) = ndex_hT(1:jpi*jpj) 347 ENDDO 348 ! 349 ENDIF 322 350 323 351 ! Define the U grid FILE ( nid_U ) … … 401 429 CALL histdef( nid_T, "sowindsp", "wind speed at 10m" , "m/s" , & ! wndm 402 430 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 431 ! 432 IF( ln_icebergs ) THEN 433 CALL histdef( nid_T, "calving" , "calving mass input" , "kg/s" , & 434 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 435 CALL histdef( nid_T, "calving_heat" , "calving heat flux" , "XXXX" , & 436 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 437 CALL histdef( nid_T, "berg_floating_melt" , "Melt rate of icebergs + bits" , "kg/m2/s", & 438 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 439 CALL histdef( nid_T, "berg_stored_ice" , "Accumulated ice mass by class" , "kg" , & 440 & jpi, jpj, nh_T, nclasses , 1, nclasses , nb_T , 32, clop, zsto, zout ) 441 IF( ln_bergdia ) THEN 442 CALL histdef( nid_T, "berg_melt" , "Melt rate of icebergs" , "kg/m2/s", & 443 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 444 CALL histdef( nid_T, "berg_buoy_melt" , "Buoyancy component of iceberg melt rate" , "kg/m2/s", & 445 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 446 CALL histdef( nid_T, "berg_eros_melt" , "Erosion component of iceberg melt rate" , "kg/m2/s", & 447 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 448 CALL histdef( nid_T, "berg_conv_melt" , "Convective component of iceberg melt rate", "kg/m2/s", & 449 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 450 CALL histdef( nid_T, "berg_virtual_area" , "Virtual coverage by icebergs" , "m2" , & 451 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 452 CALL histdef( nid_T, "bits_src" , "Mass source of bergy bits" , "kg/m2/s", & 453 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 454 CALL histdef( nid_T, "bits_melt" , "Melt rate of bergy bits" , "kg/m2/s", & 455 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 456 CALL histdef( nid_T, "bits_mass" , "Bergy bit density field" , "kg/m2" , & 457 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 458 CALL histdef( nid_T, "berg_mass" , "Iceberg density field" , "kg/m2" , & 459 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 460 CALL histdef( nid_T, "berg_real_calving" , "Calving into iceberg class" , "kg/s" , & 461 & jpi, jpj, nh_T, nclasses , 1, nclasses , nb_T , 32, clop, zsto, zout ) 462 ENDIF 463 ENDIF 464 403 465 #if ! defined key_coupled 404 466 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp … … 555 617 CALL histwrite( nid_T, "soicecov", it, fr_i , ndim_hT, ndex_hT ) ! ice fraction 556 618 CALL histwrite( nid_T, "sowindsp", it, wndm , ndim_hT, ndex_hT ) ! wind speed 619 ! 620 IF( ln_icebergs ) THEN 621 ! 622 CALL histwrite( nid_T, "calving" , it, berg_grid%calving , ndim_hT, ndex_hT ) 623 CALL histwrite( nid_T, "calving_heat" , it, berg_grid%calving_hflx , ndim_hT, ndex_hT ) 624 CALL histwrite( nid_T, "berg_floating_melt" , it, berg_grid%floating_melt, ndim_hT, ndex_hT ) 625 ! 626 CALL histwrite( nid_T, "berg_stored_ice" , it, berg_grid%stored_ice , ndim_bT, ndex_bT ) 627 ! 628 IF( ln_bergdia ) THEN 629 CALL histwrite( nid_T, "berg_melt" , it, berg_melt , ndim_hT, ndex_hT ) 630 CALL histwrite( nid_T, "berg_buoy_melt" , it, buoy_melt , ndim_hT, ndex_hT ) 631 CALL histwrite( nid_T, "berg_eros_melt" , it, eros_melt , ndim_hT, ndex_hT ) 632 CALL histwrite( nid_T, "berg_conv_melt" , it, conv_melt , ndim_hT, ndex_hT ) 633 CALL histwrite( nid_T, "berg_virtual_area" , it, virtual_area , ndim_hT, ndex_hT ) 634 CALL histwrite( nid_T, "bits_src" , it, bits_src , ndim_hT, ndex_hT ) 635 CALL histwrite( nid_T, "bits_melt" , it, bits_melt , ndim_hT, ndex_hT ) 636 CALL histwrite( nid_T, "bits_mass" , it, bits_mass , ndim_hT, ndex_hT ) 637 CALL histwrite( nid_T, "berg_mass" , it, berg_mass , ndim_hT, ndex_hT ) 638 ! 639 CALL histwrite( nid_T, "berg_real_calving" , it, real_calving , ndim_bT, ndex_bT ) 640 ENDIF 641 ENDIF 642 557 643 #if ! defined key_coupled 558 644 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping
Note: See TracChangeset
for help on using the changeset viewer.