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