[8321] | 1 | MODULE icestp |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE icestp *** |
---|
| 4 | !! Surface module : update the ocean surface boundary condition over ice |
---|
| 5 | !! & covered area using LIM sea-ice model |
---|
| 6 | !! Sea-Ice model : LIM-3 Sea ice model time-stepping |
---|
| 7 | !!===================================================================== |
---|
| 8 | !! History : 2.0 ! 2006-12 (M. Vancoppenolle) Original code |
---|
| 9 | !! 3.0 ! 2008-02 (C. Talandier) Surface module from icestp.F90 |
---|
[8411] | 10 | !! - ! 2008-04 (G. Madec) sltyle and ice_ctl routine |
---|
[8321] | 11 | !! 3.3 ! 2010-11 (G. Madec) ice-ocean stress always computed at each ocean time-step |
---|
| 12 | !! 3.4 ! 2011-01 (A Porter) dynamical allocation |
---|
[8426] | 13 | !! - ! 2012-10 (C. Rousset) add ice_dia |
---|
[8321] | 14 | !! 3.6 ! 2014-07 (M. Vancoppenolle, G. Madec, O. Marti) revise coupled interface |
---|
| 15 | !! 4.0 ! 2016-06 (L. Brodeau) new unified bulk routine (based on AeroBulk) |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
| 17 | #if defined key_lim3 |
---|
| 18 | !!---------------------------------------------------------------------- |
---|
[8486] | 19 | !! 'key_lim3' LIM 3.0 sea-ice model |
---|
[8321] | 20 | !!---------------------------------------------------------------------- |
---|
[8486] | 21 | !! ice_stp : sea-ice model time-stepping and update ocean surf. boundary cond. over ice-covered area |
---|
| 22 | !! ice_init : |
---|
| 23 | !! ice_run_init : |
---|
[8321] | 24 | !!---------------------------------------------------------------------- |
---|
[8486] | 25 | USE oce ! ocean dynamics and tracers |
---|
| 26 | USE dom_oce ! ocean space and time domain |
---|
| 27 | USE c1d ! 1D vertical configuration |
---|
| 28 | USE ice ! sea-ice: variables |
---|
| 29 | USE ice1D ! sea-ice: thermodynamical 1D variables |
---|
[8321] | 30 | ! |
---|
[8486] | 31 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 32 | USE sbc_ice ! Surface boundary condition: ice fields |
---|
| 33 | USE iceforcing ! sea-ice: Surface boundary condition !!gm why not icesbc module name |
---|
[8321] | 34 | ! |
---|
[8486] | 35 | USE phycst ! Define parameters for the routines |
---|
| 36 | USE eosbn2 ! equation of state |
---|
| 37 | USE icerhg ! sea-ice: rheology |
---|
| 38 | USE iceadv ! sea-ice: advection |
---|
| 39 | USE icethd ! sea-ice: thermodynamics |
---|
| 40 | USE icerdgrft ! sea-ice: ridging/rafting |
---|
| 41 | USE iceupdate ! sea-ice: sea surface boundary condition update |
---|
| 42 | USE icedia ! sea-ice: budget diagnostics |
---|
| 43 | USE icewri ! sea-ice: outputs |
---|
| 44 | USE icerst ! sea-ice: restarts |
---|
| 45 | USE icecor ! sea-ice: corrections |
---|
| 46 | USE icevar ! sea-ice: operations |
---|
| 47 | USE icectl ! sea-ice: control |
---|
[8321] | 48 | ! MV MP 2016 |
---|
[8486] | 49 | USE limmp ! sea-ice: melt ponds |
---|
[8321] | 50 | ! END MV MP 2016 |
---|
[8514] | 51 | USE iceistate ! sea-ice: initial state |
---|
[8486] | 52 | USE icethd_sal ! sea-ice: thermodynamics and salinity |
---|
[8505] | 53 | USE iceitd ! sea-ice: remapping thickness distribution |
---|
| 54 | USE icealb ! sea-ice: albedo |
---|
[8321] | 55 | ! |
---|
[8486] | 56 | USE bdy_oce , ONLY : ln_bdy ! flag for bdy |
---|
| 57 | USE bdyice ! unstructured open boundary data for sea-ice |
---|
[8321] | 58 | # if defined key_agrif |
---|
| 59 | USE agrif_ice |
---|
| 60 | USE agrif_lim3_update |
---|
| 61 | USE agrif_lim3_interp |
---|
| 62 | # endif |
---|
[8486] | 63 | ! |
---|
| 64 | USE in_out_manager ! I/O manager |
---|
| 65 | USE iom ! I/O manager library |
---|
| 66 | USE prtctl ! Print control |
---|
| 67 | USE lib_fortran ! |
---|
| 68 | USE lbclnk ! lateral boundary condition - MPP link |
---|
| 69 | USE lib_mpp ! MPP library |
---|
| 70 | USE timing ! Timing |
---|
[8321] | 71 | |
---|
| 72 | IMPLICIT NONE |
---|
| 73 | PRIVATE |
---|
| 74 | |
---|
[8486] | 75 | PUBLIC ice_stp ! called by sbcmod.F90 |
---|
| 76 | PUBLIC ice_init ! called by sbcmod.F90 |
---|
[8321] | 77 | |
---|
| 78 | !! * Substitutions |
---|
| 79 | # include "vectopt_loop_substitute.h90" |
---|
| 80 | !!---------------------------------------------------------------------- |
---|
[8486] | 81 | !! NEMO/ICE 4.0 , NEMO Consortium (2017) |
---|
[8321] | 82 | !! $Id: icestp.F90 8319 2017-07-11 15:00:44Z clem $ |
---|
| 83 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 84 | !!---------------------------------------------------------------------- |
---|
| 85 | CONTAINS |
---|
| 86 | |
---|
| 87 | SUBROUTINE ice_stp( kt, ksbc ) |
---|
| 88 | !!--------------------------------------------------------------------- |
---|
| 89 | !! *** ROUTINE ice_stp *** |
---|
| 90 | !! |
---|
[8486] | 91 | !! ** Purpose : sea-ice model time-stepping and update ocean surface |
---|
| 92 | !! boundary condition over ice-covered area |
---|
[8321] | 93 | !! |
---|
| 94 | !! ** Method : ice model time stepping |
---|
| 95 | !! - call the ice dynamics routine |
---|
| 96 | !! - call the ice advection/diffusion routine |
---|
| 97 | !! - call the ice thermodynamics routine |
---|
| 98 | !! - call the routine that computes mass and |
---|
| 99 | !! heat fluxes at the ice/ocean interface |
---|
| 100 | !! - save the outputs |
---|
| 101 | !! - save the outputs for restart when necessary |
---|
| 102 | !! |
---|
| 103 | !! ** Action : - time evolution of the LIM sea-ice model |
---|
| 104 | !! - update all sbc variables below sea-ice: |
---|
| 105 | !! utau, vtau, taum, wndm, qns , qsr, emp , sfx |
---|
| 106 | !!--------------------------------------------------------------------- |
---|
| 107 | INTEGER, INTENT(in) :: kt ! ocean time step |
---|
[8486] | 108 | INTEGER, INTENT(in) :: ksbc ! flux formulation (user defined, bulk, or Pure Coupled) |
---|
| 109 | ! |
---|
| 110 | INTEGER :: jl ! dummy loop index |
---|
[8321] | 111 | !!---------------------------------------------------------------------- |
---|
[8486] | 112 | ! |
---|
[8321] | 113 | IF( nn_timing == 1 ) CALL timing_start('ice_stp') |
---|
[8486] | 114 | ! |
---|
| 115 | ! !-----------------------! |
---|
| 116 | IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN ! --- Ice time step --- ! |
---|
| 117 | ! !-----------------------! |
---|
| 118 | ! |
---|
[8498] | 119 | kt_ice = kt ! -- Ice model time step |
---|
[8486] | 120 | ! |
---|
[8321] | 121 | # if defined key_agrif |
---|
| 122 | IF( .NOT. Agrif_Root() ) lim_nbstep = MOD( lim_nbstep, Agrif_irhot() * Agrif_Parent(nn_fsbc) / nn_fsbc ) + 1 |
---|
| 123 | # endif |
---|
[8498] | 124 | u_oce(:,:) = ssu_m(:,:) ! -- mean surface ocean current |
---|
| 125 | v_oce(:,:) = ssv_m(:,:) |
---|
| 126 | ! |
---|
| 127 | CALL eos_fzp( sss_m(:,:) , t_bo(:,:) ) ! -- freezing temperature [Kelvin] (set to rt0 over land) |
---|
[8321] | 128 | t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) + rt0 * ( 1._wp - tmask(:,:,1) ) |
---|
| 129 | ! |
---|
[8498] | 130 | CALL store_fields ! -- Store now ice values |
---|
[8486] | 131 | ! |
---|
[8321] | 132 | !------------------------------------------------! |
---|
| 133 | ! --- Dynamical coupling with the atmosphere --- ! |
---|
| 134 | !------------------------------------------------! |
---|
[8486] | 135 | ! It provides the following fields used in sea ice model: |
---|
[8404] | 136 | ! utau_ice, vtau_ice = surface ice stress [N/m2] |
---|
[8486] | 137 | !------------------------------------------------! |
---|
| 138 | CALL ice_forcing_tau( kt, ksbc, utau_ice, vtau_ice ) |
---|
[8404] | 139 | |
---|
[8486] | 140 | !-------------------------------------! |
---|
| 141 | ! --- ice dynamics and advection --- ! |
---|
| 142 | !-------------------------------------! |
---|
| 143 | CALL ice_diag0 ! set diag of mass, heat and salt fluxes to 0 |
---|
| 144 | CALL ice_rst_opn( kt ) ! Open Ice restart file (if necessary) |
---|
[8321] | 145 | ! |
---|
[8486] | 146 | SELECT CASE( nice_dyn ) |
---|
| 147 | CASE ( np_dynFULL ) !== all dynamical processes ==! |
---|
| 148 | CALL ice_rhg ( kt ) ! -- rheology |
---|
| 149 | CALL ice_adv ( kt ) ! -- advection of ice |
---|
| 150 | CALL ice_rdgrft( kt ) ! -- ridging/rafting |
---|
| 151 | CALL ice_cor ( kt , 1 ) ! -- Corrections |
---|
| 152 | CASE ( np_dyn ) !== pure dynamics only ==! (no ridging/rafting) (nono cat. case 2) |
---|
| 153 | CALL ice_rhg ( kt ) ! -- rheology |
---|
| 154 | CALL ice_adv ( kt ) ! -- advection of ice |
---|
| 155 | CALL ice_cor ( kt , 1 ) ! -- Corrections |
---|
[8512] | 156 | CASE ( np_dynPURE ) !== pure dynamics only ==! (nn_icedyn= 0 or 1 ) |
---|
[8486] | 157 | CALL ice_rhg ( kt ) ! -- rheology |
---|
| 158 | CALL ice_adv ( kt ) ! -- advection of ice |
---|
| 159 | END SELECT |
---|
| 160 | ! |
---|
| 161 | ! !== lateral boundary conditions ==! |
---|
[8321] | 162 | #if defined key_agrif |
---|
[8486] | 163 | IF( .NOT. Agrif_Root() ) CALL agrif_interp_lim3('T') ! -- AGRIF |
---|
[8321] | 164 | #endif |
---|
[8514] | 165 | IF( ln_icethd .AND. ln_bdy ) CALL bdy_ice( kt ) ! -- bdy ice thermo |
---|
[8486] | 166 | ! |
---|
| 167 | ! |
---|
| 168 | ! !== previous lead fraction and ice volume for flux calculations |
---|
| 169 | ! |
---|
| 170 | CALL ice_var_glo2eqv ! ht_i and ht_s for ice albedo calculation |
---|
| 171 | CALL ice_var_agg(1) ! at_i for coupling |
---|
[8498] | 172 | CALL store_fields ! Store now ice values |
---|
[8321] | 173 | |
---|
| 174 | !------------------------------------------------------! |
---|
| 175 | ! --- Thermodynamical coupling with the atmosphere --- ! |
---|
| 176 | !------------------------------------------------------! |
---|
[8404] | 177 | ! It provides the following fields used in sea ice model: |
---|
[8486] | 178 | ! fr1_i0 , fr2_i0 = 1sr & 2nd fraction of qsr penetration in ice [%] |
---|
| 179 | ! emp_oce , emp_ice = E-P over ocean and sea ice [Kg/m2/s] |
---|
| 180 | ! sprecip = solid precipitation [Kg/m2/s] |
---|
| 181 | ! evap_ice = sublimation [Kg/m2/s] |
---|
| 182 | ! qsr_tot , qns_tot = solar & non solar heat flux (total) [W/m2] |
---|
| 183 | ! qsr_ice , qns_ice = solar & non solar heat flux over ice [W/m2] |
---|
| 184 | ! dqns_ice = non solar heat sensistivity [W/m2] |
---|
| 185 | ! qemp_oce, qemp_ice, = sensible heat (associated with evap & precip) [W/m2] |
---|
| 186 | ! qprec_ice, qevap_ice |
---|
| 187 | !------------------------------------------------------! |
---|
| 188 | CALL ice_forcing_flx( kt, ksbc ) |
---|
[8321] | 189 | |
---|
| 190 | !----------------------------! |
---|
| 191 | ! --- ice thermodynamics --- ! |
---|
| 192 | !----------------------------! |
---|
[8514] | 193 | IF( ln_icethd ) CALL ice_thd( kt ) ! -- Ice thermodynamics |
---|
[8321] | 194 | |
---|
| 195 | ! MV MP 2016 |
---|
[8486] | 196 | IF ( ln_pnd ) CALL lim_mp( kt ) ! -- Melt ponds |
---|
[8321] | 197 | ! END MV MP 2016 |
---|
| 198 | |
---|
[8514] | 199 | IF( ln_icethd ) CALL ice_cor( kt , 2 ) ! -- Corrections |
---|
[8321] | 200 | ! --- |
---|
| 201 | # if defined key_agrif |
---|
[8486] | 202 | IF( .NOT. Agrif_Root() ) CALL agrif_update_lim3( kt ) |
---|
[8321] | 203 | # endif |
---|
[8486] | 204 | CALL ice_var_glo2eqv ! necessary calls (at least for coupling) |
---|
| 205 | CALL ice_var_agg( 2 ) ! necessary calls (at least for coupling) |
---|
| 206 | ! |
---|
[8321] | 207 | !! clem: one should switch the calculation of the fluxes onto the parent grid but the following calls do not work |
---|
| 208 | !! moreover it should only be called at the update frequency (as in agrif_lim3_update.F90) |
---|
| 209 | !!# if defined key_agrif |
---|
| 210 | !! IF( .NOT. Agrif_Root() ) CALL Agrif_ChildGrid_To_ParentGrid() |
---|
| 211 | !!# endif |
---|
[8486] | 212 | CALL ice_update_flx( kt ) ! -- Update ocean surface mass, heat and salt fluxes |
---|
[8321] | 213 | !!# if defined key_agrif |
---|
| 214 | !! IF( .NOT. Agrif_Root() ) CALL Agrif_ParentGrid_To_ChildGrid() |
---|
| 215 | !!# endif |
---|
[8514] | 216 | IF( ln_icediahsb ) CALL ice_dia( kt ) ! -- Diagnostics and outputs |
---|
[8321] | 217 | ! |
---|
[8498] | 218 | CALL ice_wri( 1 ) ! -- Ice outputs |
---|
[8321] | 219 | ! |
---|
[8486] | 220 | IF( kt == nit000 .AND. ln_rstart ) & !!gm I don't understand the ln_rstart, if needed, add a comment, please |
---|
[8498] | 221 | & CALL iom_close( numrir ) ! close input ice restart file |
---|
[8321] | 222 | ! |
---|
[8498] | 223 | IF( lrst_ice ) CALL ice_rst_write( kt ) ! -- Ice restart file |
---|
[8321] | 224 | ! |
---|
[8514] | 225 | IF( ln_icectl ) CALL ice_ctl( kt ) ! alerts in case of model crash |
---|
[8321] | 226 | ! |
---|
| 227 | ENDIF ! End sea-ice time step only |
---|
| 228 | |
---|
| 229 | !-------------------------! |
---|
| 230 | ! --- Ocean time step --- ! |
---|
| 231 | !-------------------------! |
---|
| 232 | ! Update surface ocean stresses (only in ice-dynamic case) otherwise the atm.-ocean stresses are used everywhere |
---|
| 233 | ! using before instantaneous surf. currents |
---|
[8512] | 234 | IF( ln_icedyn ) CALL ice_update_tau( kt, ub(:,:,1), vb(:,:,1) ) |
---|
[8321] | 235 | !!gm remark, the ocean-ice stress is not saved in ice diag call above ..... find a solution!!! |
---|
| 236 | ! |
---|
| 237 | IF( nn_timing == 1 ) CALL timing_stop('ice_stp') |
---|
| 238 | ! |
---|
| 239 | END SUBROUTINE ice_stp |
---|
| 240 | |
---|
| 241 | |
---|
| 242 | SUBROUTINE ice_init |
---|
| 243 | !!---------------------------------------------------------------------- |
---|
| 244 | !! *** ROUTINE ice_init *** |
---|
| 245 | !! |
---|
| 246 | !! ** purpose : Allocate all the dynamic arrays of the LIM-3 modules |
---|
| 247 | !!---------------------------------------------------------------------- |
---|
| 248 | INTEGER :: ji, jj, ierr |
---|
| 249 | !!---------------------------------------------------------------------- |
---|
| 250 | IF(lwp) WRITE(numout,*) |
---|
[8514] | 251 | IF(lwp) WRITE(numout,*) 'ice_init: Arrays allocation & Initialization off all routines & init state' |
---|
| 252 | IF(lwp) WRITE(numout,*) '~~~~~~~~' |
---|
[8321] | 253 | ! |
---|
| 254 | ! ! Open the reference and configuration namelist files and namelist output file |
---|
| 255 | CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) |
---|
| 256 | CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) |
---|
| 257 | IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) |
---|
| 258 | ! |
---|
| 259 | CALL ice_run_init ! set some ice run parameters |
---|
| 260 | ! |
---|
[8324] | 261 | ! ! Allocate the ice arrays (sbc_ice already allocated in sbc_init) |
---|
[8321] | 262 | ierr = ice_alloc () ! ice variables |
---|
[8331] | 263 | ierr = ierr + sbc_ice_alloc () ! surface forcing |
---|
[8420] | 264 | ierr = ierr + ice1D_alloc () ! thermodynamics |
---|
[8512] | 265 | ierr = ierr + ice_rdgrft_alloc () ! ridging/rafting |
---|
[8321] | 266 | ! |
---|
| 267 | IF( lk_mpp ) CALL mpp_sum( ierr ) |
---|
| 268 | IF( ierr /= 0 ) CALL ctl_stop('STOP', 'ice_init : unable to allocate ice arrays') |
---|
| 269 | ! |
---|
| 270 | CALL ice_itd_init ! ice thickness distribution initialization |
---|
| 271 | ! |
---|
[8512] | 272 | CALL ice_rdgrft_init ! set ice ridging/rafting parameters |
---|
| 273 | ! |
---|
| 274 | CALL ice_rhg_init ! set ice rheology parameters |
---|
| 275 | ! |
---|
| 276 | CALL ice_adv_init ! set ice advection parameters |
---|
| 277 | ! |
---|
[8422] | 278 | CALL ice_thd_init ! set ice thermodynics parameters |
---|
[8321] | 279 | ! |
---|
[8422] | 280 | CALL ice_thd_sal_init ! set ice salinity parameters |
---|
[8321] | 281 | |
---|
| 282 | ! MV MP 2016 |
---|
| 283 | CALL lim_mp_init ! set melt ponds parameters |
---|
| 284 | ! END MV MP 2016 |
---|
| 285 | ! ! Initial sea-ice state |
---|
| 286 | IF( .NOT. ln_rstart ) THEN ! start from rest: sea-ice deduced from sst |
---|
[8514] | 287 | CALL ice_istate |
---|
[8321] | 288 | ELSE ! start from a restart file |
---|
[8413] | 289 | CALL ice_rst_read |
---|
[8321] | 290 | ENDIF |
---|
[8424] | 291 | CALL ice_var_agg(2) |
---|
| 292 | CALL ice_var_glo2eqv |
---|
[8321] | 293 | ! |
---|
[8414] | 294 | CALL ice_update_init ! ice surface boundary condition |
---|
[8321] | 295 | ! |
---|
[8505] | 296 | CALL ice_alb_init ! ice surface albedo |
---|
[8321] | 297 | ! |
---|
[8505] | 298 | CALL ice_dia_init ! initialization for diags |
---|
| 299 | ! |
---|
[8486] | 300 | fr_i (:,:) = at_i(:,:) ! initialisation of sea-ice fraction |
---|
[8321] | 301 | tn_ice(:,:,:) = t_su(:,:,:) ! initialisation of surface temp for coupled simu |
---|
| 302 | ! |
---|
| 303 | DO jj = 1, jpj |
---|
| 304 | DO ji = 1, jpi |
---|
[8486] | 305 | IF( gphit(ji,jj) > 0._wp ) THEN ; rn_amax_2d(ji,jj) = rn_amax_n ! NH |
---|
| 306 | ELSE ; rn_amax_2d(ji,jj) = rn_amax_s ! SH |
---|
[8321] | 307 | ENDIF |
---|
| 308 | END DO |
---|
| 309 | END DO |
---|
| 310 | ! |
---|
| 311 | END SUBROUTINE ice_init |
---|
| 312 | |
---|
| 313 | |
---|
| 314 | SUBROUTINE ice_run_init |
---|
| 315 | !!------------------------------------------------------------------- |
---|
| 316 | !! *** ROUTINE ice_run_init *** |
---|
| 317 | !! |
---|
| 318 | !! ** Purpose : Definition some run parameter for ice model |
---|
| 319 | !! |
---|
[8512] | 320 | !! ** Method : Read the namice_run namelist and check the parameter |
---|
[8321] | 321 | !! values called at the first timestep (nit000) |
---|
| 322 | !! |
---|
[8512] | 323 | !! ** input : Namelist namice_run |
---|
[8321] | 324 | !!------------------------------------------------------------------- |
---|
| 325 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[8512] | 326 | NAMELIST/namice_run/ jpl, nlay_i, nlay_s, nn_monocat, rn_amax_n, rn_amax_s, cn_icerst_in, cn_icerst_indir, & |
---|
| 327 | & cn_icerst_out, cn_icerst_outdir |
---|
[8321] | 328 | !!------------------------------------------------------------------- |
---|
| 329 | ! |
---|
[8512] | 330 | REWIND( numnam_ice_ref ) ! Namelist namice_run in reference namelist : Parameters for ice |
---|
| 331 | READ ( numnam_ice_ref, namice_run, IOSTAT = ios, ERR = 901) |
---|
| 332 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_run in reference namelist', lwp ) |
---|
[8321] | 333 | |
---|
[8512] | 334 | REWIND( numnam_ice_cfg ) ! Namelist namice_run in configuration namelist : Parameters for ice |
---|
| 335 | READ ( numnam_ice_cfg, namice_run, IOSTAT = ios, ERR = 902 ) |
---|
| 336 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_run in configuration namelist', lwp ) |
---|
| 337 | IF(lwm) WRITE ( numoni, namice_run ) |
---|
[8321] | 338 | ! |
---|
[8486] | 339 | IF(lwp) THEN ! control print |
---|
[8321] | 340 | WRITE(numout,*) |
---|
| 341 | WRITE(numout,*) 'ice_run_init : ice share parameters for dynamics/advection/thermo of sea-ice' |
---|
| 342 | WRITE(numout,*) ' ~~~~~~' |
---|
[8512] | 343 | WRITE(numout,*) ' Namelist namice_run : ' |
---|
[8486] | 344 | WRITE(numout,*) ' number of ice categories jpl = ', jpl |
---|
| 345 | WRITE(numout,*) ' number of ice layers nlay_i = ', nlay_i |
---|
| 346 | WRITE(numout,*) ' number of snow layers nlay_s = ', nlay_s |
---|
| 347 | WRITE(numout,*) ' virtual ITD mono-category param (1-4) or not (0) nn_monocat = ', nn_monocat |
---|
| 348 | WRITE(numout,*) ' maximum ice concentration for NH = ', rn_amax_n |
---|
| 349 | WRITE(numout,*) ' maximum ice concentration for SH = ', rn_amax_s |
---|
[8321] | 350 | ENDIF |
---|
| 351 | ! |
---|
[8486] | 352 | ! !--- check consistency |
---|
| 353 | IF ( jpl > 1 .AND. nn_monocat == 1 ) THEN |
---|
[8321] | 354 | nn_monocat = 0 |
---|
| 355 | IF(lwp) WRITE(numout,*) |
---|
| 356 | IF(lwp) WRITE(numout,*) ' nn_monocat forced to 0 as jpl>1, i.e. multi-category case is chosen' |
---|
| 357 | ENDIF |
---|
[8486] | 358 | IF ( jpl == 1 .AND. nn_monocat == 0 ) THEN |
---|
[8321] | 359 | CALL ctl_stop( 'STOP', 'ice_run_init : if jpl=1 then nn_monocat should be between 1 and 4' ) |
---|
| 360 | ENDIF |
---|
| 361 | ! |
---|
[8514] | 362 | IF( ln_bdy .AND. ln_icediachk ) CALL ctl_warn('ice_run_init: online conservation check does not work with BDY') |
---|
[8321] | 363 | ! |
---|
[8486] | 364 | rdt_ice = REAL(nn_fsbc) * rdt !--- sea-ice timestep and inverse |
---|
| 365 | r1_rdtice = 1._wp / rdt_ice |
---|
[8321] | 366 | IF( lwp ) WRITE(numout,*) ' ice timestep rdt_ice = ', rdt_ice |
---|
| 367 | ! |
---|
[8486] | 368 | r1_nlay_i = 1._wp / REAL( nlay_i, wp ) !--- inverse of nlay_i and nlay_s |
---|
| 369 | r1_nlay_s = 1._wp / REAL( nlay_s, wp ) |
---|
| 370 | ! |
---|
[8321] | 371 | END SUBROUTINE ice_run_init |
---|
| 372 | |
---|
| 373 | |
---|
[8498] | 374 | SUBROUTINE store_fields |
---|
[8321] | 375 | !!---------------------------------------------------------------------- |
---|
[8498] | 376 | !! *** ROUTINE store_fields *** |
---|
[8321] | 377 | !! |
---|
| 378 | !! ** purpose : store ice variables at "before" time step |
---|
| 379 | !!---------------------------------------------------------------------- |
---|
[8360] | 380 | INTEGER :: ji, jj, jl ! dummy loop index |
---|
| 381 | !!---------------------------------------------------------------------- |
---|
[8321] | 382 | ! |
---|
[8360] | 383 | DO jl = 1, jpl |
---|
[8404] | 384 | DO jj = 2, jpjm1 |
---|
| 385 | DO ji = 2, jpim1 |
---|
[8360] | 386 | a_i_b (ji,jj,jl) = a_i (ji,jj,jl) ! ice area |
---|
| 387 | v_i_b (ji,jj,jl) = v_i (ji,jj,jl) ! ice volume |
---|
| 388 | v_s_b (ji,jj,jl) = v_s (ji,jj,jl) ! snow volume |
---|
| 389 | smv_i_b(ji,jj,jl) = smv_i(ji,jj,jl) ! salt content |
---|
| 390 | oa_i_b (ji,jj,jl) = oa_i (ji,jj,jl) ! areal age content |
---|
| 391 | e_s_b (ji,jj,:,jl) = e_s (ji,jj,:,jl) ! snow thermal energy |
---|
| 392 | e_i_b (ji,jj,:,jl) = e_i (ji,jj,:,jl) ! ice thermal energy |
---|
| 393 | ! ! ice thickness |
---|
| 394 | rswitch = MAX( 0._wp , SIGN( 1._wp, a_i_b(ji,jj,jl) - epsi20 ) ) ! 0 if no ice and 1 if yes |
---|
| 395 | ht_i_b(ji,jj,jl) = v_i_b (ji,jj,jl) / MAX( a_i_b(ji,jj,jl) , epsi20 ) * rswitch |
---|
| 396 | ht_s_b(ji,jj,jl) = v_s_b (ji,jj,jl) / MAX( a_i_b(ji,jj,jl) , epsi20 ) * rswitch |
---|
| 397 | END DO |
---|
[8404] | 398 | END DO |
---|
[8360] | 399 | END DO |
---|
[8486] | 400 | CALL lbc_lnk_multi( a_i_b, 'T', 1., v_i_b , 'T', 1., ht_i_b, 'T', 1., smv_i_b, 'T', 1., & |
---|
| 401 | & oa_i_b, 'T', 1., v_s_b , 'T', 1., ht_s_b, 'T', 1. ) |
---|
[8404] | 402 | CALL lbc_lnk( e_i_b, 'T', 1. ) |
---|
| 403 | CALL lbc_lnk( e_s_b, 'T', 1. ) |
---|
[8321] | 404 | |
---|
[8486] | 405 | !!gm Question: here , a_i_b, u_ice and v_ice are defined over the whole domain, |
---|
| 406 | !!gm so why not just a copy over the whole domain and no lbc_lnk ? |
---|
| 407 | !!gm that is some thing like: |
---|
| 408 | ! at_i_b(:,:) = SUM( a_i_b(:,:,:), dim=3 ) |
---|
| 409 | ! u_ice_b(:,:) = u_ice(:,:) |
---|
| 410 | ! v_ice_b(:,:) = v_ice(:,:) |
---|
| 411 | ! idem for the loop above |
---|
| 412 | !!gm |
---|
[8360] | 413 | ! ice velocities & total concentration |
---|
[8404] | 414 | DO jj = 2, jpjm1 |
---|
| 415 | DO ji = 2, jpim1 |
---|
[8360] | 416 | at_i_b(ji,jj) = SUM( a_i_b(ji,jj,:) ) |
---|
| 417 | u_ice_b(ji,jj) = u_ice(ji,jj) |
---|
| 418 | v_ice_b(ji,jj) = v_ice(ji,jj) |
---|
| 419 | END DO |
---|
| 420 | END DO |
---|
[8404] | 421 | CALL lbc_lnk_multi( at_i_b, 'T', 1., u_ice_b , 'U', -1., v_ice_b , 'V', -1. ) |
---|
[8486] | 422 | ! |
---|
[8498] | 423 | END SUBROUTINE store_fields |
---|
[8321] | 424 | |
---|
| 425 | |
---|
| 426 | SUBROUTINE ice_diag0 |
---|
| 427 | !!---------------------------------------------------------------------- |
---|
| 428 | !! *** ROUTINE ice_diag0 *** |
---|
| 429 | !! |
---|
| 430 | !! ** purpose : set ice-ocean and ice-atm. fluxes to zeros at the beggining |
---|
| 431 | !! of the time step |
---|
| 432 | !!---------------------------------------------------------------------- |
---|
[8360] | 433 | INTEGER :: ji, jj ! dummy loop index |
---|
| 434 | !!---------------------------------------------------------------------- |
---|
| 435 | DO jj = 1, jpj |
---|
| 436 | DO ji = 1, jpi |
---|
| 437 | sfx (ji,jj) = 0._wp ; |
---|
| 438 | sfx_bri(ji,jj) = 0._wp ; sfx_lam(ji,jj) = 0._wp |
---|
| 439 | sfx_sni(ji,jj) = 0._wp ; sfx_opw(ji,jj) = 0._wp |
---|
| 440 | sfx_bog(ji,jj) = 0._wp ; sfx_dyn(ji,jj) = 0._wp |
---|
| 441 | sfx_bom(ji,jj) = 0._wp ; sfx_sum(ji,jj) = 0._wp |
---|
| 442 | sfx_res(ji,jj) = 0._wp ; sfx_sub(ji,jj) = 0._wp |
---|
| 443 | ! |
---|
| 444 | wfx_snw(ji,jj) = 0._wp ; wfx_ice(ji,jj) = 0._wp |
---|
| 445 | wfx_sni(ji,jj) = 0._wp ; wfx_opw(ji,jj) = 0._wp |
---|
| 446 | wfx_bog(ji,jj) = 0._wp ; wfx_dyn(ji,jj) = 0._wp |
---|
| 447 | wfx_bom(ji,jj) = 0._wp ; wfx_sum(ji,jj) = 0._wp |
---|
| 448 | wfx_res(ji,jj) = 0._wp ; wfx_sub(ji,jj) = 0._wp |
---|
| 449 | wfx_spr(ji,jj) = 0._wp ; wfx_lam(ji,jj) = 0._wp |
---|
| 450 | wfx_snw_dyn(ji,jj) = 0._wp ; wfx_snw_sum(ji,jj) = 0._wp |
---|
| 451 | wfx_snw_sub(ji,jj) = 0._wp ; wfx_ice_sub(ji,jj) = 0._wp |
---|
| 452 | wfx_snw_sni(ji,jj) = 0._wp |
---|
| 453 | ! MV MP 2016 |
---|
| 454 | wfx_pnd(ji,jj) = 0._wp |
---|
| 455 | ! END MV MP 2016 |
---|
| 456 | |
---|
| 457 | hfx_thd(ji,jj) = 0._wp ; |
---|
| 458 | hfx_snw(ji,jj) = 0._wp ; hfx_opw(ji,jj) = 0._wp |
---|
| 459 | hfx_bog(ji,jj) = 0._wp ; hfx_dyn(ji,jj) = 0._wp |
---|
| 460 | hfx_bom(ji,jj) = 0._wp ; hfx_sum(ji,jj) = 0._wp |
---|
| 461 | hfx_res(ji,jj) = 0._wp ; hfx_sub(ji,jj) = 0._wp |
---|
| 462 | hfx_spr(ji,jj) = 0._wp ; hfx_dif(ji,jj) = 0._wp |
---|
| 463 | hfx_err(ji,jj) = 0._wp ; hfx_err_rem(ji,jj) = 0._wp |
---|
| 464 | hfx_err_dif(ji,jj) = 0._wp |
---|
| 465 | wfx_err_sub(ji,jj) = 0._wp |
---|
| 466 | ! |
---|
| 467 | afx_tot(ji,jj) = 0._wp ; |
---|
| 468 | ! |
---|
| 469 | diag_heat(ji,jj) = 0._wp ; diag_smvi(ji,jj) = 0._wp |
---|
| 470 | diag_vice(ji,jj) = 0._wp ; diag_vsnw(ji,jj) = 0._wp |
---|
| 471 | |
---|
| 472 | ! SIMIP diagnostics |
---|
| 473 | diag_fc_bo(ji,jj) = 0._wp ; diag_fc_su(ji,jj) = 0._wp |
---|
| 474 | |
---|
| 475 | tau_icebfr(ji,jj) = 0._wp; ! landfast ice param only (clem: important to keep the init here) |
---|
| 476 | END DO |
---|
| 477 | END DO |
---|
[8321] | 478 | |
---|
| 479 | END SUBROUTINE ice_diag0 |
---|
| 480 | |
---|
| 481 | #else |
---|
| 482 | !!---------------------------------------------------------------------- |
---|
| 483 | !! Default option Dummy module NO LIM 3.0 sea-ice model |
---|
| 484 | !!---------------------------------------------------------------------- |
---|
| 485 | CONTAINS |
---|
| 486 | SUBROUTINE ice_stp ( kt, ksbc ) ! Dummy routine |
---|
| 487 | INTEGER, INTENT(in) :: kt, ksbc |
---|
| 488 | WRITE(*,*) 'ice_stp: You should not have seen this print! error?', kt |
---|
| 489 | END SUBROUTINE ice_stp |
---|
| 490 | SUBROUTINE ice_init ! Dummy routine |
---|
| 491 | END SUBROUTINE ice_init |
---|
| 492 | #endif |
---|
| 493 | |
---|
| 494 | !!====================================================================== |
---|
| 495 | END MODULE icestp |
---|