[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 | !!---------------------------------------------------------------------- |
---|
| 12 | USE oce ! ocean dynamics and active tracers |
---|
| 13 | USE dom_oce ! ocean space domain variables |
---|
[11987] | 14 | USE isf_oce ! Ice shelf variable |
---|
[11395] | 15 | USE phycst ! physical constant |
---|
| 16 | USE eosbn2 ! Equation Of State |
---|
| 17 | USE isfutils ! |
---|
| 18 | ! |
---|
| 19 | USE in_out_manager ! I/O manager |
---|
| 20 | USE iom ! xIOS server |
---|
| 21 | USE timing ! Timing |
---|
| 22 | |
---|
| 23 | IMPLICIT NONE |
---|
| 24 | PRIVATE |
---|
| 25 | |
---|
| 26 | PUBLIC tra_isf ! routine called by step.F90 |
---|
| 27 | |
---|
| 28 | !! * Substitutions |
---|
| 29 | # include "vectopt_loop_substitute.h90" |
---|
| 30 | !!---------------------------------------------------------------------- |
---|
| 31 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
| 32 | !! $Id: trasbc.F90 10499 2019-01-10 15:12:24Z deazer $ |
---|
| 33 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
| 34 | !!---------------------------------------------------------------------- |
---|
| 35 | CONTAINS |
---|
| 36 | |
---|
| 37 | SUBROUTINE tra_isf ( kt ) |
---|
| 38 | !!---------------------------------------------------------------------- |
---|
[11403] | 39 | !! *** ROUTINE tra_isf *** |
---|
[11395] | 40 | !! |
---|
[11403] | 41 | !! ** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) |
---|
[11395] | 42 | !! |
---|
[11403] | 43 | !! ** Action : - update tsa for cav, par and cpl case |
---|
[11395] | 44 | !!---------------------------------------------------------------------- |
---|
| 45 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
| 46 | !!---------------------------------------------------------------------- |
---|
| 47 | ! |
---|
[11529] | 48 | IF( ln_timing ) CALL timing_start('tra_isf') |
---|
[11395] | 49 | ! |
---|
[11902] | 50 | IF( kt == nit000 ) THEN |
---|
| 51 | IF(lwp) WRITE(numout,*) |
---|
| 52 | IF(lwp) WRITE(numout,*) 'tra_isf : Ice shelf heat fluxes' |
---|
| 53 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
| 54 | ENDIF |
---|
| 55 | ! |
---|
[11541] | 56 | ! cavity case |
---|
| 57 | 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, tsa) |
---|
[11403] | 58 | ! |
---|
[11541] | 59 | ! parametrisation case |
---|
| 60 | 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, tsa) |
---|
| 61 | ! |
---|
[11403] | 62 | ! ice sheet coupling case |
---|
[11541] | 63 | IF ( ln_isfcpl ) THEN |
---|
[11521] | 64 | ! |
---|
[11541] | 65 | IF ( kt == nit000 ) CALL tra_isf_cpl(risfcpl_tsc , tsa) |
---|
| 66 | IF ( kt == nit000+1) CALL tra_isf_cpl(risfcpl_tsc*0.5_wp, tsa) |
---|
[11521] | 67 | ! |
---|
| 68 | ! ensure 0 trend due to unconservation of the ice shelf coupling |
---|
[11541] | 69 | IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) |
---|
[11521] | 70 | ! |
---|
| 71 | END IF |
---|
[11395] | 72 | ! |
---|
[11902] | 73 | IF ( ln_isfdebug ) THEN |
---|
[11931] | 74 | CALL debug('tra_isf: tsa T', tsa(:,:,:,1)) |
---|
| 75 | CALL debug('tra_isf: tsa S', tsa(:,:,:,2)) |
---|
[11902] | 76 | END IF |
---|
| 77 | ! |
---|
[11395] | 78 | IF( ln_timing ) CALL timing_stop('tra_isf') |
---|
| 79 | ! |
---|
| 80 | END SUBROUTINE tra_isf |
---|
| 81 | ! |
---|
| 82 | SUBROUTINE tra_isf_mlt(ktop, kbot, phtbl, pfrac, ptsc, ptsc_b, pts) |
---|
| 83 | !!---------------------------------------------------------------------- |
---|
[11403] | 84 | !! *** ROUTINE tra_isf_mlt *** |
---|
| 85 | !! |
---|
| 86 | !! *** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case |
---|
| 87 | !! |
---|
| 88 | !! *** Action :: Update tsa with the surface boundary condition trend |
---|
| 89 | !! |
---|
| 90 | !!---------------------------------------------------------------------- |
---|
[11395] | 91 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: pts |
---|
| 92 | !!---------------------------------------------------------------------- |
---|
| 93 | INTEGER , DIMENSION(jpi,jpj) , INTENT(in ) :: ktop , kbot |
---|
| 94 | REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: phtbl, pfrac |
---|
| 95 | REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc , ptsc_b |
---|
| 96 | !!---------------------------------------------------------------------- |
---|
[11403] | 97 | INTEGER :: ji,jj,jk ! loop index |
---|
| 98 | INTEGER :: ikt, ikb ! top and bottom level of the tbl |
---|
| 99 | REAL(wp), DIMENSION(jpi,jpj) :: ztc ! total ice shelf tracer trend |
---|
| 100 | !!---------------------------------------------------------------------- |
---|
[11395] | 101 | ! |
---|
| 102 | ! compute 2d total trend due to isf |
---|
| 103 | ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:) |
---|
| 104 | ! |
---|
| 105 | ! update tsa |
---|
| 106 | DO jj = 1,jpj |
---|
| 107 | DO ji = 1,jpi |
---|
| 108 | ! |
---|
| 109 | ikt = ktop(ji,jj) |
---|
| 110 | ikb = kbot(ji,jj) |
---|
| 111 | ! |
---|
| 112 | ! level fully include in the ice shelf boundary layer |
---|
| 113 | DO jk = ikt, ikb - 1 |
---|
| 114 | pts(ji,jj,jk,jp_tem) = pts(ji,jj,jk,jp_tem) + ztc(ji,jj) |
---|
| 115 | END DO |
---|
| 116 | ! |
---|
| 117 | ! level partially include in ice shelf boundary layer |
---|
| 118 | pts(ji,jj,ikb,jp_tem) = pts(ji,jj,ikb,jp_tem) + ztc(ji,jj) * pfrac(ji,jj) |
---|
| 119 | ! |
---|
| 120 | END DO |
---|
| 121 | END DO |
---|
| 122 | ! |
---|
| 123 | END SUBROUTINE tra_isf_mlt |
---|
| 124 | ! |
---|
[11423] | 125 | SUBROUTINE tra_isf_cpl( ptsc, ptsa ) |
---|
| 126 | !!---------------------------------------------------------------------- |
---|
| 127 | !! *** ROUTINE tra_isf_cpl *** |
---|
| 128 | !! |
---|
| 129 | !! *** Action :: Update tsa with the ice shelf coupling trend |
---|
| 130 | !! |
---|
| 131 | !!---------------------------------------------------------------------- |
---|
| 132 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa |
---|
| 133 | !!---------------------------------------------------------------------- |
---|
[11521] | 134 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: ptsc |
---|
[11423] | 135 | !!---------------------------------------------------------------------- |
---|
| 136 | INTEGER :: jk |
---|
| 137 | !!---------------------------------------------------------------------- |
---|
| 138 | ! |
---|
| 139 | DO jk = 1,jpk |
---|
[11529] | 140 | ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t_n(:,:,jk) |
---|
| 141 | ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t_n(:,:,jk) |
---|
[11423] | 142 | END DO |
---|
| 143 | ! |
---|
| 144 | END SUBROUTINE tra_isf_cpl |
---|
[11395] | 145 | ! |
---|
| 146 | END MODULE traisf |
---|