[8586] | 1 | MODULE icedyn |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE icedyn *** |
---|
| 4 | !! Sea-Ice dynamics : master routine for sea ice dynamics |
---|
| 5 | !!====================================================================== |
---|
[9604] | 6 | !! history : 4.0 ! 2018 (C. Rousset) original code SI3 [aka Sea Ice cube] |
---|
[8586] | 7 | !!---------------------------------------------------------------------- |
---|
[9570] | 8 | #if defined key_si3 |
---|
[8586] | 9 | !!---------------------------------------------------------------------- |
---|
[9570] | 10 | !! 'key_si3' SI3 sea-ice model |
---|
[8586] | 11 | !!---------------------------------------------------------------------- |
---|
| 12 | !! ice_dyn : dynamics of sea ice |
---|
| 13 | !! ice_dyn_init : initialization and namelist read |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | USE phycst ! physical constants |
---|
| 16 | USE dom_oce ! ocean space and time domain |
---|
| 17 | USE ice ! sea-ice: variables |
---|
| 18 | USE icedyn_rhg ! sea-ice: rheology |
---|
| 19 | USE icedyn_adv ! sea-ice: advection |
---|
| 20 | USE icedyn_rdgrft ! sea-ice: ridging/rafting |
---|
| 21 | USE icecor ! sea-ice: corrections |
---|
| 22 | USE icevar ! sea-ice: operations |
---|
| 23 | ! |
---|
| 24 | USE in_out_manager ! I/O manager |
---|
| 25 | USE iom ! I/O manager library |
---|
| 26 | USE lib_mpp ! MPP library |
---|
| 27 | USE lib_fortran ! fortran utilities (glob_sum + no signed zero) |
---|
| 28 | USE lbclnk ! lateral boundary conditions (or mpp links) |
---|
| 29 | USE timing ! Timing |
---|
| 30 | |
---|
| 31 | IMPLICIT NONE |
---|
| 32 | PRIVATE |
---|
| 33 | |
---|
| 34 | PUBLIC ice_dyn ! called by icestp.F90 |
---|
| 35 | PUBLIC ice_dyn_init ! called by icestp.F90 |
---|
| 36 | |
---|
| 37 | INTEGER :: nice_dyn ! choice of the type of dynamics |
---|
| 38 | ! ! associated indices: |
---|
| 39 | INTEGER, PARAMETER :: np_dynFULL = 1 ! full ice dynamics (rheology + advection + ridging/rafting + correction) |
---|
[9076] | 40 | INTEGER, PARAMETER :: np_dynRHGADV = 2 ! pure dynamics (rheology + advection) |
---|
| 41 | INTEGER, PARAMETER :: np_dynADV = 3 ! only advection w prescribed vel.(rn_uvice + advection) |
---|
[8586] | 42 | ! |
---|
| 43 | ! ** namelist (namdyn) ** |
---|
| 44 | LOGICAL :: ln_dynFULL ! full ice dynamics (rheology + advection + ridging/rafting + correction) |
---|
| 45 | LOGICAL :: ln_dynRHGADV ! no ridge/raft & no corrections (rheology + advection) |
---|
| 46 | LOGICAL :: ln_dynADV ! only advection w prescribed vel.(rn_uvice + advection) |
---|
| 47 | REAL(wp) :: rn_uice ! prescribed u-vel (case np_dynADV) |
---|
| 48 | REAL(wp) :: rn_vice ! prescribed v-vel (case np_dynADV) |
---|
| 49 | |
---|
| 50 | !! * Substitutions |
---|
| 51 | # include "vectopt_loop_substitute.h90" |
---|
| 52 | !!---------------------------------------------------------------------- |
---|
[9598] | 53 | !! NEMO/ICE 4.0 , NEMO Consortium (2018) |
---|
[9950] | 54 | !! $Id$ |
---|
[10321] | 55 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[8586] | 56 | !!---------------------------------------------------------------------- |
---|
| 57 | CONTAINS |
---|
| 58 | |
---|
| 59 | SUBROUTINE ice_dyn( kt ) |
---|
| 60 | !!------------------------------------------------------------------- |
---|
| 61 | !! *** ROUTINE ice_dyn *** |
---|
| 62 | !! |
---|
| 63 | !! ** Purpose : this routine manages sea ice dynamics |
---|
| 64 | !! |
---|
[9604] | 65 | !! ** Action : - calculation of friction in case of landfast ice |
---|
| 66 | !! - call ice_dyn_rhg = rheology |
---|
| 67 | !! - call ice_dyn_adv = advection |
---|
| 68 | !! - call ice_dyn_rdgrft = ridging/rafting |
---|
| 69 | !! - call ice_cor = corrections if fields are out of bounds |
---|
[8586] | 70 | !!-------------------------------------------------------------------- |
---|
| 71 | INTEGER, INTENT(in) :: kt ! ice time step |
---|
| 72 | !! |
---|
| 73 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
| 74 | REAL(wp), DIMENSION(jpi,jpj,jpl) :: zhmax |
---|
| 75 | !!-------------------------------------------------------------------- |
---|
| 76 | ! |
---|
[9124] | 77 | IF( ln_timing ) CALL timing_start('icedyn') |
---|
[8586] | 78 | ! |
---|
| 79 | IF( kt == nit000 .AND. lwp ) THEN |
---|
| 80 | WRITE(numout,*) |
---|
| 81 | WRITE(numout,*)'ice_dyn: sea-ice dynamics' |
---|
| 82 | WRITE(numout,*)'~~~~~~~' |
---|
| 83 | ENDIF |
---|
| 84 | |
---|
| 85 | ! |
---|
| 86 | IF( ln_landfast ) THEN !-- Landfast ice parameterization: define max bottom friction |
---|
| 87 | tau_icebfr(:,:) = 0._wp |
---|
| 88 | DO jl = 1, jpl |
---|
| 89 | WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_gamma ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr |
---|
| 90 | END DO |
---|
| 91 | IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr ) |
---|
| 92 | ENDIF |
---|
| 93 | |
---|
| 94 | zhmax(:,:,:) = h_i_b(:,:,:) !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig) |
---|
| 95 | DO jl = 1, jpl |
---|
| 96 | DO jj = 2, jpjm1 |
---|
| 97 | DO ji = 2, jpim1 |
---|
| 98 | !!gm use of MAXVAL here is very probably less efficient than expending the 9 values |
---|
| 99 | zhmax(ji,jj,jl) = MAX( epsi20, MAXVAL( h_i_b(ji-1:ji+1,jj-1:jj+1,jl) ) ) |
---|
| 100 | END DO |
---|
| 101 | END DO |
---|
| 102 | END DO |
---|
| 103 | CALL lbc_lnk( zhmax(:,:,:), 'T', 1. ) |
---|
| 104 | ! |
---|
| 105 | ! |
---|
| 106 | SELECT CASE( nice_dyn ) !-- Set which dynamics is running |
---|
| 107 | |
---|
| 108 | CASE ( np_dynFULL ) !== all dynamical processes ==! |
---|
| 109 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
| 110 | CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhmax ) ! -- advection of ice + correction on ice thickness |
---|
| 111 | CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting |
---|
| 112 | CALL ice_cor ( kt , 1 ) ! -- Corrections |
---|
| 113 | |
---|
[9076] | 114 | CASE ( np_dynRHGADV ) !== no ridge/raft & no corrections ==! |
---|
[8586] | 115 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
| 116 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
| 117 | CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) |
---|
| 118 | |
---|
| 119 | CASE ( np_dynADV ) !== pure advection ==! (prescribed velocities) |
---|
| 120 | u_ice(:,:) = rn_uice * umask(:,:,1) |
---|
| 121 | v_ice(:,:) = rn_vice * vmask(:,:,1) |
---|
| 122 | !!CALL RANDOM_NUMBER(u_ice(:,:)) |
---|
| 123 | !!CALL RANDOM_NUMBER(v_ice(:,:)) |
---|
| 124 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
| 125 | |
---|
| 126 | END SELECT |
---|
| 127 | ! |
---|
[9124] | 128 | IF( ln_timing ) CALL timing_stop('icedyn') |
---|
[8586] | 129 | ! |
---|
| 130 | END SUBROUTINE ice_dyn |
---|
| 131 | |
---|
[9124] | 132 | |
---|
[8586] | 133 | SUBROUTINE Hbig( phmax ) |
---|
| 134 | !!------------------------------------------------------------------- |
---|
| 135 | !! *** ROUTINE Hbig *** |
---|
| 136 | !! |
---|
| 137 | !! ** Purpose : Thickness correction in case advection scheme creates |
---|
| 138 | !! abnormally tick ice |
---|
| 139 | !! |
---|
| 140 | !! ** Method : 1- check whether ice thickness resulting from advection is |
---|
| 141 | !! larger than the surrounding 9-points before advection |
---|
| 142 | !! and reduce it if a) divergence or b) convergence & at_i>0.8 |
---|
| 143 | !! 2- bound ice thickness with hi_max (99m) |
---|
| 144 | !! |
---|
| 145 | !! ** input : Max thickness of the surrounding 9-points |
---|
| 146 | !!------------------------------------------------------------------- |
---|
| 147 | REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phmax ! max ice thick from surrounding 9-pts |
---|
| 148 | ! |
---|
| 149 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
| 150 | REAL(wp) :: zh, zdv |
---|
| 151 | !!------------------------------------------------------------------- |
---|
| 152 | ! |
---|
| 153 | CALL ice_var_zapsmall !-- zap small areas |
---|
| 154 | ! |
---|
| 155 | DO jl = 1, jpl |
---|
| 156 | DO jj = 1, jpj |
---|
| 157 | DO ji = 1, jpi |
---|
| 158 | IF ( v_i(ji,jj,jl) > 0._wp ) THEN !-- bound to hmax |
---|
| 159 | ! |
---|
| 160 | zh = v_i (ji,jj,jl) / a_i(ji,jj,jl) |
---|
| 161 | zdv = v_i(ji,jj,jl) - v_i_b(ji,jj,jl) |
---|
| 162 | ! |
---|
| 163 | IF ( ( zdv > 0.0 .AND. zh > phmax(ji,jj,jl) .AND. at_i_b(ji,jj) < 0.80 ) .OR. & |
---|
| 164 | & ( zdv <= 0.0 .AND. zh > phmax(ji,jj,jl) ) ) THEN |
---|
| 165 | a_i (ji,jj,jl) = v_i(ji,jj,jl) / MIN( phmax(ji,jj,jl), hi_max(jpl) ) !-- bound h_i to hi_max (99 m) |
---|
| 166 | ENDIF |
---|
| 167 | ! |
---|
| 168 | ENDIF |
---|
| 169 | END DO |
---|
| 170 | END DO |
---|
[8637] | 171 | END DO |
---|
| 172 | ! !-- correct pond fraction to avoid a_ip > a_i |
---|
| 173 | WHERE( a_ip(:,:,:) > a_i(:,:,:) ) a_ip(:,:,:) = a_i(:,:,:) |
---|
[8586] | 174 | ! |
---|
| 175 | END SUBROUTINE Hbig |
---|
| 176 | |
---|
[9124] | 177 | |
---|
[8586] | 178 | SUBROUTINE Hpiling |
---|
| 179 | !!------------------------------------------------------------------- |
---|
| 180 | !! *** ROUTINE Hpiling *** |
---|
| 181 | !! |
---|
| 182 | !! ** Purpose : Simple conservative piling comparable with 1-cat models |
---|
| 183 | !! |
---|
| 184 | !! ** Method : pile-up ice when no ridging/rafting |
---|
| 185 | !! |
---|
| 186 | !! ** input : a_i |
---|
| 187 | !!------------------------------------------------------------------- |
---|
| 188 | INTEGER :: jl ! dummy loop indices |
---|
| 189 | !!------------------------------------------------------------------- |
---|
| 190 | ! |
---|
| 191 | CALL ice_var_zapsmall !-- zap small areas |
---|
| 192 | ! |
---|
| 193 | at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) |
---|
| 194 | DO jl = 1, jpl |
---|
| 195 | WHERE( at_i(:,:) > epsi20 ) |
---|
| 196 | a_i(:,:,jl) = a_i(:,:,jl) * ( 1._wp + MIN( rn_amax_2d(:,:) - at_i(:,:) , 0._wp ) / at_i(:,:) ) |
---|
| 197 | END WHERE |
---|
| 198 | END DO |
---|
| 199 | ! |
---|
| 200 | END SUBROUTINE Hpiling |
---|
| 201 | |
---|
[8637] | 202 | |
---|
[8586] | 203 | SUBROUTINE ice_dyn_init |
---|
| 204 | !!------------------------------------------------------------------- |
---|
| 205 | !! *** ROUTINE ice_dyn_init *** |
---|
| 206 | !! |
---|
| 207 | !! ** Purpose : Physical constants and parameters linked to the ice |
---|
| 208 | !! dynamics |
---|
| 209 | !! |
---|
| 210 | !! ** Method : Read the namdyn namelist and check the ice-dynamic |
---|
| 211 | !! parameter values called at the first timestep (nit000) |
---|
| 212 | !! |
---|
| 213 | !! ** input : Namelist namdyn |
---|
| 214 | !!------------------------------------------------------------------- |
---|
| 215 | INTEGER :: ios, ioptio ! Local integer output status for namelist read |
---|
| 216 | !! |
---|
| 217 | NAMELIST/namdyn/ ln_dynFULL, ln_dynRHGADV, ln_dynADV, rn_uice, rn_vice, & |
---|
| 218 | & rn_ishlat , & |
---|
| 219 | & ln_landfast, rn_gamma , rn_icebfr, rn_lfrelax |
---|
| 220 | !!------------------------------------------------------------------- |
---|
| 221 | ! |
---|
| 222 | REWIND( numnam_ice_ref ) ! Namelist namdyn in reference namelist : Ice dynamics |
---|
| 223 | READ ( numnam_ice_ref, namdyn, IOSTAT = ios, ERR = 901) |
---|
[9169] | 224 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn in reference namelist', lwp ) |
---|
[8586] | 225 | REWIND( numnam_ice_cfg ) ! Namelist namdyn in configuration namelist : Ice dynamics |
---|
| 226 | READ ( numnam_ice_cfg, namdyn, IOSTAT = ios, ERR = 902 ) |
---|
[9169] | 227 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn in configuration namelist', lwp ) |
---|
| 228 | IF(lwm) WRITE( numoni, namdyn ) |
---|
[8586] | 229 | ! |
---|
| 230 | IF(lwp) THEN ! control print |
---|
| 231 | WRITE(numout,*) |
---|
| 232 | WRITE(numout,*) 'ice_dyn_init: ice parameters for ice dynamics ' |
---|
| 233 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
| 234 | WRITE(numout,*) ' Namelist namdyn:' |
---|
| 235 | WRITE(numout,*) ' Full ice dynamics (rhg + adv + ridge/raft + corr) ln_dynFULL = ', ln_dynFULL |
---|
| 236 | WRITE(numout,*) ' No ridge/raft & No cor (rhg + adv) ln_dynRHGADV = ', ln_dynRHGADV |
---|
| 237 | WRITE(numout,*) ' Advection only (rn_uvice + adv) ln_dynADV = ', ln_dynADV |
---|
[9169] | 238 | WRITE(numout,*) ' with prescribed velocity given by (u,v)_ice = (rn_uice,rn_vice) = (', rn_uice,',', rn_vice,')' |
---|
[8586] | 239 | WRITE(numout,*) ' lateral boundary condition for sea ice dynamics rn_ishlat = ', rn_ishlat |
---|
| 240 | WRITE(numout,*) ' Landfast: param (T or F) ln_landfast = ', ln_landfast |
---|
| 241 | WRITE(numout,*) ' fraction of ocean depth that ice must reach rn_gamma = ', rn_gamma |
---|
| 242 | WRITE(numout,*) ' maximum bottom stress per unit area of contact rn_icebfr = ', rn_icebfr |
---|
| 243 | WRITE(numout,*) ' relax time scale (s-1) to reach static friction rn_lfrelax = ', rn_lfrelax |
---|
[9169] | 244 | WRITE(numout,*) |
---|
[8586] | 245 | ENDIF |
---|
| 246 | ! !== set the choice of ice dynamics ==! |
---|
| 247 | ioptio = 0 |
---|
| 248 | ! !--- full dynamics (rheology + advection + ridging/rafting + correction) |
---|
[9076] | 249 | IF( ln_dynFULL ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynFULL ; ENDIF |
---|
[8586] | 250 | ! !--- dynamics without ridging/rafting and corr (rheology + advection) |
---|
[9076] | 251 | IF( ln_dynRHGADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynRHGADV ; ENDIF |
---|
[8586] | 252 | ! !--- advection only with prescribed ice velocities (from namelist) |
---|
[9076] | 253 | IF( ln_dynADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynADV ; ENDIF |
---|
[8586] | 254 | ! |
---|
| 255 | IF( ioptio /= 1 ) CALL ctl_stop( 'ice_dyn_init: one and only one ice dynamics option has to be defined ' ) |
---|
| 256 | ! |
---|
| 257 | ! !--- Lateral boundary conditions |
---|
| 258 | IF ( rn_ishlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral free-slip' |
---|
| 259 | ELSEIF ( rn_ishlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral no-slip' |
---|
| 260 | ELSEIF ( 0. < rn_ishlat .AND. rn_ishlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral partial-slip' |
---|
| 261 | ELSEIF ( 2. < rn_ishlat ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral strong-slip' |
---|
| 262 | ENDIF |
---|
| 263 | ! !--- NO Landfast ice : set to zero once for all |
---|
[9169] | 264 | IF( .NOT.ln_landfast ) tau_icebfr(:,:) = 0._wp |
---|
[8586] | 265 | ! |
---|
| 266 | CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters |
---|
| 267 | CALL ice_dyn_rhg_init ! set ice rheology parameters |
---|
| 268 | CALL ice_dyn_adv_init ! set ice advection parameters |
---|
| 269 | ! |
---|
| 270 | END SUBROUTINE ice_dyn_init |
---|
| 271 | |
---|
| 272 | #else |
---|
| 273 | !!---------------------------------------------------------------------- |
---|
[9570] | 274 | !! Default option Empty module NO SI3 sea-ice model |
---|
[8586] | 275 | !!---------------------------------------------------------------------- |
---|
| 276 | #endif |
---|
| 277 | |
---|
| 278 | !!====================================================================== |
---|
| 279 | END MODULE icedyn |
---|