Changeset 14587
- Timestamp:
- 2021-03-04T18:51:35+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/TRA/traisf.F90
r14072 r14587 1 1 MODULE traisf 2 !!====================================================================== ========3 !! 2 !!====================================================================== 3 !! *** MODULE traisf *** 4 4 !! Ocean active tracers: ice shelf boundary condition 5 !!====================================================================== ========6 !! History : 5 !!====================================================================== 6 !! History : 4.0 ! 2019-09 (P. Mathiot) original file 7 7 !!---------------------------------------------------------------------- 8 8 9 9 !!---------------------------------------------------------------------- 10 10 !! tra_isf : update the tracer trend at ocean surface 11 !! isf_mlt : temperature trend due to the ice shelf melting 12 !! isf_cpl : T-S trend due to the ice shelf coupling 11 13 !!---------------------------------------------------------------------- 12 14 USE isf_oce ! Ice shelf variables … … 32 34 CONTAINS 33 35 34 SUBROUTINE tra_isf 35 !!------------------------------------------------------------------- ---36 SUBROUTINE tra_isf( kt, Kmm, pts, Krhs ) 37 !!------------------------------------------------------------------- 36 38 !! *** ROUTINE tra_isf *** 37 39 !! … … 39 41 !! 40 42 !! ** Action : - update pts(:,:,:,:,Krhs) for cav, par and cpl case 41 !!------------------------------------------------------------------- ---43 !!------------------------------------------------------------------- 42 44 INTEGER , INTENT(in ) :: kt ! ocean time step 43 45 INTEGER , INTENT(in ) :: Kmm, Krhs ! ocean time level indices 44 46 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts ! active tracers and RHS of tracer equation 45 !!------------------------------------------------------------------- ---47 !!------------------------------------------------------------------- 46 48 ! 47 49 IF( ln_timing ) CALL timing_start('tra_isf') … … 56 58 ! 57 59 ! cavity case 58 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))60 IF ( ln_isfcav_mlt ) CALL isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, pts(:,:,:,:,Krhs)) 59 61 ! 60 62 ! parametrisation case 61 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))63 IF ( ln_isfpar_mlt ) CALL isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, pts(:,:,:,:,Krhs)) 62 64 ! 63 65 ! ice sheet coupling case … … 70 72 ! in accordance to this, the heat content flux due to injected water need to be added in the temperature and salt trend 71 73 ! at time step nit000 and nit000+1 72 IF ( kt == nit000 ) CALL tra_isf_cpl(Kmm, risfcpl_tsc , pts(:,:,:,:,Krhs))73 IF ( kt == nit000+1) CALL tra_isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs))74 IF ( kt == nit000 ) CALL isf_cpl(Kmm, risfcpl_tsc , pts(:,:,:,:,Krhs)) 75 IF ( kt == nit000+1) CALL isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs)) 74 76 ! 75 77 ! ensure 0 trend due to unconservation of the ice shelf coupling 76 IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(Kmm, risfcpl_cons_tsc, pts(:,:,:,:,Krhs))78 IF ( ln_isfcpl_cons ) CALL isf_cpl(Kmm, risfcpl_cons_tsc, pts(:,:,:,:,Krhs)) 77 79 ! 78 80 END IF … … 88 90 ! 89 91 END SUBROUTINE tra_isf 90 ! 91 SUBROUTINE tra_isf_mlt(ktop, kbot, phtbl, pfrac, ptsc, ptsc_b, pts) 92 93 94 SUBROUTINE isf_mlt( ktop, kbot, phtbl, pfrac, ptsc, ptsc_b, pts ) 92 95 !!---------------------------------------------------------------------- 93 !! *** ROUTINE tra_isf_mlt ***96 !! *** ROUTINE isf_mlt *** 94 97 !! 95 98 !! *** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case … … 98 101 !! 99 102 !!---------------------------------------------------------------------- 100 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: pts 101 !!---------------------------------------------------------------------- 102 INTEGER , DIMENSION(jpi,jpj) , INTENT(in ) :: ktop , kbot 103 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: phtbl, pfrac 104 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc , ptsc_b 105 !!---------------------------------------------------------------------- 106 INTEGER :: ji,jj,jk ! loop index 107 INTEGER :: ikt, ikb ! top and bottom level of the tbl 108 REAL(wp), DIMENSION(A2D(nn_hls)) :: ztc ! total ice shelf tracer trend 103 INTEGER , DIMENSION(jpi,jpj) , INTENT(in ) :: ktop , kbot 104 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: phtbl, pfrac 105 REAL(wp), DIMENSION(jpi,jpj,jpts) , INTENT(in ) :: ptsc , ptsc_b 106 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: pts 107 !! 108 INTEGER :: ji,jj,jk ! dummy loop index 109 INTEGER :: ikt, ikb ! top and bottom level of the tbl 110 REAL(wp), DIMENSION(A2D(nn_hls)) :: ztc ! total ice shelf tracer trend 109 111 !!---------------------------------------------------------------------- 110 112 ! … … 130 132 END_2D 131 133 ! 132 END SUBROUTINE tra_isf_mlt 133 ! 134 SUBROUTINE tra_isf_cpl( Kmm, ptsc, ptsa ) 134 END SUBROUTINE isf_mlt 135 136 137 SUBROUTINE isf_cpl( Kmm, ptsc, ptsa ) 135 138 !!---------------------------------------------------------------------- 136 !! *** ROUTINE tra_isf_cpl ***139 !! *** ROUTINE isf_cpl *** 137 140 !! 138 141 !! *** Action :: Update pts(:,:,:,:,Krhs) with the ice shelf coupling trend 139 142 !! 140 143 !!---------------------------------------------------------------------- 141 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa 142 !!---------------------------------------------------------------------- 143 INTEGER , INTENT(in ) :: Kmm ! ocean time level index 144 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: ptsc 145 !!---------------------------------------------------------------------- 146 INTEGER :: ji, jj, jk 144 INTEGER , INTENT(in ) :: Kmm ! ocean time-level index 145 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: ptsc 146 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa 147 !! 148 INTEGER :: ji, jj, jk ! dummy loop index 147 149 !!---------------------------------------------------------------------- 148 150 ! … … 152 154 END_3D 153 155 ! 154 END SUBROUTINE tra_isf_cpl 155 ! 156 END SUBROUTINE isf_cpl 157 158 !!====================================================================== 156 159 END MODULE traisf
Note: See TracChangeset
for help on using the changeset viewer.