[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, & |
---|
[15388] | 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 | |
---|
[13472] | 50 | !! for convergence tests |
---|
| 51 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztice_cvgerr, ztice_cvgstp |
---|
| 52 | |
---|
[8586] | 53 | !! * Substitutions |
---|
[12377] | 54 | # include "do_loop_substitute.h90" |
---|
[8586] | 55 | !!---------------------------------------------------------------------- |
---|
[9598] | 56 | !! NEMO/ICE 4.0 , NEMO Consortium (2018) |
---|
[10069] | 57 | !! $Id$ |
---|
[10068] | 58 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[8586] | 59 | !!---------------------------------------------------------------------- |
---|
| 60 | CONTAINS |
---|
| 61 | |
---|
| 62 | SUBROUTINE ice_thd( kt ) |
---|
| 63 | !!------------------------------------------------------------------- |
---|
[14072] | 64 | !! *** ROUTINE ice_thd *** |
---|
| 65 | !! |
---|
[8586] | 66 | !! ** Purpose : This routine manages ice thermodynamics |
---|
[14072] | 67 | !! |
---|
[9604] | 68 | !! ** Action : - computation of oceanic sensible heat flux at the ice base |
---|
| 69 | !! energy budget in the leads |
---|
| 70 | !! net fluxes on top of ice and of ocean |
---|
| 71 | !! - selection of grid cells with ice |
---|
| 72 | !! - call ice_thd_zdf for vertical heat diffusion |
---|
| 73 | !! - call ice_thd_dh for vertical ice growth and melt |
---|
| 74 | !! - call ice_thd_pnd for melt ponds |
---|
| 75 | !! - call ice_thd_ent for enthalpy remapping |
---|
| 76 | !! - call ice_thd_sal for ice desalination |
---|
| 77 | !! - call ice_thd_temp to retrieve temperature from ice enthalpy |
---|
[9750] | 78 | !! - call ice_thd_mono for extra lateral ice melt if active virtual thickness distribution |
---|
[9604] | 79 | !! - call ice_thd_da for lateral ice melt |
---|
[8586] | 80 | !! - back to the geographic grid |
---|
[9604] | 81 | !! - call ice_thd_rem for remapping thickness distribution |
---|
| 82 | !! - call ice_thd_do for ice growth in leads |
---|
[8637] | 83 | !!------------------------------------------------------------------- |
---|
[8586] | 84 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
| 85 | ! |
---|
| 86 | INTEGER :: ji, jj, jk, jl ! dummy loop indices |
---|
| 87 | !!------------------------------------------------------------------- |
---|
| 88 | ! controls |
---|
[9124] | 89 | IF( ln_timing ) CALL timing_start('icethd') ! timing |
---|
| 90 | IF( ln_icediachk ) CALL ice_cons_hsm(0, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation |
---|
[11536] | 91 | IF( ln_icediachk ) CALL ice_cons2D (0, 'icethd', diag_v, diag_s, diag_t, diag_fv, diag_fs, diag_ft) ! conservation |
---|
[8586] | 92 | |
---|
| 93 | IF( kt == nit000 .AND. lwp ) THEN |
---|
| 94 | WRITE(numout,*) |
---|
| 95 | WRITE(numout,*) 'ice_thd: sea-ice thermodynamics' |
---|
| 96 | WRITE(numout,*) '~~~~~~~' |
---|
| 97 | ENDIF |
---|
[13472] | 98 | |
---|
| 99 | ! convergence tests |
---|
| 100 | IF( ln_zdf_chkcvg ) THEN |
---|
| 101 | ALLOCATE( ztice_cvgerr(jpi,jpj,jpl) , ztice_cvgstp(jpi,jpj,jpl) ) |
---|
| 102 | ztice_cvgerr = 0._wp ; ztice_cvgstp = 0._wp |
---|
| 103 | ENDIF |
---|
[15388] | 104 | ! |
---|
| 105 | CALL ice_thd_frazil !--- frazil ice: collection thickness (ht_i_new) & fraction of frazil (fraz_frac) |
---|
| 106 | ! |
---|
[15374] | 107 | !-------------------------------------------------------------------------------------------! |
---|
| 108 | ! Thermodynamic computation (only on grid points covered by ice) => loop over ice categories |
---|
| 109 | !-------------------------------------------------------------------------------------------! |
---|
| 110 | DO jl = 1, jpl |
---|
| 111 | |
---|
| 112 | ! select ice covered grid points |
---|
| 113 | npti = 0 ; nptidx(:) = 0 |
---|
| 114 | DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) |
---|
| 115 | IF ( a_i(ji,jj,jl) > epsi10 ) THEN |
---|
| 116 | npti = npti + 1 |
---|
| 117 | nptidx(npti) = (jj - 1) * jpi + ji |
---|
| 118 | ENDIF |
---|
| 119 | END_2D |
---|
| 120 | |
---|
| 121 | IF( npti > 0 ) THEN ! If there is no ice, do nothing. |
---|
| 122 | ! |
---|
| 123 | CALL ice_thd_1d2d( jl, 1 ) ! --- Move to 1D arrays --- ! |
---|
| 124 | ! ! --- & Change units of e_i, e_s from J/m2 to J/m3 --- ! |
---|
| 125 | ! |
---|
| 126 | s_i_new (1:npti) = 0._wp ; dh_s_tot(1:npti) = 0._wp ! --- some init --- ! (important to have them here) |
---|
| 127 | dh_i_sum (1:npti) = 0._wp ; dh_i_bom(1:npti) = 0._wp ; dh_i_itm (1:npti) = 0._wp |
---|
| 128 | dh_i_sub (1:npti) = 0._wp ; dh_i_bog(1:npti) = 0._wp |
---|
| 129 | dh_snowice(1:npti) = 0._wp ; dh_s_mlt(1:npti) = 0._wp |
---|
| 130 | ! |
---|
| 131 | CALL ice_thd_zdf ! --- Ice-Snow temperature --- ! |
---|
| 132 | ! |
---|
| 133 | IF( ln_icedH ) THEN ! --- Growing/Melting --- ! |
---|
| 134 | CALL ice_thd_dh ! Ice-Snow thickness |
---|
| 135 | CALL ice_thd_ent( e_i_1d(1:npti,:) ) ! Ice enthalpy remapping |
---|
| 136 | ENDIF |
---|
| 137 | CALL ice_thd_sal( ln_icedS ) ! --- Ice salinity --- ! |
---|
| 138 | ! |
---|
| 139 | CALL ice_thd_temp ! --- Temperature update --- ! |
---|
| 140 | ! |
---|
| 141 | IF( ln_icedH .AND. ln_virtual_itd ) & |
---|
| 142 | & CALL ice_thd_mono ! --- Extra lateral melting if virtual_itd --- ! |
---|
| 143 | ! |
---|
| 144 | IF( ln_icedA ) CALL ice_thd_da ! --- Lateral melting --- ! |
---|
| 145 | ! |
---|
| 146 | CALL ice_thd_1d2d( jl, 2 ) ! --- Change units of e_i, e_s from J/m3 to J/m2 --- ! |
---|
| 147 | ! ! --- & Move to 2D arrays --- ! |
---|
| 148 | ENDIF |
---|
| 149 | ! |
---|
| 150 | END DO |
---|
| 151 | ! |
---|
| 152 | IF( ln_icediachk ) CALL ice_cons_hsm(1, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) |
---|
| 153 | IF( ln_icediachk ) CALL ice_cons2D (1, 'icethd', diag_v, diag_s, diag_t, diag_fv, diag_fs, diag_ft) |
---|
| 154 | ! |
---|
| 155 | IF ( ln_pnd .AND. ln_icedH ) & |
---|
| 156 | & CALL ice_thd_pnd ! --- Melt ponds --- ! |
---|
| 157 | ! |
---|
| 158 | IF( jpl > 1 ) CALL ice_itd_rem( kt ) ! --- Transport ice between thickness categories --- ! |
---|
| 159 | ! |
---|
| 160 | IF( ln_icedO ) CALL ice_thd_do ! --- Frazil ice growth in leads --- ! |
---|
| 161 | ! |
---|
| 162 | CALL ice_cor( kt , 2 ) ! --- Corrections --- ! |
---|
| 163 | ! |
---|
| 164 | oa_i(:,:,:) = oa_i(:,:,:) + a_i(:,:,:) * rDt_ice ! --- Ice natural aging incrementation |
---|
| 165 | ! |
---|
| 166 | DO_2D( 0, 0, 0, 0 ) ! --- Ice velocity corrections |
---|
| 167 | IF( at_i(ji,jj) == 0._wp ) THEN ! if ice has melted |
---|
| 168 | IF( at_i(ji+1,jj) == 0._wp ) u_ice(ji ,jj) = 0._wp ! right side |
---|
| 169 | IF( at_i(ji-1,jj) == 0._wp ) u_ice(ji-1,jj) = 0._wp ! left side |
---|
| 170 | IF( at_i(ji,jj+1) == 0._wp ) v_ice(ji,jj ) = 0._wp ! upper side |
---|
| 171 | IF( at_i(ji,jj-1) == 0._wp ) v_ice(ji,jj-1) = 0._wp ! bottom side |
---|
| 172 | ENDIF |
---|
| 173 | END_2D |
---|
[15385] | 174 | CALL lbc_lnk( 'icethd', u_ice, 'U', -1.0_wp, v_ice, 'V', -1.0_wp ) |
---|
[15374] | 175 | ! |
---|
| 176 | ! convergence tests |
---|
| 177 | IF( ln_zdf_chkcvg ) THEN |
---|
| 178 | CALL iom_put( 'tice_cvgerr', ztice_cvgerr ) ; DEALLOCATE( ztice_cvgerr ) |
---|
| 179 | CALL iom_put( 'tice_cvgstp', ztice_cvgstp ) ; DEALLOCATE( ztice_cvgstp ) |
---|
| 180 | ENDIF |
---|
| 181 | ! |
---|
| 182 | ! controls |
---|
| 183 | IF( ln_icectl ) CALL ice_prt (kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ') ! prints |
---|
| 184 | IF( sn_cfctl%l_prtctl ) & |
---|
| 185 | & CALL ice_prt3D ('icethd') ! prints |
---|
| 186 | IF( ln_timing ) CALL timing_stop('icethd') ! timing |
---|
| 187 | ! |
---|
| 188 | END SUBROUTINE ice_thd |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | SUBROUTINE ice_thd_temp |
---|
| 192 | !!----------------------------------------------------------------------- |
---|
| 193 | !! *** ROUTINE ice_thd_temp *** |
---|
| 194 | !! |
---|
| 195 | !! ** Purpose : Computes sea ice temperature (Kelvin) from enthalpy |
---|
| 196 | !! |
---|
| 197 | !! ** Method : Formula (Bitz and Lipscomb, 1999) |
---|
| 198 | !!------------------------------------------------------------------- |
---|
| 199 | INTEGER :: ji, jk ! dummy loop indices |
---|
| 200 | REAL(wp) :: ztmelts, zbbb, zccc ! local scalar |
---|
| 201 | !!------------------------------------------------------------------- |
---|
| 202 | ! Recover ice temperature |
---|
| 203 | DO jk = 1, nlay_i |
---|
| 204 | DO ji = 1, npti |
---|
| 205 | ztmelts = -rTmlt * sz_i_1d(ji,jk) |
---|
| 206 | ! Conversion q(S,T) -> T (second order equation) |
---|
| 207 | zbbb = ( rcp - rcpi ) * ztmelts + e_i_1d(ji,jk) * r1_rhoi - rLfus |
---|
| 208 | zccc = SQRT( MAX( zbbb * zbbb - 4._wp * rcpi * rLfus * ztmelts, 0._wp ) ) |
---|
| 209 | t_i_1d(ji,jk) = rt0 - ( zbbb + zccc ) * 0.5_wp * r1_rcpi |
---|
| 210 | |
---|
| 211 | ! mask temperature |
---|
| 212 | rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - h_i_1d(ji) ) ) |
---|
| 213 | t_i_1d(ji,jk) = rswitch * t_i_1d(ji,jk) + ( 1._wp - rswitch ) * rt0 |
---|
| 214 | END DO |
---|
| 215 | END DO |
---|
| 216 | ! |
---|
| 217 | END SUBROUTINE ice_thd_temp |
---|
| 218 | |
---|
| 219 | |
---|
| 220 | SUBROUTINE ice_thd_mono |
---|
| 221 | !!----------------------------------------------------------------------- |
---|
| 222 | !! *** ROUTINE ice_thd_mono *** |
---|
| 223 | !! |
---|
| 224 | !! ** Purpose : Lateral melting in case virtual_itd |
---|
| 225 | !! ( dA = A/2h dh ) |
---|
| 226 | !!----------------------------------------------------------------------- |
---|
| 227 | INTEGER :: ji ! dummy loop indices |
---|
| 228 | REAL(wp) :: zhi_bef ! ice thickness before thermo |
---|
| 229 | REAL(wp) :: zdh_mel, zda_mel ! net melting |
---|
| 230 | REAL(wp) :: zvi, zvs ! ice/snow volumes |
---|
| 231 | !!----------------------------------------------------------------------- |
---|
| 232 | ! |
---|
| 233 | DO ji = 1, npti |
---|
| 234 | zdh_mel = MIN( 0._wp, dh_i_itm(ji) + dh_i_sum(ji) + dh_i_bom(ji) + dh_snowice(ji) + dh_i_sub(ji) ) |
---|
| 235 | IF( zdh_mel < 0._wp .AND. a_i_1d(ji) > 0._wp ) THEN |
---|
| 236 | zvi = a_i_1d(ji) * h_i_1d(ji) |
---|
| 237 | zvs = a_i_1d(ji) * h_s_1d(ji) |
---|
| 238 | ! lateral melting = concentration change |
---|
| 239 | zhi_bef = h_i_1d(ji) - zdh_mel |
---|
| 240 | rswitch = MAX( 0._wp , SIGN( 1._wp , zhi_bef - epsi20 ) ) |
---|
| 241 | zda_mel = rswitch * a_i_1d(ji) * zdh_mel / ( 2._wp * MAX( zhi_bef, epsi20 ) ) |
---|
| 242 | a_i_1d(ji) = MAX( epsi20, a_i_1d(ji) + zda_mel ) |
---|
| 243 | ! adjust thickness |
---|
| 244 | h_i_1d(ji) = zvi / a_i_1d(ji) |
---|
| 245 | h_s_1d(ji) = zvs / a_i_1d(ji) |
---|
| 246 | ! retrieve total concentration |
---|
| 247 | at_i_1d(ji) = a_i_1d(ji) |
---|
| 248 | END IF |
---|
| 249 | END DO |
---|
| 250 | ! |
---|
| 251 | END SUBROUTINE ice_thd_mono |
---|
| 252 | |
---|
[8586] | 253 | SUBROUTINE ice_thd_1d2d( kl, kn ) |
---|
| 254 | !!----------------------------------------------------------------------- |
---|
[14072] | 255 | !! *** ROUTINE ice_thd_1d2d *** |
---|
| 256 | !! |
---|
[8586] | 257 | !! ** Purpose : move arrays from 1d to 2d and the reverse |
---|
| 258 | !!----------------------------------------------------------------------- |
---|
[14072] | 259 | INTEGER, INTENT(in) :: kl ! index of the ice category |
---|
[8586] | 260 | INTEGER, INTENT(in) :: kn ! 1= from 2D to 1D ; 2= from 1D to 2D |
---|
| 261 | ! |
---|
| 262 | INTEGER :: jk ! dummy loop indices |
---|
| 263 | !!----------------------------------------------------------------------- |
---|
| 264 | ! |
---|
| 265 | SELECT CASE( kn ) |
---|
| 266 | ! !---------------------! |
---|
| 267 | CASE( 1 ) !== from 2D to 1D ==! |
---|
| 268 | ! !---------------------! |
---|
| 269 | CALL tab_2d_1d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i ) |
---|
| 270 | CALL tab_2d_1d( npti, nptidx(1:npti), a_i_1d (1:npti), a_i (:,:,kl) ) |
---|
[8637] | 271 | CALL tab_2d_1d( npti, nptidx(1:npti), h_i_1d (1:npti), h_i (:,:,kl) ) |
---|
| 272 | CALL tab_2d_1d( npti, nptidx(1:npti), h_s_1d (1:npti), h_s (:,:,kl) ) |
---|
[8586] | 273 | CALL tab_2d_1d( npti, nptidx(1:npti), t_su_1d(1:npti), t_su(:,:,kl) ) |
---|
[8637] | 274 | CALL tab_2d_1d( npti, nptidx(1:npti), s_i_1d (1:npti), s_i (:,:,kl) ) |
---|
[8586] | 275 | DO jk = 1, nlay_s |
---|
[8637] | 276 | CALL tab_2d_1d( npti, nptidx(1:npti), t_s_1d(1:npti,jk), t_s(:,:,jk,kl) ) |
---|
| 277 | CALL tab_2d_1d( npti, nptidx(1:npti), e_s_1d(1:npti,jk), e_s(:,:,jk,kl) ) |
---|
[8586] | 278 | END DO |
---|
| 279 | DO jk = 1, nlay_i |
---|
[8637] | 280 | CALL tab_2d_1d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,kl) ) |
---|
| 281 | CALL tab_2d_1d( npti, nptidx(1:npti), e_i_1d (1:npti,jk), e_i (:,:,jk,kl) ) |
---|
| 282 | CALL tab_2d_1d( npti, nptidx(1:npti), sz_i_1d(1:npti,jk), sz_i(:,:,jk,kl) ) |
---|
[8586] | 283 | END DO |
---|
| 284 | ! |
---|
[9910] | 285 | CALL tab_2d_1d( npti, nptidx(1:npti), qprec_ice_1d (1:npti), qprec_ice ) |
---|
| 286 | CALL tab_2d_1d( npti, nptidx(1:npti), qsr_ice_1d (1:npti), qsr_ice (:,:,kl) ) |
---|
| 287 | CALL tab_2d_1d( npti, nptidx(1:npti), qns_ice_1d (1:npti), qns_ice (:,:,kl) ) |
---|
| 288 | CALL tab_2d_1d( npti, nptidx(1:npti), evap_ice_1d (1:npti), evap_ice(:,:,kl) ) |
---|
| 289 | CALL tab_2d_1d( npti, nptidx(1:npti), dqns_ice_1d (1:npti), dqns_ice(:,:,kl) ) |
---|
| 290 | CALL tab_2d_1d( npti, nptidx(1:npti), t_bo_1d (1:npti), t_bo ) |
---|
[14072] | 291 | CALL tab_2d_1d( npti, nptidx(1:npti), sprecip_1d (1:npti), sprecip ) |
---|
[9913] | 292 | CALL tab_2d_1d( npti, nptidx(1:npti), qsb_ice_bot_1d(1:npti), qsb_ice_bot ) |
---|
[9910] | 293 | CALL tab_2d_1d( npti, nptidx(1:npti), fhld_1d (1:npti), fhld ) |
---|
[14072] | 294 | |
---|
[9910] | 295 | CALL tab_2d_1d( npti, nptidx(1:npti), qml_ice_1d (1:npti), qml_ice (:,:,kl) ) |
---|
| 296 | CALL tab_2d_1d( npti, nptidx(1:npti), qcn_ice_1d (1:npti), qcn_ice (:,:,kl) ) |
---|
| 297 | CALL tab_2d_1d( npti, nptidx(1:npti), qtr_ice_top_1d(1:npti), qtr_ice_top(:,:,kl) ) |
---|
[8586] | 298 | ! |
---|
| 299 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sni_1d(1:npti), wfx_snw_sni ) |
---|
| 300 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sum_1d(1:npti), wfx_snw_sum ) |
---|
| 301 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sub_1d (1:npti), wfx_sub ) |
---|
| 302 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sub_1d(1:npti), wfx_snw_sub ) |
---|
| 303 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_ice_sub_1d(1:npti), wfx_ice_sub ) |
---|
| 304 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_err_sub_1d(1:npti), wfx_err_sub ) |
---|
| 305 | ! |
---|
| 306 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_bog_1d (1:npti), wfx_bog ) |
---|
| 307 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_bom_1d (1:npti), wfx_bom ) |
---|
| 308 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sum_1d (1:npti), wfx_sum ) |
---|
| 309 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sni_1d (1:npti), wfx_sni ) |
---|
| 310 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_res_1d (1:npti), wfx_res ) |
---|
| 311 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_spr_1d (1:npti), wfx_spr ) |
---|
| 312 | CALL tab_2d_1d( npti, nptidx(1:npti), wfx_lam_1d (1:npti), wfx_lam ) |
---|
| 313 | ! |
---|
| 314 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bog_1d (1:npti), sfx_bog ) |
---|
| 315 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bom_1d (1:npti), sfx_bom ) |
---|
| 316 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sum_1d (1:npti), sfx_sum ) |
---|
| 317 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sni_1d (1:npti), sfx_sni ) |
---|
| 318 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bri_1d (1:npti), sfx_bri ) |
---|
| 319 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_res_1d (1:npti), sfx_res ) |
---|
| 320 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sub_1d (1:npti), sfx_sub ) |
---|
| 321 | CALL tab_2d_1d( npti, nptidx(1:npti), sfx_lam_1d (1:npti), sfx_lam ) |
---|
| 322 | ! |
---|
[9910] | 323 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_thd_1d (1:npti), hfx_thd ) |
---|
| 324 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_spr_1d (1:npti), hfx_spr ) |
---|
| 325 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_sum_1d (1:npti), hfx_sum ) |
---|
| 326 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_bom_1d (1:npti), hfx_bom ) |
---|
| 327 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_bog_1d (1:npti), hfx_bog ) |
---|
| 328 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_dif_1d (1:npti), hfx_dif ) |
---|
| 329 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_opw_1d (1:npti), hfx_opw ) |
---|
| 330 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_snw_1d (1:npti), hfx_snw ) |
---|
| 331 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_sub_1d (1:npti), hfx_sub ) |
---|
| 332 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_res_1d (1:npti), hfx_res ) |
---|
[8586] | 333 | CALL tab_2d_1d( npti, nptidx(1:npti), hfx_err_dif_1d(1:npti), hfx_err_dif ) |
---|
| 334 | ! |
---|
| 335 | ! ocean surface fields |
---|
| 336 | CALL tab_2d_1d( npti, nptidx(1:npti), sst_1d(1:npti), sst_m ) |
---|
| 337 | CALL tab_2d_1d( npti, nptidx(1:npti), sss_1d(1:npti), sss_m ) |
---|
[13643] | 338 | CALL tab_2d_1d( npti, nptidx(1:npti), frq_m_1d(1:npti), frq_m ) |
---|
[10786] | 339 | ! |
---|
| 340 | ! to update ice age |
---|
| 341 | CALL tab_2d_1d( npti, nptidx(1:npti), o_i_1d (1:npti), o_i (:,:,kl) ) |
---|
| 342 | CALL tab_2d_1d( npti, nptidx(1:npti), oa_i_1d(1:npti), oa_i(:,:,kl) ) |
---|
| 343 | ! |
---|
[8586] | 344 | ! --- Change units of e_i, e_s from J/m2 to J/m3 --- ! |
---|
| 345 | DO jk = 1, nlay_i |
---|
| 346 | 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 |
---|
| 347 | END DO |
---|
| 348 | DO jk = 1, nlay_s |
---|
| 349 | 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 |
---|
| 350 | END DO |
---|
| 351 | ! |
---|
| 352 | ! !---------------------! |
---|
| 353 | CASE( 2 ) !== from 1D to 2D ==! |
---|
| 354 | ! !---------------------! |
---|
| 355 | ! --- Change units of e_i, e_s from J/m3 to J/m2 --- ! |
---|
| 356 | DO jk = 1, nlay_i |
---|
| 357 | 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 |
---|
| 358 | END DO |
---|
| 359 | DO jk = 1, nlay_s |
---|
| 360 | 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 |
---|
| 361 | END DO |
---|
| 362 | ! |
---|
| 363 | ! Change thickness to volume (replaces routine ice_var_eqv2glo) |
---|
[8637] | 364 | v_i_1d (1:npti) = h_i_1d (1:npti) * a_i_1d (1:npti) |
---|
| 365 | v_s_1d (1:npti) = h_s_1d (1:npti) * a_i_1d (1:npti) |
---|
| 366 | sv_i_1d(1:npti) = s_i_1d (1:npti) * v_i_1d (1:npti) |
---|
[10786] | 367 | oa_i_1d(1:npti) = o_i_1d (1:npti) * a_i_1d (1:npti) |
---|
[14072] | 368 | |
---|
[8586] | 369 | CALL tab_1d_2d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i ) |
---|
| 370 | CALL tab_1d_2d( npti, nptidx(1:npti), a_i_1d (1:npti), a_i (:,:,kl) ) |
---|
[8637] | 371 | CALL tab_1d_2d( npti, nptidx(1:npti), h_i_1d (1:npti), h_i (:,:,kl) ) |
---|
| 372 | CALL tab_1d_2d( npti, nptidx(1:npti), h_s_1d (1:npti), h_s (:,:,kl) ) |
---|
[8586] | 373 | CALL tab_1d_2d( npti, nptidx(1:npti), t_su_1d(1:npti), t_su(:,:,kl) ) |
---|
[8637] | 374 | CALL tab_1d_2d( npti, nptidx(1:npti), s_i_1d (1:npti), s_i (:,:,kl) ) |
---|
[8586] | 375 | DO jk = 1, nlay_s |
---|
[8637] | 376 | CALL tab_1d_2d( npti, nptidx(1:npti), t_s_1d(1:npti,jk), t_s(:,:,jk,kl) ) |
---|
| 377 | CALL tab_1d_2d( npti, nptidx(1:npti), e_s_1d(1:npti,jk), e_s(:,:,jk,kl) ) |
---|
[8586] | 378 | END DO |
---|
| 379 | DO jk = 1, nlay_i |
---|
[8637] | 380 | CALL tab_1d_2d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,kl) ) |
---|
| 381 | CALL tab_1d_2d( npti, nptidx(1:npti), e_i_1d (1:npti,jk), e_i (:,:,jk,kl) ) |
---|
| 382 | CALL tab_1d_2d( npti, nptidx(1:npti), sz_i_1d(1:npti,jk), sz_i(:,:,jk,kl) ) |
---|
[8586] | 383 | END DO |
---|
| 384 | ! |
---|
| 385 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sni_1d(1:npti), wfx_snw_sni ) |
---|
| 386 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sum_1d(1:npti), wfx_snw_sum ) |
---|
| 387 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sub_1d (1:npti), wfx_sub ) |
---|
| 388 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sub_1d(1:npti), wfx_snw_sub ) |
---|
| 389 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_ice_sub_1d(1:npti), wfx_ice_sub ) |
---|
| 390 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_err_sub_1d(1:npti), wfx_err_sub ) |
---|
| 391 | ! |
---|
| 392 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_bog_1d (1:npti), wfx_bog ) |
---|
| 393 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_bom_1d (1:npti), wfx_bom ) |
---|
| 394 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sum_1d (1:npti), wfx_sum ) |
---|
| 395 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sni_1d (1:npti), wfx_sni ) |
---|
| 396 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_res_1d (1:npti), wfx_res ) |
---|
| 397 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_spr_1d (1:npti), wfx_spr ) |
---|
| 398 | CALL tab_1d_2d( npti, nptidx(1:npti), wfx_lam_1d (1:npti), wfx_lam ) |
---|
| 399 | ! |
---|
| 400 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bog_1d (1:npti), sfx_bog ) |
---|
| 401 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bom_1d (1:npti), sfx_bom ) |
---|
| 402 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sum_1d (1:npti), sfx_sum ) |
---|
| 403 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sni_1d (1:npti), sfx_sni ) |
---|
| 404 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bri_1d (1:npti), sfx_bri ) |
---|
| 405 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_res_1d (1:npti), sfx_res ) |
---|
| 406 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sub_1d (1:npti), sfx_sub ) |
---|
| 407 | CALL tab_1d_2d( npti, nptidx(1:npti), sfx_lam_1d (1:npti), sfx_lam ) |
---|
| 408 | ! |
---|
[9912] | 409 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_thd_1d (1:npti), hfx_thd ) |
---|
| 410 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_spr_1d (1:npti), hfx_spr ) |
---|
| 411 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_sum_1d (1:npti), hfx_sum ) |
---|
| 412 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_bom_1d (1:npti), hfx_bom ) |
---|
| 413 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_bog_1d (1:npti), hfx_bog ) |
---|
| 414 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_dif_1d (1:npti), hfx_dif ) |
---|
| 415 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_opw_1d (1:npti), hfx_opw ) |
---|
| 416 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_snw_1d (1:npti), hfx_snw ) |
---|
| 417 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_sub_1d (1:npti), hfx_sub ) |
---|
| 418 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_res_1d (1:npti), hfx_res ) |
---|
[8586] | 419 | CALL tab_1d_2d( npti, nptidx(1:npti), hfx_err_dif_1d(1:npti), hfx_err_dif ) |
---|
| 420 | ! |
---|
[9910] | 421 | CALL tab_1d_2d( npti, nptidx(1:npti), qns_ice_1d (1:npti), qns_ice (:,:,kl) ) |
---|
| 422 | CALL tab_1d_2d( npti, nptidx(1:npti), qtr_ice_bot_1d(1:npti), qtr_ice_bot(:,:,kl) ) |
---|
[10534] | 423 | ! effective conductivity and 1st layer temperature (ln_cndflx=T) |
---|
[8933] | 424 | CALL tab_1d_2d( npti, nptidx(1:npti), cnd_ice_1d(1:npti), cnd_ice(:,:,kl) ) |
---|
| 425 | CALL tab_1d_2d( npti, nptidx(1:npti), t1_ice_1d (1:npti), t1_ice (:,:,kl) ) |
---|
[14005] | 426 | ! Melt ponds |
---|
| 427 | CALL tab_1d_2d( npti, nptidx(1:npti), dh_i_sum (1:npti) , dh_i_sum_2d(:,:,kl) ) |
---|
| 428 | CALL tab_1d_2d( npti, nptidx(1:npti), dh_s_mlt (1:npti) , dh_s_mlt_2d(:,:,kl) ) |
---|
[14072] | 429 | ! SIMIP diagnostics |
---|
[9916] | 430 | CALL tab_1d_2d( npti, nptidx(1:npti), t_si_1d (1:npti), t_si (:,:,kl) ) |
---|
| 431 | CALL tab_1d_2d( npti, nptidx(1:npti), qcn_ice_bot_1d(1:npti), qcn_ice_bot(:,:,kl) ) |
---|
| 432 | CALL tab_1d_2d( npti, nptidx(1:npti), qcn_ice_top_1d(1:npti), qcn_ice_top(:,:,kl) ) |
---|
[14886] | 433 | CALL tab_1d_2d( npti, nptidx(1:npti), qml_ice_1d (1:npti), qml_ice (:,:,kl) ) |
---|
[8586] | 434 | ! extensive variables |
---|
| 435 | CALL tab_1d_2d( npti, nptidx(1:npti), v_i_1d (1:npti), v_i (:,:,kl) ) |
---|
| 436 | CALL tab_1d_2d( npti, nptidx(1:npti), v_s_1d (1:npti), v_s (:,:,kl) ) |
---|
| 437 | CALL tab_1d_2d( npti, nptidx(1:npti), sv_i_1d(1:npti), sv_i(:,:,kl) ) |
---|
[10786] | 438 | CALL tab_1d_2d( npti, nptidx(1:npti), oa_i_1d(1:npti), oa_i(:,:,kl) ) |
---|
[13472] | 439 | ! check convergence of heat diffusion scheme |
---|
| 440 | IF( ln_zdf_chkcvg ) THEN |
---|
| 441 | CALL tab_1d_2d( npti, nptidx(1:npti), tice_cvgerr_1d(1:npti), ztice_cvgerr(:,:,kl) ) |
---|
| 442 | CALL tab_1d_2d( npti, nptidx(1:npti), tice_cvgstp_1d(1:npti), ztice_cvgstp(:,:,kl) ) |
---|
| 443 | ENDIF |
---|
[8586] | 444 | ! |
---|
| 445 | END SELECT |
---|
| 446 | ! |
---|
| 447 | END SUBROUTINE ice_thd_1d2d |
---|
| 448 | |
---|
| 449 | |
---|
| 450 | SUBROUTINE ice_thd_init |
---|
[8637] | 451 | !!------------------------------------------------------------------- |
---|
[14072] | 452 | !! *** ROUTINE ice_thd_init *** |
---|
| 453 | !! |
---|
[8586] | 454 | !! ** Purpose : Physical constants and parameters associated with |
---|
| 455 | !! ice thermodynamics |
---|
| 456 | !! |
---|
| 457 | !! ** Method : Read the namthd namelist and check the parameters |
---|
| 458 | !! called at the first timestep (nit000) |
---|
| 459 | !! |
---|
| 460 | !! ** input : Namelist namthd |
---|
| 461 | !!------------------------------------------------------------------- |
---|
| 462 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 463 | !! |
---|
[13472] | 464 | NAMELIST/namthd/ ln_icedH, ln_icedA, ln_icedO, ln_icedS, ln_leadhfx |
---|
[8586] | 465 | !!------------------------------------------------------------------- |
---|
| 466 | ! |
---|
| 467 | READ ( numnam_ice_ref, namthd, IOSTAT = ios, ERR = 901) |
---|
[11536] | 468 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in reference namelist' ) |
---|
[8586] | 469 | READ ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 ) |
---|
[11536] | 470 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namthd in configuration namelist' ) |
---|
[9169] | 471 | IF(lwm) WRITE( numoni, namthd ) |
---|
[8586] | 472 | ! |
---|
| 473 | IF(lwp) THEN ! control print |
---|
[9169] | 474 | WRITE(numout,*) |
---|
[8586] | 475 | WRITE(numout,*) 'ice_thd_init: Ice Thermodynamics' |
---|
| 476 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
| 477 | WRITE(numout,*) ' Namelist namthd:' |
---|
[13472] | 478 | WRITE(numout,*) ' activate ice thick change from top/bot (T) or not (F) ln_icedH = ', ln_icedH |
---|
| 479 | WRITE(numout,*) ' activate lateral melting (T) or not (F) ln_icedA = ', ln_icedA |
---|
| 480 | WRITE(numout,*) ' activate ice growth in open-water (T) or not (F) ln_icedO = ', ln_icedO |
---|
| 481 | WRITE(numout,*) ' activate gravity drainage and flushing (T) or not (F) ln_icedS = ', ln_icedS |
---|
| 482 | WRITE(numout,*) ' heat in the leads is used to melt sea-ice before warming the ocean ln_leadhfx = ', ln_leadhfx |
---|
[8586] | 483 | ENDIF |
---|
| 484 | ! |
---|
| 485 | CALL ice_thd_zdf_init ! set ice heat diffusion parameters |
---|
| 486 | IF( ln_icedA ) CALL ice_thd_da_init ! set ice lateral melting parameters |
---|
| 487 | IF( ln_icedO ) CALL ice_thd_do_init ! set ice growth in open water parameters |
---|
| 488 | CALL ice_thd_sal_init ! set ice salinity parameters |
---|
[8637] | 489 | CALL ice_thd_pnd_init ! set melt ponds parameters |
---|
[8586] | 490 | ! |
---|
| 491 | END SUBROUTINE ice_thd_init |
---|
| 492 | |
---|
| 493 | #else |
---|
| 494 | !!---------------------------------------------------------------------- |
---|
[9570] | 495 | !! Default option Dummy module NO SI3 sea-ice model |
---|
[8586] | 496 | !!---------------------------------------------------------------------- |
---|
| 497 | #endif |
---|
| 498 | |
---|
| 499 | !!====================================================================== |
---|
| 500 | END MODULE icethd |
---|