[825] | 1 | MODULE iceini |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE iceini *** |
---|
| 4 | !! Sea-ice model : LIM Sea ice model Initialization |
---|
| 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : 3.0 ! 2008-03 (M. Vancoppenolle) LIM-3 original code |
---|
| 7 | !! 3.3 ! 2010-12 (G. Madec) add call to lim_thd_init and lim_thd_sal_init |
---|
[2715] | 8 | !! 4.0 ! 2011-02 (G. Madec) dynamical allocation |
---|
[2528] | 9 | !!---------------------------------------------------------------------- |
---|
[825] | 10 | #if defined key_lim3 |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
[3625] | 12 | !! 'key_lim3' LIM sea-ice model |
---|
[825] | 13 | !!---------------------------------------------------------------------- |
---|
[3625] | 14 | !! ice_init : sea-ice model initialization |
---|
[825] | 15 | !!---------------------------------------------------------------------- |
---|
[3625] | 16 | USE phycst ! physical constants |
---|
| 17 | USE dom_oce ! ocean domain |
---|
| 18 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 19 | USE sbc_ice ! Surface boundary condition: ice fields |
---|
| 20 | USE ice ! LIM variables |
---|
| 21 | USE par_ice ! LIM parameters |
---|
| 22 | USE dom_ice ! LIM domain |
---|
| 23 | USE thd_ice ! LIM thermodynamical variables |
---|
| 24 | USE limitd_me ! LIM ice thickness distribution |
---|
| 25 | USE limmsh ! LIM mesh |
---|
| 26 | USE limistate ! LIM initial state |
---|
| 27 | USE limrst ! LIM restart |
---|
| 28 | USE limthd ! LIM ice thermodynamics |
---|
| 29 | USE limthd_sal ! LIM ice thermodynamics: salinity |
---|
| 30 | USE limvar ! LIM variables |
---|
| 31 | USE limsbc ! LIM surface boundary condition |
---|
| 32 | USE in_out_manager ! I/O manager |
---|
| 33 | USE lib_mpp ! MPP library |
---|
| 34 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[825] | 35 | |
---|
| 36 | IMPLICIT NONE |
---|
| 37 | PRIVATE |
---|
| 38 | |
---|
[2715] | 39 | PUBLIC ice_init ! called by sbcice_lim.F90 |
---|
[2528] | 40 | |
---|
[825] | 41 | !!---------------------------------------------------------------------- |
---|
[3625] | 42 | !! NEMO/LIM3 3.4 , UCL - NEMO Consortium (2011) |
---|
[1156] | 43 | !! $Id$ |
---|
[2528] | 44 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[825] | 45 | !!---------------------------------------------------------------------- |
---|
| 46 | CONTAINS |
---|
| 47 | |
---|
| 48 | SUBROUTINE ice_init |
---|
| 49 | !!---------------------------------------------------------------------- |
---|
| 50 | !! *** ROUTINE ice_init *** |
---|
| 51 | !! |
---|
[2715] | 52 | !! ** purpose : Allocate all the dynamic arrays of the LIM-3 modules |
---|
[825] | 53 | !!---------------------------------------------------------------------- |
---|
[2715] | 54 | INTEGER :: ierr |
---|
| 55 | !!---------------------------------------------------------------------- |
---|
| 56 | |
---|
| 57 | ! ! Allocate the ice arrays |
---|
[3294] | 58 | ierr = ice_alloc () ! ice variables |
---|
| 59 | ierr = ierr + dom_ice_alloc () ! domain |
---|
| 60 | ierr = ierr + sbc_ice_alloc () ! surface forcing |
---|
| 61 | ierr = ierr + thd_ice_alloc () ! thermodynamics |
---|
| 62 | ierr = ierr + lim_itd_me_alloc () ! ice thickness distribution - mechanics |
---|
[2528] | 63 | ! |
---|
[2715] | 64 | IF( lk_mpp ) CALL mpp_sum( ierr ) |
---|
| 65 | IF( ierr /= 0 ) CALL ctl_stop('STOP', 'ice_init : unable to allocate ice arrays') |
---|
| 66 | ! |
---|
| 67 | ! ! adequation jpk versus ice/snow layers/categories |
---|
| 68 | IF( jpl > jpk .OR. jpm > jpk .OR. & |
---|
| 69 | jkmax > jpk .OR. nlay_s > jpk ) CALL ctl_stop( 'STOP', & |
---|
| 70 | & 'ice_init: the 3rd dimension of workspace arrays is too small.', & |
---|
| 71 | & 'use more ocean levels or less ice/snow layers/categories.' ) |
---|
| 72 | |
---|
[2528] | 73 | ! ! Open the namelist file |
---|
[1581] | 74 | CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) |
---|
[2477] | 75 | ! |
---|
[2715] | 76 | CALL ice_run ! set some ice run parameters |
---|
[2528] | 77 | ! |
---|
[2715] | 78 | CALL lim_thd_init ! set ice thermodynics parameters |
---|
[2477] | 79 | ! |
---|
[2715] | 80 | CALL lim_thd_sal_init ! set ice salinity parameters |
---|
[2477] | 81 | ! |
---|
[3625] | 82 | rdt_ice = nn_fsbc * rdttra(1) ! sea-ice timestep |
---|
| 83 | r1_rdtice = 1._wp / rdt_ice ! sea-ice timestep inverse |
---|
[2477] | 84 | ! |
---|
| 85 | CALL lim_msh ! ice mesh initialization |
---|
| 86 | ! |
---|
[2715] | 87 | CALL lim_itd_ini ! ice thickness distribution initialization |
---|
| 88 | ! |
---|
| 89 | CALL lim_sbc_init ! ice surface boundary condition |
---|
[921] | 90 | |
---|
[2715] | 91 | |
---|
[2528] | 92 | ! ! Initial sea-ice state |
---|
[2477] | 93 | IF( .NOT.ln_rstart ) THEN ! start from rest |
---|
[825] | 94 | numit = 0 |
---|
| 95 | numit = nit000 - 1 |
---|
[2477] | 96 | CALL lim_istate ! start from rest: sea-ice deduced from sst |
---|
| 97 | CALL lim_var_agg(1) ! aggregate category variables in bulk variables |
---|
| 98 | CALL lim_var_glo2eqv ! convert global variables in equivalent variables |
---|
| 99 | ELSE ! start from a restart file |
---|
| 100 | CALL lim_rst_read ! read the restart file |
---|
[825] | 101 | numit = nit000 - 1 |
---|
[2477] | 102 | CALL lim_var_agg(1) ! aggregate ice variables |
---|
| 103 | CALL lim_var_glo2eqv ! convert global var in equivalent variables |
---|
[825] | 104 | ENDIF |
---|
[2477] | 105 | ! |
---|
[1037] | 106 | fr_i(:,:) = at_i(:,:) ! initialisation of sea-ice fraction |
---|
[2477] | 107 | ! |
---|
[2528] | 108 | nstart = numit + nn_fsbc |
---|
| 109 | nitrun = nitend - nit000 + 1 |
---|
| 110 | nlast = numit + nitrun |
---|
[2477] | 111 | ! |
---|
| 112 | IF( nstock == 0 ) nstock = nlast + 1 |
---|
[2528] | 113 | ! |
---|
[825] | 114 | END SUBROUTINE ice_init |
---|
| 115 | |
---|
[2528] | 116 | |
---|
[825] | 117 | SUBROUTINE ice_run |
---|
| 118 | !!------------------------------------------------------------------- |
---|
| 119 | !! *** ROUTINE ice_run *** |
---|
| 120 | !! |
---|
| 121 | !! ** Purpose : Definition some run parameter for ice model |
---|
| 122 | !! |
---|
| 123 | !! ** Method : Read the namicerun namelist and check the parameter |
---|
[2715] | 124 | !! values called at the first timestep (nit000) |
---|
[825] | 125 | !! |
---|
| 126 | !! ** input : Namelist namicerun |
---|
| 127 | !!------------------------------------------------------------------- |
---|
[1229] | 128 | NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, acrit, hsndif, hicdif, cai, cao, ln_nicep |
---|
[825] | 129 | !!------------------------------------------------------------------- |
---|
[2528] | 130 | ! |
---|
| 131 | REWIND( numnam_ice ) ! Read Namelist namicerun |
---|
| 132 | READ ( numnam_ice , namicerun ) |
---|
| 133 | ! |
---|
[1055] | 134 | IF( lk_mpp .AND. ln_nicep ) THEN |
---|
| 135 | ln_nicep = .FALSE. |
---|
| 136 | CALL ctl_warn( 'ice_run : specific control print for LIM3 desactivated with MPI' ) |
---|
| 137 | ENDIF |
---|
[2528] | 138 | ! |
---|
| 139 | IF(lwp) THEN ! control print |
---|
[825] | 140 | WRITE(numout,*) |
---|
| 141 | WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' |
---|
| 142 | WRITE(numout,*) ' ~~~~~~' |
---|
| 143 | WRITE(numout,*) ' switch for ice dynamics (1) or not (0) ln_limdyn = ', ln_limdyn |
---|
| 144 | WRITE(numout,*) ' minimum fraction for leads in the NH (SH) acrit(1/2) = ', acrit(:) |
---|
| 145 | WRITE(numout,*) ' computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif |
---|
| 146 | WRITE(numout,*) ' computation of temp. in ice (=0) or not (=9999) hicdif = ', hicdif |
---|
[830] | 147 | WRITE(numout,*) ' atmospheric drag over sea ice = ', cai |
---|
| 148 | WRITE(numout,*) ' atmospheric drag over ocean = ', cao |
---|
[2528] | 149 | WRITE(numout,*) ' Several ice points in the ice or not in ocean.output = ', ln_nicep |
---|
[825] | 150 | ENDIF |
---|
[2528] | 151 | ! |
---|
[825] | 152 | END SUBROUTINE ice_run |
---|
| 153 | |
---|
[2528] | 154 | |
---|
[825] | 155 | SUBROUTINE lim_itd_ini |
---|
[921] | 156 | !!------------------------------------------------------------------ |
---|
| 157 | !! *** ROUTINE lim_itd_ini *** |
---|
| 158 | !! |
---|
[2528] | 159 | !! ** Purpose : Initializes the ice thickness distribution |
---|
| 160 | !! ** Method : ... |
---|
[921] | 161 | !!------------------------------------------------------------------ |
---|
[2528] | 162 | INTEGER :: jl, jm ! dummy loop index |
---|
| 163 | REAL(wp) :: zc1, zc2, zc3, zx1 ! local scalars |
---|
| 164 | !!------------------------------------------------------------------ |
---|
[825] | 165 | |
---|
[2528] | 166 | IF(lwp) WRITE(numout,*) |
---|
[1112] | 167 | IF(lwp) WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution ' |
---|
| 168 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' |
---|
[825] | 169 | |
---|
[921] | 170 | !------------------------------------------------------------------------------! |
---|
| 171 | ! 1) Ice thickness distribution parameters initialization |
---|
| 172 | !------------------------------------------------------------------------------! |
---|
[825] | 173 | |
---|
[834] | 174 | !- Types boundaries (integer) |
---|
| 175 | !---------------------------- |
---|
[825] | 176 | ice_cat_bounds(1,1) = 1 |
---|
| 177 | ice_cat_bounds(1,2) = jpl |
---|
| 178 | |
---|
| 179 | !- Number of ice thickness categories in each ice type |
---|
| 180 | DO jm = 1, jpm |
---|
| 181 | ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1 |
---|
| 182 | END DO |
---|
| 183 | |
---|
| 184 | !- Make the correspondence between thickness categories and ice types |
---|
| 185 | !--------------------------------------------------------------------- |
---|
| 186 | DO jm = 1, jpm !over types |
---|
| 187 | DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories |
---|
| 188 | ice_types(jl) = jm |
---|
| 189 | END DO |
---|
| 190 | END DO |
---|
| 191 | |
---|
[1112] | 192 | IF(lwp) THEN |
---|
| 193 | WRITE(numout,*) ' Number of ice types jpm = ', jpm |
---|
| 194 | WRITE(numout,*) ' Number of ice categories jpl = ', jpl |
---|
| 195 | DO jm = 1, jpm |
---|
| 196 | WRITE(numout,*) ' Ice type ', jm |
---|
| 197 | WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm) |
---|
| 198 | WRITE(numout,*) ' Thickness category boundaries ', ice_cat_bounds(jm,1:2) |
---|
| 199 | END DO |
---|
| 200 | WRITE(numout,*) 'Ice type vector', ice_types(1:jpl) |
---|
| 201 | WRITE(numout,*) |
---|
| 202 | ENDIF |
---|
[825] | 203 | |
---|
[834] | 204 | !- Thickness categories boundaries |
---|
| 205 | !---------------------------------- |
---|
[2528] | 206 | hi_max(:) = 0._wp |
---|
| 207 | hi_max_typ(:,:) = 0._wp |
---|
[825] | 208 | |
---|
| 209 | !- Type 1 - undeformed ice |
---|
[2528] | 210 | zc1 = 3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) |
---|
| 211 | zc2 = 10._wp * zc1 |
---|
| 212 | zc3 = 3._wp |
---|
[825] | 213 | |
---|
[834] | 214 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
[2528] | 215 | zx1 = REAL( jl-1 , wp ) / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) |
---|
| 216 | hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) ) |
---|
[834] | 217 | END DO |
---|
[825] | 218 | |
---|
[862] | 219 | !- Fill in the hi_max_typ vector, useful in other circumstances |
---|
[2528] | 220 | ! Tricky trick: hi_max_typ is actually not used in the code and will be removed in a |
---|
| 221 | ! next flyspray at this time, the tricky trick will also be removed (Martin, march 08) |
---|
[834] | 222 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
| 223 | hi_max_typ(jl,1) = hi_max(jl) |
---|
| 224 | END DO |
---|
[825] | 225 | |
---|
[1112] | 226 | IF(lwp) WRITE(numout,*) ' Thickness category boundaries independently of ice type ' |
---|
| 227 | IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl) |
---|
[825] | 228 | |
---|
[1112] | 229 | IF(lwp) WRITE(numout,*) ' Thickness category boundaries inside ice types ' |
---|
| 230 | IF(lwp) THEN |
---|
| 231 | DO jm = 1, jpm |
---|
| 232 | WRITE(numout,*) ' Type number ', jm |
---|
| 233 | WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm) |
---|
| 234 | END DO |
---|
| 235 | ENDIF |
---|
[2528] | 236 | ! |
---|
[862] | 237 | DO jl = 1, jpl |
---|
[2528] | 238 | hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) * 0.5_wp |
---|
[862] | 239 | END DO |
---|
[2528] | 240 | ! |
---|
[834] | 241 | tn_ice(:,:,:) = t_su(:,:,:) |
---|
[2528] | 242 | ! |
---|
[921] | 243 | END SUBROUTINE lim_itd_ini |
---|
[825] | 244 | |
---|
| 245 | #else |
---|
| 246 | !!---------------------------------------------------------------------- |
---|
| 247 | !! Default option : Empty module NO LIM sea-ice model |
---|
| 248 | !!---------------------------------------------------------------------- |
---|
| 249 | CONTAINS |
---|
| 250 | SUBROUTINE ice_init ! Empty routine |
---|
| 251 | END SUBROUTINE ice_init |
---|
| 252 | #endif |
---|
| 253 | |
---|
| 254 | !!====================================================================== |
---|
| 255 | END MODULE iceini |
---|