Changeset 5123 for trunk/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
- Timestamp:
- 2015-03-04T17:06:03+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
r4990 r5123 18 18 USE thd_ice ! LIM thermodynamics 19 19 USE ice ! LIM variables 20 USE par_ice ! LIM parameters21 20 USE dom_ice ! LIM domain 22 21 USE limthd_lac ! LIM … … 27 26 USE wrk_nemo ! work arrays 28 27 USE prtctl ! Print control 29 ! Check budget (Rousset) 28 30 29 USE iom ! I/O manager 31 30 USE lib_fortran ! glob_sum … … 40 39 PUBLIC lim_itd_me_icestrength 41 40 PUBLIC lim_itd_me_init 42 PUBLIC lim_itd_me_zapsmall 43 PUBLIC lim_itd_me_alloc ! called by iceini.F90 41 PUBLIC lim_itd_me_alloc ! called by sbc_lim_init 44 42 45 43 !----------------------------------------------------------------------- … … 125 123 !! and Elizabeth C. Hunke, LANL are gratefully acknowledged 126 124 !!--------------------------------------------------------------------! 127 INTEGER :: ji, jj, jk, jl ! dummy loop index 128 INTEGER :: niter, nitermax = 20 ! local integer 129 LOGICAL :: asum_error ! flag for asum .ne. 1 125 INTEGER :: ji, jj, jk, jl ! dummy loop index 126 INTEGER :: niter ! local integer 130 127 INTEGER :: iterate_ridging ! if true, repeat the ridging 131 REAL(wp) :: w1, tmpfac! local scalar128 REAL(wp) :: za, zfac ! local scalar 132 129 CHARACTER (len = 15) :: fieldid 133 130 REAL(wp), POINTER, DIMENSION(:,:) :: closing_net ! net rate at which area is removed (1/s) … … 140 137 REAL(wp), POINTER, DIMENSION(:,:) :: vt_i_init, vt_i_final ! ice volume summed over categories 141 138 ! 139 INTEGER, PARAMETER :: nitermax = 20 140 ! 142 141 REAL(wp) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b 143 142 !!----------------------------------------------------------------------------- … … 159 158 ! 1) Thickness categories boundaries, ice / o.w. concentrations, init_ons 160 159 !-----------------------------------------------------------------------------! 161 Cp = 0.5 * grav * (rau0-rhoic) * rhoic /rau0 ! proport const for PE160 Cp = 0.5 * grav * (rau0-rhoic) * rhoic * r1_rau0 ! proport const for PE 162 161 ! 163 162 CALL lim_itd_me_ridgeprep ! prepare ridging … … 193 192 ! (thick, newly ridged ice). 194 193 195 closing_net(ji,jj) = Cs * 0.5 * ( Delta_i(ji,jj) - ABS( divu_i(ji,jj) ) ) - MIN( divu_i(ji,jj), 0._wp )194 closing_net(ji,jj) = rn_cs * 0.5 * ( delta_i(ji,jj) - ABS( divu_i(ji,jj) ) ) - MIN( divu_i(ji,jj), 0._wp ) 196 195 197 196 ! 2.2 divu_adv … … 237 236 ! Reduce the closing rate if more than 100% of the open water 238 237 ! would be removed. Reduce the opening rate proportionately. 239 IF ( ato_i(ji,jj) .GT. epsi10 .AND. athorn(ji,jj,0) .GT.0.0 ) THEN240 w1= athorn(ji,jj,0) * closing_gross(ji,jj) * rdt_ice241 IF ( w1 .GT.ato_i(ji,jj)) THEN242 tmpfac = ato_i(ji,jj) / w1243 closing_gross(ji,jj) = closing_gross(ji,jj) * tmpfac244 opning(ji,jj) = opning(ji,jj) * tmpfac245 ENDIF !w1246 ENDIF !at0i and athorn247 248 END DO ! ji249 END DO ! jj238 IF ( ato_i(ji,jj) > epsi10 .AND. athorn(ji,jj,0) > 0.0 ) THEN 239 za = athorn(ji,jj,0) * closing_gross(ji,jj) * rdt_ice 240 IF ( za > ato_i(ji,jj)) THEN 241 zfac = ato_i(ji,jj) / za 242 closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 243 opning(ji,jj) = opning(ji,jj) * zfac 244 ENDIF 245 ENDIF 246 247 END DO 248 END DO 250 249 251 250 ! correction to closing rate / opening if excessive ice removal … … 258 257 DO ji = 1, jpi 259 258 IF ( a_i(ji,jj,jl) > epsi10 .AND. athorn(ji,jj,jl) > 0._wp )THEN 260 w1= athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice261 IF ( w1> a_i(ji,jj,jl) ) THEN262 tmpfac = a_i(ji,jj,jl) / w1263 closing_gross(ji,jj) = closing_gross(ji,jj) * tmpfac264 opning (ji,jj) = opning (ji,jj) * tmpfac259 za = athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice 260 IF ( za > a_i(ji,jj,jl) ) THEN 261 zfac = a_i(ji,jj,jl) / za 262 closing_gross(ji,jj) = closing_gross(ji,jj) * zfac 263 opning (ji,jj) = opning (ji,jj) * zfac 265 264 ENDIF 266 265 ENDIF 267 END DO !ji268 END DO ! jj269 END DO !jl266 END DO 267 END DO 268 END DO 270 269 271 270 ! 3.3 Redistribute area, volume, and energy. … … 288 287 DO jj = 1, jpj 289 288 DO ji = 1, jpi 290 IF (ABS(asum(ji,jj) - kamax ) .LT.epsi10) THEN289 IF (ABS(asum(ji,jj) - kamax ) < epsi10) THEN 291 290 closing_net(ji,jj) = 0._wp 292 291 opning (ji,jj) = 0._wp … … 324 323 ! Convert ridging rate diagnostics to correct units. 325 324 ! Update fresh water and heat fluxes due to snow melt. 326 327 asum_error = .false.328 329 325 DO jj = 1, jpj 330 326 DO ji = 1, jpi 331 332 IF(ABS(asum(ji,jj) - kamax) > epsi10 ) asum_error = .true.333 327 334 328 dardg1dt(ji,jj) = dardg1dt(ji,jj) * r1_rdtice … … 341 335 !-----------------------------------------------------------------------------! 342 336 wfx_snw(ji,jj) = wfx_snw(ji,jj) + msnow_mlt(ji,jj) * r1_rdtice ! fresh water source for ocean 343 hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + esnow_mlt(ji,jj) * unit_fac / area(ji,jj) * r1_rdtice! heat sink for ocean (<0, W.m-2)337 hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + esnow_mlt(ji,jj) * r1_rdtice ! heat sink for ocean (<0, W.m-2) 344 338 345 339 END DO … … 359 353 WRITE(numout,*) jl, a_i(ji,jj,jl), athorn(ji,jj,jl) 360 354 END DO 361 ENDIF ! asum 362 363 END DO !ji 364 END DO !jj 355 ENDIF 356 END DO 357 END DO 365 358 366 359 ! Conservation check … … 375 368 !-----------------------------------------------------------------------------! 376 369 CALL lim_var_glo2eqv 377 CALL lim_itd_me_zapsmall 370 CALL lim_var_zapsmall 371 CALL lim_var_agg( 1 ) 378 372 379 373 … … 382 376 CALL prt_ctl_info(' - Cell values : ') 383 377 CALL prt_ctl_info(' ~~~~~~~~~~~~~ ') 384 CALL prt_ctl(tab2d_1= area, clinfo1=' lim_itd_me : cell area :')378 CALL prt_ctl(tab2d_1=e12t , clinfo1=' lim_itd_me : cell area :') 385 379 CALL prt_ctl(tab2d_1=at_i , clinfo1=' lim_itd_me : at_i :') 386 380 CALL prt_ctl(tab2d_1=vt_i , clinfo1=' lim_itd_me : vt_i :') … … 436 430 !!---------------------------------------------------------------------- 437 431 INTEGER, INTENT(in) :: kstrngth ! = 1 for Rothrock formulation, 0 for Hibler (1979) 438 439 INTEGER :: ji,jj, jl ! dummy loop indices 440 INTEGER :: ksmooth ! smoothing the resistance to deformation 441 INTEGER :: numts_rm ! number of time steps for the P smoothing 442 REAL(wp) :: hi, zw1, zp, zdummy, zzc, z1_3 ! local scalars 432 INTEGER :: ji,jj, jl ! dummy loop indices 433 INTEGER :: ksmooth ! smoothing the resistance to deformation 434 INTEGER :: numts_rm ! number of time steps for the P smoothing 435 REAL(wp) :: zhi, zp, z1_3 ! local scalars 443 436 REAL(wp), POINTER, DIMENSION(:,:) :: zworka ! temporary array used here 444 437 !!---------------------------------------------------------------------- … … 466 459 ! 467 460 IF( a_i(ji,jj,jl) > epsi10 .AND. athorn(ji,jj,jl) > 0._wp ) THEN 468 hi = v_i(ji,jj,jl) / a_i(ji,jj,jl)461 zhi = v_i(ji,jj,jl) / a_i(ji,jj,jl) 469 462 !---------------------------- 470 463 ! PE loss from deforming ice 471 464 !---------------------------- 472 strength(ji,jj) = strength(ji,jj) - athorn(ji,jj,jl) * hi *hi465 strength(ji,jj) = strength(ji,jj) - athorn(ji,jj,jl) * zhi * zhi 473 466 474 467 !-------------------------- 475 468 ! PE gain from rafting ice 476 469 !-------------------------- 477 strength(ji,jj) = strength(ji,jj) + 2._wp * araft(ji,jj,jl) * hi *hi470 strength(ji,jj) = strength(ji,jj) + 2._wp * araft(ji,jj,jl) * zhi * zhi 478 471 479 472 !---------------------------- … … 481 474 !---------------------------- 482 475 strength(ji,jj) = strength(ji,jj) + aridge(ji,jj,jl)/krdg(ji,jj,jl) & 483 * z1_3 * ( hrmax(ji,jj,jl)**3 - hrmin(ji,jj,jl)**3) / ( hrmax(ji,jj,jl)-hrmin(ji,jj,jl) )484 !!gm Optimization: (a**3-b**3)/(a-b) = a*a+ab+b*b ==> less costly operations even if a**3 is replaced by a*a*a...485 ENDIF ! aicen > epsi10476 * z1_3 * ( hrmax(ji,jj,jl)**2 + hrmin(ji,jj,jl)**2 + hrmax(ji,jj,jl) * hrmin(ji,jj,jl) ) 477 !!(a**3-b**3)/(a-b) = a*a+ab+b*b 478 ENDIF 486 479 ! 487 END DO ! ji 488 END DO !jj 489 END DO !jl 490 491 zzc = Cf * Cp ! where Cp = (g/2)*(rhow-rhoi)*(rhoi/rhow) and Cf accounts for frictional dissipation 492 strength(:,:) = zzc * strength(:,:) / aksum(:,:) 493 480 END DO 481 END DO 482 END DO 483 484 strength(:,:) = rn_pe_rdg * Cp * strength(:,:) / aksum(:,:) 485 ! where Cp = (g/2)*(rhow-rhoi)*(rhoi/rhow) and rn_pe_rdg accounts for frictional dissipation 494 486 ksmooth = 1 495 487 … … 499 491 ELSE ! kstrngth ne 1: Hibler (1979) form 500 492 ! 501 strength(:,:) = Pstar * vt_i(:,:) * EXP( - C_rhg * ( 1._wp - at_i(:,:) ) )493 strength(:,:) = rn_pstar * vt_i(:,:) * EXP( - rn_crhg * ( 1._wp - at_i(:,:) ) ) 502 494 ! 503 495 ksmooth = 1 … … 511 503 ! CAN BE REMOVED 512 504 ! 513 IF ( brinstren_swi == 1) THEN505 IF( ln_icestr_bvf ) THEN 514 506 515 507 DO jj = 1, jpj 516 508 DO ji = 1, jpi 517 IF ( bv_i(ji,jj) .GT. 0.0 ) THEN518 zdummy = MIN ( bv_i(ji,jj), 0.10 ) * MIN( bv_i(ji,jj), 0.10 )519 ELSE520 zdummy = 0.0521 ENDIF522 509 strength(ji,jj) = strength(ji,jj) * exp(-5.88*SQRT(MAX(bv_i(ji,jj),0.0))) 523 END DO ! j524 END DO ! i510 END DO 511 END DO 525 512 526 513 ENDIF … … 538 525 CALL lbc_lnk( strength, 'T', 1. ) 539 526 540 DO jj = 2, jpj - 1 541 DO ji = 2, jpi - 1 542 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) .GT. epsi10) THEN ! ice is 543 ! present 527 DO jj = 2, jpjm1 528 DO ji = 2, jpim1 529 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > epsi10) THEN ! ice is present 544 530 zworka(ji,jj) = 4.0 * strength(ji,jj) & 545 & + strength(ji-1,jj) * tm s(ji-1,jj) &546 & + strength(ji+1,jj) * tm s(ji+1,jj) &547 & + strength(ji,jj-1) * tm s(ji,jj-1) &548 & + strength(ji,jj+1) * tm s(ji,jj+1)549 550 zw 1 = 4.0 + tms(ji-1,jj) + tms(ji+1,jj) + tms(ji,jj-1) + tms(ji,jj+1)551 zworka(ji,jj) = zworka(ji,jj) / zw1531 & + strength(ji-1,jj) * tmask(ji-1,jj,1) & 532 & + strength(ji+1,jj) * tmask(ji+1,jj,1) & 533 & + strength(ji,jj-1) * tmask(ji,jj-1,1) & 534 & + strength(ji,jj+1) * tmask(ji,jj+1,1) 535 536 zworka(ji,jj) = zworka(ji,jj) / & 537 & ( 4.0 + tmask(ji-1,jj,1) + tmask(ji+1,jj,1) + tmask(ji,jj-1,1) + tmask(ji,jj+1,1) ) 552 538 ELSE 553 539 zworka(ji,jj) = 0._wp … … 556 542 END DO 557 543 558 DO jj = 2, jpj -1559 DO ji = 2, jpi -1544 DO jj = 2, jpjm1 545 DO ji = 2, jpim1 560 546 strength(ji,jj) = zworka(ji,jj) 561 547 END DO … … 563 549 CALL lbc_lnk( strength, 'T', 1. ) 564 550 565 ENDIF ! ksmooth551 ENDIF 566 552 567 553 !-------------------- … … 580 566 DO jj = 1, jpj - 1 581 567 DO ji = 1, jpi - 1 582 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) .GT.epsi10) THEN ! ice is present568 IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > epsi10) THEN ! ice is present 583 569 numts_rm = 1 ! number of time steps for the running mean 584 IF ( strp1(ji,jj) .GT.0.0 ) numts_rm = numts_rm + 1585 IF ( strp2(ji,jj) .GT.0.0 ) numts_rm = numts_rm + 1570 IF ( strp1(ji,jj) > 0.0 ) numts_rm = numts_rm + 1 571 IF ( strp2(ji,jj) > 0.0 ) numts_rm = numts_rm + 1 586 572 zp = ( strength(ji,jj) + strp1(ji,jj) + strp2(ji,jj) ) / numts_rm 587 573 strp2(ji,jj) = strp1(ji,jj) … … 612 598 !!---------------------------------------------------------------------! 613 599 INTEGER :: ji,jj, jl ! dummy loop indices 614 REAL(wp) :: Gstari, astari, hi, hrmean, zdummy ! local scalar600 REAL(wp) :: Gstari, astari, zhi, hrmean, zdummy ! local scalar 615 601 REAL(wp), POINTER, DIMENSION(:,:) :: zworka ! temporary array used here 616 602 REAL(wp), POINTER, DIMENSION(:,:,:) :: Gsum ! Gsum(n) = sum of areas in categories 0 to n … … 620 606 CALL wrk_alloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 ) 621 607 622 Gstari = 1.0/ Gstar623 astari = 1.0/ astar608 Gstari = 1.0/rn_gstar 609 astari = 1.0/rn_astar 624 610 aksum(:,:) = 0.0 625 611 athorn(:,:,:) = 0.0 … … 632 618 633 619 ! ! Zero out categories with very small areas 634 CALL lim_ itd_me_zapsmall620 CALL lim_var_zapsmall 635 621 636 622 !------------------------------------------------------------------------------! … … 662 648 DO jj = 1, jpj 663 649 DO ji = 1, jpi 664 IF( a_i(ji,jj,jl) .GT.epsi10 ) THEN ; Gsum(ji,jj,jl) = Gsum(ji,jj,jl-1) + a_i(ji,jj,jl)665 ELSE 650 IF( a_i(ji,jj,jl) > epsi10 ) THEN ; Gsum(ji,jj,jl) = Gsum(ji,jj,jl-1) + a_i(ji,jj,jl) 651 ELSE ; Gsum(ji,jj,jl) = Gsum(ji,jj,jl-1) 666 652 ENDIF 667 653 END DO … … 687 673 !----------------------------------------------------------------- 688 674 689 IF( partfun_swi== 0 ) THEN !--- Linear formulation (Thorndike et al., 1975)675 IF( nn_partfun == 0 ) THEN !--- Linear formulation (Thorndike et al., 1975) 690 676 DO jl = 0, jpl 691 677 DO jj = 1, jpj 692 678 DO ji = 1, jpi 693 IF( Gsum(ji,jj,jl) < Gstar) THEN679 IF( Gsum(ji,jj,jl) < rn_gstar) THEN 694 680 athorn(ji,jj,jl) = Gstari * (Gsum(ji,jj,jl)-Gsum(ji,jj,jl-1)) * & 695 681 (2.0 - (Gsum(ji,jj,jl-1)+Gsum(ji,jj,jl))*Gstari) 696 ELSEIF (Gsum(ji,jj,jl-1) < Gstar) THEN697 athorn(ji,jj,jl) = Gstari * ( Gstar-Gsum(ji,jj,jl-1)) * &698 (2.0 - (Gsum(ji,jj,jl-1)+ Gstar)*Gstari)682 ELSEIF (Gsum(ji,jj,jl-1) < rn_gstar) THEN 683 athorn(ji,jj,jl) = Gstari * (rn_gstar-Gsum(ji,jj,jl-1)) * & 684 (2.0 - (Gsum(ji,jj,jl-1)+rn_gstar)*Gstari) 699 685 ELSE 700 686 athorn(ji,jj,jl) = 0.0 701 687 ENDIF 702 END DO ! ji703 END DO ! jj704 END DO ! jl688 END DO 689 END DO 690 END DO 705 691 706 692 ELSE !--- Exponential, more stable formulation (Lipscomb et al, 2007) … … 715 701 END DO 716 702 ! 717 ENDIF ! partfun_swi718 719 IF( raft_swi == 1) THEN ! Ridging and rafting ice participation functions703 ENDIF ! nn_partfun 704 705 IF( ln_rafting ) THEN ! Ridging and rafting ice participation functions 720 706 ! 721 707 DO jl = 1, jpl 722 708 DO jj = 1, jpj 723 709 DO ji = 1, jpi 724 IF ( athorn(ji,jj,jl) .GT.0._wp ) THEN710 IF ( athorn(ji,jj,jl) > 0._wp ) THEN 725 711 !!gm TANH( -X ) = - TANH( X ) so can be computed only 1 time.... 726 aridge(ji,jj,jl) = ( TANH ( Craft * ( ht_i(ji,jj,jl) - hparmeter) ) + 1.0 ) * 0.5 * athorn(ji,jj,jl)727 araft (ji,jj,jl) = ( TANH ( - Craft * ( ht_i(ji,jj,jl) - hparmeter) ) + 1.0 ) * 0.5 * athorn(ji,jj,jl)712 aridge(ji,jj,jl) = ( TANH ( rn_craft * ( ht_i(ji,jj,jl) - rn_hraft ) ) + 1.0 ) * 0.5 * athorn(ji,jj,jl) 713 araft (ji,jj,jl) = ( TANH ( -rn_craft * ( ht_i(ji,jj,jl) - rn_hraft ) ) + 1.0 ) * 0.5 * athorn(ji,jj,jl) 728 714 IF ( araft(ji,jj,jl) < epsi06 ) araft(ji,jj,jl) = 0._wp 729 715 aridge(ji,jj,jl) = MAX( athorn(ji,jj,jl) - araft(ji,jj,jl), 0.0 ) 730 ENDIF ! athorn731 END DO ! ji732 END DO ! jj733 END DO ! jl734 735 ELSE ! raft_swi = 0716 ENDIF 717 END DO 718 END DO 719 END DO 720 721 ELSE 736 722 ! 737 723 DO jl = 1, jpl … … 741 727 ENDIF 742 728 743 IF ( raft_swi == 1) THEN744 745 IF( MAXVAL(aridge + araft - athorn(:,:,1:jpl)) .GT.epsi10 ) THEN729 IF( ln_rafting ) THEN 730 731 IF( MAXVAL(aridge + araft - athorn(:,:,1:jpl)) > epsi10 ) THEN 746 732 DO jl = 1, jpl 747 733 DO jj = 1, jpj 748 734 DO ji = 1, jpi 749 IF ( aridge(ji,jj,jl) + araft(ji,jj,jl) - athorn(ji,jj,jl) .GT.epsi10 ) THEN735 IF ( aridge(ji,jj,jl) + araft(ji,jj,jl) - athorn(ji,jj,jl) > epsi10 ) THEN 750 736 WRITE(numout,*) ' ALERTE 96 : wrong participation function ... ' 751 737 WRITE(numout,*) ' ji, jj, jl : ', ji, jj, jl … … 793 779 DO ji = 1, jpi 794 780 795 IF (a_i(ji,jj,jl) .GT. epsi10 .AND. athorn(ji,jj,jl) .GT.0.0 ) THEN796 hi = v_i(ji,jj,jl) / a_i(ji,jj,jl)797 hrmean = MAX(SQRT( Hstar*hi),hi*krdgmin)798 hrmin(ji,jj,jl) = MIN(2.0* hi, 0.5*(hrmean +hi))781 IF (a_i(ji,jj,jl) > epsi10 .AND. athorn(ji,jj,jl) > 0.0 ) THEN 782 zhi = v_i(ji,jj,jl) / a_i(ji,jj,jl) 783 hrmean = MAX(SQRT(rn_hstar*zhi), zhi*krdgmin) 784 hrmin(ji,jj,jl) = MIN(2.0*zhi, 0.5*(hrmean + zhi)) 799 785 hrmax(ji,jj,jl) = 2.0*hrmean - hrmin(ji,jj,jl) 800 hraft(ji,jj,jl) = kraft* hi801 krdg(ji,jj,jl) = hrmean / hi786 hraft(ji,jj,jl) = kraft*zhi 787 krdg(ji,jj,jl) = hrmean / zhi 802 788 ELSE 803 789 hraft(ji,jj,jl) = 0.0 … … 847 833 INTEGER :: ij ! horizontal index, combines i and j loops 848 834 INTEGER :: icells ! number of cells with aicen > puny 849 REAL(wp) :: hL, hR, farea, z dummy, zdummy0, ztmelts ! left and right limits of integration835 REAL(wp) :: hL, hR, farea, ztmelts ! left and right limits of integration 850 836 REAL(wp) :: zsstK ! SST in Kelvin 851 837 … … 989 975 large_afrft = .false. 990 976 991 !CDIR NODEP992 977 DO ij = 1, icells 993 978 ji = indxi(ij) … … 1031 1016 !-------------------------------------------------------------------------- 1032 1017 vrdg1(ji,jj) = vicen_init(ji,jj,jl1) * afrac(ji,jj) 1033 vrdg2(ji,jj) = vrdg1(ji,jj) * ( 1. + r idge_por)1034 vsw (ji,jj) = vrdg1(ji,jj) * r idge_por1018 vrdg2(ji,jj) = vrdg1(ji,jj) * ( 1. + rn_por_rdg ) 1019 vsw (ji,jj) = vrdg1(ji,jj) * rn_por_rdg 1035 1020 1036 1021 vsrdg(ji,jj) = vsnwn_init(ji,jj,jl1) * afrac(ji,jj) … … 1062 1047 srdg2(ji,jj) = srdg1(ji,jj) + smsw(ji,jj) ! salt content of new ridge 1063 1048 1064 !srdg2(ji,jj) = MIN( s_i_max * vrdg2(ji,jj) , zsrdg2 ) ! impose a maximum salinity1049 !srdg2(ji,jj) = MIN( rn_simax * vrdg2(ji,jj) , zsrdg2 ) ! impose a maximum salinity 1065 1050 1066 1051 sfx_dyn(ji,jj) = sfx_dyn(ji,jj) - smsw(ji,jj) * rhoic * r1_rdtice … … 1091 1076 ! ij looping 1-icells 1092 1077 1093 msnow_mlt(ji,jj) = msnow_mlt(ji,jj) + rhosn*vsrdg(ji,jj)*(1.0- fsnowrdg) & ! rafting included1094 & + rhosn*vsrft(ji,jj)*(1.0- fsnowrft)1095 1096 ! in 1e-9 Joules(same as e_s)1097 esnow_mlt(ji,jj) = esnow_mlt(ji,jj) - esrdg(ji,jj)*(1.0- fsnowrdg) & !rafting included1098 & - esrft(ji,jj)*(1.0- fsnowrft)1078 msnow_mlt(ji,jj) = msnow_mlt(ji,jj) + rhosn*vsrdg(ji,jj)*(1.0-rn_fsnowrdg) & ! rafting included 1079 & + rhosn*vsrft(ji,jj)*(1.0-rn_fsnowrft) 1080 1081 ! in J/m2 (same as e_s) 1082 esnow_mlt(ji,jj) = esnow_mlt(ji,jj) - esrdg(ji,jj)*(1.0-rn_fsnowrdg) & !rafting included 1083 & - esrft(ji,jj)*(1.0-rn_fsnowrft) 1099 1084 1100 1085 !----------------------------------------------------------------- … … 1116 1101 !-------------------------------------------------------------------- 1117 1102 DO jk = 1, nlay_i 1118 !CDIR NODEP1119 1103 DO ij = 1, icells 1120 1104 ji = indxi(ij) … … 1129 1113 ! clem: if sst>0, then ersw <0 (is that possible?) 1130 1114 zsstK = sst_m(ji,jj) + rt0 1131 ersw(ji,jj,jk) = - rhoic * vsw(ji,jj) * rcp * ( zsstK - rt0 ) / REAL( nlay_i )1115 ersw(ji,jj,jk) = - rhoic * vsw(ji,jj) * rcp * ( zsstK - rt0 ) * r1_nlay_i 1132 1116 1133 1117 ! heat flux to the ocean 1134 1118 hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ersw(ji,jj,jk) * r1_rdtice ! > 0 [W.m-2] ocean->ice flux 1135 1119 1136 ! Correct dimensions to avoid big values 1137 ersw(ji,jj,jk) = ersw(ji,jj,jk) / unit_fac 1138 1139 ! Mutliply by ice volume, and divide by number of layers to get heat content in 1.e9 J 1140 ! it is added to sea ice because the sign convention is the opposite of the sign convention for the ocean 1141 !! MV HC 2014 1142 ersw (ji,jj,jk) = ersw(ji,jj,jk) * area(ji,jj) 1143 1120 ! it is added to sea ice because the sign convention is the opposite of the sign convention for the ocean 1144 1121 erdg2(ji,jj,jk) = erdg1(ji,jj,jk) + ersw(ji,jj,jk) 1145 1122 … … 1150 1127 IF( con_i ) THEN 1151 1128 DO jk = 1, nlay_i 1152 !CDIR NODEP1153 1129 DO ij = 1, icells 1154 1130 ji = indxi(ij) … … 1160 1136 1161 1137 IF( large_afrac ) THEN ! there is a bug 1162 !CDIR NODEP1163 1138 DO ij = 1, icells 1164 1139 ji = indxi(ij) … … 1172 1147 ENDIF 1173 1148 IF( large_afrft ) THEN ! there is a bug 1174 !CDIR NODEP1175 1149 DO ij = 1, icells 1176 1150 ji = indxi(ij) … … 1190 1164 DO jl2 = 1, jpl 1191 1165 ! over categories to which ridged ice is transferred 1192 !CDIR NODEP1193 1166 DO ij = 1, icells 1194 1167 ji = indxi(ij) … … 1214 1187 a_i (ji,jj ,jl2) = a_i (ji,jj ,jl2) + ardg2 (ji,jj) * farea 1215 1188 v_i (ji,jj ,jl2) = v_i (ji,jj ,jl2) + vrdg2 (ji,jj) * fvol(ji,jj) 1216 v_s (ji,jj ,jl2) = v_s (ji,jj ,jl2) + vsrdg (ji,jj) * fvol(ji,jj) * fsnowrdg1217 e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + esrdg (ji,jj) * fvol(ji,jj) * fsnowrdg1189 v_s (ji,jj ,jl2) = v_s (ji,jj ,jl2) + vsrdg (ji,jj) * fvol(ji,jj) * rn_fsnowrdg 1190 e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + esrdg (ji,jj) * fvol(ji,jj) * rn_fsnowrdg 1218 1191 smv_i(ji,jj ,jl2) = smv_i(ji,jj ,jl2) + srdg2 (ji,jj) * fvol(ji,jj) 1219 1192 oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + oirdg2(ji,jj) * farea … … 1223 1196 ! Transfer ice energy to category jl2 by ridging 1224 1197 DO jk = 1, nlay_i 1225 !CDIR NODEP1226 1198 DO ij = 1, icells 1227 1199 ji = indxi(ij) … … 1235 1207 DO jl2 = 1, jpl 1236 1208 1237 !CDIR NODEP1238 1209 DO ij = 1, icells 1239 1210 ji = indxi(ij) … … 1246 1217 a_i (ji,jj ,jl2) = a_i (ji,jj ,jl2) + arft2 (ji,jj) 1247 1218 v_i (ji,jj ,jl2) = v_i (ji,jj ,jl2) + virft (ji,jj) 1248 v_s (ji,jj ,jl2) = v_s (ji,jj ,jl2) + vsrft (ji,jj) * fsnowrft1249 e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + esrft (ji,jj) * fsnowrft1219 v_s (ji,jj ,jl2) = v_s (ji,jj ,jl2) + vsrft (ji,jj) * rn_fsnowrft 1220 e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + esrft (ji,jj) * rn_fsnowrft 1250 1221 smv_i(ji,jj ,jl2) = smv_i(ji,jj ,jl2) + smrft (ji,jj) 1251 1222 oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + oirft2(ji,jj) 1252 ENDIF ! hraft1223 ENDIF 1253 1224 ! 1254 END DO ! ij1225 END DO 1255 1226 1256 1227 ! Transfer rafted ice energy to category jl2 1257 1228 DO jk = 1, nlay_i 1258 !CDIR NODEP1259 1229 DO ij = 1, icells 1260 1230 ji = indxi(ij) … … 1264 1234 e_i(ji,jj,jk,jl2) = e_i(ji,jj,jk,jl2) + eirft(ji,jj,jk) 1265 1235 ENDIF 1266 END DO ! ij1267 END DO !jk1268 1269 END DO ! jl21236 END DO 1237 END DO 1238 1239 END DO 1270 1240 1271 1241 END DO ! jl1 (deforming categories) … … 1339 1309 !!------------------------------------------------------------------- 1340 1310 INTEGER :: ios ! Local integer output status for namelist read 1341 NAMELIST/namiceitdme/ r idge_scheme_swi, Cs, Cf, fsnowrdg,fsnowrft, &1342 & Gstar, astar, Hstar, raft_swi, hparmeter, Craft, ridge_por, &1343 & partfun_swi, brinstren_swi1311 NAMELIST/namiceitdme/ rn_cs, rn_fsnowrdg, rn_fsnowrft, & 1312 & rn_gstar, rn_astar, rn_hstar, ln_rafting, rn_hraft, rn_craft, rn_por_rdg, & 1313 & nn_partfun 1344 1314 !!------------------------------------------------------------------- 1345 1315 ! … … 1357 1327 WRITE(numout,*)' lim_itd_me_init : ice parameters for mechanical ice redistribution ' 1358 1328 WRITE(numout,*)' ~~~~~~~~~~~~~~~' 1359 WRITE(numout,*)' Switch choosing the ice redistribution scheme ridge_scheme_swi', ridge_scheme_swi 1360 WRITE(numout,*)' Fraction of shear energy contributing to ridging Cs ', Cs 1361 WRITE(numout,*)' Ratio of ridging work to PotEner change in ridging Cf ', Cf 1362 WRITE(numout,*)' Fraction of snow volume conserved during ridging fsnowrdg ', fsnowrdg 1363 WRITE(numout,*)' Fraction of snow volume conserved during ridging fsnowrft ', fsnowrft 1364 WRITE(numout,*)' Fraction of total ice coverage contributing to ridging Gstar ', Gstar 1365 WRITE(numout,*)' Equivalent to G* for an exponential part function astar ', astar 1366 WRITE(numout,*)' Quantity playing a role in max ridged ice thickness Hstar ', Hstar 1367 WRITE(numout,*)' Rafting of ice sheets or not raft_swi ', raft_swi 1368 WRITE(numout,*)' Parmeter thickness (threshold between ridge-raft) hparmeter ', hparmeter 1369 WRITE(numout,*)' Rafting hyperbolic tangent coefficient Craft ', Craft 1370 WRITE(numout,*)' Initial porosity of ridges ridge_por ', ridge_por 1371 WRITE(numout,*)' Switch for part. function (0) linear (1) exponential partfun_swi ', partfun_swi 1372 WRITE(numout,*)' Switch for including brine volume in ice strength comp. brinstren_swi ', brinstren_swi 1329 WRITE(numout,*)' Fraction of shear energy contributing to ridging rn_cs = ', rn_cs 1330 WRITE(numout,*)' Fraction of snow volume conserved during ridging rn_fsnowrdg = ', rn_fsnowrdg 1331 WRITE(numout,*)' Fraction of snow volume conserved during ridging rn_fsnowrft = ', rn_fsnowrft 1332 WRITE(numout,*)' Fraction of total ice coverage contributing to ridging rn_gstar = ', rn_gstar 1333 WRITE(numout,*)' Equivalent to G* for an exponential part function rn_astar = ', rn_astar 1334 WRITE(numout,*)' Quantity playing a role in max ridged ice thickness rn_hstar = ', rn_hstar 1335 WRITE(numout,*)' Rafting of ice sheets or not ln_rafting = ', ln_rafting 1336 WRITE(numout,*)' Parmeter thickness (threshold between ridge-raft) rn_hraft = ', rn_hraft 1337 WRITE(numout,*)' Rafting hyperbolic tangent coefficient rn_craft = ', rn_craft 1338 WRITE(numout,*)' Initial porosity of ridges rn_por_rdg = ', rn_por_rdg 1339 WRITE(numout,*)' Switch for part. function (0) linear (1) exponential nn_partfun = ', nn_partfun 1373 1340 ENDIF 1374 1341 ! 1375 1342 END SUBROUTINE lim_itd_me_init 1376 1377 1378 SUBROUTINE lim_itd_me_zapsmall1379 !!-------------------------------------------------------------------1380 !! *** ROUTINE lim_itd_me_zapsmall ***1381 !!1382 !! ** Purpose : Remove too small sea ice areas and correct salt fluxes1383 !!1384 !! history :1385 !! author: William H. Lipscomb, LANL1386 !! Nov 2003: Modified by Julie Schramm to conserve volume and energy1387 !! Sept 2004: Modified by William Lipscomb; replaced normalize_state with1388 !! additions to local freshwater, salt, and heat fluxes1389 !! 9.0, LIM3.0 - 02-2006 (M. Vancoppenolle) original code1390 !!-------------------------------------------------------------------1391 INTEGER :: ji, jj, jl, jk ! dummy loop indices1392 INTEGER :: icells ! number of cells with ice to zap1393 1394 REAL(wp), POINTER, DIMENSION(:,:) :: zmask ! 2D workspace1395 REAL(wp) :: zmask_glo, zsal, zvi, zvs, zei, zes1396 !!gm REAL(wp) :: xtmp ! temporary variable1397 !!-------------------------------------------------------------------1398 1399 CALL wrk_alloc( jpi, jpj, zmask )1400 1401 ! to be sure that at_i is the sum of a_i(jl)1402 at_i(:,:) = SUM( a_i(:,:,:), dim=3 )1403 1404 DO jl = 1, jpl1405 !-----------------------------------------------------------------1406 ! Count categories to be zapped.1407 !-----------------------------------------------------------------1408 icells = 01409 zmask(:,:) = 0._wp1410 DO jj = 1, jpj1411 DO ji = 1, jpi1412 IF( a_i(ji,jj,jl) <= epsi10 .OR. v_i(ji,jj,jl) <= epsi10 .OR. at_i(ji,jj) <= epsi10 ) THEN1413 zmask(ji,jj) = 1._wp1414 ENDIF1415 END DO1416 END DO1417 !zmask_glo = glob_sum(zmask)1418 !IF( ln_nicep .AND. lwp ) WRITE(numout,*) zmask_glo, ' cells of ice zapped in the ocean '1419 1420 !-----------------------------------------------------------------1421 ! Zap ice energy and use ocean heat to melt ice1422 !-----------------------------------------------------------------1423 1424 DO jk = 1, nlay_i1425 DO jj = 1 , jpj1426 DO ji = 1 , jpi1427 zei = e_i(ji,jj,jk,jl)1428 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * ( 1._wp - zmask(ji,jj) )1429 t_i(ji,jj,jk,jl) = t_i(ji,jj,jk,jl) * ( 1._wp - zmask(ji,jj) ) + rtt * zmask(ji,jj)1430 ! update exchanges with ocean1431 hfx_res(ji,jj) = hfx_res(ji,jj) + ( e_i(ji,jj,jk,jl) - zei ) * unit_fac / area(ji,jj) * r1_rdtice ! W.m-2 <01432 END DO1433 END DO1434 END DO1435 1436 DO jj = 1 , jpj1437 DO ji = 1 , jpi1438 1439 zsal = smv_i(ji,jj,jl)1440 zvi = v_i(ji,jj,jl)1441 zvs = v_s(ji,jj,jl)1442 zes = e_s(ji,jj,1,jl)1443 !-----------------------------------------------------------------1444 ! Zap snow energy and use ocean heat to melt snow1445 !-----------------------------------------------------------------1446 ! xtmp = esnon(i,j,n) / dt ! < 01447 ! fhnet(i,j) = fhnet(i,j) + xtmp1448 ! fhnet_hist(i,j) = fhnet_hist(i,j) + xtmp1449 ! xtmp is greater than 01450 ! fluxes are positive to the ocean1451 ! here the flux has to be negative for the ocean1452 t_s(ji,jj,1,jl) = rtt * zmask(ji,jj) + t_s(ji,jj,1,jl) * ( 1._wp - zmask(ji,jj) )1453 1454 !-----------------------------------------------------------------1455 ! zap ice and snow volume, add water and salt to ocean1456 !-----------------------------------------------------------------1457 ato_i(ji,jj) = a_i (ji,jj,jl) * zmask(ji,jj) + ato_i(ji,jj)1458 a_i (ji,jj,jl) = a_i (ji,jj,jl) * ( 1._wp - zmask(ji,jj) )1459 v_i (ji,jj,jl) = v_i (ji,jj,jl) * ( 1._wp - zmask(ji,jj) )1460 v_s (ji,jj,jl) = v_s (ji,jj,jl) * ( 1._wp - zmask(ji,jj) )1461 t_su (ji,jj,jl) = t_su (ji,jj,jl) * ( 1._wp - zmask(ji,jj) ) + t_bo(ji,jj) * zmask(ji,jj)1462 oa_i (ji,jj,jl) = oa_i (ji,jj,jl) * ( 1._wp - zmask(ji,jj) )1463 smv_i(ji,jj,jl) = smv_i(ji,jj,jl) * ( 1._wp - zmask(ji,jj) )1464 e_s(ji,jj,1,jl) = e_s(ji,jj,1,jl) * ( 1._wp - zmask(ji,jj) )1465 ! additional condition1466 IF( v_s(ji,jj,jl) <= epsi10 ) THEN1467 v_s(ji,jj,jl) = 0._wp1468 e_s(ji,jj,1,jl) = 0._wp1469 ENDIF1470 ! update exchanges with ocean1471 sfx_res(ji,jj) = sfx_res(ji,jj) - ( smv_i(ji,jj,jl) - zsal ) * rhoic * r1_rdtice1472 wfx_res(ji,jj) = wfx_res(ji,jj) - ( v_i(ji,jj,jl) - zvi ) * rhoic * r1_rdtice1473 wfx_snw(ji,jj) = wfx_snw(ji,jj) - ( v_s(ji,jj,jl) - zvs ) * rhosn * r1_rdtice1474 hfx_res(ji,jj) = hfx_res(ji,jj) + ( e_s(ji,jj,1,jl) - zes ) * unit_fac / area(ji,jj) * r1_rdtice ! W.m-2 <01475 END DO1476 END DO1477 END DO ! jl1478 1479 ! to be sure that at_i is the sum of a_i(jl)1480 at_i(:,:) = SUM( a_i(:,:,:), dim=3 )1481 !1482 CALL wrk_dealloc( jpi, jpj, zmask )1483 !1484 END SUBROUTINE lim_itd_me_zapsmall1485 1343 1486 1344 #else … … 1497 1355 SUBROUTINE lim_itd_me_init 1498 1356 END SUBROUTINE lim_itd_me_init 1499 SUBROUTINE lim_itd_me_zapsmall1500 END SUBROUTINE lim_itd_me_zapsmall1501 1357 #endif 1502 1358 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.