Changeset 8150
- Timestamp:
- 2017-06-07T16:37:36+02:00 (7 years ago)
- Location:
- branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
r7596 r8150 256 256 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_sub !: snow/ice sublimation [kg.m-2.s-1] 257 257 258 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_snw_dyn !: dynamical component of wfx_snw [kg.m-2.s-1] 259 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_snw_sum !: surface melt component of wfx_snw [kg.m-2.s-1] 260 258 261 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_ice !: ice-ocean mass exchange [kg.m-2.s-1] 259 262 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_sni !: snow ice growth component of wfx_ice [kg.m-2.s-1] … … 417 420 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tm_si !: mean temperature at the snow-ice interface (K) 418 421 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dmi_dyn !: Change in ice mass due to ice dynamics (kg/m2/s) 419 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dms_mel !: Change in snow mass due to melting (kg/m2/s)420 422 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dms_dyn !: Change in snow mass due to ice dynamics (kg/m2/s) 421 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dmtx_dyn !: X-component of total snow + ice mass transport (kg/ m2/s)422 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dmty_dyn !: X-component of total snow + ice mass transport (kg/ m2/s)423 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dmtx_dyn !: X-component of total snow + ice mass transport (kg/s) 424 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_dmty_dyn !: X-component of total snow + ice mass transport (kg/s) 423 425 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_fc_bo !: Bottom conduction flux (W/m2) 424 426 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: diag_fc_su !: Surface conduction flux (W/m2) … … 465 467 466 468 ii = ii + 1 467 ALLOCATE( sist (jpi,jpj) , t_bo (jpi,jpj) , &469 ALLOCATE( sist (jpi,jpj) , t_bo (jpi,jpj) , & 468 470 & frld (jpi,jpj) , pfrld (jpi,jpj) , phicif (jpi,jpj) , & 469 & wfx_snw(jpi,jpj) , wfx_ice(jpi,jpj) , wfx_sub(jpi,jpj) , & 471 & wfx_snw(jpi,jpj) , wfx_snw_dyn(jpi,jpj), wfx_snw_sum(jpi,jpj) & 472 & wfx_ice(jpi,jpj) , wfx_sub(jpi,jpj) , & 470 473 & wfx_bog(jpi,jpj) , wfx_dyn(jpi,jpj) , wfx_bom(jpi,jpj) , wfx_sum(jpi,jpj) , & 471 474 & wfx_res(jpi,jpj) , wfx_sni(jpi,jpj) , wfx_opw(jpi,jpj) , wfx_spr(jpi,jpj) , & … … 534 537 ii = ii + 1 535 538 ALLOCATE( t_si (jpi,jpj,jpl) , tm_si(jpi,jpj) , & 536 diag_dmi_dyn(jpi,jpj) , & 537 diag_dms_mel(jpi,jpj) , diag_dms_dyn(jpi,jpj) , & 539 diag_dmi_dyn(jpi,jpj) , diag_dms_dyn(jpi,jpj) , & 538 540 diag_dmtx_dyn(jpi,jpj), diag_dmty_dyn(jpi,jpj), & 539 541 diag_fc_bo(jpi,jpj) , diag_fc_su(jpi,jpj) , & -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limcons.F90
r6963 r8150 190 190 ! water flux 191 191 zfw_b = glob_sum( -( wfx_bog(:,:) + wfx_bom(:,:) + wfx_sum(:,:) + wfx_sni(:,:) + wfx_opw(:,:) + & 192 & wfx_res(:,:) + wfx_dyn(:,:) + wfx_snw(:,:) + wfx_sub(:,:) + wfx_spr(:,:) & 192 & wfx_res(:,:) + wfx_dyn(:,:) + wfx_snw(:,:) + & 193 & wfx_sub(:,:) + wfx_spr(:,:) & 193 194 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) 194 195 … … 215 216 ! water flux 216 217 zfw = glob_sum( -( wfx_bog(:,:) + wfx_bom(:,:) + wfx_sum(:,:) + wfx_sni(:,:) + wfx_opw(:,:) + & 217 & wfx_res(:,:) + wfx_dyn(:,:) + wfx_snw(:,:) + wfx_sub(:,:) + wfx_spr(:,:) & 218 & wfx_res(:,:) + wfx_dyn(:,:) + wfx_snw(:,:) + + & 219 & wfx_sub(:,:) + wfx_spr(:,:) & 218 220 & ) * e12t(:,:) * tmask(:,:,1) * zconv ) - zfw_b 219 221 -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
r7506 r8150 535 535 INTEGER :: icells ! number of cells with a_i > puny 536 536 REAL(wp) :: hL, hR, farea ! left and right limits of integration 537 REAL(wp) :: zwfx_snw ! snow mass flux increment 537 538 538 539 INTEGER , POINTER, DIMENSION(:) :: indxi, indxj ! compressed indices … … 648 649 srdg2(ij) = srdg1(ij) + smsw(ij) ! salt content of new ridge 649 650 650 sfx_dyn(ji,jj) = sfx_dyn(ji,jj)- smsw(ij) * rhoic * r1_rdtice651 wfx_dyn(ji,jj) = wfx_dyn(ji,jj)- vsw (ij) * rhoic * r1_rdtice ! increase in ice volume due to seawater frozen in voids651 sfx_dyn(ji,jj) = sfx_dyn(ji,jj) - smsw(ij) * rhoic * r1_rdtice 652 wfx_dyn(ji,jj) = wfx_dyn(ji,jj) - vsw (ij) * rhoic * r1_rdtice ! increase in ice volume due to seawater frozen in voids 652 653 653 654 ! virtual salt flux to keep salinity constant … … 666 667 ! During the next time step, thermo_rates will determine whether 667 668 ! the ocean cools or new ice grows. 668 wfx_snw(ji,jj) = wfx_snw(ji,jj) + ( rhosn * vsrdg(ij) * ( 1._wp - rn_fsnowrdg ) & 669 & + rhosn * vsrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice ! fresh water source for ocean 669 zwfx_snw = ( rhosn * vsrdg(ij) * ( 1._wp - rn_fsnowrdg ) & 670 & + rhosn * vsrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice ! fresh water source for ocean 671 672 wfx_snw_dyn(ji,jj) = wfx_snw(ji,jj) + zwfx_snw 673 wfx_snw(ji,jj) = wfx_snw(ji,jj) + zwfx_snw 670 674 671 675 ! SIMIP diagnostic 672 diag_dms_dyn(ji,jj) = diag_dms_dyn(ji,jj) - ( rhosn * vsrdg(ij) * ( 1._wp - rn_fsnowrdg ) & 673 & - rhosn * vsrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice 674 diag_dmi_dyn(ji,jj) = diag_dmi_dyn(ji,jj) + vsw (ij) * rhoic * r1_rdtice 676 diag_dms_dyn(ji,jj) = - wfx_dyn(ji,jj) + diag_trp_vi(ji,jj) 677 diag_dmi_dyn(ji,jj) = - wfx_snw_dyn(ji,jj) + diag_trp_vs(ji,jj) 675 678 676 679 hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ( - esrdg(ij) * ( 1._wp - rn_fsnowrdg ) & -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
r7517 r8150 149 149 ! ocean surface (ssh_m) if ice is not embedded 150 150 ! ice top surface if ice is embedded 151 REAL(wp), POINTER, DIMENSION(:,:) :: zCor 151 REAL(wp), POINTER, DIMENSION(:,:) :: zCorx, zCory ! Coriolis stress array (SIMIP) 152 152 REAL(wp), POINTER, DIMENSION(:,:) :: zswitchU, zswitchV ! dummy arrays 153 153 REAL(wp), POINTER, DIMENSION(:,:) :: zmaskU, zmaskV ! mask for ice presence … … 164 164 CALL wrk_alloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice ) 165 165 CALL wrk_alloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf ) 166 CALL wrk_alloc( jpi,jpj, zCor )166 CALL wrk_alloc( jpi,jpj, zCorx, zCory) 167 167 168 168 #if defined key_lim2 && ! defined key_lim2_vp … … 449 449 450 450 ! Coriolis at V-points (energy conserving formulation) 451 zCor (ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * &451 zCory(ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * & 452 452 & ( zmf(ji,jj ) * ( e2u(ji,jj ) * u_ice(ji,jj ) + e2u(ji-1,jj ) * u_ice(ji-1,jj ) ) & 453 453 & + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 454 454 455 455 ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 456 zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor (ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) )456 zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 457 457 458 458 ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) … … 465 465 CALL lbc_lnk( v_ice, 'V', -1. ) 466 466 467 ! SIMIP diag468 IF ( jter .EQ. nn_nevp ) THEN469 diag_corstry(:,:) = zCor(:,:)470 ENDIF471 472 467 #if defined key_agrif && defined key_lim2 473 468 CALL agrif_rhg_lim2( jter, nn_nevp, 'V' ) … … 485 480 486 481 ! Coriolis at U-points (energy conserving formulation) 487 zCor (ji,jj) = 0.25_wp * r1_e1u(ji,jj) * &482 zCorx(ji,jj) = 0.25_wp * r1_e1u(ji,jj) * & 488 483 & ( zmf(ji ,jj) * ( e1v(ji ,jj) * v_ice(ji ,jj) + e1v(ji ,jj-1) * v_ice(ji ,jj-1) ) & 489 484 & + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 490 485 491 486 ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 492 zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor (ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) )487 zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 493 488 494 489 ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) … … 500 495 END DO 501 496 CALL lbc_lnk( u_ice, 'U', -1. ) 502 IF ( jter .EQ. nn_nevp ) THEN503 diag_corstrx(:,:) = zCor(:,:)504 ENDIF505 497 506 498 #if defined key_agrif && defined key_lim2 … … 521 513 522 514 ! Coriolis at U-points (energy conserving formulation) 523 zCor (ji,jj) = 0.25_wp * r1_e1u(ji,jj) * &515 zCorx(ji,jj) = 0.25_wp * r1_e1u(ji,jj) * & 524 516 & ( zmf(ji ,jj) * ( e1v(ji ,jj) * v_ice(ji ,jj) + e1v(ji ,jj-1) * v_ice(ji ,jj-1) ) & 525 517 & + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 526 518 527 519 ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 528 zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor (ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) )520 zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 529 521 530 522 ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) … … 552 544 553 545 ! Coriolis at V-points (energy conserving formulation) 554 zCor (ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * &546 zCory(ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * & 555 547 & ( zmf(ji,jj ) * ( e2u(ji,jj ) * u_ice(ji,jj ) + e2u(ji-1,jj ) * u_ice(ji-1,jj ) ) & 556 548 & + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 557 549 558 550 ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 559 zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor (ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) )551 zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 560 552 561 553 ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) … … 640 632 stress12_i(:,:) = zs12(:,:) 641 633 642 ! SIMIP diagnostic internal stress terms (N/m2) 643 diag_dssh_dx(:,:) = zspgU(:,:) 644 diag_dssh_dy(:,:) = zspgV(:,:) 634 ! SIMIP diagnostics: sea surface sloop stress, coriolis and internal stress terms (N/m2) 635 ! stress tensor invariants (normal and shear stress N/m) 636 DO jj = k_j1+1, k_jpj-1 637 DO ji = 2, jpim1 638 zswi = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 639 640 diag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * zswi ! normal stress 641 diag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * zswi ! shear stress 642 643 diag_dssh_dx(ji,jj) = zspgU(ji,jj) * zswi ! sea surface slope stress term 644 diag_dssh_dy(ji,jj) = zspgV(ji,jj) * zswi 645 646 diag_corstrx(ji,jj) = zCorx(ji,jj) * zswi ! Coriolis stress term 647 diag_corstry(ji,jj) = zCory(ji,jj) * zswi 648 649 diag_intstrx(ji,jj) = zfU(ji,jj) * zswi ! internal stress term 650 diag_intstry(ji,jj) = zfV(ji,jj) * zswi 651 652 END DO 653 END DO 654 655 CALL lbc_lnk_multi( diag_sig1 , 'T', 1., diag_sig2 , 'T', 1., & 656 & diag_dssh_dx, 'U', -1., diag_dssh_dy, 'V', -1., & 657 & diag_corstrx, 'U', -1., diag_corstry, 'V', -1. & 658 & diag_intstrx, 'U', -1., diag_intstry, 'V', -1. ) 659 645 660 CALL lbc_lnk( diag_dssh_dx, 'U', -1. ) 646 661 CALL lbc_lnk( diag_dssh_dy, 'V', -1. ) 647 662 648 diag_intstrx(:,:) = zfU(:,:)649 diag_intstry(:,:) = zfV(:,:)650 663 CALL lbc_lnk( diag_intstrx, 'U', -1. ) 651 664 CALL lbc_lnk( diag_intstry, 'V', -1. ) 652 665 653 ! SIMIP diagnostic stress tensor invariants (normal and shear stress N/m) 654 DO jj = k_j1+1, k_jpj-1 655 DO ji = 2, jpim1 656 zswi = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 1.0e-6 ) ) ! 1 if ice, 0 if no ice 657 diag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * zswi 658 diag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * zswi 659 END DO 660 END DO 661 CALL lbc_lnk( diag_sig1, 'T', 1. ) 662 CALL lbc_lnk( diag_sig2, 'T', 1. ) 663 666 CALL lbc_lnk( diag_corstrx, 'U', -1. ) 667 CALL lbc_lnk( diag_corstry, 'V', -1. ) 668 664 669 ! 665 670 !------------------------------------------------------------------------------! … … 705 710 CALL wrk_dealloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice ) 706 711 CALL wrk_dealloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf ) 707 CALL wrk_dealloc( jpi,jpj, zCor 712 CALL wrk_dealloc( jpi,jpj, zCorx, zCory) 708 713 709 714 END SUBROUTINE lim_rhg -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
r7506 r8150 169 169 170 170 ! mass flux at the ocean/ice interface 171 fmmflx(ji,jj) = - ( wfx_ice(ji,jj) + wfx_snw(ji,jj) + wfx_err_sub(ji,jj) ) 172 emp(ji,jj) = emp_oce(ji,jj) - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_err_sub(ji,jj) 171 fmmflx(ji,jj) = - ( wfx_ice(ji,jj) + wfx_snw(ji,jj) + wfx_err_sub(ji,jj) ) ! F/M mass flux save at least for biogeochemical model 172 emp(ji,jj) = emp_oce(ji,jj) - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_err_sub(ji,jj) ! mass flux + F/M mass flux (always ice/ocean mass exchange) 173 173 END DO 174 174 END DO … … 278 278 ! 279 279 ! SIMIP diags 280 diag_utau_oi(:,:) = 0._wp281 diag_vtau_oi(:,:) = 0._wp280 !diag_utau_oi(:,:) = 0._wp 281 !diag_vtau_oi(:,:) = 0._wp 282 282 DO jj = 2, jpjm1 !* update the stress WITHOUT a ice-ocean rotation angle 283 283 DO ji = fs_2, fs_jpim1 ! Vect. Opt. … … 290 290 utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice 291 291 vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice 292 293 diag_utau_oi(ji,jj) = - zutau_ice 292 293 diag_utau_oi(ji,jj) = - zutau_ice ! diagnostic oceanic stress on sea ice 294 294 diag_vtau_oi(ji,jj) = - zvtau_ice 295 295 END DO 296 296 END DO 297 CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition 297 CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition 298 CALL lbc_lnk( diag_utau_oi, 'U', -1. ) ; CALL lbc_lnk( diag_vtau_oi, 'V', -1. ) ! lateral boundary condition 298 299 ! 299 300 IF(ln_ctl) CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau : ', mask1=umask, & -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
r7596 r8150 502 502 503 503 CALL tab_2d_1d( nbpb, t_su_1d (1:nbpb), t_su(:,:,jl) , jpi, jpj, npb(1:nbpb) ) 504 CALL tab_2d_1d( nbpb, t_si_1d (1:nbpb), t_si(:,:,jl) , jpi, jpj, npb(1:nbpb) ) ! MV SIMIP 2016505 504 CALL tab_2d_1d( nbpb, sm_i_1d (1:nbpb), sm_i(:,:,jl) , jpi, jpj, npb(1:nbpb) ) 506 505 DO jk = 1, nlay_s … … 530 529 531 530 CALL tab_2d_1d( nbpb, wfx_snw_1d (1:nbpb), wfx_snw , jpi, jpj, npb(1:nbpb) ) 531 CALL tab_2d_1d( nbpb, wfx_snw_sum_1d(1:nbpb), wfx_snw_sum , jpi, jpj, npb(1:nbpb) ) 532 532 CALL tab_2d_1d( nbpb, wfx_sub_1d (1:nbpb), wfx_sub , jpi, jpj, npb(1:nbpb) ) 533 533 … … 562 562 563 563 ! SIMIP diagnostics 564 CALL tab_2d_1d( nbpb, diag_dms_mel_1d (1:nbpb), diag_dms_mel, jpi, jpj, npb(1:nbpb) )565 564 CALL tab_2d_1d( nbpb, diag_fc_bo_1d (1:nbpb), diag_fc_bo , jpi, jpj, npb(1:nbpb) ) 566 565 CALL tab_2d_1d( nbpb, diag_fc_su_1d (1:nbpb), diag_fc_su , jpi, jpj, npb(1:nbpb) ) … … 573 572 CALL tab_1d_2d( nbpb, a_i (:,:,jl) , npb, a_i_1d (1:nbpb) , jpi, jpj ) 574 573 CALL tab_1d_2d( nbpb, t_su(:,:,jl) , npb, t_su_1d (1:nbpb) , jpi, jpj ) 575 CALL tab_1d_2d( nbpb, t_si(:,:,jl) , npb, t_si_1d (1:nbpb) , jpi, jpj ) ! MV 2016576 574 CALL tab_1d_2d( nbpb, sm_i(:,:,jl) , npb, sm_i_1d (1:nbpb) , jpi, jpj ) 577 575 DO jk = 1, nlay_s … … 587 585 588 586 CALL tab_1d_2d( nbpb, wfx_snw , npb, wfx_snw_1d(1:nbpb) , jpi, jpj ) 587 CALL tab_1d_2d( nbpb, wfx_snw_sum , npb, wfx_snw_sum_1d(1:nbpb),jpi, jpj ) 589 588 CALL tab_1d_2d( nbpb, wfx_sub , npb, wfx_sub_1d(1:nbpb) , jpi, jpj ) 590 589 … … 622 621 623 622 ! SIMIP diagnostics 624 CALL tab_1d_2d( nbpb, diag_dms_mel , npb, diag_dms_mel_1d(1:nbpb), jpi, jpj )623 CALL tab_1d_2d( nbpb, t_si(:,:,jl) , npb, t_si_1d (1:nbpb) , jpi, jpj ) 625 624 CALL tab_1d_2d( nbpb, diag_fc_bo , npb, diag_fc_bo_1d(1:nbpb) , jpi, jpj ) 626 625 CALL tab_1d_2d( nbpb, diag_fc_su , npb, diag_fc_su_1d(1:nbpb) , jpi, jpj ) -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
r7506 r8150 88 88 REAL(wp) :: zdE ! specific enthalpy difference (J/kg) 89 89 REAL(wp) :: zfmdt ! exchange mass flux x time step (J/m2), >0 towards the ocean 90 REAL(wp) :: zsstK ! SST in Kelvin90 REAL(wp) :: zsstK ! SST (K) 91 91 92 92 REAL(wp), POINTER, DIMENSION(:) :: zqprec ! energy of fallen snow (J.m-3) … … 174 174 hfx_res_1d(ji) = hfx_res_1d(ji) + q_s_1d(ji,1) * ht_s_1d(ji) * a_i_1d(ji) * r1_rdtice 175 175 ! Contribution to mass flux 176 wfx_snw_1d(ji) = wfx_snw_1d(ji) + rhosn * ht_s_1d(ji) * a_i_1d(ji) * r1_rdtice 177 ! SIMIP snow melt diagnostic 178 diag_dms_mel_1d(ji) = diag_dms_mel_1d(ji) - rhosn * ht_s_1d(ji) * a_i_1d(ji) * r1_rdtice 176 wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) + rhosn * ht_s_1d(ji) * a_i_1d(ji) * r1_rdtice 179 177 ! updates 180 178 ht_s_1d(ji) = 0._wp … … 240 238 hfx_snw_1d(ji) = hfx_snw_1d(ji) - zdeltah(ji,1) * a_i_1d(ji) * zqprec(ji) * r1_rdtice 241 239 ! snow melting only = water into the ocean (then without snow precip), >0 242 wfx_snw_1d(ji) = wfx_snw_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 243 ! SIMIP snow melt diagnostic 244 diag_dms_mel_1d(ji) = diag_dms_mel_1d(ji) + rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 240 wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 245 241 ! updates available heat + precipitations after melting 246 242 zq_su (ji) = MAX( 0._wp , zq_su (ji) + zdeltah(ji,1) * zqprec(ji) ) … … 264 260 hfx_snw_1d(ji) = hfx_snw_1d(ji) - zdeltah(ji,jk) * a_i_1d(ji) * q_s_1d(ji,jk) * r1_rdtice 265 261 ! snow melting only = water into the ocean (then without snow precip) 266 wfx_snw_1d(ji) = wfx_snw_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 267 ! SIMIP snow melt diagnostic 268 diag_dms_mel_1d(ji) = diag_dms_mel_1d(ji) + rhosn * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 262 wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,jk) * r1_rdtice 269 263 ! updates available heat + thickness 270 264 zq_su (ji) = MAX( 0._wp , zq_su (ji) + zdeltah(ji,jk) * q_s_1d(ji,jk) ) … … 618 612 hfx_snw_1d(ji) = hfx_snw_1d(ji) - zdeltah(ji,1) * a_i_1d(ji) * q_s_1d(ji,1) * r1_rdtice ! W.m-2 (>0) 619 613 ! Contribution to mass flux 620 wfx_snw_1d(ji) = wfx_snw_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 621 ! SIMIP snow melt diagnostic 622 diag_dms_mel_1d(ji) = diag_dms_mel_1d(ji) + rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 614 wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) - rhosn * a_i_1d(ji) * zdeltah(ji,1) * r1_rdtice 623 615 ! 624 616 ii = MOD( npb(ji) - 1, jpi ) + 1 ; ij = ( npb(ji) - 1 ) / jpi + 1 … … 628 620 IF( ln_icectl .AND. zq_rema(ji) < 0. .AND. lwp ) WRITE(numout,*) 'ALERTE zq_rema <0 = ', zq_rema(ji) 629 621 END DO 630 622 623 ! add snow melt to mass snow mass flux to the ocean 624 DO ji = kideb, kiut 625 wfx_snw_1d(ji) = wfx_snw_1d(ji) + wfx_snw_sum_1d(ji) 626 END DO 627 631 628 ! 632 629 !------------------------------------------------------------------------------| … … 708 705 ! --- ensure that a_i = 0 where ht_i = 0 --- 709 706 WHERE( ht_i_1d == 0._wp ) a_i_1d = 0._wp 710 707 711 708 CALL wrk_dealloc( jpij, zqprec, zq_su, zq_bo, zf_tt, zq_rema, zsnw, zevap_rema ) 712 709 CALL wrk_dealloc( jpij, zdh_s_mel, zdh_s_pre, zdh_s_sub, zqh_i ) -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
r7596 r8150 743 743 END DO 744 744 745 WHERE( zh_s .LT. epsi10) ; t_si_1d(:) = t_su_1d(:) ; END WHERE745 WHERE( ( zh_s .LT. 1.0e-3 ) ) ; t_si_1d(:) = t_su_1d(:) ; END WHERE 746 746 ! END MV SIMIP 2016 747 747 -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
r7597 r8150 102 102 103 103 zsm(:,:) = e12t(:,:) 104 105 ! SIMIP diags 106 diag_dmtx_dyn(:,:) = 0._wp ; diag_dmty_dyn(:,:) = 0._wp 104 107 105 108 ! !-------------------------------------! … … 190 193 DO jl = 1, jpl 191 194 ! SIMIP mass transport diags 192 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:)195 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 193 196 CALL lim_adv_x( zusnit, u_ice, 1._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & !--- ice volume --- 194 197 & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) ) 195 198 CALL lim_adv_x( zusnit, u_ice, 1._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & !--- snow volume --- 196 199 & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) ) 197 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:)198 199 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:)200 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 201 202 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 200 203 CALL lim_adv_y( zusnit, v_ice, 0._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & !--- ice volume 201 204 & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) ) 202 205 CALL lim_adv_y( zusnit, v_ice, 0._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & !--- snow volume 203 206 & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) ) 204 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:)207 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 205 208 ! END SIMIP mass transport diags 206 207 ! CALL lim_adv_x( zusnit, u_ice, 1._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & !--- ice volume ---208 ! & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) )209 ! CALL lim_adv_y( zusnit, v_ice, 0._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), &210 ! & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) )211 ! CALL lim_adv_x( zusnit, u_ice, 1._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & !--- snow volume ---212 ! & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) )213 ! CALL lim_adv_y( zusnit, v_ice, 0._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), &214 ! & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) )215 209 CALL lim_adv_x( zusnit, u_ice, 1._wp, zsm, z0smi (:,:,jl), sxsal(:,:,jl), & !--- ice salinity --- 216 210 & sxxsal(:,:,jl), sysal(:,:,jl), syysal(:,:,jl), sxysal(:,:,jl) ) … … 246 240 & sxxopw(:,:) , syopw(:,:), syyopw(:,:), sxyopw(:,:) ) 247 241 DO jl = 1, jpl 248 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:) 242 ! SIMIP mass transport diags 243 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 249 244 CALL lim_adv_y( zusnit, v_ice, 1._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & !--- ice volume --- 250 245 & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) ) 251 246 CALL lim_adv_y( zusnit, v_ice, 1._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & !--- snow volume --- 252 247 & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) ) 253 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:)254 255 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:)256 CALL lim_adv_ y( zusnit, v_ice, 1._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & !--- snow volume ---257 & sxx sn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn(:,:,jl) )248 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 249 250 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) - ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 251 CALL lim_adv_x( zusnit, u_ice, 0._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & 252 & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) ) 258 253 CALL lim_adv_x( zusnit, u_ice, 0._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & 259 254 & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) ) 260 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) * r1_e12t(:,:) 261 262 ! CALL lim_adv_y( zusnit, v_ice, 1._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & !--- ice volume --- 263 ! & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) ) 264 ! CALL lim_adv_x( zusnit, u_ice, 0._wp, zsm, z0ice (:,:,jl), sxice(:,:,jl), & 265 ! & sxxice(:,:,jl), syice(:,:,jl), syyice(:,:,jl), sxyice(:,:,jl) ) 266 ! CALL lim_adv_y( zusnit, v_ice, 1._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & !--- snow volume --- 267 ! & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) ) 268 ! CALL lim_adv_x( zusnit, u_ice, 0._wp, zsm, z0snw (:,:,jl), sxsn (:,:,jl), & 269 ! & sxxsn (:,:,jl), sysn (:,:,jl), syysn (:,:,jl), sxysn (:,:,jl) ) 255 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) + ( rhoic * z0ice(:,:,jl) + rhosn * z0snw(:,:,jl) ) 256 ! END SIMIP mass transport diags 270 257 271 258 CALL lim_adv_y( zusnit, v_ice, 1._wp, zsm, z0smi (:,:,jl), sxsal(:,:,jl), & !--- ice salinity --- … … 298 285 299 286 ! SIMIP diags 300 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) / ( rdt_ice * zusnit )301 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) / ( rdt_ice * zusnit )287 diag_dmtx_dyn(:,:) = diag_dmtx_dyn(:,:) / rdt_ice 288 diag_dmty_dyn(:,:) = diag_dmty_dyn(:,:) / rdt_ice 302 289 303 290 !------------------------------------------- … … 401 388 402 389 ! SIMIP diagnostics 403 diag_dms_dyn(ji,jj) = rhosn * diag_trp_vs(ji,jj)404 diag_dmi_dyn(ji,jj) = rhoic * diag_trp_vi(ji,jj)390 diag_dms_dyn(ji,jj) = diag_dms_dyn(ji,jj) + rhosn * diag_trp_vs(ji,jj) 391 diag_dmi_dyn(ji,jj) = diag_dmi_dyn(ji,jj) + rhoic * diag_trp_vi(ji,jj) 405 392 END DO 406 393 END DO … … 447 434 hfx_res(ji,jj) = hfx_res(ji,jj) + ( e_s(ji,jj,1,jl) - zes ) * r1_rdtice ! W.m-2 <0 448 435 hfx_res(ji,jj) = hfx_res(ji,jj) + ( SUM( e_i(ji,jj,1:nlay_i,jl) ) - zei ) * r1_rdtice ! W.m-2 <0 449 450 ! SIMIP diagnostic451 diag_dms_dyn(ji,jj) = diag_dms_dyn(ji,jj) + ( v_s(ji,jj,jl) - zvs ) * rhosn * r1_rdtice452 436 453 437 ENDIF -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
r7506 r8150 600 600 hfx_res(ji,jj) = hfx_res(ji,jj) + ( e_s(ji,jj,1,jl) - zes ) * r1_rdtice ! W.m-2 <0 601 601 602 ! SIMIP snow melt diagnostic603 diag_dms_mel_1d(ji) = diag_dms_mel(ji,jj) + ( v_s(ji,jj,jl) - zvs ) * rhosn * r1_rdtice604 605 602 END DO 606 603 END DO -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
r7536 r8150 80 80 INTEGER :: Nu, Nv ! passage size 81 81 82 INTEGER, PARAMETER :: i_grid = 2 ! grid type (eORCA1 = 1, ORCA2 = 2)82 INTEGER, DIMENSION(4) :: ji0, ji1, jj0, jj1 83 83 84 84 !!------------------------------------------------------------------- … … 142 142 ! 143 143 IF ( iom_use( "miceage" ) ) CALL iom_put( "miceage" , om_i * zswi * z1_365 ) ! mean ice age 144 IF ( iom_use( "icethic_cea" ) ) CALL iom_put( "icethic_cea" , htm_i * zswi ) ! ice thickness mean145 IF ( iom_use( "snowthic_cea" ) ) CALL iom_put( "snowthic_cea", htm_s * zswi ) ! snow thickness mean146 144 IF ( iom_use( "micet" ) ) CALL iom_put( "micet" , ( tm_i - rt0 ) * zswi ) ! ice mean temperature 147 145 IF ( iom_use( "icest" ) ) CALL iom_put( "icest" , ( tm_su - rt0 ) * zswi ) ! ice surface temperature … … 228 226 CALL iom_put ('hfxspr' , hfx_spr(:,:) ) ! Heat content of snow precip 229 227 230 !--------------------------------231 ! Add-ons for SIMIP232 !--------------------------------233 zrho1 = ( rau0 - rhoic ) / rau0; zrho2 = rhosn / rau0234 235 IF ( iom_use( "icethic" ) ) CALL iom_put( "icethic" , htm_i * zswi ) ! ice thickness236 IF ( iom_use( "icepres" ) ) CALL iom_put( "icepres" , zswi ) ! ice presence (1 or 0)237 IF ( iom_use( "snowthic" ) ) CALL iom_put( "snowthic" , htm_s * zswi ) ! snow thickness238 IF ( iom_use( "icemass" ) ) CALL iom_put( "icemass" , rhoic * vt_i(:,:) * zswi ) ! ice mass per cell area239 IF ( iom_use( "snomass" ) ) CALL iom_put( "snomass" , rhosn * vt_s(:,:) * zswi ) ! snow mass per cell area240 IF ( iom_use( "icesnt" ) ) CALL iom_put( "icesnt" , ( tm_si - rt0 ) * zswi ) ! snow-ice interface temperature241 IF ( iom_use( "icebot" ) ) CALL iom_put( "icebot" , ( t_bo - rt0 ) * zswi ) ! ice bottom temperature242 IF ( iom_use( "icesmass" ) ) CALL iom_put( "icesmass" , smt_i * vt_i * rhoic / 1000. * zswi ) ! mass of salt in sea ice per cell area243 IF ( iom_use( "icefb" ) ) CALL iom_put( "icefb" , ( zrho1 * htm_i(:,:) - zrho2 * htm_s(:,:) ) * zswi ) ! mass of salt in sea ice per cell area244 245 IF ( iom_use( "wfxsum" ) ) CALL iom_put( "wfxsum" , wfx_sum ) ! Freshwater flux from sea-ice surface246 IF ( iom_use( "dmithd" ) ) CALL iom_put( "dmithd" , - wfx_bog - wfx_bom - wfx_sum & ! Sea-ice mass change from thermodynamics247 & - wfx_sni - wfx_opw - wfx_res )248 IF ( iom_use( "dmidyn" ) ) CALL iom_put( "dmidyn" , diag_dmi_dyn ) ! Sea-ice mass change from dynamics249 IF ( iom_use( "dmiopw" ) ) CALL iom_put( "dmiopw" , - wfx_opw ) ! Sea-ice mass change through growth in open water250 IF ( iom_use( "dmibog" ) ) CALL iom_put( "dmibog" , - wfx_bog ) ! Sea-ice mass change through basal growth251 IF ( iom_use( "dmisni" ) ) CALL iom_put( "dmisni" , - wfx_sni ) ! Sea-ice mass change through snow-to-ice conversion252 IF ( iom_use( "dmisum" ) ) CALL iom_put( "dmisum" , - wfx_sum ) ! Sea-ice mass change through surface melting253 IF ( iom_use( "dmibom" ) ) CALL iom_put( "dmibom" , - wfx_bom ) ! Sea-ice mass change through bottom melting254 IF ( iom_use( "dmtsub" ) ) CALL iom_put( "dmtsub" , - wfx_sub ) ! Sea-ice mass change through evaporation and sublimation255 IF ( iom_use( "dmsspr" ) ) CALL iom_put( "dmsspr" , - wfx_spr ) ! snow mass change through snow fall256 IF ( iom_use( "dmsssi" ) ) CALL iom_put( "dmsssi" , wfx_sni*rhosn/rhoic ) ! snow mass change through snow-to-ice conversion257 258 IF ( iom_use( "dmsmel" ) ) CALL iom_put( "dmsmel" , diag_dms_mel ) ! snow mass change through melt259 IF ( iom_use( "dmsdyn" ) ) CALL iom_put( "dmsdyn" , diag_dms_dyn ) ! snow mass change through dynamics260 261 IF ( iom_use( "hfxconbo" ) ) CALL iom_put( "hfxconbo" , diag_fc_bo ) ! bottom conduction flux262 IF ( iom_use( "hfxconsu" ) ) CALL iom_put( "hfxconsu" , diag_fc_su ) ! surface conduction flux263 264 IF ( iom_use( "wfxtot" ) ) CALL iom_put( "wfxtot" , -wfx_ice ) ! total freshwater flux from sea ice265 266 IF ( iom_use( "dmtxdyn" ) ) CALL iom_put( "dmtxdyn" , diag_dmtx_dyn ) ! X-component of sea-ice mass transport267 IF ( iom_use( "dmtydyn" ) ) CALL iom_put( "dmtydyn" , diag_dmty_dyn ) ! Y-component of sea-ice mass transport268 269 IF ( iom_use( "utau_oce" ) ) CALL iom_put( "utau_oce" , diag_utau_oi*zswi ) ! X-component of ocean stress on sea ice270 IF ( iom_use( "vtau_oce" ) ) CALL iom_put( "vtau_oce" , diag_vtau_oi*zswi ) ! Y-component of ocean stress on sea ice271 272 IF ( iom_use( "dssh_dx" ) ) CALL iom_put( "dssh_dx" , diag_dssh_dx*zswi ) ! Sea-surface tilt term in force balance (x-component)273 IF ( iom_use( "dssh_dy" ) ) CALL iom_put( "dssh_dy" , diag_dssh_dy*zswi ) ! Sea-surface tilt term in force balance (y-component)274 275 IF ( iom_use( "corstrx" ) ) CALL iom_put( "corstrx" , diag_corstrx*zswi ) ! Coriolis force term in force balance (x-component)276 IF ( iom_use( "corstry" ) ) CALL iom_put( "corstry" , diag_corstry*zswi ) ! Coriolis force term in force balance (y-component)277 278 IF ( iom_use( "intstrx" ) ) CALL iom_put( "intstrx" , diag_intstrx*zswi ) ! Internal force term in force balance (x-component)279 IF ( iom_use( "intstry" ) ) CALL iom_put( "intstry" , diag_intstry*zswi ) ! Internal force term in force balance (y-component)280 281 IF ( iom_use( "normstr" ) ) CALL iom_put( "normstr" , diag_sig1 *zswi ) ! Normal stress282 IF ( iom_use( "sheastr" ) ) CALL iom_put( "sheastr" , diag_sig2 *zswi ) ! Shear stress283 284 !--------------------------------285 ! Global ice diagnostics (SIMIP)286 !--------------------------------287 !288 ! What follows could be a separate routine289 !290 291 IF ( iom_use( "NH_icearea" ) .OR. iom_use( "NH_icevolu" ) ) THEN ! NH ice area292 293 WHERE( fcor > 0 ); zswi(:,:) = 1.0e-12;294 ELSEWHERE ; zswi(:,:) = 0.295 END WHERE296 297 IF ( iom_use( "NH_icearea" ) ) THEN298 zdiag_area_nh = glob_sum( at_i(:,:) * zswi(:,:) * e12t(:,:) )299 CALL iom_put( "NH_icearea", zdiag_area_nh )300 ENDIF301 IF ( iom_use( "NH_icevolu" ) ) THEN302 zdiag_volu_nh = glob_sum( vt_i(:,:) * zswi(:,:) * e12t(:,:) )303 CALL iom_put( "NH_icevolu", zdiag_volu_nh )304 ENDIF305 306 ENDIF307 308 IF ( iom_use( "NH_iceextt" ) ) THEN ! NH ice extt309 310 WHERE( fcor > 0 .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12;311 ELSEWHERE ; zswi(:,:) = 0.312 END WHERE313 314 zdiag_extt_nh = glob_sum( zswi(:,:) * e12t(:,:) )315 CALL iom_put( "NH_iceextt", zdiag_extt_nh )316 317 ENDIF318 319 IF ( iom_use( "SH_icearea" ) .OR. iom_use( "SH_icevolu" ) ) THEN ! SH ice area / volume320 321 WHERE( fcor < 0 ); zswi(:,:) = 1.0e-12;322 ELSEWHERE ; zswi(:,:) = 0.323 END WHERE324 325 IF ( iom_use( "SH_icearea" ) ) THEN326 zdiag_area_sh = glob_sum( at_i(:,:) * zswi(:,:) * e12t(:,:) )327 CALL iom_put( "SH_icearea", zdiag_area_sh )328 ENDIF329 IF ( iom_use( "SH_icevolu" ) ) THEN330 zdiag_volu_sh = glob_sum( vt_i(:,:) * zswi(:,:) * e12t(:,:) )331 CALL iom_put( "SH_icevolu", zdiag_volu_sh )332 ENDIF333 334 ENDIF335 336 IF ( iom_use( "SH_iceextt" ) ) THEN ! SH ice extt337 338 WHERE( fcor < 0 .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12;339 ELSEWHERE ; zswi(:,:) = 0.340 END WHERE341 342 zdiag_extt_sh = glob_sum( zswi(:,:) * e12t(:,:) )343 344 CALL iom_put( "SH_iceextt", zdiag_extt_sh )345 346 ENDIF347 348 !------------------------349 ! Fluxes through straits350 !------------------------351 !352 ! This piece of code is quite awful and should probably be a separate routine353 !354 ! See Notz et al 2016 for definitions355 ! 4 Arctic passages are considered (Fram, CAA, Barents, Bering)356 !357 358 IF ( iom_use("strait_arfl") .OR. iom_use("strait_mifl") .OR. iom_use("strait_msfl") ) THEN359 360 zdiag_area_strait(:) = 0._wp361 zdiag_mice_strait(:) = 0._wp362 zdiag_msno_strait(:) = 0._wp363 364 ! === Fram Strait ===365 IF ( i_grid == 2 ) THEN ! ORCA2366 Nv = 4367 zvi(1:Nv) = (/ 133, 134, 135, 136 /)368 zvj(1:Nv) = (/ 136, 136, 136, 136 /)369 ENDIF370 371 IF ( i_grid == 1 ) THEN ! eORCA1372 Nv = 10373 zvi(1:Nv) = (/ 268,269,270,271,272,273,274,275,276,277 /)374 zvj(1:Nv) = (/ 311,311,311,311,311,311,311,311,311,311 /)375 ENDIF376 377 DO ii = 1, Nv378 ji = zvi(ii)379 jj = zvj(ii)380 zdiag_area_strait(1) = zdiag_area_strait(1) & ! --- ice area flux ---381 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & ! northwards (positive) flow382 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ! southwards (negative) flow383 384 zdiag_mice_strait(1) = zdiag_mice_strait(1) + rhoic * & ! --- ice mass flux ---385 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & !386 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ) !387 388 zdiag_msno_strait(1) = zdiag_msno_strait(1) + rhosn * & ! --- snow mass flux ---389 & ( vt_s(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) &390 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) )391 END DO392 393 ! === Bering Strait ===394 IF ( i_grid == 1 ) THEN ! eORCA1395 Nv = 3396 zvi(1:Nv) = (/ 113,114,115 /)397 zvj(1:Nv) = (/ 285,285,285 /)398 ENDIF399 400 IF ( i_grid == 2 ) THEN ! ORCA2401 Nv = 2402 zvi(1:Nv) = (/ 55 , 56 /)403 zvj(1:Nv) = (/ 122,122 /)404 ENDIF405 406 DO ii = 1, Nv407 ji = zvi(ii)408 jj = zvj(ii)409 zdiag_area_strait(4) = zdiag_area_strait(4) & ! --- ice area flux ---410 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & ! northwards (positive) flow411 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ! southwards (negative) flow412 413 zdiag_mice_strait(4) = zdiag_mice_strait(4) + rhoic * & ! --- ice mass flux ---414 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & !415 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ) !416 417 zdiag_msno_strait(4) = zdiag_msno_strait(4) + rhosn * & ! --- snow mass flux ---418 & ( vt_s(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) &419 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) )420 END DO421 422 ! === Barents throughflow (eORCA1)423 424 ! U-flow425 IF ( i_grid == 1 ) THEN ! 'eORCA1'426 Nu = 11427 zui(1:Nu) = (/ 282,283,284,285,286,286,287,288,289,290,292/)428 zuj(1:Nu) = (/ 308,307,306,305,304,303,302,301,300,299,298/)429 ENDIF430 IF ( i_grid == 2 ) THEN ! 'ORCA2'431 Nu = 5432 zui(1:Nu) = (/ 141,142,142,143,144 /)433 zuj(1:Nu) = (/ 134,133,132,131,130 /)434 ENDIF435 zfarea_u = 0._wp436 zfmice_u = 0._wp437 zfmsno_u = 0._wp438 439 DO ii = 1, Nu440 ji = zui(ii)441 jj = zuj(ii)442 zfarea_u = zfarea_u & ! --- ice area zonal flux ---443 & + at_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & ! --- eastward444 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ! --- westward445 zfmice_u = zfmice_u + rhoic * & ! --- ice mass zonal flux ---446 & ( vt_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) &447 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) )448 zfmsno_u = zfmsno_u + rhosn * & ! --- snow mass zonal flux ---449 & ( vt_s(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) &450 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) )451 END DO452 453 ! V-flow454 IF ( i_grid == 1 ) THEN ! 'eORCA1'455 Nv = 9456 zvi(1:Nv) = (/ 282,283,284,285,286,287,288,289,290/)457 zvj(1:Nv) = (/ 308,307,306,305,303,302,301,300,299/)458 ENDIF459 IF ( i_grid == 2 ) THEN ! 'ORCA2'460 Nv = 4461 zvi(1:Nv) = (/ 140,141,142,143 /)462 zvj(1:Nv) = (/ 135,134,132,131 /)463 ENDIF464 zfarea_v = 0._wp465 zfmice_v = 0._wp466 zfmsno_v = 0._wp467 468 DO ii = 1, Nv469 ji = zvi(ii)470 jj = zvj(ii)471 zfarea_v = zfarea_v & ! --- ice area meridian flux ---472 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! --- eastward473 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ! --- westward474 zfmice_v = zfmice_v + rhoic * & ! --- ice mass meridian flux ---475 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & !476 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) !477 zfmsno_v = zfmsno_v + rhosn * & ! --- snow mass meridian flux ---478 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & !479 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) !480 END DO481 482 ! Sum U/V contributions483 zdiag_area_strait(3) = zfarea_u + zfarea_v484 zdiag_mice_strait(3) = zfmice_u + zfmice_v485 zdiag_msno_strait(3) = zfmsno_u + zfmsno_v486 487 ! === CAA throughflow ===488 ! U-flow through Queen Elisabeth Islands and McClure straits489 IF ( i_grid == 1 ) THEN ! eORCA1490 Nu = 8491 zui(1:Nu) = (/ 231,231,231, 132,132,132,132,132 /)492 zuj(1:Nu) = (/ 328,329,330, 318,319,320,321,322 /)493 zfarea_u = 0._wp494 zfmice_u = 0._wp495 zfmsno_u = 0._wp496 497 DO ii = 1, Nu498 ji = zui(ii)499 jj = zuj(ii)500 zfarea_u = zfarea_u & ! --- ice area zonal flux ---501 & + at_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & ! --- eastward502 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ! --- westward503 zfmice_u = zfmice_u + rhoic * & ! --- ice mass zonal flux ---504 & ( vt_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) &505 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) )506 zfmsno_u = zfmsno_u + rhosn * & ! --- snow mass zonal flux ---507 & ( vt_s(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) &508 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) )509 END DO510 ENDIF511 512 IF ( i_grid == 2 ) THEN ! ORCA2513 zfarea_u = 0._wp ! QEI and McClure straits are not resolved in ORCA2514 zfmice_u = 0._wp515 zfmsno_u = 0._wp516 ENDIF517 518 ! V-flow through Nares Strait519 IF ( i_grid == 1 ) THEN ! eORCA1520 Nv = 4521 zvi(1:Nv) = (/ 254,255,256,257 /)522 zvj(1:Nv) = (/ 317,317,317,317 /)523 ENDIF524 IF ( i_grid == 2 ) THEN ! ORCA2525 Nv = 2526 zvi(1:Nv) = (/ 117,118 /)527 zvj(1:Nv) = (/ 145,145 /)528 ENDIF529 zfarea_v = 0._wp530 zfmice_v = 0._wp531 zfmsno_v = 0._wp532 533 DO ii = 1, Nv534 ji = zvi(ii)535 jj = zvj(ii)536 zfarea_v = zfarea_v & ! --- ice area meridian flux ---537 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! --- eastward538 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ! --- westward539 zfmice_v = zfmice_v + rhoic * & ! --- ice mass meridian flux ---540 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & !541 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) !542 zfmsno_v = zfmsno_v + rhosn * & ! --- snow mass meridian flux ---543 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & !544 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) !545 END DO546 547 ! Sum U/V contributions548 zdiag_area_strait(2) = zfarea_u + zfarea_v549 zdiag_mice_strait(2) = zfmice_u + zfmice_v550 zdiag_msno_strait(2) = zfmsno_u + zfmsno_v551 552 ! === Write in file553 IF ( iom_use("strait_arfl") ) CALL iom_put( "strait_arfl", zdiag_area_strait )554 IF ( iom_use("strait_mifl") ) CALL iom_put( "strait_mifl", zdiag_mice_strait )555 IF ( iom_use("strait_msfl") ) CALL iom_put( "strait_msfl", zdiag_msno_strait )556 557 WRITE(numout,*) " area flx ", zdiag_area_strait(:)558 WRITE(numout,*) " mice flx ", zdiag_mice_strait(:)559 WRITE(numout,*) " msno flx ", zdiag_msno_strait(:)560 561 ENDIF562 563 228 !---------------------------------- 564 229 ! Output category-dependent fields … … 576 241 ! brine volume 577 242 IF ( iom_use( "brinevol_cat" ) ) CALL iom_put( "brinevol_cat", bv_i * 100. * zswi2 ) 243 244 !-------------------------------- 245 ! Add-ons for SIMIP 246 !-------------------------------- 247 zrho1 = ( rau0 - rhoic ) / rau0; zrho2 = rhosn / rau0 248 249 IF ( iom_use( "icethic" ) ) CALL iom_put( "icethic" , htm_i * zswi ) ! ice thickness 250 IF ( iom_use( "icepres" ) ) CALL iom_put( "icepres" , zswi ) ! ice presence (1 or 0) 251 IF ( iom_use( "snowthic" ) ) CALL iom_put( "snowthic" , htm_s * zswi ) ! snow thickness 252 IF ( iom_use( "icemass" ) ) CALL iom_put( "icemass" , rhoic * vt_i(:,:) * zswi ) ! ice mass per cell area 253 IF ( iom_use( "snomass" ) ) CALL iom_put( "snomass" , rhosn * vt_s(:,:) * zswi ) ! snow mass per cell area 254 IF ( iom_use( "icesnt" ) ) CALL iom_put( "icesnt" , ( tm_si - rt0 ) * zswi ) ! snow-ice interface temperature 255 IF ( iom_use( "icebot" ) ) CALL iom_put( "icebot" , ( t_bo - rt0 ) * zswi ) ! ice bottom temperature 256 IF ( iom_use( "icesmass" ) ) CALL iom_put( "icesmass" , SUM( smv_i, DIM = 3 ) * rhoic / 1000. * zswi ) ! mass of salt in sea ice per cell area 257 IF ( iom_use( "icefb" ) ) CALL iom_put( "icefb" , ( zrho1 * htm_i(:,:) - zrho2 * htm_s(:,:) ) * zswi ) ! ice freeboard 258 259 IF ( iom_use( "wfxsum" ) ) CALL iom_put( "wfxsum" , wfx_sum ) ! Freshwater flux from sea-ice surface 260 IF ( iom_use( "dmithd" ) ) CALL iom_put( "dmithd" , - wfx_bog - wfx_bom - wfx_sum & ! Sea-ice mass change from thermodynamics 261 & - wfx_sni - wfx_opw - wfx_res ) 262 IF ( iom_use( "dmidyn" ) ) CALL iom_put( "dmidyn" , diag_dmi_dyn ) ! Sea-ice mass change from dynamics 263 IF ( iom_use( "dmiopw" ) ) CALL iom_put( "dmiopw" , - wfx_opw ) ! Sea-ice mass change through growth in open water 264 IF ( iom_use( "dmibog" ) ) CALL iom_put( "dmibog" , - wfx_bog ) ! Sea-ice mass change through basal growth 265 IF ( iom_use( "dmisni" ) ) CALL iom_put( "dmisni" , - wfx_sni ) ! Sea-ice mass change through snow-to-ice conversion 266 IF ( iom_use( "dmisum" ) ) CALL iom_put( "dmisum" , - wfx_sum ) ! Sea-ice mass change through surface melting 267 IF ( iom_use( "dmibom" ) ) CALL iom_put( "dmibom" , - wfx_bom ) ! Sea-ice mass change through bottom melting 268 IF ( iom_use( "dmtsub" ) ) CALL iom_put( "dmtsub" , - wfx_sub ) ! Sea-ice mass change through evaporation and sublimation 269 IF ( iom_use( "dmsspr" ) ) CALL iom_put( "dmsspr" , - wfx_spr ) ! snow mass change through snow fall 270 IF ( iom_use( "dmsssi" ) ) CALL iom_put( "dmsssi" , wfx_sni*rhosn/rhoic ) ! snow mass change through snow-to-ice conversion 271 272 IF ( iom_use( "dmsmel" ) ) CALL iom_put( "dmsmel" , - wfx_snw_sum ) ! snow mass change through melt 273 IF ( iom_use( "dmsdyn" ) ) CALL iom_put( "dmsdyn" , diag_dms_dyn ) ! snow mass change through dynamics 274 275 IF ( iom_use( "hfxconbo" ) ) CALL iom_put( "hfxconbo" , diag_fc_bo ) ! bottom conduction flux 276 IF ( iom_use( "hfxconsu" ) ) CALL iom_put( "hfxconsu" , diag_fc_su ) ! surface conduction flux 277 278 IF ( iom_use( "wfxtot" ) ) CALL iom_put( "wfxtot" , -wfx_ice ) ! total freshwater flux from sea ice 279 280 IF ( iom_use( "dmtxdyn" ) ) CALL iom_put( "dmtxdyn" , diag_dmtx_dyn ) ! X-component of sea-ice mass transport 281 IF ( iom_use( "dmtydyn" ) ) CALL iom_put( "dmtydyn" , diag_dmty_dyn ) ! Y-component of sea-ice mass transport 282 283 IF ( iom_use( "utau_oi" ) ) CALL iom_put( "utau_oi" , diag_utau_oi*zswi ) ! X-component of ocean stress on sea ice 284 IF ( iom_use( "vtau_oi" ) ) CALL iom_put( "vtau_oi" , diag_vtau_oi*zswi ) ! Y-component of ocean stress on sea ice 285 286 IF ( iom_use( "dssh_dx" ) ) CALL iom_put( "dssh_dx" , diag_dssh_dx*zswi ) ! Sea-surface tilt term in force balance (x-component) 287 IF ( iom_use( "dssh_dy" ) ) CALL iom_put( "dssh_dy" , diag_dssh_dy*zswi ) ! Sea-surface tilt term in force balance (y-component) 288 289 IF ( iom_use( "corstrx" ) ) CALL iom_put( "corstrx" , diag_corstrx*zswi ) ! Coriolis force term in force balance (x-component) 290 IF ( iom_use( "corstry" ) ) CALL iom_put( "corstry" , diag_corstry*zswi ) ! Coriolis force term in force balance (y-component) 291 292 IF ( iom_use( "intstrx" ) ) CALL iom_put( "intstrx" , diag_intstrx*zswi ) ! Internal force term in force balance (x-component) 293 IF ( iom_use( "intstry" ) ) CALL iom_put( "intstry" , diag_intstry*zswi ) ! Internal force term in force balance (y-component) 294 295 IF ( iom_use( "normstr" ) ) CALL iom_put( "normstr" , diag_sig1 *zswi ) ! Normal stress 296 IF ( iom_use( "sheastr" ) ) CALL iom_put( "sheastr" , diag_sig2 *zswi ) ! Shear stress 297 298 !-------------------------------- 299 ! Global ice diagnostics (SIMIP) 300 !-------------------------------- 301 302 IF ( iom_use( "NH_icearea" ) .OR. iom_use( "NH_icevolu" ) .OR. iom_use( "NH_iceextt" ) ) THEN ! NH integrated diagnostics 303 304 WHERE( fcor > 0._wp ); zswi(:,:) = 1.0e-12 305 ELSEWHERE ; zswi(:,:) = 0. 306 END WHERE 307 308 zdiag_area_nh = glob_sum( at_i(:,:) * zswi(:,:) * e12t(:,:) ) 309 zdiag_volu_nh = glob_sum( vt_i(:,:) * zswi(:,:) * e12t(:,:) ) 310 311 WHERE( fcor > 0._wp .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12 312 ELSEWHERE ; zswi(:,:) = 0. 313 END WHERE 314 315 zdiag_extt_nh = glob_sum( zswi(:,:) * e12t(:,:) ) 316 317 IF ( iom_use( "NH_icearea" ) ) CALL iom_put( "NH_icearea" , zdiag_area_nh ) 318 IF ( iom_use( "NH_icevolu" ) ) CALL iom_put( "NH_icevolu" , zdiag_volu_nh ) 319 IF ( iom_use( "NH_iceextt" ) ) CALL iom_put( "NH_iceextt" , zdiag_extt_nh ) 320 321 ENDIF 322 323 IF ( iom_use( "SH_icearea" ) .OR. iom_use( "SH_icevolu" ) .OR. iom_use( "SH_iceextt" ) ) THEN ! SH integrated diagnostics 324 325 WHERE( fcor < 0._wp ); zswi(:,:) = 1.0e-12; 326 ELSEWHERE ; zswi(:,:) = 0. 327 END WHERE 328 329 zdiag_area_sh = glob_sum( at_i(:,:) * zswi(:,:) * e12t(:,:) ) 330 zdiag_volu_sh = glob_sum( vt_i(:,:) * zswi(:,:) * e12t(:,:) ) 331 332 WHERE( fcor < 0._wp .AND. at_i > 0.15 ); zswi(:,:) = 1.0e-12 333 ELSEWHERE ; zswi(:,:) = 0. 334 END WHERE 335 336 zdiag_extt_sh = glob_sum( zswi(:,:) * e12t(:,:) ) 337 338 IF ( iom_use( "SH_icearea" ) ) CALL iom_put( "SH_icearea", zdiag_area_sh ) 339 IF ( iom_use( "SH_icevolu" ) ) CALL iom_put( "SH_icevolu", zdiag_volu_sh ) 340 IF ( iom_use( "SH_iceextt" ) ) CALL iom_put( "SH_iceextt", zdiag_extt_sh ) 341 342 ENDIF 343 344 !-------------------------------- 345 ! Fluxes through straits (SIMIP) 346 !-------------------------------- 347 ! 348 ! Valid only for ORCA-like grids 349 ! 350 ! 4 Arctic passages are considered (Fram, CAA, Barents, Bering; see Notz et al (GMD 2016) for definitions) 351 ! 352 ! Fram and Bering straits are easy because they follow parallels 353 ! Barents and Canadian Arctic Archipelago are less easy because they do not, which is why they look so awful. 354 ! 355 356 IF ( iom_use( "strait_arfl" ) .OR. iom_use( "strait_mifl" ) .OR. iom_use( "strait_msfl" ) .AND. cp_cfg == "orca" ) THEN 357 358 zdiag_area_strait(:) = 0._wp ; zdiag_mice_strait(:) = 0._wp ; zdiag_msno_strait(:) = 0._wp 359 360 !------------------------------ 361 ! === Fram & Bering Straits === 362 !------------------------------ 363 364 SELECT CASE ( jp_cfg ) 365 366 CASE ( 2 ) ! --- ORCA2 367 368 ! Fram Strait (i_strait = 1) 369 ji0(1) = 133 ; ji1(1) = 136 370 jj0(1) = 136 371 372 ! Bering Strait (i_strait = 4) 373 ji0(4) = 55 ; ji1(4) = 56 374 jj0(4) = 122 375 376 CASE ( 1 ) ! --- eORCA1 377 378 ! Fram Strait 379 ji0(1) = 268 ; ji1(1) = 277 380 jj0(1) = 311 381 382 ! Bering Strait 383 ji0(4) = 113 ; jj1(4) = 115 384 jj0(4) = 285 385 386 END SELECT 387 388 DO i_strait = 1, 4, 3 389 390 DO ji = mi0(ji0), mi1(ji1) 391 jj = mj0(jj0) 392 393 zdiag_area_strait(i_strait) = zdiag_area_strait(i_strait) & ! --- ice area flux --- 394 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & ! northwards (positive) flow 395 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ! southwards (negative) flow 396 397 zdiag_mice_strait(i_strait) = zdiag_mice_strait(i_strait) + rhoic * & ! --- ice mass flux --- 398 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & 399 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ) 400 401 zdiag_msno_strait(i_strait) = zdiag_msno_strait(i_strait) + rhosn * & ! --- snow mass flux --- 402 & ( vt_s(ji,jj-1) * e12t(ji,jj-1) * MAX( v_ice(ji,jj-1), 0.0 ) & 403 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( v_ice(ji,jj-1), 0.0 ) ) 404 405 END DO 406 407 END DO 408 409 !--------------------- 410 ! === Barents opening 411 !--------------------- 412 413 SELECT CASE ( jp_cfg ) 414 415 CASE ( 1 ) ! 'eORCA1' 416 417 Nu = 11 ! U-Flow 418 zui(1:Nu) = (/ 282,283,284,285,286,286,287,288,289,290,292/) 419 zuj(1:Nu) = (/ 308,307,306,305,304,303,302,301,300,299,298/) 420 421 Nv = 9 ! V-Flow 422 zvi(1:Nv) = (/ 282,283,284,285,286,287,288,289,290/) 423 zvj(1:Nv) = (/ 308,307,306,305,303,302,301,300,299/) 424 425 CASE ( 2 ) ! 'ORCA2' 426 427 Nu = 5 ! U-Flow 428 zui(1:Nu) = (/ 141,142,142,143,144 /) 429 zuj(1:Nu) = (/ 134,133,132,131,130 /) 430 431 Nv = 4 ! V-Flow 432 zvi(1:Nv) = (/ 140,141,142,143 /) 433 zvj(1:Nv) = (/ 135,134,132,131 /) 434 435 END SELECT 436 437 ! Barents U-flow 438 zfarea_u = 0._wp ; zfmice_u = 0._wp ; zfmsno_u = 0._wp 439 440 DO ii = 1, Nu 441 442 ji = mi0(zui(ii)) 443 jj = mj0(zuj(ii)) 444 445 zfarea_u = zfarea_u & ! --- ice area zonal flux --- 446 & + at_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & ! --- northward 447 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ! --- southward 448 zfmice_u = zfmice_u + rhoic * & ! --- ice mass zonal flux --- 449 & ( vt_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & 450 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ) 451 zfmsno_u = zfmsno_u + rhosn * & ! --- snow mass zonal flux --- 452 & ( vt_s(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & 453 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ) 454 END DO 455 456 ! Barents V-flow 457 zfarea_v = 0._wp ; zfmice_v = 0._wp ; zfmsno_v = 0._wp 458 459 DO ii = 1, Nv 460 461 ji = mi0(zvi(ii)) 462 jj = mj0(zvj(ii)) 463 464 zfarea_v = zfarea_v & ! --- ice area meridian flux --- 465 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! --- eastward 466 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ! --- westward 467 zfmice_v = zfmice_v + rhoic * & ! --- ice mass meridian flux --- 468 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! 469 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) ! 470 zfmsno_v = zfmsno_v + rhosn * & ! --- snow mass meridian flux --- 471 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! 472 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) ! 473 END DO 474 475 ! Sum Barents U-/V- contributions 476 zdiag_area_strait(3) = zfarea_u + zfarea_v 477 zdiag_mice_strait(3) = zfmice_u + zfmice_v 478 zdiag_msno_strait(3) = zfmsno_u + zfmsno_v 479 480 !--------------------- 481 ! === CAA throughflow 482 !--------------------- 483 484 SELECT CASE ( jp_cfg ) 485 486 CASE ( 1 ) ! eORCA1 487 488 ! V-flow through Nares Strait 489 Nv = 4 490 zvi(1:Nv) = (/ 254,255,256,257 /) 491 zvj(1:Nv) = (/ 317,317,317,317 /) 492 493 ! U-flow through Queen Elisabeth Islands and McClure straits 494 Nu = 8 495 zui(1:Nu) = (/ 231,231,231, 132,132,132,132,132 /) 496 zuj(1:Nu) = (/ 328,329,330, 318,319,320,321,322 /) 497 498 zfarea_u = 0._wp ; zfmice_u = 0._wp ; zfmsno_u = 0._wp 499 500 DO ii = 1, Nu 501 502 ji = mi0(zui(ii)) 503 jj = mj0(zuj(ii)) 504 505 zfarea_u = zfarea_u & ! --- ice area zonal flux --- 506 & + at_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & ! --- eastward 507 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ! --- westward 508 zfmice_u = zfmice_u + rhoic * & ! --- ice mass zonal flux --- 509 & ( vt_i(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & 510 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ) 511 zfmsno_u = zfmsno_u + rhosn * & ! --- snow mass zonal flux --- 512 & ( vt_s(ji-1,jj) * e12t(ji-1,jj) * MAX( u_ice(ji-1,jj), 0.0 ) & 513 & + vt_s(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji-1,jj), 0.0 ) ) 514 515 END DO 516 517 518 CASE ( 2 ) ! ORCA2 519 520 ! V-flow through Nares Strait 521 Nv = 2 522 zvi(1:Nv) = (/ 117,118 /) 523 zvj(1:Nv) = (/ 145,145 /) 524 525 ! U-flow through Queen Elisabeth Islands and McClure straits (not resolved in ORCA2) 526 zfarea_u = 0._wp ; zfmice_u = 0._wp ; zfmsno_u = 0._wp 527 528 END SELECT 529 530 ! V-flow through Nares Strait 531 zfarea_v = 0._wp ; zfmice_v = 0._wp ; zfmsno_v = 0._wp 532 533 DO ii = 1, Nv 534 535 ji = mi0(zvi(ii)) 536 jj = mj0(zvj(ii)) 537 538 zfarea_v = zfarea_v & ! --- ice area meridian flux --- 539 & + at_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! --- eastward 540 & + at_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ! --- westward 541 zfmice_v = zfmice_v + rhoic * & ! --- ice mass meridian flux --- 542 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! 543 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) ! 544 zfmsno_v = zfmsno_v + rhosn * & ! --- snow mass meridian flux --- 545 & ( vt_i(ji,jj-1) * e12t(ji,jj-1) * MAX( u_ice(ji,jj-1), 0.0 ) & ! 546 & + vt_i(ji,jj ) * e12t(ji,jj) * MIN( u_ice(ji,jj-1), 0.0 ) ) ! 547 548 END DO 549 550 ! Sum U/V contributions 551 zdiag_area_strait(2) = zfarea_u + zfarea_v 552 zdiag_mice_strait(2) = zfmice_u + zfmice_v 553 zdiag_msno_strait(2) = zfmsno_u + zfmsno_v 554 555 ! === Ncdf output 556 IF ( iom_use("strait_arfl") ) CALL iom_put( "strait_arfl", zdiag_area_strait ) 557 IF ( iom_use("strait_mifl") ) CALL iom_put( "strait_mifl", zdiag_mice_strait ) 558 IF ( iom_use("strait_msfl") ) CALL iom_put( "strait_msfl", zdiag_msno_strait ) 559 560 WRITE(numout,*) " area flx ", zdiag_area_strait(:) 561 WRITE(numout,*) " mice flx ", zdiag_mice_strait(:) 562 WRITE(numout,*) " msno flx ", zdiag_msno_strait(:) 563 564 ENDIF 578 565 579 566 ! ! Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/thd_ice.F90
r7506 r8150 66 66 67 67 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_snw_1d 68 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_snw_sum_1d 68 69 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_sub_1d 69 70 … … 130 131 131 132 ! Extra SIMIP data request diagnostics 132 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: diag_dms_mel_1d !: <==> the 2D diag_dms_mel133 133 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: diag_fc_bo_1d !: <==> the 2D diag_fc_bo 134 134 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: diag_fc_su_1d !: <==> the 2D diag_fc_su … … 177 177 & t_s_1d(jpij,nlay_s) , t_i_1d(jpij,nlay_i) , s_i_1d(jpij,nlay_i) , & 178 178 & q_i_1d(jpij,nlay_i+1) , q_s_1d(jpij,nlay_s) , & 179 & qh_i_old(jpij,0:nlay_i+1), h_i_old(jpij,0:nlay_i+1) , STAT=ierr(3) )179 & qh_i_old(jpij,0:nlay_i+1), h_i_old(jpij,0:nlay_i+1) , STAT=ierr(3) ) 180 180 ! Extra SIMIP diagnostics 181 ALLOCATE( diag_dms_mel_1d(jpij) , & 182 & diag_fc_bo_1d(jpij) , diag_fc_su_1d(jpij) , & 183 & STAT=ierr(4) ) 181 ALLOCATE( diag_fc_bo_1d(jpij) , diag_fc_su_1d(jpij) , STAT=ierr(4) ) 184 182 185 183 thd_ice_alloc = MAXVAL( ierr ) -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r7517 r8150 230 230 ! automatic definitions of some of the xml attributs 231 231 CALL set_xmlatt 232 233 CALL set_1point 232 234 233 235 ! end file definition … … 1573 1575 1574 1576 1577 SUBROUTINE set_1point 1578 !!---------------------------------------------------------------------- 1579 !! *** ROUTINE set_1point *** 1580 !! 1581 !! ** Purpose : define zoom grid for scalar fields 1582 !! 1583 !!---------------------------------------------------------------------- 1584 REAL(wp), DIMENSION(1) :: zz = 1. 1585 INTEGER :: ix, iy 1586 !!---------------------------------------------------------------------- 1587 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! Nearest point to north pole should be ocean 1588 CALL iom_set_domain_attr('1point', zoom_ibegin=ix, zoom_jbegin=iy) 1589 1590 END SUBROUTINE set_1point 1591 1592 1575 1593 SUBROUTINE set_xmlatt 1576 1594 !!---------------------------------------------------------------------- -
branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r7506 r8150 595 595 wfx_res(:,:) = 0._wp ; wfx_sub(:,:) = 0._wp 596 596 wfx_spr(:,:) = 0._wp ; 597 598 wfx_snw_dyn(:,:) = 0._wp ; wfx_snw_sum(:,:) = 0._wp 597 599 598 600 hfx_thd(:,:) = 0._wp ; … … 613 615 614 616 ! SIMIP diagnostics 615 diag_dms_ mel(:,:) = 0._wp ; diag_dms_dyn(:,:) = 0._wp616 diag_dm tx_dyn(:,:) = 0._wp ; diag_dmty_dyn(:,:) = 0._wp617 diag_dms_sum(:,:) = 0._wp ; diag_dms_dyn(:,:) = 0._wp 618 diag_dmi_dyn(:,:) = 0._wp ; 617 619 diag_fc_bo(:,:) = 0._wp ; diag_fc_su(:,:) = 0._wp 618 620
Note: See TracChangeset
for help on using the changeset viewer.