[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 ocfzpt |
---|
| 19 | USE ice |
---|
| 20 | USE limmsh |
---|
| 21 | USE limistate |
---|
| 22 | USE limrst |
---|
| 23 | USE par_ice |
---|
| 24 | USE limvar |
---|
| 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 | |
---|
| 95 | freeze(:,:) = at_i(:,:) ! initialisation of sea/ice cover |
---|
| 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 ) |
---|
[921] | 130 | ln_nicep = ln_nicep .AND. lwp |
---|
[825] | 131 | IF(lwp) THEN |
---|
| 132 | WRITE(numout,*) |
---|
| 133 | WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' |
---|
| 134 | WRITE(numout,*) ' ~~~~~~' |
---|
| 135 | WRITE(numout,*) ' switch for ice dynamics (1) or not (0) ln_limdyn = ', ln_limdyn |
---|
| 136 | WRITE(numout,*) ' minimum fraction for leads in the NH (SH) acrit(1/2) = ', acrit(:) |
---|
| 137 | WRITE(numout,*) ' computation of temp. in snow (=0) or not (=9999) hsndif = ', hsndif |
---|
| 138 | WRITE(numout,*) ' computation of temp. in ice (=0) or not (=9999) hicdif = ', hicdif |
---|
[830] | 139 | WRITE(numout,*) ' atmospheric drag over sea ice = ', cai |
---|
| 140 | WRITE(numout,*) ' atmospheric drag over ocean = ', cao |
---|
[825] | 141 | WRITE(numout,*) ' Several ice points in the ice or not in ocean.output = ', ln_nicep |
---|
| 142 | ENDIF |
---|
[921] | 143 | |
---|
[825] | 144 | END SUBROUTINE ice_run |
---|
| 145 | |
---|
| 146 | SUBROUTINE lim_itd_ini |
---|
[921] | 147 | !!------------------------------------------------------------------ |
---|
| 148 | !! *** ROUTINE lim_itd_ini *** |
---|
| 149 | !! ** Purpose : |
---|
| 150 | !! Initializes the ice thickness distribution |
---|
| 151 | !! ** Method : |
---|
| 152 | !! Very simple. Currently there are no ice types in the |
---|
| 153 | !! model... |
---|
| 154 | !! |
---|
| 155 | !! ** Arguments : |
---|
| 156 | !! kideb , kiut : Starting and ending points on which the |
---|
| 157 | !! the computation is applied |
---|
| 158 | !! |
---|
| 159 | !! ** Inputs / Ouputs : (global commons) |
---|
| 160 | !! |
---|
| 161 | !! ** External : |
---|
| 162 | !! |
---|
| 163 | !! ** References : |
---|
| 164 | !! |
---|
| 165 | !! ** History : |
---|
| 166 | !! (12-2005) Martin Vancoppenolle |
---|
| 167 | !! |
---|
| 168 | !!------------------------------------------------------------------ |
---|
| 169 | !! * Arguments |
---|
[825] | 170 | |
---|
[921] | 171 | !! * Local variables |
---|
| 172 | INTEGER :: jl, & ! ice category dummy loop index |
---|
| 173 | jm ! ice types dummy loop index |
---|
[825] | 174 | |
---|
[921] | 175 | REAL(wp) :: & ! constant values |
---|
| 176 | zeps = 1.0e-10, & ! |
---|
| 177 | zc1 , & ! |
---|
| 178 | zc2 , & ! |
---|
| 179 | zc3 , & ! |
---|
| 180 | zx1 |
---|
[825] | 181 | |
---|
[921] | 182 | WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution ' |
---|
| 183 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
[825] | 184 | |
---|
[921] | 185 | !!-- End of declarations |
---|
| 186 | !!------------------------------------------------------------------------------ |
---|
[825] | 187 | |
---|
[921] | 188 | !------------------------------------------------------------------------------! |
---|
| 189 | ! 1) Ice thickness distribution parameters initialization |
---|
| 190 | !------------------------------------------------------------------------------! |
---|
[825] | 191 | |
---|
[834] | 192 | !- Types boundaries (integer) |
---|
| 193 | !---------------------------- |
---|
[825] | 194 | ice_cat_bounds(1,1) = 1 |
---|
| 195 | ice_cat_bounds(1,2) = jpl |
---|
| 196 | |
---|
| 197 | !- Number of ice thickness categories in each ice type |
---|
| 198 | DO jm = 1, jpm |
---|
| 199 | ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1 |
---|
| 200 | END DO |
---|
| 201 | |
---|
| 202 | !- Make the correspondence between thickness categories and ice types |
---|
| 203 | !--------------------------------------------------------------------- |
---|
| 204 | DO jm = 1, jpm !over types |
---|
| 205 | DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories |
---|
| 206 | ice_types(jl) = jm |
---|
| 207 | END DO |
---|
| 208 | END DO |
---|
| 209 | |
---|
| 210 | WRITE(numout,*) ' Number of ice types jpm = ', jpm |
---|
| 211 | WRITE(numout,*) ' Number of ice categories jpl = ', jpl |
---|
| 212 | DO jm = 1, jpm |
---|
| 213 | WRITE(numout,*) ' Ice type ', jm |
---|
| 214 | WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm) |
---|
| 215 | WRITE(numout,*) ' Thickness category boundaries ', ice_cat_bounds(jm,1:2) |
---|
| 216 | END DO |
---|
| 217 | WRITE(numout,*) 'Ice type vector', ice_types(1:jpl) |
---|
| 218 | WRITE(numout,*) |
---|
| 219 | |
---|
[834] | 220 | !- Thickness categories boundaries |
---|
| 221 | !---------------------------------- |
---|
| 222 | hi_max(:) = 0.0 |
---|
| 223 | hi_max_typ(:,:) = 0.0 |
---|
[825] | 224 | |
---|
| 225 | !- Type 1 - undeformed ice |
---|
[834] | 226 | zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1) |
---|
| 227 | zc2 = 10.0*zc1 |
---|
| 228 | zc3 = 3.0 |
---|
[825] | 229 | |
---|
[834] | 230 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
| 231 | zx1 = REAL(jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1) |
---|
| 232 | hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1.0 + TANH ( zc3 * (zx1 - 1.0 ) ) ) |
---|
| 233 | END DO |
---|
[825] | 234 | |
---|
[862] | 235 | !- Fill in the hi_max_typ vector, useful in other circumstances |
---|
| 236 | ! Tricky trick |
---|
[844] | 237 | ! hi_max_typ is actually not used in the code and will be removed in a |
---|
[862] | 238 | ! next flyspray at this time, the tricky trick will also be removed |
---|
[844] | 239 | ! Martin, march 08 |
---|
[834] | 240 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
| 241 | hi_max_typ(jl,1) = hi_max(jl) |
---|
| 242 | END DO |
---|
[825] | 243 | |
---|
[834] | 244 | WRITE(numout,*) ' Thickness category boundaries independently of ice type ' |
---|
| 245 | WRITE(numout,*) ' hi_max ', hi_max(0:jpl) |
---|
[825] | 246 | |
---|
[834] | 247 | WRITE(numout,*) ' Thickness category boundaries inside ice types ' |
---|
| 248 | DO jm = 1, jpm |
---|
| 249 | WRITE(numout,*) ' Type number ', jm |
---|
| 250 | WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm) |
---|
| 251 | END DO |
---|
[825] | 252 | |
---|
[862] | 253 | DO jl = 1, jpl |
---|
| 254 | hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0 |
---|
| 255 | END DO |
---|
| 256 | |
---|
[834] | 257 | tn_ice(:,:,:) = t_su(:,:,:) |
---|
[825] | 258 | |
---|
[921] | 259 | END SUBROUTINE lim_itd_ini |
---|
[825] | 260 | |
---|
| 261 | #else |
---|
| 262 | !!---------------------------------------------------------------------- |
---|
| 263 | !! Default option : Empty module NO LIM sea-ice model |
---|
| 264 | !!---------------------------------------------------------------------- |
---|
| 265 | CONTAINS |
---|
| 266 | SUBROUTINE ice_init ! Empty routine |
---|
| 267 | END SUBROUTINE ice_init |
---|
| 268 | |
---|
| 269 | SUBROUTINE lim_itd_ini |
---|
| 270 | END SUBROUTINE lim_itd_ini |
---|
| 271 | #endif |
---|
| 272 | |
---|
| 273 | !!====================================================================== |
---|
| 274 | END MODULE iceini |
---|