[8586] | 1 | MODULE icethd |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE icethd *** |
---|
| 4 | !! sea-ice : master routine for thermodynamics |
---|
| 5 | !!====================================================================== |
---|
[9656] | 6 | !! History : 1.0 ! 2000-01 (M.A. Morales Maqueda, H. Goosse, T. Fichefet) original code 1D |
---|
[9604] | 7 | !! 4.0 ! 2018 (many people) SI3 [aka Sea Ice cube] |
---|
[8586] | 8 | !!---------------------------------------------------------------------- |
---|
[9570] | 9 | #if defined key_si3 |
---|
[8586] | 10 | !!---------------------------------------------------------------------- |
---|
[9570] | 11 | !! 'key_si3' SI3 sea-ice model |
---|
[8586] | 12 | !!---------------------------------------------------------------------- |
---|
| 13 | !! ice_thd : thermodynamics of sea ice |
---|
| 14 | !! ice_thd_init : initialisation of sea-ice thermodynamics |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | USE phycst ! physical constants |
---|
| 17 | USE dom_oce ! ocean space and time domain variables |
---|
| 18 | USE ice ! sea-ice: variables |
---|
| 19 | !!gm list trop longue ==>>> why not passage en argument d'appel ? |
---|
| 20 | USE sbc_oce , ONLY : sss_m, sst_m, e3t_m, utau, vtau, ssu_m, ssv_m, frq_m, qns_tot, qsr_tot, sprecip, ln_cpl |
---|
| 21 | USE sbc_ice , ONLY : qsr_oce, qns_oce, qemp_oce, qsr_ice, qns_ice, dqns_ice, evap_ice, qprec_ice, qevap_ice, & |
---|
[9910] | 22 | & qml_ice, qcn_ice, qtr_ice_top |
---|
[8586] | 23 | USE ice1D ! sea-ice: thermodynamics variables |
---|
| 24 | USE icethd_zdf ! sea-ice: vertical heat diffusion |
---|
| 25 | USE icethd_dh ! sea-ice: ice-snow growth and melt |
---|
| 26 | USE icethd_da ! sea-ice: lateral melting |
---|
| 27 | USE icethd_sal ! sea-ice: salinity |
---|
| 28 | USE icethd_ent ! sea-ice: enthalpy redistribution |
---|
| 29 | USE icethd_do ! sea-ice: growth in open water |
---|
[8637] | 30 | USE icethd_pnd ! sea-ice: melt ponds |
---|
[8586] | 31 | USE iceitd ! sea-ice: remapping thickness distribution |
---|
| 32 | USE icetab ! sea-ice: 1D <==> 2D transformation |
---|
| 33 | USE icevar ! sea-ice: operations |
---|
| 34 | USE icectl ! sea-ice: control print |
---|
| 35 | ! |
---|
| 36 | USE in_out_manager ! I/O manager |
---|
| 37 | USE lib_mpp ! MPP library |
---|
| 38 | USE lib_fortran ! fortran utilities (glob_sum + no signed zero) |
---|
| 39 | USE lbclnk ! lateral boundary conditions (or mpp links) |
---|
| 40 | USE timing ! Timing |
---|
| 41 | |
---|
| 42 | IMPLICIT NONE |
---|
| 43 | PRIVATE |
---|
| 44 | |
---|
| 45 | PUBLIC ice_thd ! called by limstp module |
---|
| 46 | PUBLIC ice_thd_init ! called by ice_init |
---|
| 47 | |
---|
| 48 | !!** namelist (namthd) ** |
---|
| 49 | LOGICAL :: ln_icedH ! activate ice thickness change from growing/melting (T) or not (F) |
---|
| 50 | LOGICAL :: ln_icedA ! activate lateral melting param. (T) or not (F) |
---|
| 51 | LOGICAL :: ln_icedO ! activate ice growth in open-water (T) or not (F) |
---|
| 52 | LOGICAL :: ln_icedS ! activate gravity drainage and flushing (T) or not (F) |
---|
| 53 | |
---|
| 54 | !! * Substitutions |
---|
| 55 | # include "vectopt_loop_substitute.h90" |
---|
| 56 | !!---------------------------------------------------------------------- |
---|
[9598] | 57 | !! NEMO/ICE 4.0 , NEMO Consortium (2018) |
---|
[9950] | 58 | !! $Id$ |
---|
[9598] | 59 | !! Software governed by the CeCILL licence (./LICENSE) |
---|
[8586] | 60 | !!---------------------------------------------------------------------- |
---|
| 61 | CONTAINS |
---|
| 62 | |
---|
| 63 | SUBROUTINE ice_thd( kt ) |
---|
| 64 | !!------------------------------------------------------------------- |
---|
| 65 | !! *** ROUTINE ice_thd *** |
---|
| 66 | !! |
---|
| 67 | !! ** Purpose : This routine manages ice thermodynamics |
---|
| 68 | !! |
---|
[9604] | 69 | !! ** Action : - computation of oceanic sensible heat flux at the ice base |
---|
| 70 | !! energy budget in the leads |
---|
| 71 | !! net fluxes on top of ice and of ocean |
---|
| 72 | !! - selection of grid cells with ice |
---|
| 73 | !! - call ice_thd_zdf for vertical heat diffusion |
---|
| 74 | !! - call ice_thd_dh for vertical ice growth and melt |
---|
| 75 | !! - call ice_thd_pnd for melt ponds |
---|
| 76 | !! - call ice_thd_ent for enthalpy remapping |
---|
| 77 | !! - call ice_thd_sal for ice desalination |
---|
| 78 | !! - call ice_thd_temp to retrieve temperature from ice enthalpy |
---|
[9750] | 79 | !! - call ice_thd_mono for extra lateral ice melt if active virtual thickness distribution |
---|
[9604] | 80 | !! - call ice_thd_da for lateral ice melt |
---|
[8586] | 81 | !! - back to the geographic grid |
---|
[9604] | 82 | !! - call ice_thd_rem for remapping thickness distribution |
---|
| 83 | !! - call ice_thd_do for ice growth in leads |
---|
[8637] | 84 | !!------------------------------------------------------------------- |
---|
[8586] | 85 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
| 86 | ! |
---|
| 87 | INTEGER :: ji, jj, jk, jl ! dummy loop indices |
---|
| 88 | REAL(wp) :: zfric_u, zqld, zqfr, zqfr_neg |
---|
| 89 | REAL(wp), PARAMETER :: zfric_umin = 0._wp ! lower bound for the friction velocity (cice value=5.e-04) |
---|
| 90 | REAL(wp), PARAMETER :: zch = 0.0057_wp ! heat transfer coefficient |
---|
| 91 | REAL(wp), DIMENSION(jpi,jpj) :: zu_io, zv_io, zfric ! ice-ocean velocity (m/s) and frictional velocity (m2/s2) |
---|
| 92 | ! |
---|
| 93 | !!------------------------------------------------------------------- |
---|
| 94 | ! controls |
---|
[9124] | 95 | IF( ln_timing ) CALL timing_start('icethd') ! timing |
---|
| 96 | IF( ln_icediachk ) CALL ice_cons_hsm(0, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation |
---|
[8586] | 97 | |
---|
| 98 | IF( kt == nit000 .AND. lwp ) THEN |
---|
| 99 | WRITE(numout,*) |
---|
| 100 | WRITE(numout,*) 'ice_thd: sea-ice thermodynamics' |
---|
| 101 | WRITE(numout,*) '~~~~~~~' |
---|
| 102 | ENDIF |
---|
| 103 | |
---|
| 104 | CALL ice_var_glo2eqv |
---|
| 105 | |
---|
| 106 | !---------------------------------------------! |
---|
| 107 | ! computation of friction velocity at T points |
---|
| 108 | !---------------------------------------------! |
---|
| 109 | IF( ln_icedyn ) THEN |
---|
| 110 | zu_io(:,:) = u_ice(:,:) - ssu_m(:,:) |
---|
| 111 | zv_io(:,:) = v_ice(:,:) - ssv_m(:,:) |
---|
| 112 | DO jj = 2, jpjm1 |
---|
| 113 | DO ji = fs_2, fs_jpim1 |
---|
| 114 | zfric(ji,jj) = rn_cio * ( 0.5_wp * & |
---|
| 115 | & ( zu_io(ji,jj) * zu_io(ji,jj) + zu_io(ji-1,jj) * zu_io(ji-1,jj) & |
---|
| 116 | & + zv_io(ji,jj) * zv_io(ji,jj) + zv_io(ji,jj-1) * zv_io(ji,jj-1) ) ) * tmask(ji,jj,1) |
---|
| 117 | END DO |
---|
| 118 | END DO |
---|
| 119 | ELSE ! if no ice dynamics => transmit directly the atmospheric stress to the ocean |
---|
| 120 | DO jj = 2, jpjm1 |
---|
| 121 | DO ji = fs_2, fs_jpim1 |
---|
| 122 | zfric(ji,jj) = r1_rau0 * SQRT( 0.5_wp * & |
---|
| 123 | & ( utau(ji,jj) * utau(ji,jj) + utau(ji-1,jj) * utau(ji-1,jj) & |
---|
| 124 | & + vtau(ji,jj) * vtau(ji,jj) + vtau(ji,jj-1) * vtau(ji,jj-1) ) ) * tmask(ji,jj,1) |
---|
| 125 | END DO |
---|
| 126 | END DO |
---|
| 127 | ENDIF |
---|
| 128 | CALL lbc_lnk( zfric, 'T', 1. ) |
---|
| 129 | ! |
---|
| 130 | !--------------------------------------------------------------------! |
---|
| 131 | ! Partial computation of forcing for the thermodynamic sea ice model |
---|
| 132 | !--------------------------------------------------------------------! |
---|
| 133 | DO jj = 1, jpj |
---|
| 134 | DO ji = 1, jpi |
---|
| 135 | rswitch = tmask(ji,jj,1) * MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi10 ) ) ! 0 if no ice |
---|
| 136 | ! |
---|
| 137 | ! ! solar irradiance transmission at the mixed layer bottom and used in the lead heat budget |
---|
| 138 | ! ! practically no "direct lateral ablation" |
---|
| 139 | ! |
---|
| 140 | ! ! net downward heat flux from the ice to the ocean, expressed as a function of ocean |
---|
| 141 | ! ! temperature and turbulent mixing (McPhee, 1992) |
---|
| 142 | ! |
---|
[9922] | 143 | ! --- Energy received in the lead from atm-oce exchanges, zqld is defined everywhere (J.m-2) --- ! |
---|
[8586] | 144 | zqld = tmask(ji,jj,1) * rdt_ice * & |
---|
| 145 | & ( ( 1._wp - at_i_b(ji,jj) ) * qsr_oce(ji,jj) * frq_m(ji,jj) + & |
---|
| 146 | & ( 1._wp - at_i_b(ji,jj) ) * qns_oce(ji,jj) + qemp_oce(ji,jj) ) |
---|
| 147 | |
---|
[9922] | 148 | ! --- Energy needed to bring ocean surface layer until its freezing (mostly<0 but >0 if supercooling, J.m-2) --- ! |
---|
| 149 | zqfr = rau0 * rcp * e3t_m(ji,jj) * ( t_bo(ji,jj) - ( sst_m(ji,jj) + rt0 ) ) * tmask(ji,jj,1) ! both < 0 (t_bo < sst) and > 0 (t_bo > sst) |
---|
| 150 | zqfr_neg = MIN( zqfr , 0._wp ) ! only < 0 |
---|
[8586] | 151 | |
---|
[9922] | 152 | ! --- Sensible ocean-to-ice heat flux (mostly>0 but <0 if supercooling, W/m2) |
---|
| 153 | zfric_u = MAX( SQRT( zfric(ji,jj) ), zfric_umin ) |
---|
[9913] | 154 | qsb_ice_bot(ji,jj) = rswitch * rau0 * rcp * zch * zfric_u * ( ( sst_m(ji,jj) + rt0 ) - t_bo(ji,jj) ) ! W.m-2 |
---|
[8586] | 155 | |
---|
[9913] | 156 | qsb_ice_bot(ji,jj) = rswitch * MIN( qsb_ice_bot(ji,jj), - zqfr_neg * r1_rdtice / MAX( at_i(ji,jj), epsi10 ) ) |
---|
| 157 | ! upper bound for qsb_ice_bot: the heat retrieved from the ocean must be smaller than the heat necessary to reach |
---|
| 158 | ! the freezing point, so that we do not have SST < T_freeze |
---|
| 159 | ! This implies: - ( qsb_ice_bot(ji,jj) * at_i(ji,jj) * rtdice ) - zqfr >= 0 |
---|
[8586] | 160 | |
---|
[9913] | 161 | !-- Energy Budget of the leads (J.m-2), source of ice growth in open water. Must be < 0 to form ice |
---|
| 162 | qlead(ji,jj) = MIN( 0._wp , zqld - ( qsb_ice_bot(ji,jj) * at_i(ji,jj) * rdt_ice ) - zqfr ) |
---|
[8586] | 163 | |
---|
| 164 | ! If there is ice and leads are warming, then transfer energy from the lead budget and use it for bottom melting |
---|
| 165 | IF( zqld > 0._wp ) THEN |
---|
| 166 | fhld (ji,jj) = rswitch * zqld * r1_rdtice / MAX( at_i(ji,jj), epsi10 ) ! divided by at_i since this is (re)multiplied by a_i in icethd_dh.F90 |
---|
| 167 | qlead(ji,jj) = 0._wp |
---|
| 168 | ELSE |
---|
| 169 | fhld (ji,jj) = 0._wp |
---|
| 170 | ENDIF |
---|
| 171 | ! |
---|
| 172 | ! Net heat flux on top of the ice-ocean [W.m-2] |
---|
| 173 | ! --------------------------------------------- |
---|
[9912] | 174 | qt_atm_oi(ji,jj) = qns_tot(ji,jj) + qsr_tot(ji,jj) |
---|
[8586] | 175 | END DO |
---|
| 176 | END DO |
---|
| 177 | |
---|
| 178 | ! In case we bypass open-water ice formation |
---|
| 179 | IF( .NOT. ln_icedO ) qlead(:,:) = 0._wp |
---|
| 180 | ! In case we bypass growing/melting from top and bottom: we suppose ice is impermeable => ocean is isolated from atmosphere |
---|
| 181 | IF( .NOT. ln_icedH ) THEN |
---|
[9913] | 182 | qt_atm_oi (:,:) = ( 1._wp - at_i_b(:,:) ) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:) |
---|
| 183 | qsb_ice_bot(:,:) = 0._wp |
---|
| 184 | fhld (:,:) = 0._wp |
---|
[8586] | 185 | ENDIF |
---|
| 186 | |
---|
| 187 | ! --------------------------------------------------------------------- |
---|
| 188 | ! Net heat flux on top of the ocean after ice thermo (1st step) [W.m-2] |
---|
| 189 | ! --------------------------------------------------------------------- |
---|
[9913] | 190 | ! First step here : non solar + precip - qlead - qsensible |
---|
[8586] | 191 | ! Second step in icethd_dh : heat remaining if total melt (zq_rema) |
---|
| 192 | ! Third step in iceupdate.F90 : heat from ice-ocean mass exchange (zf_mass) + solar |
---|
[9912] | 193 | qt_oce_ai(:,:) = ( 1._wp - at_i_b(:,:) ) * qns_oce(:,:) + qemp_oce(:,:) & ! Non solar heat flux received by the ocean |
---|
| 194 | & - qlead(:,:) * r1_rdtice & ! heat flux taken from the ocean where there is open water ice formation |
---|
[9913] | 195 | & - at_i (:,:) * qsb_ice_bot(:,:) & ! heat flux taken by sensible flux |
---|
| 196 | & - at_i (:,:) * fhld (:,:) ! heat flux taken during bottom growth/melt |
---|
| 197 | ! ! (fhld should be 0 while bott growth) |
---|
[8586] | 198 | !-------------------------------------------------------------------------------------------! |
---|
| 199 | ! Thermodynamic computation (only on grid points covered by ice) => loop over ice categories |
---|
| 200 | !-------------------------------------------------------------------------------------------! |
---|
| 201 | DO jl = 1, jpl |
---|
| 202 | |
---|
| 203 | ! select ice covered grid points |
---|
| 204 | npti = 0 ; nptidx(:) = 0 |
---|
| 205 | DO jj = 1, jpj |
---|
| 206 | DO ji = 1, jpi |
---|
| 207 | IF ( a_i(ji,jj,jl) > epsi10 ) THEN |
---|
| 208 | npti = npti + 1 |
---|
| 209 | nptidx(npti) = (jj - 1) * jpi + ji |
---|
| 210 | ENDIF |
---|
| 211 | END DO |
---|
| 212 | END DO |
---|
| 213 | |
---|
| 214 | IF( lk_mpp ) CALL mpp_ini_ice( npti , numout ) |
---|
| 215 | |
---|
| 216 | IF( npti > 0 ) THEN ! If there is no ice, do nothing. |
---|
| 217 | ! |
---|
| 218 | CALL ice_thd_1d2d( jl, 1 ) ! --- Move to 1D arrays --- ! |
---|
| 219 | ! ! --- & Change units of e_i, e_s from J/m2 to J/m3 --- ! |
---|
| 220 | ! |
---|
[9750] | 221 | s_i_new (1:npti) = 0._wp ; dh_s_tot(1:npti) = 0._wp ! --- some init --- ! (important to have them here) |
---|
| 222 | dh_i_sum (1:npti) = 0._wp ; dh_i_bom(1:npti) = 0._wp ; dh_i_itm (1:npti) = 0._wp |
---|
| 223 | dh_i_sub (1:npti) = 0._wp ; dh_i_bog(1:npti) = 0._wp |
---|
| 224 | dh_snowice(1:npti) = 0._wp ; dh_s_mlt(1:npti) = 0._wp |
---|
[8586] | 225 | ! |
---|
| 226 | IF( ln_icedH ) THEN ! --- growing/melting --- ! |
---|
| 227 | CALL ice_thd_zdf ! Ice/Snow Temperature profile |
---|
| 228 | CALL ice_thd_dh ! Ice/Snow thickness |
---|
[8637] | 229 | CALL ice_thd_pnd ! Melt ponds formation |
---|
[8586] | 230 | CALL ice_thd_ent( e_i_1d(1:npti,:) ) ! Ice enthalpy remapping |
---|
| 231 | ENDIF |
---|
| 232 | ! |
---|
| 233 | CALL ice_thd_sal( ln_icedS ) ! --- Ice salinity --- ! |
---|
| 234 | ! |
---|
| 235 | CALL ice_thd_temp ! --- temperature update --- ! |
---|
| 236 | ! |
---|
[9750] | 237 | !!gm please create a new logical (l_thd_mono or a better explicit name) set one for all in icestp.F90 module |
---|
| 238 | !!gm l_thd_mono = ln_icedH .AND. ( ( nn_virtual_itd == 1 .OR. nn_virtual_itd == 4 ) .AND. jpl == 1 ) |
---|
[9076] | 239 | !!gm by the way, the different options associated with nn_virtual_itd =1 to 4 are quite impossible to identify |
---|
[8586] | 240 | !!gm more comment to add when ready the namelist, with an explicit print in the ocean.output |
---|
| 241 | IF( ln_icedH ) THEN |
---|
[9076] | 242 | IF ( ( nn_virtual_itd == 1 .OR. nn_virtual_itd == 3 ) .AND. jpl == 1 ) THEN |
---|
[9750] | 243 | CALL ice_thd_mono ! --- extra lateral melting if virtual_itd --- ! |
---|
[8586] | 244 | END IF |
---|
| 245 | END IF |
---|
| 246 | ! |
---|
| 247 | IF( ln_icedA ) CALL ice_thd_da ! --- lateral melting --- ! |
---|
| 248 | ! |
---|
| 249 | CALL ice_thd_1d2d( jl, 2 ) ! --- Change units of e_i, e_s from J/m3 to J/m2 --- ! |
---|
| 250 | ! ! --- & Move to 2D arrays --- ! |
---|
| 251 | ! |
---|
| 252 | IF( lk_mpp ) CALL mpp_comm_free( ncomm_ice ) !RB necessary ?? |
---|
| 253 | ENDIF |
---|
| 254 | ! |
---|
| 255 | END DO |
---|
| 256 | ! update ice age (in case a_i changed, i.e. becomes 0 or lateral melting) |
---|
| 257 | oa_i(:,:,:) = o_i(:,:,:) * a_i(:,:,:) |
---|
| 258 | |
---|
| 259 | IF( ln_icediachk ) CALL ice_cons_hsm(1, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) |
---|
| 260 | ! |
---|
| 261 | CALL ice_var_zapsmall ! --- remove very small ice concentration (<1e-10) --- ! |
---|
| 262 | ! ! & make sure at_i=SUM(a_i) & ato_i=1 where at_i=0 |
---|
| 263 | ! |
---|
[9124] | 264 | IF( jpl > 1 ) CALL ice_itd_rem( kt ) ! --- Transport ice between thickness categories --- ! |
---|
[8586] | 265 | ! |
---|
[9124] | 266 | IF( ln_icedO ) CALL ice_thd_do ! --- frazil ice growing in leads --- ! |
---|
[8586] | 267 | ! |
---|
| 268 | ! controls |
---|
[9124] | 269 | IF( ln_icectl ) CALL ice_prt (kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ') ! prints |
---|
| 270 | IF( ln_ctl ) CALL ice_prt3D ('icethd') ! prints |
---|
| 271 | IF( ln_timing ) CALL timing_stop('icethd') ! timing |
---|
[8586] | 272 | ! |
---|
| 273 | END SUBROUTINE ice_thd |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | SUBROUTINE ice_thd_temp |
---|
| 277 | !!----------------------------------------------------------------------- |
---|
| 278 | !! *** ROUTINE ice_thd_temp *** |
---|
| 279 | !! |
---|
| 280 | !! ** Purpose : Computes sea ice temperature (Kelvin) from enthalpy |
---|
| 281 | !! |
---|
| 282 | !! ** Method : Formula (Bitz and Lipscomb, 1999) |
---|
| 283 | !!------------------------------------------------------------------- |
---|
| 284 | INTEGER :: ji, jk ! dummy loop indices |
---|
| 285 | REAL(wp) :: ztmelts, zbbb, zccc ! local scalar |
---|
| 286 | !!------------------------------------------------------------------- |
---|
| 287 | ! Recover ice temperature |
---|
| 288 | DO jk = 1, nlay_i |
---|
| 289 | DO ji = 1, npti |
---|
[9935] | 290 | ztmelts = -rTmlt * sz_i_1d(ji,jk) |
---|
[8586] | 291 | ! Conversion q(S,T) -> T (second order equation) |
---|
[9935] | 292 | zbbb = ( rcp - rcpi ) * ztmelts + e_i_1d(ji,jk) * r1_rhoi - rLfus |
---|
| 293 | zccc = SQRT( MAX( zbbb * zbbb - 4._wp * rcpi * rLfus * ztmelts, 0._wp ) ) |
---|
| 294 | t_i_1d(ji,jk) = rt0 - ( zbbb + zccc ) * 0.5_wp * r1_rcpi |
---|
[8586] | 295 | |
---|
| 296 | ! mask temperature |
---|
| 297 | rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - h_i_1d(ji) ) ) |
---|
| 298 | t_i_1d(ji,jk) = rswitch * t_i_1d(ji,jk) + ( 1._wp - rswitch ) * rt0 |
---|
| 299 | END DO |
---|
| 300 | END DO |
---|
| 301 | ! |
---|
| 302 | END SUBROUTINE ice_thd_temp |
---|
| 303 | |
---|
| 304 | |
---|
[9750] | 305 | SUBROUTINE ice_thd_mono |
---|
[8586] | 306 | !!----------------------------------------------------------------------- |
---|
[9750] | 307 | !! *** ROUTINE ice_thd_mono *** |
---|
[8586] | 308 | !! |
---|
[9076] | 309 | !! ** Purpose : Lateral melting in case virtual_itd |
---|
[8586] | 310 | !! ( dA = A/2h dh ) |
---|
| 311 | !!----------------------------------------------------------------------- |
---|
| 312 | INTEGER :: ji ! dummy loop indices |
---|
| 313 | REAL(wp) :: zhi_bef ! ice thickness before thermo |
---|
| 314 | REAL(wp) :: zdh_mel, zda_mel ! net melting |
---|
| 315 | REAL(wp) :: zvi, zvs ! ice/snow volumes |
---|
| 316 | !!----------------------------------------------------------------------- |
---|
| 317 | ! |
---|
| 318 | DO ji = 1, npti |
---|
[9750] | 319 | zdh_mel = MIN( 0._wp, dh_i_itm(ji) + dh_i_sum(ji) + dh_i_bom(ji) + dh_snowice(ji) + dh_i_sub(ji) ) |
---|
[8586] | 320 | IF( zdh_mel < 0._wp .AND. a_i_1d(ji) > 0._wp ) THEN |
---|
| 321 | zvi = a_i_1d(ji) * h_i_1d(ji) |
---|
| 322 | zvs = a_i_1d(ji) * h_s_1d(ji) |
---|
| 323 | ! lateral melting = concentration change |
---|
| 324 | zhi_bef = h_i_1d(ji) - zdh_mel |
---|
| 325 | rswitch = MAX( 0._wp , SIGN( 1._wp , zhi_bef - epsi20 ) ) |
---|
| 326 | zda_mel = rswitch * a_i_1d(ji) * zdh_mel / ( 2._wp * MAX( zhi_bef, epsi20 ) ) |
---|
| 327 | a_i_1d(ji) = MAX( epsi20, a_i_1d(ji) + zda_mel ) |
---|
| 328 | ! adjust thickness |
---|
| 329 | h_i_1d(ji) = zvi / a_i_1d(ji) |
---|
| 330 | h_s_1d(ji) = zvs / a_i_1d(ji) |
---|
| 331 | ! retrieve total concentration |
---|
| 332 | at_i_1d(ji) = a_i_1d(ji) |
---|
| 333 | END IF |
---|
| 334 | END DO |
---|
| 335 | ! |
---|
[9750] | 336 | END SUBROUTINE ice_thd_mono |
---|
[8586] | 337 | |
---|
| 338 | |
---|
| 339 | SUBROUTINE ice_thd_1d2d( kl, kn ) |
---|
| 340 | !!----------------------------------------------------------------------- |
---|
| 341 | !! *** ROUTINE ice_thd_1d2d *** |
---|
| 342 | !! |
---|
| 343 | !! ** Purpose : move arrays from 1d to 2d and the reverse |
---|
| 344 | !!----------------------------------------------------------------------- |
---|
| 345 | INTEGER, INTENT(in) :: kl ! index of the ice category |
---|
| 346 | INTEGER, INTENT(in) :: kn ! 1= from 2D to 1D ; 2= from 1D to 2D |
---|
| 347 | ! |
---|
| 348 | INTEGER :: jk ! dummy loop indices |
---|
| 349 | !!----------------------------------------------------------------------- |
---|
| 350 | ! |
---|
| 351 | SELECT CASE( kn ) |
---|
| 352 | ! !---------------------! |
---|
| 353 | CASE( 1 ) !== from 2D to 1D ==! |
---|
| 354 | ! !---------------------! |
---|
| 355 | CALL tab_2d_1d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i ) |
---|
| 356 | CALL tab_2d_1d( npti, nptidx(1:npti), a_i_1d (1:npti), a_i (:,:,kl) ) |
---|
[8637] | 357 | CALL tab_2d_1d( npti, nptidx(1:npti), h_i_1d (1:npti), h_i (:,:,kl) ) |
---|
| 358 | CALL tab_2d_1d( npti, nptidx(1:npti), h_s_1d (1:npti), h_s (:,:,kl) ) |
---|
[8586] | 359 | CALL tab_2d_1d( npti, nptidx(1:npti), t_su_1d(1:npti), t_su(:,:,kl) ) |
---|
[8637] | 360 | CALL tab_2d_1d( npti, nptidx(1:npti), s_i_1d (1:npti), s_i (:,:,kl) ) |
---|
[8586] | 361 | DO jk = 1, nlay_s |
---|
[8637] | 362 | CALL tab_2d_1d( npti, nptidx(1:npti), t_s_1d(1:npti,jk), t_s(:,:,jk,kl) ) |
---|
| 363 | CALL tab_2d_1d( npti, nptidx(1:npti), e_s_1d(1:npti,jk), e_s(:,:,jk,kl) ) |
---|
[8586] | 364 | END DO |
---|
| 365 | DO jk = 1, nlay_i |
---|
[8637] | 366 | CALL tab_2d_1d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,kl) ) |
---|
| 367 | CALL tab_2d_1d( npti, nptidx(1:npti), e_i_1d (1:npti,jk), e_i (:,:,jk,kl) ) |
---|
| 368 | CALL tab_2d_1d( npti, nptidx(1:npti), sz_i_1d(1:npti,jk), sz_i(:,:,jk,kl) ) |
---|
[8586] | 369 | END DO |
---|
[8637] | 370 | CALL tab_2d_1d( npti, nptidx(1:npti), a_ip_1d (1:npti), a_ip (:,:,kl) ) |
---|
| 371 | CALL tab_2d_1d( npti, nptidx(1:npti), h_ip_1d (1:npti), h_ip (:,:,kl) ) |
---|
| 372 | CALL tab_2d_1d( npti, nptidx(1:npti), a_ip_frac_1d(1:npti), a_ip_frac(:,:,kl) ) |
---|
[8586] | 373 | ! |
---|
[9910] | 374 | CALL tab_2d_1d( npti, nptidx(1:npti), qprec_ice_1d (1:npti), qprec_ice ) |
---|
| 375 | CALL tab_2d_1d( npti, nptidx(1:npti), qsr_ice_1d (1:npti), qsr_ice (:,:,kl) ) |
---|
| 376 | CALL tab_2d_1d( npti, nptidx(1:npti), qns_ice_1d (1:npti), qns_ice (:,:,kl) ) |
---|
| 377 | CALL tab_2d_1d( npti, nptidx(1:npti), evap_ice_1d (1:npti), evap_ice(:,:,kl) ) |
---|
| 378 | CALL tab_2d_1d( npti, nptidx(1:npti), dqns_ice_1d (1:npti), dqns_ice(:,:,kl) ) |
---|
| 379 | CALL tab_2d_1d( npti, nptidx(1:npti), t_bo_1d (1:npti), t_bo ) |
---|
| 380 | CALL tab_2d_1d( npti, nptidx(1:npti), sprecip_1d (1:npti), sprecip ) |
---|
[9913] | 381 | CALL tab_2d_1d( npti, nptidx(1:npti), qsb_ice_bot_1d(1:npti), qsb_ice_bot ) |
---|
[9910] | 382 | CALL tab_2d_1d( npti, nptidx(1:npti), fhld_1d (1:npti), fhld ) |
---|
[8813] | 383 | |
---|
[9910] | 384 | CALL tab_2d_1d( npti, nptidx(1:npti), qml_ice_1d (1:npti), qml_ice (:,:,kl) ) |
---|
| 385 | CALL tab_2d_1d( npti, nptidx(1:npti), qcn_ice_1d (1:npti), qcn_ice (:,:,kl) ) |
---|
| 386 | CALL tab_2d_1d( npti, nptidx(1:npti), qtr_ice_top_1d(1:npti), qtr_ice_top(:,:,kl) ) |
---|
[8586] | 387 | ! |
---|
| 388 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sni_1d(1:npti), wfx_snw_sni ) |
---|
| 389 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sum_1d(1:npti), wfx_snw_sum ) |
---|
| 390 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sub_1d (1:npti), wfx_sub ) |
---|
| 391 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sub_1d(1:npti), wfx_snw_sub ) |
---|
| 392 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_ice_sub_1d(1:npti), wfx_ice_sub ) |
---|
| 393 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_err_sub_1d(1:npti), wfx_err_sub ) |
---|
| 394 | ! |
---|
| 395 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_bog_1d (1:npti), wfx_bog ) |
---|
| 396 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_bom_1d (1:npti), wfx_bom ) |
---|
| 397 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sum_1d (1:npti), wfx_sum ) |
---|
| 398 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sni_1d (1:npti), wfx_sni ) |
---|
| 399 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_res_1d (1:npti), wfx_res ) |
---|
| 400 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_spr_1d (1:npti), wfx_spr ) |
---|
| 401 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_lam_1d (1:npti), wfx_lam ) |
---|
[8637] | 402 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_pnd_1d (1:npti), wfx_pnd ) |
---|
[8586] | 403 | ! |
---|
| 404 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bog_1d (1:npti), sfx_bog ) |
---|
| 405 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bom_1d (1:npti), sfx_bom ) |
---|
| 406 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sum_1d (1:npti), sfx_sum ) |
---|
| 407 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sni_1d (1:npti), sfx_sni ) |
---|
| 408 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bri_1d (1:npti), sfx_bri ) |
---|
| 409 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_res_1d (1:npti), sfx_res ) |
---|
| 410 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sub_1d (1:npti), sfx_sub ) |
---|
| 411 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_lam_1d (1:npti), sfx_lam ) |
---|
| 412 | ! |
---|
[9910] | 413 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_thd_1d (1:npti), hfx_thd ) |
---|
| 414 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_spr_1d (1:npti), hfx_spr ) |
---|
| 415 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_sum_1d (1:npti), hfx_sum ) |
---|
| 416 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_bom_1d (1:npti), hfx_bom ) |
---|
| 417 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_bog_1d (1:npti), hfx_bog ) |
---|
| 418 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_dif_1d (1:npti), hfx_dif ) |
---|
| 419 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_opw_1d (1:npti), hfx_opw ) |
---|
| 420 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_snw_1d (1:npti), hfx_snw ) |
---|
| 421 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_sub_1d (1:npti), hfx_sub ) |
---|
| 422 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_res_1d (1:npti), hfx_res ) |
---|
[8586] | 423 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_err_dif_1d(1:npti), hfx_err_dif ) |
---|
| 424 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_err_rem_1d(1:npti), hfx_err_rem ) |
---|
[9912] | 425 | CALL tab_2d_1d( npti, nptidx(1:npti), qt_oce_ai_1d (1:npti), qt_oce_ai ) |
---|
[8586] | 426 | ! |
---|
| 427 | ! ocean surface fields |
---|
| 428 | CALL tab_2d_1d( npti, nptidx(1:npti), sst_1d(1:npti), sst_m ) |
---|
| 429 | CALL tab_2d_1d( npti, nptidx(1:npti), sss_1d(1:npti), sss_m ) |
---|
| 430 | |
---|
| 431 | ! --- Change units of e_i, e_s from J/m2 to J/m3 --- ! |
---|
| 432 | DO jk = 1, nlay_i |
---|
| 433 | WHERE( h_i_1d(1:npti)>0._wp ) e_i_1d(1:npti,jk) = e_i_1d(1:npti,jk) / (h_i_1d(1:npti) * a_i_1d(1:npti)) * nlay_i |
---|
| 434 | END DO |
---|
| 435 | DO jk = 1, nlay_s |
---|
| 436 | WHERE( h_s_1d(1:npti)>0._wp ) e_s_1d(1:npti,jk) = e_s_1d(1:npti,jk) / (h_s_1d(1:npti) * a_i_1d(1:npti)) * nlay_s |
---|
| 437 | END DO |
---|
| 438 | ! |
---|
| 439 | ! !---------------------! |
---|
| 440 | CASE( 2 ) !== from 1D to 2D ==! |
---|
| 441 | ! !---------------------! |
---|
| 442 | ! --- Change units of e_i, e_s from J/m3 to J/m2 --- ! |
---|
| 443 | DO jk = 1, nlay_i |
---|
| 444 | e_i_1d(1:npti,jk) = e_i_1d(1:npti,jk) * h_i_1d(1:npti) * a_i_1d(1:npti) * r1_nlay_i |
---|
| 445 | END DO |
---|
| 446 | DO jk = 1, nlay_s |
---|
| 447 | e_s_1d(1:npti,jk) = e_s_1d(1:npti,jk) * h_s_1d(1:npti) * a_i_1d(1:npti) * r1_nlay_s |
---|
| 448 | END DO |
---|
| 449 | ! |
---|
| 450 | ! Change thickness to volume (replaces routine ice_var_eqv2glo) |
---|
[8637] | 451 | v_i_1d (1:npti) = h_i_1d (1:npti) * a_i_1d (1:npti) |
---|
| 452 | v_s_1d (1:npti) = h_s_1d (1:npti) * a_i_1d (1:npti) |
---|
| 453 | sv_i_1d(1:npti) = s_i_1d (1:npti) * v_i_1d (1:npti) |
---|
| 454 | v_ip_1d(1:npti) = h_ip_1d(1:npti) * a_ip_1d(1:npti) |
---|
[8586] | 455 | |
---|
| 456 | CALL tab_1d_2d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i ) |
---|
| 457 | CALL tab_1d_2d( npti, nptidx(1:npti), a_i_1d (1:npti), a_i (:,:,kl) ) |
---|
[8637] | 458 | CALL tab_1d_2d( npti, nptidx(1:npti), h_i_1d (1:npti), h_i (:,:,kl) ) |
---|
| 459 | CALL tab_1d_2d( npti, nptidx(1:npti), h_s_1d (1:npti), h_s (:,:,kl) ) |
---|
[8586] | 460 | CALL tab_1d_2d( npti, nptidx(1:npti), t_su_1d(1:npti), t_su(:,:,kl) ) |
---|
[8637] | 461 | CALL tab_1d_2d( npti, nptidx(1:npti), s_i_1d (1:npti), s_i (:,:,kl) ) |
---|
[8586] | 462 | DO jk = 1, nlay_s |
---|
[8637] | 463 | CALL tab_1d_2d( npti, nptidx(1:npti), t_s_1d(1:npti,jk), t_s(:,:,jk,kl) ) |
---|
| 464 | CALL tab_1d_2d( npti, nptidx(1:npti), e_s_1d(1:npti,jk), e_s(:,:,jk,kl) ) |
---|
[8586] | 465 | END DO |
---|
| 466 | DO jk = 1, nlay_i |
---|
[8637] | 467 | CALL tab_1d_2d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,kl) ) |
---|
| 468 | CALL tab_1d_2d( npti, nptidx(1:npti), e_i_1d (1:npti,jk), e_i (:,:,jk,kl) ) |
---|
| 469 | CALL tab_1d_2d( npti, nptidx(1:npti), sz_i_1d(1:npti,jk), sz_i(:,:,jk,kl) ) |
---|
[8586] | 470 | END DO |
---|
[8637] | 471 | CALL tab_1d_2d( npti, nptidx(1:npti), a_ip_1d (1:npti), a_ip (:,:,kl) ) |
---|
| 472 | CALL tab_1d_2d( npti, nptidx(1:npti), h_ip_1d (1:npti), h_ip (:,:,kl) ) |
---|
| 473 | CALL tab_1d_2d( npti, nptidx(1:npti), a_ip_frac_1d(1:npti), a_ip_frac(:,:,kl) ) |
---|
[8586] | 474 | ! |
---|
| 475 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sni_1d(1:npti), wfx_snw_sni ) |
---|
| 476 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sum_1d(1:npti), wfx_snw_sum ) |
---|
| 477 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sub_1d (1:npti), wfx_sub ) |
---|
| 478 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sub_1d(1:npti), wfx_snw_sub ) |
---|
| 479 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_ice_sub_1d(1:npti), wfx_ice_sub ) |
---|
| 480 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_err_sub_1d(1:npti), wfx_err_sub ) |
---|
| 481 | ! |
---|
| 482 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_bog_1d (1:npti), wfx_bog ) |
---|
| 483 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_bom_1d (1:npti), wfx_bom ) |
---|
| 484 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sum_1d (1:npti), wfx_sum ) |
---|
| 485 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sni_1d (1:npti), wfx_sni ) |
---|
| 486 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_res_1d (1:npti), wfx_res ) |
---|
| 487 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_spr_1d (1:npti), wfx_spr ) |
---|
| 488 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_lam_1d (1:npti), wfx_lam ) |
---|
[8813] | 489 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_pnd_1d (1:npti), wfx_pnd ) |
---|
[8586] | 490 | ! |
---|
| 491 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bog_1d (1:npti), sfx_bog ) |
---|
| 492 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bom_1d (1:npti), sfx_bom ) |
---|
| 493 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sum_1d (1:npti), sfx_sum ) |
---|
| 494 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sni_1d (1:npti), sfx_sni ) |
---|
| 495 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bri_1d (1:npti), sfx_bri ) |
---|
| 496 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_res_1d (1:npti), sfx_res ) |
---|
| 497 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sub_1d (1:npti), sfx_sub ) |
---|
| 498 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_lam_1d (1:npti), sfx_lam ) |
---|
| 499 | ! |
---|
[9912] | 500 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_thd_1d (1:npti), hfx_thd ) |
---|
| 501 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_spr_1d (1:npti), hfx_spr ) |
---|
| 502 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_sum_1d (1:npti), hfx_sum ) |
---|
| 503 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_bom_1d (1:npti), hfx_bom ) |
---|
| 504 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_bog_1d (1:npti), hfx_bog ) |
---|
| 505 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_dif_1d (1:npti), hfx_dif ) |
---|
| 506 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_opw_1d (1:npti), hfx_opw ) |
---|
| 507 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_snw_1d (1:npti), hfx_snw ) |
---|
| 508 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_sub_1d (1:npti), hfx_sub ) |
---|
| 509 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_res_1d (1:npti), hfx_res ) |
---|
[8586] | 510 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_err_dif_1d(1:npti), hfx_err_dif ) |
---|
| 511 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_err_rem_1d(1:npti), hfx_err_rem ) |
---|
[9912] | 512 | CALL tab_1d_2d( npti, nptidx(1:npti), qt_oce_ai_1d (1:npti), qt_oce_ai ) |
---|
[8586] | 513 | ! |
---|
[9910] | 514 | CALL tab_1d_2d( npti, nptidx(1:npti), qns_ice_1d (1:npti), qns_ice (:,:,kl) ) |
---|
| 515 | CALL tab_1d_2d( npti, nptidx(1:npti), qtr_ice_bot_1d(1:npti), qtr_ice_bot(:,:,kl) ) |
---|
[8933] | 516 | ! effective conductivity and 1st layer temperature (for Jules coupling) |
---|
| 517 | CALL tab_1d_2d( npti, nptidx(1:npti), cnd_ice_1d(1:npti), cnd_ice(:,:,kl) ) |
---|
| 518 | CALL tab_1d_2d( npti, nptidx(1:npti), t1_ice_1d (1:npti), t1_ice (:,:,kl) ) |
---|
[8586] | 519 | ! SIMIP diagnostics |
---|
[9916] | 520 | CALL tab_1d_2d( npti, nptidx(1:npti), t_si_1d (1:npti), t_si (:,:,kl) ) |
---|
| 521 | CALL tab_1d_2d( npti, nptidx(1:npti), qcn_ice_bot_1d(1:npti), qcn_ice_bot(:,:,kl) ) |
---|
| 522 | CALL tab_1d_2d( npti, nptidx(1:npti), qcn_ice_top_1d(1:npti), qcn_ice_top(:,:,kl) ) |
---|
[8586] | 523 | ! extensive variables |
---|
| 524 | CALL tab_1d_2d( npti, nptidx(1:npti), v_i_1d (1:npti), v_i (:,:,kl) ) |
---|
| 525 | CALL tab_1d_2d( npti, nptidx(1:npti), v_s_1d (1:npti), v_s (:,:,kl) ) |
---|
| 526 | CALL tab_1d_2d( npti, nptidx(1:npti), sv_i_1d(1:npti), sv_i(:,:,kl) ) |
---|
[8637] | 527 | CALL tab_1d_2d( npti, nptidx(1:npti), v_ip_1d(1:npti), v_ip(:,:,kl) ) |
---|
[8586] | 528 | ! |
---|
| 529 | END SELECT |
---|
| 530 | ! |
---|
| 531 | END SUBROUTINE ice_thd_1d2d |
---|
| 532 | |
---|
| 533 | |
---|
| 534 | SUBROUTINE ice_thd_init |
---|
[8637] | 535 | !!------------------------------------------------------------------- |
---|
[8586] | 536 | !! *** ROUTINE ice_thd_init *** |
---|
| 537 | !! |
---|
| 538 | !! ** Purpose : Physical constants and parameters associated with |
---|
| 539 | !! ice thermodynamics |
---|
| 540 | !! |
---|
| 541 | !! ** Method : Read the namthd namelist and check the parameters |
---|
| 542 | !! called at the first timestep (nit000) |
---|
| 543 | !! |
---|
| 544 | !! ** input : Namelist namthd |
---|
| 545 | !!------------------------------------------------------------------- |
---|
| 546 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 547 | !! |
---|
| 548 | NAMELIST/namthd/ ln_icedH, ln_icedA, ln_icedO, ln_icedS |
---|
| 549 | !!------------------------------------------------------------------- |
---|
| 550 | ! |
---|
| 551 | REWIND( numnam_ice_ref ) ! Namelist namthd in reference namelist : Ice thermodynamics |
---|
| 552 | READ ( numnam_ice_ref, namthd, IOSTAT = ios, ERR = 901) |
---|
[9169] | 553 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in reference namelist', lwp ) |
---|
[8586] | 554 | REWIND( numnam_ice_cfg ) ! Namelist namthd in configuration namelist : Ice thermodynamics |
---|
| 555 | READ ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 ) |
---|
[9169] | 556 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namthd in configuration namelist', lwp ) |
---|
| 557 | IF(lwm) WRITE( numoni, namthd ) |
---|
[8586] | 558 | ! |
---|
| 559 | IF(lwp) THEN ! control print |
---|
[9169] | 560 | WRITE(numout,*) |
---|
[8586] | 561 | WRITE(numout,*) 'ice_thd_init: Ice Thermodynamics' |
---|
| 562 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
| 563 | WRITE(numout,*) ' Namelist namthd:' |
---|
| 564 | WRITE(numout,*) ' activate ice thick change from top/bot (T) or not (F) ln_icedH = ', ln_icedH |
---|
| 565 | WRITE(numout,*) ' activate lateral melting (T) or not (F) ln_icedA = ', ln_icedA |
---|
| 566 | WRITE(numout,*) ' activate ice growth in open-water (T) or not (F) ln_icedO = ', ln_icedO |
---|
| 567 | WRITE(numout,*) ' activate gravity drainage and flushing (T) or not (F) ln_icedS = ', ln_icedS |
---|
| 568 | ENDIF |
---|
| 569 | ! |
---|
| 570 | CALL ice_thd_zdf_init ! set ice heat diffusion parameters |
---|
| 571 | IF( ln_icedA ) CALL ice_thd_da_init ! set ice lateral melting parameters |
---|
| 572 | IF( ln_icedO ) CALL ice_thd_do_init ! set ice growth in open water parameters |
---|
| 573 | CALL ice_thd_sal_init ! set ice salinity parameters |
---|
[8637] | 574 | CALL ice_thd_pnd_init ! set melt ponds parameters |
---|
[8586] | 575 | ! |
---|
| 576 | END SUBROUTINE ice_thd_init |
---|
| 577 | |
---|
| 578 | #else |
---|
| 579 | !!---------------------------------------------------------------------- |
---|
[9570] | 580 | !! Default option Dummy module NO SI3 sea-ice model |
---|
[8586] | 581 | !!---------------------------------------------------------------------- |
---|
| 582 | #endif |
---|
| 583 | |
---|
| 584 | !!====================================================================== |
---|
| 585 | END MODULE icethd |
---|