[11395] | 1 | MODULE traisf |
---|
| 2 | !!============================================================================== |
---|
[11403] | 3 | !! *** MODULE traisf *** |
---|
| 4 | !! Ocean active tracers: ice shelf boundary condition |
---|
[11395] | 5 | !!============================================================================== |
---|
| 6 | !! History : 4.0 ! 2019-09 (P. Mathiot) original file |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! tra_isf : update the tracer trend at ocean surface |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
[12077] | 12 | USE isf_oce ! Ice shelf variables |
---|
| 13 | USE dom_oce , ONLY : e3t, r1_e1e2t ! ocean space domain variables |
---|
| 14 | USE isfutils, ONLY : debug ! debug option |
---|
| 15 | USE timing , ONLY : timing_start, timing_stop ! Timing |
---|
| 16 | USE in_out_manager ! I/O manager |
---|
[11395] | 17 | |
---|
| 18 | IMPLICIT NONE |
---|
| 19 | PRIVATE |
---|
| 20 | |
---|
| 21 | PUBLIC tra_isf ! routine called by step.F90 |
---|
| 22 | |
---|
| 23 | !! * Substitutions |
---|
[12340] | 24 | # include "do_loop_substitute.h90" |
---|
[11395] | 25 | !!---------------------------------------------------------------------- |
---|
| 26 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
| 27 | !! $Id: trasbc.F90 10499 2019-01-10 15:12:24Z deazer $ |
---|
| 28 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
| 29 | !!---------------------------------------------------------------------- |
---|
| 30 | CONTAINS |
---|
| 31 | |
---|
[12068] | 32 | SUBROUTINE tra_isf ( kt, Kmm, pts, Krhs ) |
---|
[11395] | 33 | !!---------------------------------------------------------------------- |
---|
[11403] | 34 | !! *** ROUTINE tra_isf *** |
---|
[11395] | 35 | !! |
---|
[11403] | 36 | !! ** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) |
---|
[11395] | 37 | !! |
---|
[12068] | 38 | !! ** Action : - update pts(:,:,:,:,Krhs) for cav, par and cpl case |
---|
[11395] | 39 | !!---------------------------------------------------------------------- |
---|
[12068] | 40 | INTEGER , INTENT(in ) :: kt ! ocean time step |
---|
| 41 | INTEGER , INTENT(in ) :: Kmm, Krhs ! ocean time level indices |
---|
| 42 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts ! active tracers and RHS of tracer equation |
---|
[11395] | 43 | !!---------------------------------------------------------------------- |
---|
| 44 | ! |
---|
[11529] | 45 | IF( ln_timing ) CALL timing_start('tra_isf') |
---|
[11395] | 46 | ! |
---|
[11902] | 47 | IF( kt == nit000 ) THEN |
---|
| 48 | IF(lwp) WRITE(numout,*) |
---|
| 49 | IF(lwp) WRITE(numout,*) 'tra_isf : Ice shelf heat fluxes' |
---|
| 50 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
| 51 | ENDIF |
---|
| 52 | ! |
---|
[11541] | 53 | ! cavity case |
---|
[12068] | 54 | IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, pts(:,:,:,:,Krhs)) |
---|
[11403] | 55 | ! |
---|
[11541] | 56 | ! parametrisation case |
---|
[12068] | 57 | IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, pts(:,:,:,:,Krhs)) |
---|
[11541] | 58 | ! |
---|
[11403] | 59 | ! ice sheet coupling case |
---|
[11541] | 60 | IF ( ln_isfcpl ) THEN |
---|
[11521] | 61 | ! |
---|
[12077] | 62 | ! Dynamical stability at start up after change in under ice shelf cavity geometry is achieve by correcting the divergence. |
---|
| 63 | ! This is achieved by applying a volume flux in order to keep the horizontal divergence after remapping |
---|
| 64 | ! the same as at the end of the latest time step. So correction need to be apply at nit000 (euler time step) and |
---|
| 65 | ! half of it at nit000+1 (leap frog time step). |
---|
| 66 | ! in accordance to this, the heat content flux due to injected water need to be added in the temperature and salt trend |
---|
| 67 | ! at time step nit000 and nit000+1 |
---|
[12068] | 68 | IF ( kt == nit000 ) CALL tra_isf_cpl(Kmm, risfcpl_tsc , pts(:,:,:,:,Krhs)) |
---|
| 69 | IF ( kt == nit000+1) CALL tra_isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs)) |
---|
[11521] | 70 | ! |
---|
| 71 | ! ensure 0 trend due to unconservation of the ice shelf coupling |
---|
[12068] | 72 | IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(Kmm, risfcpl_cons_tsc, pts(:,:,:,:,Krhs)) |
---|
[11521] | 73 | ! |
---|
| 74 | END IF |
---|
[11395] | 75 | ! |
---|
[11902] | 76 | IF ( ln_isfdebug ) THEN |
---|
[12068] | 77 | CALL debug('tra_isf: pts(:,:,:,:,Krhs) T', pts(:,:,:,1,Krhs)) |
---|
| 78 | CALL debug('tra_isf: pts(:,:,:,:,Krhs) S', pts(:,:,:,2,Krhs)) |
---|
[11902] | 79 | END IF |
---|
| 80 | ! |
---|
[11395] | 81 | IF( ln_timing ) CALL timing_stop('tra_isf') |
---|
| 82 | ! |
---|
| 83 | END SUBROUTINE tra_isf |
---|
| 84 | ! |
---|
| 85 | SUBROUTINE tra_isf_mlt(ktop, kbot, phtbl, pfrac, ptsc, ptsc_b, pts) |
---|
| 86 | !!---------------------------------------------------------------------- |
---|
[11403] | 87 | !! *** ROUTINE tra_isf_mlt *** |
---|
| 88 | !! |
---|
| 89 | !! *** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case |
---|
| 90 | !! |
---|
[12068] | 91 | !! *** Action :: Update pts(:,:,:,:,Krhs) with the surface boundary condition trend |
---|
[11403] | 92 | !! |
---|
| 93 | !!---------------------------------------------------------------------- |
---|
[11395] | 94 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: pts |
---|
| 95 | !!---------------------------------------------------------------------- |
---|
| 96 | INTEGER , DIMENSION(jpi,jpj) , INTENT(in ) :: ktop , kbot |
---|
| 97 | REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: phtbl, pfrac |
---|
| 98 | REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc , ptsc_b |
---|
| 99 | !!---------------------------------------------------------------------- |
---|
[11403] | 100 | INTEGER :: ji,jj,jk ! loop index |
---|
| 101 | INTEGER :: ikt, ikb ! top and bottom level of the tbl |
---|
| 102 | REAL(wp), DIMENSION(jpi,jpj) :: ztc ! total ice shelf tracer trend |
---|
| 103 | !!---------------------------------------------------------------------- |
---|
[11395] | 104 | ! |
---|
| 105 | ! compute 2d total trend due to isf |
---|
| 106 | ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:) |
---|
| 107 | ! |
---|
[12068] | 108 | ! update pts(:,:,:,:,Krhs) |
---|
[12340] | 109 | DO_2D_11_11 |
---|
| 110 | ! |
---|
| 111 | ikt = ktop(ji,jj) |
---|
| 112 | ikb = kbot(ji,jj) |
---|
| 113 | ! |
---|
| 114 | ! level fully include in the ice shelf boundary layer |
---|
| 115 | DO jk = ikt, ikb - 1 |
---|
| 116 | pts(ji,jj,jk,jp_tem) = pts(ji,jj,jk,jp_tem) + ztc(ji,jj) |
---|
[11395] | 117 | END DO |
---|
[12340] | 118 | ! |
---|
| 119 | ! level partially include in ice shelf boundary layer |
---|
| 120 | pts(ji,jj,ikb,jp_tem) = pts(ji,jj,ikb,jp_tem) + ztc(ji,jj) * pfrac(ji,jj) |
---|
| 121 | ! |
---|
| 122 | END_2D |
---|
[11395] | 123 | ! |
---|
| 124 | END SUBROUTINE tra_isf_mlt |
---|
| 125 | ! |
---|
[12068] | 126 | SUBROUTINE tra_isf_cpl( Kmm, ptsc, ptsa ) |
---|
[11423] | 127 | !!---------------------------------------------------------------------- |
---|
| 128 | !! *** ROUTINE tra_isf_cpl *** |
---|
| 129 | !! |
---|
[12068] | 130 | !! *** Action :: Update pts(:,:,:,:,Krhs) with the ice shelf coupling trend |
---|
[11423] | 131 | !! |
---|
| 132 | !!---------------------------------------------------------------------- |
---|
| 133 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa |
---|
| 134 | !!---------------------------------------------------------------------- |
---|
[12068] | 135 | INTEGER , INTENT(in ) :: Kmm ! ocean time level index |
---|
[11521] | 136 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: ptsc |
---|
[11423] | 137 | !!---------------------------------------------------------------------- |
---|
| 138 | INTEGER :: jk |
---|
| 139 | !!---------------------------------------------------------------------- |
---|
| 140 | ! |
---|
| 141 | DO jk = 1,jpk |
---|
[12068] | 142 | ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) |
---|
| 143 | ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) |
---|
[11423] | 144 | END DO |
---|
| 145 | ! |
---|
| 146 | END SUBROUTINE tra_isf_cpl |
---|
[11395] | 147 | ! |
---|
| 148 | END MODULE traisf |
---|