[825] | 1 | MODULE iceini |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE iceini *** |
---|
| 4 | !! Sea-ice model : LIM Sea ice model Initialization |
---|
| 5 | !!====================================================================== |
---|
| 6 | #if defined key_lim3 |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! 'key_lim3' : LIM sea-ice model |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! ice_init : sea-ice model initialization |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | USE dom_oce |
---|
| 13 | USE in_out_manager |
---|
| 14 | USE ice_oce ! ice variables |
---|
[888] | 15 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 16 | USE sbc_ice ! Surface boundary condition: ice fields |
---|
[825] | 17 | USE phycst ! Define parameters for the routines |
---|
| 18 | USE ice |
---|
| 19 | USE limmsh |
---|
| 20 | USE limistate |
---|
| 21 | USE limrst |
---|
| 22 | USE par_ice |
---|
| 23 | USE limvar |
---|
[1055] | 24 | USE lib_mpp |
---|
[825] | 25 | |
---|
| 26 | IMPLICIT NONE |
---|
| 27 | PRIVATE |
---|
| 28 | |
---|
| 29 | !! * Routine accessibility |
---|
| 30 | PUBLIC ice_init ! called by opa.F90 |
---|
| 31 | PUBLIC lim_itd_ini |
---|
| 32 | |
---|
| 33 | !! * Share Module variables |
---|
| 34 | INTEGER , PUBLIC :: & !: |
---|
| 35 | nstart , & !: iteration number of the begining of the run |
---|
| 36 | nlast , & !: iteration number of the end of the run |
---|
| 37 | nitrun , & !: number of iteration |
---|
| 38 | numit !: iteration number |
---|
| 39 | REAL(wp), PUBLIC :: & !: |
---|
[921] | 40 | tpstot !: time of the run in seconds |
---|
[825] | 41 | !!---------------------------------------------------------------------- |
---|
[834] | 42 | !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) |
---|
[888] | 43 | !! $ Id: $ |
---|
[825] | 44 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
| 45 | !!---------------------------------------------------------------------- |
---|
| 46 | |
---|
| 47 | CONTAINS |
---|
| 48 | |
---|
| 49 | SUBROUTINE ice_init |
---|
| 50 | !!---------------------------------------------------------------------- |
---|
| 51 | !! *** ROUTINE ice_init *** |
---|
| 52 | !! |
---|
| 53 | !! ** purpose : |
---|
| 54 | !! |
---|
| 55 | !! History : |
---|
[834] | 56 | !! 2.0 ! 02-08 (G. Madec) F90: Free form and modules |
---|
| 57 | !! 3.0 ! 08-03 (M. Vancop) ITD, salinity, EVP-C |
---|
[825] | 58 | !!---------------------------------------------------------------------- |
---|
| 59 | |
---|
| 60 | ! Open the namelist file |
---|
[843] | 61 | CALL ctlopn(numnam_ice,'namelist_ice','OLD', 'FORMATTED', 'SEQUENTIAL', 1,numout,.FALSE.,1) |
---|
[825] | 62 | |
---|
| 63 | CALL ice_run ! read in namelist some run parameters |
---|
[921] | 64 | |
---|
[825] | 65 | ! Louvain la Neuve Ice model |
---|
| 66 | IF( nacc == 1 ) THEN |
---|
[921] | 67 | dtsd2 = nn_fsbc * rdtmin * 0.5 |
---|
| 68 | rdt_ice = nn_fsbc * rdtmin |
---|
[825] | 69 | ELSE |
---|
[921] | 70 | dtsd2 = nn_fsbc * rdt * 0.5 |
---|
| 71 | rdt_ice = nn_fsbc * rdt |
---|
[825] | 72 | ENDIF |
---|
| 73 | |
---|
| 74 | CALL lim_msh ! ice mesh initialization |
---|
[921] | 75 | |
---|
[834] | 76 | CALL lim_itd_ini ! initialize the ice thickness |
---|
[921] | 77 | ! distribution |
---|
[825] | 78 | ! Initial sea-ice state |
---|
| 79 | IF( .NOT.ln_rstart ) THEN |
---|
| 80 | numit = 0 |
---|
| 81 | numit = nit000 - 1 |
---|
| 82 | CALL lim_istate ! start from rest: sea-ice deduced from sst |
---|
[834] | 83 | CALL lim_var_agg(1) ! aggregate category variables in |
---|
[921] | 84 | ! bulk variables |
---|
[834] | 85 | CALL lim_var_glo2eqv ! convert global variables in equivalent |
---|
[921] | 86 | ! variables |
---|
[825] | 87 | ELSE |
---|
[835] | 88 | CALL lim_rst_read ! start from a restart file |
---|
[836] | 89 | |
---|
[825] | 90 | numit = nit000 - 1 |
---|
[834] | 91 | CALL lim_var_agg(1) ! aggregate ice variables |
---|
| 92 | CALL lim_var_glo2eqv ! convert global var in equivalent variables |
---|
[825] | 93 | ENDIF |
---|
| 94 | |
---|
[1037] | 95 | fr_i(:,:) = at_i(:,:) ! initialisation of sea-ice fraction |
---|
[825] | 96 | # if defined key_coupled |
---|
[888] | 97 | Must be adpated to LIM3 |
---|
| 98 | alb_ice(:,:,:) = albege(:,:) ! sea-ice albedo |
---|
[825] | 99 | # endif |
---|
[921] | 100 | |
---|
[888] | 101 | nstart = numit + nn_fsbc |
---|
[825] | 102 | nitrun = nitend - nit000 + 1 |
---|
| 103 | nlast = numit + nitrun |
---|
| 104 | |
---|
| 105 | IF( nstock == 0 ) nstock = nlast + 1 |
---|
| 106 | |
---|
| 107 | END SUBROUTINE ice_init |
---|
| 108 | |
---|
| 109 | SUBROUTINE ice_run |
---|
| 110 | !!------------------------------------------------------------------- |
---|
| 111 | !! *** ROUTINE ice_run *** |
---|
| 112 | !! |
---|
| 113 | !! ** Purpose : Definition some run parameter for ice model |
---|
| 114 | !! |
---|
| 115 | !! ** Method : Read the namicerun namelist and check the parameter |
---|
| 116 | !! values called at the first timestep (nit000) |
---|
| 117 | !! |
---|
| 118 | !! ** input : Namelist namicerun |
---|
| 119 | !! |
---|
| 120 | !! history : |
---|
| 121 | !! 2.0 ! 03-08 (C. Ethe) Original code |
---|
[834] | 122 | !! 3.0 ! 08-03 (M. Vancop) LIM3 |
---|
[825] | 123 | !!------------------------------------------------------------------- |
---|
[830] | 124 | NAMELIST/namicerun/ ln_limdyn, acrit, hsndif, hicdif, cai, cao, ln_nicep |
---|
[825] | 125 | !!------------------------------------------------------------------- |
---|
| 126 | |
---|
| 127 | ! ! Read Namelist namicerun |
---|
| 128 | REWIND ( numnam_ice ) |
---|
| 129 | READ ( numnam_ice , namicerun ) |
---|
[1055] | 130 | |
---|
| 131 | IF( lk_mpp .AND. ln_nicep ) THEN |
---|
| 132 | ln_nicep = .FALSE. |
---|
| 133 | CALL ctl_warn( 'ice_run : specific control print for LIM3 desactivated with MPI' ) |
---|
| 134 | ENDIF |
---|
| 135 | |
---|
[825] | 136 | IF(lwp) THEN |
---|
| 137 | WRITE(numout,*) |
---|
| 138 | WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' |
---|
| 139 | WRITE(numout,*) ' ~~~~~~' |
---|
| 140 | WRITE(numout,*) ' switch for ice dynamics (1) or not (0) ln_limdyn = ', ln_limdyn |
---|
| 141 | WRITE(numout,*) ' minimum fraction for leads in the NH (SH) acrit(1/2) = ', acrit(:) |
---|
| 142 | WRITE(numout,*) ' computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif |
---|
| 143 | WRITE(numout,*) ' computation of temp. in ice (=0) or not (=9999) hicdif = ', hicdif |
---|
[830] | 144 | WRITE(numout,*) ' atmospheric drag over sea ice = ', cai |
---|
| 145 | WRITE(numout,*) ' atmospheric drag over ocean = ', cao |
---|
[825] | 146 | WRITE(numout,*) ' Several ice points in the ice or not in ocean.output = ', ln_nicep |
---|
| 147 | ENDIF |
---|
[921] | 148 | |
---|
[825] | 149 | END SUBROUTINE ice_run |
---|
| 150 | |
---|
| 151 | SUBROUTINE lim_itd_ini |
---|
[921] | 152 | !!------------------------------------------------------------------ |
---|
| 153 | !! *** ROUTINE lim_itd_ini *** |
---|
| 154 | !! ** Purpose : |
---|
| 155 | !! Initializes the ice thickness distribution |
---|
| 156 | !! ** Method : |
---|
| 157 | !! Very simple. Currently there are no ice types in the |
---|
| 158 | !! model... |
---|
| 159 | !! |
---|
| 160 | !! ** Arguments : |
---|
| 161 | !! kideb , kiut : Starting and ending points on which the |
---|
| 162 | !! the computation is applied |
---|
| 163 | !! |
---|
| 164 | !! ** Inputs / Ouputs : (global commons) |
---|
| 165 | !! |
---|
| 166 | !! ** External : |
---|
| 167 | !! |
---|
| 168 | !! ** References : |
---|
| 169 | !! |
---|
| 170 | !! ** History : |
---|
| 171 | !! (12-2005) Martin Vancoppenolle |
---|
| 172 | !! |
---|
| 173 | !!------------------------------------------------------------------ |
---|
| 174 | !! * Arguments |
---|
[825] | 175 | |
---|
[921] | 176 | !! * Local variables |
---|
| 177 | INTEGER :: jl, & ! ice category dummy loop index |
---|
| 178 | jm ! ice types dummy loop index |
---|
[825] | 179 | |
---|
[921] | 180 | REAL(wp) :: & ! constant values |
---|
| 181 | zeps = 1.0e-10, & ! |
---|
| 182 | zc1 , & ! |
---|
| 183 | zc2 , & ! |
---|
| 184 | zc3 , & ! |
---|
| 185 | zx1 |
---|
[825] | 186 | |
---|
[921] | 187 | WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution ' |
---|
| 188 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
[825] | 189 | |
---|
[921] | 190 | !!-- End of declarations |
---|
| 191 | !!------------------------------------------------------------------------------ |
---|
[825] | 192 | |
---|
[921] | 193 | !------------------------------------------------------------------------------! |
---|
| 194 | ! 1) Ice thickness distribution parameters initialization |
---|
| 195 | !------------------------------------------------------------------------------! |
---|
[825] | 196 | |
---|
[834] | 197 | !- Types boundaries (integer) |
---|
| 198 | !---------------------------- |
---|
[825] | 199 | ice_cat_bounds(1,1) = 1 |
---|
| 200 | ice_cat_bounds(1,2) = jpl |
---|
| 201 | |
---|
| 202 | !- Number of ice thickness categories in each ice type |
---|
| 203 | DO jm = 1, jpm |
---|
| 204 | ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1 |
---|
| 205 | END DO |
---|
| 206 | |
---|
| 207 | !- Make the correspondence between thickness categories and ice types |
---|
| 208 | !--------------------------------------------------------------------- |
---|
| 209 | DO jm = 1, jpm !over types |
---|
| 210 | DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories |
---|
| 211 | ice_types(jl) = jm |
---|
| 212 | END DO |
---|
| 213 | END DO |
---|
| 214 | |
---|
| 215 | WRITE(numout,*) ' Number of ice types jpm = ', jpm |
---|
| 216 | WRITE(numout,*) ' Number of ice categories jpl = ', jpl |
---|
| 217 | DO jm = 1, jpm |
---|
| 218 | WRITE(numout,*) ' Ice type ', jm |
---|
| 219 | WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm) |
---|
| 220 | WRITE(numout,*) ' Thickness category boundaries ', ice_cat_bounds(jm,1:2) |
---|
| 221 | END DO |
---|
| 222 | WRITE(numout,*) 'Ice type vector', ice_types(1:jpl) |
---|
| 223 | WRITE(numout,*) |
---|
| 224 | |
---|
[834] | 225 | !- Thickness categories boundaries |
---|
| 226 | !---------------------------------- |
---|
| 227 | hi_max(:) = 0.0 |
---|
| 228 | hi_max_typ(:,:) = 0.0 |
---|
[825] | 229 | |
---|
| 230 | !- Type 1 - undeformed ice |
---|
[834] | 231 | zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1) |
---|
| 232 | zc2 = 10.0*zc1 |
---|
| 233 | zc3 = 3.0 |
---|
[825] | 234 | |
---|
[834] | 235 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
| 236 | zx1 = REAL(jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1) |
---|
| 237 | hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1.0 + TANH ( zc3 * (zx1 - 1.0 ) ) ) |
---|
| 238 | END DO |
---|
[825] | 239 | |
---|
[862] | 240 | !- Fill in the hi_max_typ vector, useful in other circumstances |
---|
| 241 | ! Tricky trick |
---|
[844] | 242 | ! hi_max_typ is actually not used in the code and will be removed in a |
---|
[862] | 243 | ! next flyspray at this time, the tricky trick will also be removed |
---|
[844] | 244 | ! Martin, march 08 |
---|
[834] | 245 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
| 246 | hi_max_typ(jl,1) = hi_max(jl) |
---|
| 247 | END DO |
---|
[825] | 248 | |
---|
[834] | 249 | WRITE(numout,*) ' Thickness category boundaries independently of ice type ' |
---|
| 250 | WRITE(numout,*) ' hi_max ', hi_max(0:jpl) |
---|
[825] | 251 | |
---|
[834] | 252 | WRITE(numout,*) ' Thickness category boundaries inside ice types ' |
---|
| 253 | DO jm = 1, jpm |
---|
| 254 | WRITE(numout,*) ' Type number ', jm |
---|
| 255 | WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm) |
---|
| 256 | END DO |
---|
[825] | 257 | |
---|
[862] | 258 | DO jl = 1, jpl |
---|
| 259 | hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0 |
---|
| 260 | END DO |
---|
| 261 | |
---|
[834] | 262 | tn_ice(:,:,:) = t_su(:,:,:) |
---|
[825] | 263 | |
---|
[921] | 264 | END SUBROUTINE lim_itd_ini |
---|
[825] | 265 | |
---|
| 266 | #else |
---|
| 267 | !!---------------------------------------------------------------------- |
---|
| 268 | !! Default option : Empty module NO LIM sea-ice model |
---|
| 269 | !!---------------------------------------------------------------------- |
---|
| 270 | CONTAINS |
---|
| 271 | SUBROUTINE ice_init ! Empty routine |
---|
| 272 | END SUBROUTINE ice_init |
---|
| 273 | |
---|
| 274 | SUBROUTINE lim_itd_ini |
---|
| 275 | END SUBROUTINE lim_itd_ini |
---|
| 276 | #endif |
---|
| 277 | |
---|
| 278 | !!====================================================================== |
---|
| 279 | END MODULE iceini |
---|