- Timestamp:
- 2020-12-02T20:53:00+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/ICE/icedyn.F90
r13472 r14021 2 2 !!====================================================================== 3 3 !! *** MODULE icedyn *** 4 !! Sea-Ice dynamics : master routine for sea ice dynamics 4 !! Sea-Ice dynamics : master routine for sea ice dynamics 5 5 !!====================================================================== 6 6 !! history : 4.0 ! 2018 (C. Rousset) original code SI3 [aka Sea Ice cube] … … 29 29 USE lbclnk ! lateral boundary conditions (or mpp links) 30 30 USE timing ! Timing 31 USE fldread ! read input fields 31 32 32 33 IMPLICIT NONE … … 35 36 PUBLIC ice_dyn ! called by icestp.F90 36 37 PUBLIC ice_dyn_init ! called by icestp.F90 37 38 38 39 INTEGER :: nice_dyn ! choice of the type of dynamics 39 40 ! ! associated indices: 40 41 INTEGER, PARAMETER :: np_dynALL = 1 ! full ice dynamics (rheology + advection + ridging/rafting + correction) 41 INTEGER, PARAMETER :: np_dynRHGADV = 2 ! pure dynamics (rheology + advection) 42 INTEGER, PARAMETER :: np_dynRHGADV = 2 ! pure dynamics (rheology + advection) 42 43 INTEGER, PARAMETER :: np_dynADV1D = 3 ! only advection 1D - test case from Schar & Smolarkiewicz 1996 43 44 INTEGER, PARAMETER :: np_dynADV2D = 4 ! only advection 2D w prescribed vel.(rn_uvice + advection) … … 50 51 REAL(wp) :: rn_uice ! prescribed u-vel (case np_dynADV1D & np_dynADV2D) 51 52 REAL(wp) :: rn_vice ! prescribed v-vel (case np_dynADV1D & np_dynADV2D) 52 53 54 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_icbmsk ! structure of input grounded icebergs mask (file informations, fields read) 55 53 56 !! * Substitutions 54 57 # include "do_loop_substitute.h90" … … 63 66 !!------------------------------------------------------------------- 64 67 !! *** ROUTINE ice_dyn *** 65 !! 68 !! 66 69 !! ** Purpose : this routine manages sea ice dynamics 67 70 !! … … 81 84 ! 82 85 ! controls 83 IF( ln_timing ) CALL timing_start('ice dyn')86 IF( ln_timing ) CALL timing_start('ice_dyn') 84 87 ! 85 88 IF( kt == nit000 .AND. lwp ) THEN … … 88 91 WRITE(numout,*)'~~~~~~~' 89 92 ENDIF 90 ! 93 ! 91 94 ! retrieve thickness from volume for landfast param. and UMx advection scheme 92 95 WHERE( a_i(:,:,:) >= epsi20 ) … … 106 109 END WHERE 107 110 ! 111 IF( ln_landfast_L16 ) THEN 112 CALL fld_read( kt, 1, sf_icbmsk ) 113 icb_mask(:,:) = sf_icbmsk(1)%fnow(:,:,1) 114 ENDIF 108 115 ! 109 116 SELECT CASE( nice_dyn ) !-- Set which dynamics is running … … 111 118 CASE ( np_dynALL ) !== all dynamical processes ==! 112 119 ! 113 CALL ice_dyn_rhg ( kt, Kmm ) ! -- rheology 120 CALL ice_dyn_rhg ( kt, Kmm ) ! -- rheology 114 121 CALL ice_dyn_adv ( kt ) ! -- advection of ice 115 CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting 122 CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting 116 123 CALL ice_cor ( kt , 1 ) ! -- Corrections 117 124 ! 118 125 CASE ( np_dynRHGADV ) !== no ridge/raft & no corrections ==! 119 126 ! 120 CALL ice_dyn_rhg ( kt, Kmm ) ! -- rheology 127 CALL ice_dyn_rhg ( kt, Kmm ) ! -- rheology 121 128 CALL ice_dyn_adv ( kt ) ! -- advection of ice 122 129 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) … … 127 134 ! --- monotonicity test from Schar & Smolarkiewicz 1996 --- ! 128 135 ! CFL = 0.5 at a distance from the bound of 1/6 of the basin length 129 ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s 136 ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s 130 137 DO_2D( 1, 1, 1, 1 ) 131 138 zcoefu = ( REAL(jpiglo+1)*0.5_wp - REAL(ji+nimpp-1) ) / ( REAL(jpiglo+1)*0.5_wp - 1._wp ) … … 149 156 ! 150 157 ! 151 ! diagnostics: divergence at T points 158 ! diagnostics: divergence at T points 152 159 IF( iom_use('icediv') ) THEN 153 160 ! … … 172 179 ! 173 180 ! controls 174 IF( ln_timing ) CALL timing_stop ('ice dyn')181 IF( ln_timing ) CALL timing_stop ('ice_dyn') 175 182 ! 176 183 END SUBROUTINE ice_dyn … … 216 223 !! ** input : Namelist namdyn 217 224 !!------------------------------------------------------------------- 218 INTEGER :: ios, ioptio ! Local integer output status for namelist read 225 INTEGER :: ios, ioptio, ierror ! Local integer output status for namelist read 226 ! 227 CHARACTER(len=256) :: cn_dir ! Root directory for location of ice files 228 TYPE(FLD_N) :: sn_icbmsk ! informations about the grounded icebergs field to be read 219 229 !! 220 230 NAMELIST/namdyn/ ln_dynALL, ln_dynRHGADV, ln_dynADV1D, ln_dynADV2D, rn_uice, rn_vice, & 221 231 & rn_ishlat , & 222 & ln_landfast_L16, rn_lf_depfra, rn_lf_bfr, rn_lf_relax, rn_lf_tensile 232 & ln_landfast_L16, rn_lf_depfra, rn_lf_bfr, rn_lf_relax, rn_lf_tensile, & 233 & sn_icbmsk, cn_dir 223 234 !!------------------------------------------------------------------- 224 235 ! … … 248 259 ENDIF 249 260 ! !== set the choice of ice dynamics ==! 250 ioptio = 0 261 ioptio = 0 251 262 ! !--- full dynamics (rheology + advection + ridging/rafting + correction) 252 263 IF( ln_dynALL ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynALL ; ENDIF … … 269 280 IF( .NOT.ln_landfast_L16 ) tau_icebfr(:,:) = 0._wp 270 281 ! 282 ! !--- allocate and fill structure for grounded icebergs mask 283 IF( ln_landfast_L16 ) THEN 284 ALLOCATE( sf_icbmsk(1), STAT=ierror ) 285 IF( ierror > 0 ) THEN 286 CALL ctl_stop( 'ice_dyn_init: unable to allocate sf_icbmsk structure' ) ; RETURN 287 ENDIF 288 ! 289 CALL fld_fill( sf_icbmsk, (/ sn_icbmsk /), cn_dir, 'ice_dyn_init', & 290 & 'landfast ice is a function of read grounded icebergs', 'icedyn' ) 291 ! 292 ALLOCATE( sf_icbmsk(1)%fnow(jpi,jpj,1) ) 293 IF( sf_icbmsk(1)%ln_tint ) ALLOCATE( sf_icbmsk(1)%fdta(jpi,jpj,1,2) ) 294 IF( TRIM(sf_icbmsk(1)%clrootname) == 'NOT USED' ) sf_icbmsk(1)%fnow(:,:,1) = 0._wp ! not used field (set to 0) 295 ELSE 296 icb_mask(:,:) = 0._wp 297 ENDIF 298 ! !--- other init 271 299 CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters 272 300 CALL ice_dyn_rhg_init ! set ice rheology parameters … … 279 307 !! Default option Empty module NO SI3 sea-ice model 280 308 !!---------------------------------------------------------------------- 281 #endif 309 #endif 282 310 283 311 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.