[11395] | 1 | MODULE isfhdiv |
---|
[11987] | 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE isfhdiv *** |
---|
| 4 | !! ice shelf horizontal divergence module : update the horizontal divergence |
---|
| 5 | !! with the ice shelf melt and coupling correction |
---|
| 6 | !!====================================================================== |
---|
| 7 | !! History : 4.0 ! 2019-09 (P. Mathiot) Original code |
---|
| 8 | !!---------------------------------------------------------------------- |
---|
[11395] | 9 | |
---|
[11987] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! isf_hdiv : update the horizontal divergence with the ice shelf |
---|
| 12 | !! melt and coupling correction |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | |
---|
| 15 | USE isf_oce ! ice shelf |
---|
| 16 | |
---|
[11852] | 17 | USE dom_oce ! time and space domain |
---|
| 18 | USE phycst , ONLY: r1_rau0 ! physical constant |
---|
| 19 | USE in_out_manager ! |
---|
[11395] | 20 | |
---|
[11403] | 21 | IMPLICIT NONE |
---|
[11395] | 22 | |
---|
[11403] | 23 | PRIVATE |
---|
[11395] | 24 | |
---|
[11403] | 25 | PUBLIC isf_hdiv |
---|
[11395] | 26 | |
---|
| 27 | CONTAINS |
---|
| 28 | |
---|
[11423] | 29 | SUBROUTINE isf_hdiv( kt, phdiv ) |
---|
[11395] | 30 | !!---------------------------------------------------------------------- |
---|
| 31 | !! *** SUBROUTINE isf_hdiv *** |
---|
| 32 | !! |
---|
[11541] | 33 | !! ** Purpose : update the horizontal divergence with the ice shelf contribution |
---|
| 34 | !! (parametrisation, explicit, ice sheet coupling conservation |
---|
| 35 | !! increment) |
---|
[11395] | 36 | !! |
---|
| 37 | !!---------------------------------------------------------------------- |
---|
| 38 | REAL(wp), DIMENSION(:,:,:), INTENT( inout ) :: phdiv ! horizontal divergence |
---|
| 39 | !!---------------------------------------------------------------------- |
---|
[11423] | 40 | INTEGER, INTENT(in) :: kt |
---|
[11395] | 41 | ! |
---|
[11521] | 42 | IF ( ln_isf ) THEN |
---|
| 43 | ! |
---|
| 44 | ! ice shelf cavity contribution |
---|
| 45 | IF ( ln_isfcav_mlt ) CALL isf_hdiv_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, phdiv) |
---|
| 46 | ! |
---|
| 47 | ! ice shelf parametrisation contribution |
---|
| 48 | IF ( ln_isfpar_mlt ) CALL isf_hdiv_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, phdiv) |
---|
| 49 | ! |
---|
[11541] | 50 | ! ice sheet coupling contribution |
---|
[11852] | 51 | IF ( ln_isfcpl .AND. kt /= 0 ) THEN |
---|
[11541] | 52 | ! |
---|
| 53 | ! correct divergence only for the first time step |
---|
| 54 | IF ( kt == nit000 ) CALL isf_hdiv_cpl(risfcpl_vol , phdiv) |
---|
| 55 | IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(risfcpl_vol*0.5_wp, phdiv) |
---|
| 56 | ! |
---|
| 57 | ! correct divergence every time step to remove any trend due to coupling |
---|
| 58 | ! conservation option |
---|
| 59 | IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) |
---|
| 60 | ! |
---|
| 61 | END IF |
---|
[11423] | 62 | ! |
---|
| 63 | END IF |
---|
[11395] | 64 | ! |
---|
| 65 | END SUBROUTINE isf_hdiv |
---|
| 66 | |
---|
| 67 | SUBROUTINE isf_hdiv_mlt(ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, phdiv) |
---|
| 68 | !!---------------------------------------------------------------------- |
---|
| 69 | !! *** SUBROUTINE sbc_isf_div *** |
---|
| 70 | !! |
---|
[11541] | 71 | !! ** Purpose : update the horizontal divergence with the ice shelf inflow |
---|
[11395] | 72 | !! |
---|
[11541] | 73 | !! ** Method : pfwf is positive (outflow) and expressed as kg/m2/s |
---|
| 74 | !! increase the divergence |
---|
[11395] | 75 | !! |
---|
[11541] | 76 | !! ** Action : phdivn increased by the ice shelf outflow |
---|
[11395] | 77 | !!---------------------------------------------------------------------- |
---|
| 78 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv |
---|
| 79 | !!---------------------------------------------------------------------- |
---|
| 80 | INTEGER , DIMENSION(jpi,jpj), INTENT(in ) :: ktop , kbot |
---|
| 81 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pfrac, phtbl |
---|
| 82 | REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pfwf , pfwf_b |
---|
| 83 | !!---------------------------------------------------------------------- |
---|
| 84 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
| 85 | INTEGER :: ikt, ikb |
---|
[11541] | 86 | REAL(wp), DIMENSION(jpi,jpj) :: zhdiv |
---|
[11395] | 87 | !!---------------------------------------------------------------------- |
---|
| 88 | ! |
---|
| 89 | !== fwf distributed over several levels ==! |
---|
| 90 | ! |
---|
| 91 | ! compute integrated divergence correction |
---|
[11541] | 92 | zhdiv(:,:) = 0.5_wp * ( pfwf(:,:) + pfwf_b(:,:) ) * r1_rau0 / phtbl(:,:) |
---|
[11395] | 93 | ! |
---|
| 94 | ! update divergence at each level affected by ice shelf top boundary layer |
---|
| 95 | DO jj = 1,jpj |
---|
| 96 | DO ji = 1,jpi |
---|
[11521] | 97 | ikt = ktop(ji,jj) |
---|
| 98 | ikb = kbot(ji,jj) |
---|
| 99 | ! level fully include in the ice shelf boundary layer |
---|
| 100 | DO jk = ikt, ikb - 1 |
---|
[11541] | 101 | phdiv(ji,jj,jk) = phdiv(ji,jj,jk) + zhdiv(ji,jj) |
---|
[11521] | 102 | END DO |
---|
| 103 | ! level partially include in ice shelf boundary layer |
---|
[11541] | 104 | phdiv(ji,jj,ikb) = phdiv(ji,jj,ikb) + zhdiv(ji,jj) * pfrac(ji,jj) |
---|
[11395] | 105 | END DO |
---|
| 106 | END DO |
---|
| 107 | ! |
---|
| 108 | END SUBROUTINE isf_hdiv_mlt |
---|
| 109 | |
---|
[11529] | 110 | SUBROUTINE isf_hdiv_cpl(pqvol, phdiv) |
---|
[11521] | 111 | !!---------------------------------------------------------------------- |
---|
| 112 | !! *** SUBROUTINE isf_hdiv_cpl *** |
---|
| 113 | !! |
---|
[11541] | 114 | !! ** Purpose : update the horizontal divergence with the ice shelf |
---|
| 115 | !! coupling conservation increment |
---|
[11521] | 116 | !! |
---|
[11541] | 117 | !! ** Method : pqvol is positive (outflow) and expressed as m3/s |
---|
| 118 | !! increase the divergence |
---|
[11521] | 119 | !! |
---|
[11541] | 120 | !! ** Action : phdivn increased by the ice shelf outflow |
---|
| 121 | !! |
---|
[11521] | 122 | !!---------------------------------------------------------------------- |
---|
[11423] | 123 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv |
---|
[11521] | 124 | !!---------------------------------------------------------------------- |
---|
[11529] | 125 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: pqvol |
---|
[11521] | 126 | !!---------------------------------------------------------------------- |
---|
| 127 | INTEGER :: jk |
---|
| 128 | !!---------------------------------------------------------------------- |
---|
| 129 | ! |
---|
[11423] | 130 | DO jk=1,jpk |
---|
| 131 | phdiv(:,:,jk) = phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t_n(:,:,jk) |
---|
| 132 | END DO |
---|
[11521] | 133 | ! |
---|
| 134 | END SUBROUTINE isf_hdiv_cpl |
---|
[11423] | 135 | |
---|
[11395] | 136 | END MODULE isfhdiv |
---|