[825] | 1 | MODULE limthd_sal |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE limthd_sal *** |
---|
[2528] | 4 | !! LIM-3 sea-ice : computation of salinity variations in the ice |
---|
[825] | 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : - ! 2003-05 (M. Vancoppenolle) UCL-ASTR first coding for LIM3-1D |
---|
| 7 | !! 3.0 ! 2005-12 (M. Vancoppenolle) adapted to the 3-D version |
---|
[2715] | 8 | !! 4.0 ! 2011-02 (G. Madec) dynamical allocation |
---|
[2528] | 9 | !!--------------------------------------------------------------------- |
---|
[888] | 10 | #if defined key_lim3 |
---|
[825] | 11 | !!---------------------------------------------------------------------- |
---|
[2528] | 12 | !! 'key_lim3' LIM-3 sea-ice model |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
[3625] | 14 | !! lim_thd_sal : salinity variations in the ice |
---|
[2528] | 15 | !!---------------------------------------------------------------------- |
---|
[3625] | 16 | USE par_oce ! ocean parameters |
---|
| 17 | USE phycst ! physical constants (ocean directory) |
---|
| 18 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 19 | USE ice ! LIM variables |
---|
| 20 | USE par_ice ! LIM parameters |
---|
| 21 | USE thd_ice ! LIM thermodynamics |
---|
| 22 | USE limvar ! LIM variables |
---|
| 23 | USE in_out_manager ! I/O manager |
---|
| 24 | USE lib_mpp ! MPP library |
---|
| 25 | USE wrk_nemo ! work arrays |
---|
| 26 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[825] | 27 | |
---|
| 28 | IMPLICIT NONE |
---|
| 29 | PRIVATE |
---|
| 30 | |
---|
[2528] | 31 | PUBLIC lim_thd_sal ! called by limthd module |
---|
| 32 | PUBLIC lim_thd_sal_init ! called by iceini module |
---|
[825] | 33 | |
---|
[1156] | 34 | !!---------------------------------------------------------------------- |
---|
[4045] | 35 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
[1156] | 36 | !! $Id$ |
---|
[2528] | 37 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[1156] | 38 | !!---------------------------------------------------------------------- |
---|
[921] | 39 | CONTAINS |
---|
[825] | 40 | |
---|
[2528] | 41 | SUBROUTINE lim_thd_sal( kideb, kiut ) |
---|
[825] | 42 | !!------------------------------------------------------------------- |
---|
[2528] | 43 | !! *** ROUTINE lim_thd_sal *** |
---|
| 44 | !! |
---|
| 45 | !! ** Purpose : computes new salinities in the ice |
---|
[825] | 46 | !! |
---|
[3625] | 47 | !! ** Method : 3 possibilities |
---|
| 48 | !! -> num_sal = 1 -> Sice = cst [ice salinity constant in both time & space] |
---|
| 49 | !! -> num_sal = 2 -> Sice = S(z,t) [Vancoppenolle et al. 2005] |
---|
| 50 | !! -> num_sal = 3 -> Sice = S(z) [multiyear ice] |
---|
[825] | 51 | !!--------------------------------------------------------------------- |
---|
[3625] | 52 | INTEGER, INTENT(in) :: kideb, kiut ! thickness category index |
---|
[2528] | 53 | ! |
---|
| 54 | INTEGER :: ji, jk ! dummy loop indices |
---|
[4634] | 55 | REAL(wp) :: iflush, igravdr, ztmelts ! local scalars |
---|
[2528] | 56 | REAL(wp) :: zaaa, zbbb, zccc, zdiscrim ! local scalars |
---|
| 57 | !!--------------------------------------------------------------------- |
---|
[825] | 58 | |
---|
[921] | 59 | !------------------------------------------------------------------------------| |
---|
| 60 | ! 1) Constant salinity, constant in time | |
---|
| 61 | !------------------------------------------------------------------------------| |
---|
[3625] | 62 | !!gm comment: if num_sal = 1 s_i_new, s_i_b and sm_i_b can be set to bulk_sal one for all in the initialisation phase !! |
---|
| 63 | !!gm ===>>> simplification of almost all test on num_sal value |
---|
| 64 | IF( num_sal == 1 ) THEN |
---|
| 65 | s_i_b (kideb:kiut,1:nlay_i) = bulk_sal |
---|
| 66 | sm_i_b (kideb:kiut) = bulk_sal |
---|
| 67 | s_i_new(kideb:kiut) = bulk_sal |
---|
[2528] | 68 | ENDIF |
---|
[825] | 69 | |
---|
[921] | 70 | !------------------------------------------------------------------------------| |
---|
| 71 | ! Module 2 : Constant salinity varying in time | |
---|
| 72 | !------------------------------------------------------------------------------| |
---|
[825] | 73 | |
---|
[3625] | 74 | IF( num_sal == 2 ) THEN |
---|
[825] | 75 | |
---|
| 76 | DO ji = kideb, kiut |
---|
[2715] | 77 | ! |
---|
[825] | 78 | ! Switches |
---|
| 79 | !---------- |
---|
[4634] | 80 | iflush = MAX( 0._wp , SIGN( 1._wp , t_su_b(ji) - rtt ) ) ! =1 if summer |
---|
| 81 | igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_b(ji) - t_su_b(ji) ) ) ! =1 if t_su < t_bo |
---|
[825] | 82 | |
---|
| 83 | !--------------------- |
---|
| 84 | ! Salinity tendencies |
---|
| 85 | !--------------------- |
---|
[4634] | 86 | ! |
---|
| 87 | dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_b(ji) - sal_G , 0._wp ) / time_G * rdt_ice ! drainage by gravity |
---|
| 88 | dsm_i_fl_1d(ji) = - iflush * MAX( sm_i_b(ji) - sal_F , 0._wp ) / time_F * rdt_ice ! drainage by flushing |
---|
| 89 | ! |
---|
[825] | 90 | !----------------- |
---|
| 91 | ! Update salinity |
---|
| 92 | !----------------- |
---|
| 93 | ! only drainage terms ( gravity drainage and flushing ) |
---|
[2715] | 94 | ! snow ice / bottom sources are added in lim_thd_ent to conserve energy |
---|
[2528] | 95 | sm_i_b(ji) = sm_i_b(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) |
---|
[825] | 96 | |
---|
[4045] | 97 | !---------------------------- |
---|
| 98 | ! Salt flux - brine drainage |
---|
| 99 | !---------------------------- |
---|
[4634] | 100 | sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_b(ji) * ht_i_b(ji) * ( dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) ) * r1_rdtice |
---|
[3625] | 101 | |
---|
[4045] | 102 | END DO |
---|
[825] | 103 | |
---|
[4045] | 104 | ! Salinity profile |
---|
| 105 | CALL lim_var_salprof1d( kideb, kiut ) |
---|
[825] | 106 | |
---|
| 107 | |
---|
| 108 | ! Only necessary for conservation check since salinity is modified |
---|
| 109 | !-------------------- |
---|
| 110 | ! Temperature update |
---|
| 111 | !-------------------- |
---|
| 112 | DO jk = 1, nlay_i |
---|
| 113 | DO ji = kideb, kiut |
---|
| 114 | ztmelts = -tmut*s_i_b(ji,jk) + rtt |
---|
| 115 | !Conversion q(S,T) -> T (second order equation) |
---|
| 116 | zaaa = cpic |
---|
[2528] | 117 | zbbb = ( rcp - cpic ) * ( ztmelts - rtt ) + q_i_b(ji,jk) / rhoic - lfus |
---|
[825] | 118 | zccc = lfus * ( ztmelts - rtt ) |
---|
[2715] | 119 | zdiscrim = SQRT( MAX( zbbb*zbbb - 4.0*zaaa*zccc, 0._wp ) ) |
---|
[2528] | 120 | t_i_b(ji,jk) = rtt - ( zbbb + zdiscrim ) / ( 2.0 *zaaa ) |
---|
[2715] | 121 | END DO |
---|
| 122 | END DO |
---|
[2528] | 123 | ! |
---|
[3625] | 124 | ENDIF |
---|
[825] | 125 | |
---|
[921] | 126 | !------------------------------------------------------------------------------| |
---|
| 127 | ! Module 3 : Profile of salinity, constant in time | |
---|
| 128 | !------------------------------------------------------------------------------| |
---|
[825] | 129 | |
---|
[3625] | 130 | IF( num_sal == 3 ) CALL lim_var_salprof1d( kideb, kiut ) |
---|
[825] | 131 | |
---|
[2528] | 132 | ! |
---|
[825] | 133 | END SUBROUTINE lim_thd_sal |
---|
| 134 | |
---|
[2528] | 135 | |
---|
[825] | 136 | SUBROUTINE lim_thd_sal_init |
---|
| 137 | !!------------------------------------------------------------------- |
---|
| 138 | !! *** ROUTINE lim_thd_sal_init *** |
---|
| 139 | !! |
---|
| 140 | !! ** Purpose : initialization of ice salinity parameters |
---|
| 141 | !! |
---|
[2528] | 142 | !! ** Method : Read the namicesal namelist and check the parameter |
---|
| 143 | !! values called at the first timestep (nit000) |
---|
[825] | 144 | !! |
---|
| 145 | !! ** input : Namelist namicesal |
---|
| 146 | !!------------------------------------------------------------------- |
---|
[2528] | 147 | NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F, & |
---|
| 148 | & s_i_max, s_i_min, s_i_0, s_i_1 |
---|
[825] | 149 | !!------------------------------------------------------------------- |
---|
[2528] | 150 | ! |
---|
| 151 | REWIND( numnam_ice ) ! Read Namelist namicesal |
---|
| 152 | READ ( numnam_ice , namicesal ) |
---|
| 153 | ! |
---|
| 154 | IF(lwp) THEN ! control print |
---|
[825] | 155 | WRITE(numout,*) |
---|
| 156 | WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity ' |
---|
| 157 | WRITE(numout,*) '~~~~~~~~~~~~~~~~' |
---|
| 158 | WRITE(numout,*) ' switch for salinity num_sal : ', num_sal |
---|
| 159 | WRITE(numout,*) ' bulk salinity value if num_sal = 1 : ', bulk_sal |
---|
| 160 | WRITE(numout,*) ' restoring salinity for GD : ', sal_G |
---|
| 161 | WRITE(numout,*) ' restoring time for GD : ', time_G |
---|
| 162 | WRITE(numout,*) ' restoring salinity for flushing : ', sal_F |
---|
| 163 | WRITE(numout,*) ' restoring time for flushing : ', time_F |
---|
| 164 | WRITE(numout,*) ' Maximum tolerated ice salinity : ', s_i_max |
---|
| 165 | WRITE(numout,*) ' Minimum tolerated ice salinity : ', s_i_min |
---|
| 166 | WRITE(numout,*) ' 1st salinity for salinity profile : ', s_i_0 |
---|
| 167 | WRITE(numout,*) ' 2nd salinity for salinity profile : ', s_i_1 |
---|
| 168 | ENDIF |
---|
[2528] | 169 | ! |
---|
[825] | 170 | END SUBROUTINE lim_thd_sal_init |
---|
| 171 | |
---|
| 172 | #else |
---|
| 173 | !!---------------------------------------------------------------------- |
---|
[2528] | 174 | !! Default option Dummy Module No LIM-3 sea-ice model |
---|
[825] | 175 | !!---------------------------------------------------------------------- |
---|
| 176 | #endif |
---|
| 177 | !!====================================================================== |
---|
| 178 | END MODULE limthd_sal |
---|