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