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