Changeset 8534
- Timestamp:
- 2017-09-18T16:54:04+02:00 (7 years ago)
- Location:
- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3
- Files:
-
- 6 added
- 6 deleted
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
r8531 r8534 1 1 MODULE ice 2 2 !!====================================================================== 3 !! *** MODULE ice ***4 !! LIM-3 Sea Ice physics: diagnostics variables of icedefined in memory5 !!===================================================================== 3 !! *** MODULE ice *** 4 !! sea-ice: ice variables defined in memory 5 !!====================================================================== 6 6 !! History : 3.0 ! 2008-03 (M. Vancoppenolle) original code LIM-3 7 7 !! 4.0 ! 2011-02 (G. Madec) dynamical allocation … … 9 9 #if defined key_lim3 10 10 !!---------------------------------------------------------------------- 11 !! 'key_lim3' LIM-3sea-ice model11 !! 'key_lim3' ESIM sea-ice model 12 12 !!---------------------------------------------------------------------- 13 13 USE in_out_manager ! I/O manager … … 150 150 !!===================================================================== 151 151 152 !!---------------------------------------------------------------------- ----152 !!---------------------------------------------------------------------- 153 153 !! * Share Module variables 154 !!---------------------------------------------------------------------- ----154 !!---------------------------------------------------------------------- 155 155 ! !!** ice-generic parameters namelist (nampar) ** 156 156 INTEGER , PUBLIC :: jpl !: number of ice categories … … 308 308 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ftr_ice !: transmitted solar radiation under ice 309 309 310 !!---------------------------------------------------------------------- ----310 !!---------------------------------------------------------------------- 311 311 !! * Ice global state variables 312 !!---------------------------------------------------------------------- ----312 !!---------------------------------------------------------------------- 313 313 !! Variables defined for each ice category 314 314 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ht_i !: Ice thickness (m) … … 356 356 ! END MV MP 2016 357 357 358 !!---------------------------------------------------------------------- ----358 !!---------------------------------------------------------------------- 359 359 !! * Moments for advection 360 !!---------------------------------------------------------------------- ----360 !!---------------------------------------------------------------------- 361 361 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sxopw, syopw, sxxopw, syyopw, sxyopw !: open water in sea ice 362 362 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sxice, syice, sxxice, syyice, sxyice !: ice thickness … … 372 372 ! END MV MP 2016 373 373 374 !!---------------------------------------------------------------------- ----374 !!---------------------------------------------------------------------- 375 375 !! * Old values of global variables 376 !!---------------------------------------------------------------------- ----376 !!---------------------------------------------------------------------- 377 377 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: v_s_b, v_i_b, ht_s_b, ht_i_b !: snow and ice volumes/thickness 378 378 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i_b, smv_i_b, oa_i_b !: … … 382 382 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: at_i_b !: ice concentration (total) 383 383 384 !!---------------------------------------------------------------------- ----384 !!---------------------------------------------------------------------- 385 385 !! * Ice thickness distribution variables 386 !!---------------------------------------------------------------------- ----386 !!---------------------------------------------------------------------- 387 387 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hi_max !: Boundary of ice thickness categories in thickness space 388 388 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hi_mean !: Mean ice thickness in catgories 389 389 ! 390 !!---------------------------------------------------------------------- ----390 !!---------------------------------------------------------------------- 391 391 !! * Ice diagnostics 392 !!---------------------------------------------------------------------- ----392 !!---------------------------------------------------------------------- 393 393 ! thd refers to changes induced by thermodynamics 394 394 ! trp '' '' '' advection (transport of ice) … … 406 406 407 407 ! 408 !!---------------------------------------------------------------------- ----408 !!---------------------------------------------------------------------- 409 409 !! * SIMIP extra diagnostics 410 !!---------------------------------------------------------------------- ----410 !!---------------------------------------------------------------------- 411 411 ! Extra sea ice diagnostics to address the data request 412 412 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: t_si !: Temperature at Snow-ice interface (K) … … 541 541 #else 542 542 !!---------------------------------------------------------------------- 543 !! Default option Empty module NO LIM sea-ice model543 !! Default option Empty module NO ESIM sea-ice model 544 544 !!---------------------------------------------------------------------- 545 545 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice1D.F90
r8518 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE ice1D *** 4 !! LIM sea-ice : Ice thermodynamics in 1D4 !! sea-ice : Ice thermodynamics variables in 1D 5 5 !!===================================================================== 6 6 !! History : 3.0 ! 2002-11 (C. Ethe) F90: Free form and module … … 8 8 #if defined key_lim3 9 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' LIM3sea-ice model10 !! 'key_lim3' ESIM sea-ice model 11 11 !!---------------------------------------------------------------------- 12 12 USE ice , ONLY : nlay_i, nlay_s, jpl ! number of ice/snow layers and categories … … 223 223 #else 224 224 !!---------------------------------------------------------------------- 225 !! Default option : Empty module NO LIM sea-ice model225 !! Default option : Empty module NO ESIM sea-ice model 226 226 !!---------------------------------------------------------------------- 227 227 CONTAINS -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icealb.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icealb *** 4 !! Ocean forcing: bulk thermohaline forcing of theice4 !! Atmospheric forcing: Albedo over sea ice 5 5 !!===================================================================== 6 6 !! History : 4.0 ! 2017-07 (C. Rousset) Split ice and ocean albedos … … 8 8 #if defined key_lim3 9 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' LIM 3.0sea-ice model11 !!---------------------------------------------------------------------- 12 !! ice_alb : albedo for ice (clear and overcast skies)13 !! alb_init: initialisation of albedo computation10 !! 'key_lim3' ESIM sea-ice model 11 !!---------------------------------------------------------------------- 12 !! ice_alb : albedo for ice (clear and overcast skies) 13 !! ice_alb_init : initialisation of albedo computation 14 14 !!---------------------------------------------------------------------- 15 15 USE ice, ONLY: jpl ! sea-ice: number of categories … … 19 19 USE lib_mpp ! MPP library 20 20 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 21 USE timing ! Timing 21 22 22 23 IMPLICIT NONE … … 109 110 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zafrac_pnd ! relative ice fraction (effective) 110 111 !!--------------------------------------------------------------------- 111 112 ! 113 IF( nn_timing == 1 ) CALL timing_start('icealb') 114 ! 112 115 !----------------------------------------------------- 113 116 ! Snow-free albedo (no ice thickness dependence yet) … … 147 150 ENDIF 148 151 ! 149 !!gm: optimization ( rn_alb_smlt - rn_alb_imlt ) * r1_c2 can be computed one for all150 !!gm before the DO-loop below151 152 DO jl = 1, jpl 152 153 DO jj = 1, jpj … … 301 302 END SELECT 302 303 ! 304 IF( nn_timing == 1 ) CALL timing_stop('icealb') 305 ! 303 306 END SUBROUTINE ice_alb 304 307 … … 343 346 #else 344 347 !!---------------------------------------------------------------------- 345 !! Default option Dummy module NO LIM 3.0sea-ice model348 !! Default option Dummy module NO ESIM sea-ice model 346 349 !!---------------------------------------------------------------------- 347 350 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icecor.F90
r8517 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icecor *** 4 !! LIM-3 : Update of sea-ice globalvariables at the end of the time step4 !! ESIM : Corrections on sea-ice variables at the end of the time step 5 5 !!====================================================================== 6 6 !! History : 3.0 ! 2006-04 (M. Vancoppenolle) Original code … … 9 9 #if defined key_lim3 10 10 !!---------------------------------------------------------------------- 11 !! 'key_lim3' LIM3sea-ice model11 !! 'key_lim3' ESIM sea-ice model 12 12 !!---------------------------------------------------------------------- 13 !! ice_cor : co mputes update of sea-ice global variables from trend terms13 !! ice_cor : corrections on sea-ice variables 14 14 !!---------------------------------------------------------------------- 15 15 USE dom_oce ! ocean domain … … 22 22 ! 23 23 USE in_out_manager ! I/O manager 24 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 25 USE lbclnk ! lateral boundary condition - MPP link 24 USE iom ! I/O manager library 26 25 USE lib_mpp ! MPP library 26 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 27 USE lbclnk ! lateral boundary conditions (or mpp links) 27 28 USE timing ! Timing 28 USE iom !29 29 30 30 IMPLICIT NONE … … 47 47 !! 48 48 !! ** Purpose : Computes corrections on sea-ice global variables at 49 !! the end of the dynamics .49 !! the end of the dynamics (kn=1) and thermodynamics (kn=2) 50 50 !!---------------------------------------------------------------------- 51 51 INTEGER, INTENT(in) :: kt ! number of iteration … … 184 184 #else 185 185 !!---------------------------------------------------------------------- 186 !! Default option Dummy module NO LIM 3.0sea-ice model186 !! Default option Dummy module NO ESIM sea-ice model 187 187 !!---------------------------------------------------------------------- 188 188 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icectl.F90
r8517 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icectl *** 4 !! LIM-3 : control and printing4 !! sea-ice : controls and prints 5 5 !!====================================================================== 6 6 !! History : 3.5 ! 2015-01 (M. Vancoppenolle) Original code … … 9 9 #if defined key_lim3 10 10 !!---------------------------------------------------------------------- 11 !! 'key_lim3' LIM3 sea-ice model 12 !!---------------------------------------------------------------------- 13 !! ice_ctl : control prints in case of crash 14 !! ice_prt : ice control print at a given grid point 15 !! ice_prt3D : control prints of ice arrays 16 !!---------------------------------------------------------------------- 11 !! 'key_lim3' ESIM sea-ice model 12 !!---------------------------------------------------------------------- 13 !! ice_cons_hsm : conservation tests on heat, salt and mass 14 !! ice_cons_final : conservation tests on heat, salt and mass at end of time step 15 !! ice_ctl : control prints in case of crash 16 !! ice_prt : control prints at a given grid point 17 !! ice_prt3D : control prints of ice arrays 18 !!---------------------------------------------------------------------- 19 USE phycst ! physical constants 17 20 USE oce ! ocean dynamics and tracers 18 21 USE dom_oce ! ocean space and time domain 19 USE ice ! LIM-3: icevariables20 USE ice1D ! LIM-3: thermodynamicalvariables22 USE ice ! sea-ice: variables 23 USE ice1D ! sea-ice: thermodynamics variables 21 24 USE sbc_oce ! Surface boundary condition: ocean fields 22 25 USE sbc_ice ! Surface boundary condition: ice fields 23 USE phycst ! Define parameters for the routines24 26 ! 27 USE in_out_manager ! I/O manager 25 28 USE lib_mpp ! MPP library 29 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 26 30 USE timing ! Timing 27 USE in_out_manager ! I/O manager28 31 USE prtctl ! Print control 29 USE lib_fortran !30 32 31 33 IMPLICIT NONE … … 48 50 49 51 SUBROUTINE ice_cons_hsm( icount, cd_routine, pdiag_v, pdiag_s, pdiag_t, pdiag_fv, pdiag_fs, pdiag_ft ) 50 !!------------------------------------------------------------------- ---52 !!------------------------------------------------------------------- 51 53 !! *** ROUTINE ice_cons_hsm *** 52 54 !! … … 60 62 !! For salt and heat thresholds, ice is considered to have a salinity of 10 61 63 !! and a heat content of 3e5 J/kg (=latent heat of fusion) 62 !!------------------------------------------------------------------- ---64 !!------------------------------------------------------------------- 63 65 INTEGER , INTENT(in) :: icount ! called at: =0 the begining of the routine, =1 the end 64 66 CHARACTER(len=*), INTENT(in) :: cd_routine ! name of the routine … … 70 72 REAL(wp) :: zarea, zv_sill, zs_sill, zt_sill 71 73 REAL(wp), PARAMETER :: zconv = 1.e-9 ! convert W to GW and kg to Mt 72 !!------------------------------------------------------------------- ---74 !!------------------------------------------------------------------- 73 75 ! 74 76 IF( icount == 0 ) THEN … … 143 145 IF ( ABS( zs ) > zs_sill ) WRITE(numout,*) 'violation saline [psu*Mt/day] (',cd_routine,') = ',zs 144 146 IF ( ABS( zt ) > zt_sill ) WRITE(numout,*) 'violation enthalpy [GW] (',cd_routine,') = ',zt 145 IF ( ABS(zvtrp ) > zv_sill .AND. cd_routine == 'ice adv' ) THEN147 IF ( ABS(zvtrp ) > zv_sill .AND. cd_routine == 'icedyn_adv' ) THEN 146 148 WRITE(numout,*) 'violation vtrp [Mt/day] (',cd_routine,') = ',zvtrp 147 149 WRITE(numout,*) 'violation etrp [GW] (',cd_routine,') = ',zetrp 148 150 ENDIF 149 151 IF ( zvmin < -epsi10 ) WRITE(numout,*) 'violation v_i<0 [m] (',cd_routine,') = ',zvmin 150 IF ( zamax > MAX(rn_amax_n,rn_amax_s) + epsi10 .AND. cd_routine /= 'iceadv' .AND. cd_routine /= 'icerdgrft' ) &152 IF ( zamax > MAX(rn_amax_n,rn_amax_s)+epsi10 .AND. cd_routine /= 'icedyn_adv' .AND. cd_routine /= 'icedyn_rdgrft' ) & 151 153 & WRITE(numout,*) 'violation a_i>amax (',cd_routine,') = ',zamax 152 154 IF ( zamin < -epsi10 ) WRITE(numout,*) 'violation a_i<0 (',cd_routine,') = ',zamin … … 159 161 160 162 SUBROUTINE ice_cons_final( cd_routine ) 161 !!------------------------------------------------------------------- ---163 !!------------------------------------------------------------------- 162 164 !! *** ROUTINE ice_cons_final *** 163 165 !! … … 170 172 !! For salt and heat thresholds, ice is considered to have a salinity of 10 171 173 !! and a heat content of 3e5 J/kg (=latent heat of fusion) 172 !!------------------------------------------------------------------- ---174 !!------------------------------------------------------------------- 173 175 CHARACTER(len=*), INTENT(in) :: cd_routine ! name of the routine 174 176 REAL(wp) :: zhfx, zsfx, zvfx 175 177 REAL(wp) :: zarea, zv_sill, zs_sill, zt_sill 176 178 REAL(wp), PARAMETER :: zconv = 1.e-9 ! convert W to GW and kg to Mt 177 !!------------------------------------------------------------------- ---179 !!------------------------------------------------------------------- 178 180 179 181 ! water flux … … 204 206 205 207 SUBROUTINE ice_ctl( kt ) 206 !!------------------------------------------------------------------- ----208 !!------------------------------------------------------------------- 207 209 !! *** ROUTINE ice_ctl *** 208 210 !! … … 415 417 416 418 SUBROUTINE ice_prt( kt, ki, kj, kn, cd1 ) 417 !!------------------------------------------------------------------- ----419 !!------------------------------------------------------------------- 418 420 !! *** ROUTINE ice_prt *** 419 421 !! … … 596 598 597 599 SUBROUTINE ice_prt3D( cd_routine ) 598 !!------------------------------------------------------------------- --------------------------------------599 !! 600 !!------------------------------------------------------------------- 601 !! *** ROUTINE ice_prt3D *** 600 602 !! 601 603 !! ** Purpose : CTL prints of ice arrays in case ln_ctl is activated 602 604 !! 603 !!------------------------------------------------------------------- --------------------------------------605 !!------------------------------------------------------------------- 604 606 CHARACTER(len=*), INTENT(in) :: cd_routine ! name of the routine 605 607 INTEGER :: jk, jl ! dummy loop indices … … 664 666 665 667 #else 666 !!---------------------------------------------------------------------- ----667 !! Default option Empty Module No LIM3sea-ice model668 !!---------------------------------------------------------------------- ----668 !!---------------------------------------------------------------------- 669 !! Default option Empty Module No ESIM sea-ice model 670 !!---------------------------------------------------------------------- 669 671 #endif 670 672 -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icedia.F90
r8531 r8534 15 15 !! ice_dia_rst : read/write budgets restart 16 16 !!---------------------------------------------------------------------- 17 USE ice ! LIM-3: sea-ice variable18 17 USE dom_oce ! ocean domain 19 18 USE phycst ! physical constant 20 19 USE daymod ! model calendar 21 20 USE sbc_oce , ONLY : sfx, nn_fsbc ! surface boundary condition: ocean fields 22 USE icerst ! ice restart 21 USE ice ! sea-ice: variables 22 USE icerst ! sea-ice: restart 23 23 ! 24 24 USE in_out_manager ! I/O manager 25 USE iom ! I/O manager library 25 26 USE lib_mpp ! MPP library 26 USE timing ! preformance summary 27 USE iom ! I/O manager 28 USE lib_fortran ! glob_sum 27 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 28 USE timing ! Timing 29 29 30 30 IMPLICIT NONE … … 279 279 #else 280 280 !!---------------------------------------------------------------------- 281 !! Default option : Empty module NO LIM sea-ice model281 !! Default option : Empty module NO ESIM sea-ice model 282 282 !!---------------------------------------------------------------------- 283 283 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icedyn.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icedyn *** 4 !! Sea-Ice dynamics : 4 !! Sea-Ice dynamics : master routine for sea ice dynamics 5 5 !!====================================================================== 6 6 !! history : 4.0 ! 2017-09 (C. Rousset) original code … … 8 8 #if defined key_lim3 9 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' LIM3sea-ice model10 !! 'key_lim3' ESIM sea-ice model 11 11 !!---------------------------------------------------------------------- 12 12 !! ice_dyn : dynamics of sea ice 13 !! ice_dyn_init : initiali sation of sea-ice dynamics13 !! ice_dyn_init : initialization and namelist read 14 14 !!---------------------------------------------------------------------- 15 15 USE phycst ! physical constants 16 16 USE dom_oce ! ocean space and time domain 17 17 USE ice ! sea-ice: variables 18 USE ice rhg! sea-ice: rheology19 USE ice adv! sea-ice: advection20 USE ice rdgrft! sea-ice: ridging/rafting18 USE icedyn_rhg ! sea-ice: rheology 19 USE icedyn_adv ! sea-ice: advection 20 USE icedyn_rdgrft ! sea-ice: ridging/rafting 21 21 USE icecor ! sea-ice: corrections 22 22 USE icevar ! sea-ice: operations 23 23 ! 24 USE lbclnk ! lateral boundary conditions - MPP exchanges 24 USE in_out_manager ! I/O manager 25 USE iom ! I/O manager library 25 26 USE lib_mpp ! MPP library 26 USE in_out_manager ! I/O manager 27 USE iom ! I/O manager 28 USE lib_fortran ! glob_sum 27 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 28 USE lbclnk ! lateral boundary conditions (or mpp links) 29 29 USE timing ! Timing 30 30 … … 73 73 !!-------------------------------------------------------------------- 74 74 ! 75 IF( nn_timing == 1 ) CALL timing_start('icedyn')75 IF( nn_timing == 1 ) CALL timing_start('icedyn') 76 76 ! 77 77 IF( kt == nit000 .AND. lwp ) THEN … … 104 104 105 105 CASE ( np_dynFULL ) !== all dynamical processes ==! 106 CALL ice_ rhg ( kt ) ! -- rheology107 CALL ice_ adv ( kt ) ; CALL Hbig( zhmax ) ! -- advection of ice + correction on ice thickness108 CALL ice_ rdgrft( kt ) ! -- ridging/rafting109 CALL ice_cor ( kt , 1 ) ! -- Corrections106 CALL ice_dyn_rhg ( kt ) ! -- rheology 107 CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhmax ) ! -- advection of ice + correction on ice thickness 108 CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting 109 CALL ice_cor ( kt , 1 ) ! -- Corrections 110 110 111 111 CASE ( np_dynRHGADV1 ) !== no ridge/raft ==! (mono cat. case 2) 112 CALL ice_ rhg ( kt ) ! -- rheology113 CALL ice_ adv ( kt ) ! -- advection of ice114 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting)115 CALL ice_cor ( kt , 1 ) ! -- Corrections112 CALL ice_dyn_rhg ( kt ) ! -- rheology 113 CALL ice_dyn_adv ( kt ) ! -- advection of ice 114 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) 115 CALL ice_cor ( kt , 1 ) ! -- Corrections 116 116 117 117 CASE ( np_dynRHGADV2 ) !== no ridge/raft & no corrections ==! 118 CALL ice_ rhg ( kt ) ! -- rheology119 CALL ice_ adv ( kt ) ! -- advection of ice120 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting)118 CALL ice_dyn_rhg ( kt ) ! -- rheology 119 CALL ice_dyn_adv ( kt ) ! -- advection of ice 120 CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) 121 121 122 122 CASE ( np_dynADV ) !== pure advection ==! (prescribed velocities) … … 125 125 !!CALL RANDOM_NUMBER(u_ice(:,:)) 126 126 !!CALL RANDOM_NUMBER(v_ice(:,:)) 127 CALL ice_ adv ( kt ) ! -- advection of ice127 CALL ice_dyn_adv ( kt ) ! -- advection of ice 128 128 129 129 END SELECT … … 269 269 IF( .NOT. ln_landfast ) tau_icebfr(:,:) = 0._wp 270 270 ! 271 CALL ice_ rdgrft_init ! set ice ridging/rafting parameters272 CALL ice_ rhg_init ! set ice rheology parameters273 CALL ice_ adv_init ! set ice advection parameters271 CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters 272 CALL ice_dyn_rhg_init ! set ice rheology parameters 273 CALL ice_dyn_adv_init ! set ice advection parameters 274 274 ! 275 275 END SUBROUTINE ice_dyn_init … … 277 277 #else 278 278 !!---------------------------------------------------------------------- 279 !! Default option Empty module NO LIM-3sea-ice model279 !! Default option Empty module NO ESIM sea-ice model 280 280 !!---------------------------------------------------------------------- 281 281 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceforcing.F90
r8531 r8534 8 8 #if defined key_lim3 9 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' : LIM 3.0sea-ice model10 !! 'key_lim3' : ESIM sea-ice model 11 11 !!---------------------------------------------------------------------- 12 12 USE oce ! ocean dynamics and tracers 13 13 USE dom_oce ! ocean space and time domain 14 USE ice ! sea-ice variables14 USE ice ! sea-ice: variables 15 15 USE sbc_oce ! Surface boundary condition: ocean fields 16 16 USE sbc_ice ! Surface boundary condition: ice fields 17 USE usrdef_sbc ! user defined: surface boundary condition17 USE usrdef_sbc ! Surface boundary condition: user defined 18 18 USE sbcblk ! Surface boundary condition: bulk 19 19 USE sbccpl ! Surface boundary condition: coupled interface 20 USE icealb ! icealbedo20 USE icealb ! sae-ice: albedo 21 21 ! 22 USE in_out_manager ! I/O manager 22 23 USE iom ! I/O manager library 23 USE in_out_manager ! I/O manager24 USE lbclnk ! lateral boundary condition - MPP link25 24 USE lib_mpp ! MPP library 26 USE lib_fortran ! 25 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 26 USE lbclnk ! lateral boundary conditions (or mpp links) 27 27 USE timing ! Timing 28 28 … … 44 44 45 45 SUBROUTINE ice_forcing_tau( kt, ksbc, utau_ice, vtau_ice ) 46 !!------------------------------------------------------------------- --46 !!------------------------------------------------------------------- 47 47 !! *** ROUTINE ice_forcing_tau *** 48 48 !! … … 51 51 !! ** Action : It provides the following fields: 52 52 !! utau_ice, vtau_ice : surface ice stress (U- & V-points) [N/m2] 53 !!------------------------------------------------------------------- --53 !!------------------------------------------------------------------- 54 54 INTEGER, INTENT(in) :: kt ! ocean time step 55 55 INTEGER, INTENT(in) :: ksbc ! type of sbc flux ( 1 = user defined formulation, … … 60 60 INTEGER :: ji, jj ! dummy loop index 61 61 REAL(wp), DIMENSION(jpi,jpj) :: zutau_ice, zvtau_ice 62 !!------------------------------------------------------------------- ---63 64 IF( nn_timing == 1 ) CALL timing_start('ice_forcing _tau')62 !!------------------------------------------------------------------- 63 64 IF( nn_timing == 1 ) CALL timing_start('ice_forcing') 65 65 66 66 IF( kt == nit000 .AND. lwp ) THEN … … 87 87 ENDIF 88 88 89 IF( nn_timing == 1 ) CALL timing_stop('ice_forcing _tau')89 IF( nn_timing == 1 ) CALL timing_stop('ice_forcing') 90 90 ! 91 91 END SUBROUTINE ice_forcing_tau … … 93 93 94 94 SUBROUTINE ice_forcing_flx( kt, ksbc ) 95 !!------------------------------------------------------------------- --95 !!------------------------------------------------------------------- 96 96 !! *** ROUTINE ice_forcing_flx *** 97 97 !! … … 112 112 !! tprecip = total precipitation [Kg/m2/s] 113 113 !! alb_ice = albedo above sea ice 114 !!------------------------------------------------------------------- --114 !!------------------------------------------------------------------- 115 115 INTEGER, INTENT(in) :: kt ! ocean time step 116 116 INTEGER, INTENT(in) :: ksbc ! flux formulation (user defined, bulk or Pure Coupled) … … 119 119 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalb_os, zalb_cs ! ice albedo under overcast/clear sky 120 120 REAL(wp), DIMENSION(jpi,jpj) :: zalb ! 2D workspace 121 !!-------------------------------------------------------------------- --122 ! 123 IF( nn_timing == 1 ) CALL timing_start('ice_forcing _flx')121 !!-------------------------------------------------------------------- 122 ! 123 IF( nn_timing == 1 ) CALL timing_start('ice_forcing') 124 124 125 125 IF( kt == nit000 .AND. lwp ) THEN … … 164 164 ENDIF 165 165 ! 166 IF( nn_timing == 1 ) CALL timing_stop('ice_forcing _flx')166 IF( nn_timing == 1 ) CALL timing_stop('ice_forcing') 167 167 ! 168 168 END SUBROUTINE ice_forcing_flx … … 170 170 171 171 SUBROUTINE ice_flx_dist( ptn_ice, palb_ice, pqns_ice, pqsr_ice, pdqn_ice, pevap_ice, pdevap_ice, k_iceflx ) 172 !!------------------------------------------------------------------- --172 !!------------------------------------------------------------------- 173 173 !! *** ROUTINE ice_flx_dist *** 174 174 !! … … 184 184 !! using T-ice and albedo sensitivity 185 185 !! = 2 Redistribute a single flux over categories 186 !!------------------------------------------------------------------- --186 !!------------------------------------------------------------------- 187 187 INTEGER , INTENT(in ) :: k_iceflx ! redistributor 188 188 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: ptn_ice ! ice surface temperature … … 206 206 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ztem_m ! Mean temperature over all categories 207 207 !!---------------------------------------------------------------------- 208 !209 IF( nn_timing == 1 ) CALL timing_start('ice_flx_dist')210 208 ! 211 209 WHERE ( at_i (:,:) > 0._wp ) ; z1_at_i(:,:) = 1._wp / at_i (:,:) … … 253 251 ! 254 252 END SELECT 255 !256 IF( nn_timing == 1 ) CALL timing_stop('ice_flx_dist')257 253 ! 258 254 END SUBROUTINE ice_flx_dist … … 315 311 #else 316 312 !!---------------------------------------------------------------------- 317 !! Default option : Empty module NO LIM sea-ice model313 !! Default option : Empty module NO ESIM sea-ice model 318 314 !!---------------------------------------------------------------------- 319 315 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceistate.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE iceistate *** 4 !! Initialisation of diagnosticsice variables4 !! sea-ice : Initialization of ice variables 5 5 !!====================================================================== 6 6 !! History : 2.0 ! 2004-01 (C. Ethe, G. Madec) Original code … … 12 12 #if defined key_lim3 13 13 !!---------------------------------------------------------------------- 14 !! 'key_lim3' LIM3sea-ice model14 !! 'key_lim3' ESIM sea-ice model 15 15 !!---------------------------------------------------------------------- 16 16 !! ice_istate : initialization of diagnostics ice variables 17 17 !! ice_istate_init : initialization of ice state and namelist read 18 18 !!---------------------------------------------------------------------- 19 USE par_oce ! ocean parameters20 19 USE phycst ! physical constant 21 20 USE oce ! dynamics and tracers variables … … 29 28 ! 30 29 USE in_out_manager ! I/O manager 30 USE iom ! I/O manager library 31 31 USE lib_mpp ! MPP library 32 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)32 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 33 33 USE fldread ! read input fields 34 USE iom35 34 36 35 IMPLICIT NONE … … 82 81 !! values in the namelist 83 82 !! 84 !! ** Steps : 1) Read namelist85 !! 2) Basal temperature; ice and hemisphere masks83 !! ** Steps : 1) Set initial surface and basal temperatures 84 !! 2) Recompute or read sea ice state variables 86 85 !! 3) Fill in the ice thickness distribution using gaussian 87 86 !! 4) Fill in space-dependent arrays for state variables 88 !! 5) Diagnostic arrays89 !! 6) Lateral boundary conditions87 !! 5) snow-ice mass computation 88 !! 6) store before fields 90 89 !! 91 90 !! ** Notes : o_i, t_su, t_s, t_i, s_i must be filled everywhere, even … … 109 108 110 109 !-------------------------------------------------------------------- 111 ! 1) Read namelist110 ! 1) Set surface and bottom temperatures to initial values 112 111 !-------------------------------------------------------------------- 113 112 ! … … 122 121 t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) 123 122 124 !--------------------------------------------------------------------125 ! 2) Initialization of sea ice state variables126 !--------------------------------------------------------------------127 123 IF( ln_iceini ) THEN 124 !----------------------------------------------------------- 125 ! 2) Compute or read sea ice variables ===> single category 126 !----------------------------------------------------------- 128 127 ! 129 IF( ln_iceini_file )THEN 130 ! 128 ! !---------------! 129 IF( ln_iceini_file )THEN ! Read a file ! 130 ! !---------------! 131 ! 131 132 zht_i_ini(:,:) = si(jp_hti)%fnow(:,:,1) 132 133 zht_s_ini(:,:) = si(jp_hts)%fnow(:,:,1) … … 139 140 ELSEWHERE ; zswitch(:,:) = 0._wp 140 141 END WHERE 142 zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:) 141 143 ! 142 ELSE ! ln_iceini_file = F 143 144 !-------------------------------------------------------------------- 145 ! 3) Basal temperature, ice mask 146 !-------------------------------------------------------------------- 147 ! no ice if sst <= t-freez + ttest 144 ! !---------------! 145 ELSE ! Read namelist ! 146 ! !---------------! 147 148 ! no ice if sst <= t-freez + ttest 148 149 WHERE( ( sst_m(:,:) - (t_bo(:,:) - rt0) ) * tmask(:,:,1) >= rn_thres_sst ) ; zswitch(:,:) = 0._wp 149 150 ELSEWHERE ; zswitch(:,:) = tmask(:,:,1) 150 151 END WHERE 151 152 152 !-----------------------------153 ! 3.1) Hemisphere-dependent arrays154 !-----------------------------155 153 ! assign initial thickness, concentration, snow depth and salinity to an hemisphere-dependent array 156 154 WHERE( ff_t(:,:) >= 0._wp ) … … 169 167 ztm_i_ini(:,:) = rn_tmi_ini_s * zswitch(:,:) 170 168 END WHERE 169 zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:) 171 170 ! 172 ENDIF ! ln_iceini_file171 ENDIF 173 172 174 zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:) ! ice volume 175 !--------------------------------------------------------------------- 176 ! 3.2) Distribute ice concentration and thickness into the categories 177 !--------------------------------------------------------------------- 173 !------------------------------------------------------------------ 174 ! 3) Distribute ice concentration and thickness into the categories 175 !------------------------------------------------------------------ 178 176 ! a gaussian distribution for ice concentration is used 179 177 ! then we check whether the distribution fullfills … … 187 185 IF( zat_i_ini(ji,jj) > 0._wp .AND. zht_i_ini(ji,jj) > 0._wp )THEN 188 186 189 ! --- jl0: most likely index where cc will be maximum187 ! find which category (jl0) the input ice thickness falls into 190 188 jl0 = jpl 191 189 DO jl = 1, jpl … … 196 194 END DO 197 195 ! 198 ! initialisation of tests 199 itest(:) = 0 200 201 i_fill = jpl + 1 !==================================== 202 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 203 ! iteration !==================================== 196 itest(:) = 0 197 i_fill = jpl + 1 !------------------------------------ 198 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 199 ! !------------------------------------ 204 200 i_fill = i_fill - 1 205 206 ! initialisation of ice variables for each try 201 ! 207 202 zh_i_ini(ji,jj,:) = 0._wp 208 203 za_i_ini(ji,jj,:) = 0._wp 209 204 itest(:) = 0 210 205 ! 211 ! *** case very thin ice: fill only category 1 212 IF ( i_fill == 1 ) THEN 206 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 213 207 zh_i_ini(ji,jj,1) = zht_i_ini(ji,jj) 214 208 za_i_ini(ji,jj,1) = zat_i_ini(ji,jj) 215 216 ! *** case ice is thicker: fill categories >1 217 ELSE 218 219 ! Fill ice thicknesses in the (i_fill-1) cat by hmean 209 ELSE !-- case ice is thicker: fill categories >1 210 ! thickness 220 211 DO jl = 1, i_fill-1 221 212 zh_i_ini(ji,jj,jl) = hi_mean(jl) 222 213 END DO 223 214 ! 224 ! --- Concentrations215 ! concentration 225 216 za_i_ini(ji,jj,jl0) = zat_i_ini(ji,jj) / SQRT(REAL(jpl)) 226 217 DO jl = 1, i_fill - 1 … … 230 221 ENDIF 231 222 END DO 232 ! 233 ! Concentration in the last (i_fill)category223 224 ! last category 234 225 za_i_ini(ji,jj,i_fill) = zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:i_fill-1) ) 235 236 ! Ice thickness in the last (i_fill) category237 226 zV = SUM( za_i_ini(ji,jj,1:i_fill-1) * zh_i_ini(ji,jj,1:i_fill-1) ) 238 227 zh_i_ini(ji,jj,i_fill) = ( zvt_i_ini(ji,jj) - zV ) / MAX( za_i_ini(ji,jj,i_fill), epsi10 ) … … 252 241 ENDIF 253 242 ! 254 ENDIF ! case ice is thick or thin 255 256 !--------------------- 243 ENDIF 244 257 245 ! Compatibility tests 258 !--------------------- 259 ! Test 1: area conservation 260 zconv = ABS( zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:jpl) ) ) 246 zconv = ABS( zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:jpl) ) ) ! Test 1: area conservation 261 247 IF ( zconv < epsi06 ) itest(1) = 1 262 248 263 ! Test 2: volume conservation 264 zconv = ABS( zat_i_ini(ji,jj) * zht_i_ini(ji,jj) & 249 zconv = ABS( zat_i_ini(ji,jj) * zht_i_ini(ji,jj) & ! Test 2: volume conservation 265 250 & - SUM( za_i_ini (ji,jj,1:jpl) * zh_i_ini (ji,jj,1:jpl) ) ) 266 251 IF ( zconv < epsi06 ) itest(2) = 1 267 252 268 ! Test 3: thickness of the last category is in-bounds ? 269 IF ( zh_i_ini(ji,jj,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 253 IF ( zh_i_ini(ji,jj,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ? 270 254 271 ! Test 4: positivity of ice concentrations272 255 itest(4) = 1 273 256 DO jl = 1, i_fill 274 IF ( za_i_ini(ji,jj,jl) < 0._wp ) itest(4) = 0 257 IF ( za_i_ini(ji,jj,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations 275 258 END DO 276 ! !============================277 END DO ! end iteration on categories278 ! !============================259 ! !---------------------------- 260 END DO ! end iteration on categories 261 ! !---------------------------- 279 262 ! 280 263 IF( lwp .AND. SUM(itest) /= 4 ) THEN … … 288 271 ENDIF 289 272 290 ENDIF ! zat_i_ini(ji,jj) > 0._wp .AND. zht_i_ini(ji,jj) > 0._wp273 ENDIF 291 274 ! 292 275 END DO … … 294 277 295 278 !--------------------------------------------------------------------- 296 ! 3.3) Space-dependent arrays for ice state variables279 ! 4) Fill in sea ice arrays 297 280 !--------------------------------------------------------------------- 298 281 … … 426 409 at_i (:,:) = at_i (:,:) + a_i (:,:,jl) 427 410 END DO 428 429 !-------------------------------------------------------------------- 430 ! 4) Global ice variables for output diagnostics | 431 !-------------------------------------------------------------------- 411 ! 412 ! --- set ice velocities --- ! 432 413 u_ice (:,:) = 0._wp 433 414 v_ice (:,:) = 0._wp 434 415 ! 435 !---------------------------------------------- ----------------------436 ! Snow-ice mass (case ice is fully embedded) |437 !---------------------------------------------- ----------------------416 !---------------------------------------------- 417 ! 5) Snow-ice mass (case ice is fully embedded) 418 !---------------------------------------------- 438 419 snwice_mass (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:) ) ! snow+ice mass 439 420 snwice_mass_b(:,:) = snwice_mass(:,:) … … 556 537 WRITE(numout,*) '~~~~~~~~~~~~~~~' 557 538 WRITE(numout,*) ' Namelist namini:' 558 WRITE(numout,*) ' initialization with ice (T) or not (F) ln_iceini = ', ln_iceini559 WRITE(numout,*) ' ice initialization from a netcdf file ln_iceini_file = ', ln_iceini_file560 WRITE(numout,*) ' max delta ocean temp. above Tfreeze with initial ice rn_thres_sst = ', rn_thres_sst561 WRITE(numout,*) ' initial snow thickness in the north rn_hts_ini_n = ', rn_hts_ini_n562 WRITE(numout,*) ' initial snow thickness in the south rn_hts_ini_s = ', rn_hts_ini_s563 WRITE(numout,*) ' initial ice thickness in the north rn_hti_ini_n = ', rn_hti_ini_n564 WRITE(numout,*) ' initial ice thickness in the south rn_hti_ini_s = ', rn_hti_ini_s565 WRITE(numout,*) ' initial ice concentr. in the north rn_ati_ini_n = ', rn_ati_ini_n566 WRITE(numout,*) ' initial ice concentr. in the north rn_ati_ini_s = ', rn_ati_ini_s567 WRITE(numout,*) ' initial ice salinity in the north rn_smi_ini_n = ', rn_smi_ini_n568 WRITE(numout,*) ' initial ice salinity in the south rn_smi_ini_s = ', rn_smi_ini_s569 WRITE(numout,*) ' initial ice/snw temp in the north rn_tmi_ini_n = ', rn_tmi_ini_n570 WRITE(numout,*) ' initial ice/snw temp in the south rn_tmi_ini_s = ', rn_tmi_ini_s539 WRITE(numout,*) ' initialization with ice (T) or not (F) ln_iceini = ', ln_iceini 540 WRITE(numout,*) ' ice initialization from a netcdf file ln_iceini_file = ', ln_iceini_file 541 WRITE(numout,*) ' max delta ocean temp. above Tfreeze with initial ice rn_thres_sst = ', rn_thres_sst 542 WRITE(numout,*) ' initial snow thickness in the north rn_hts_ini_n = ', rn_hts_ini_n 543 WRITE(numout,*) ' initial snow thickness in the south rn_hts_ini_s = ', rn_hts_ini_s 544 WRITE(numout,*) ' initial ice thickness in the north rn_hti_ini_n = ', rn_hti_ini_n 545 WRITE(numout,*) ' initial ice thickness in the south rn_hti_ini_s = ', rn_hti_ini_s 546 WRITE(numout,*) ' initial ice concentr. in the north rn_ati_ini_n = ', rn_ati_ini_n 547 WRITE(numout,*) ' initial ice concentr. in the north rn_ati_ini_s = ', rn_ati_ini_s 548 WRITE(numout,*) ' initial ice salinity in the north rn_smi_ini_n = ', rn_smi_ini_n 549 WRITE(numout,*) ' initial ice salinity in the south rn_smi_ini_s = ', rn_smi_ini_s 550 WRITE(numout,*) ' initial ice/snw temp in the north rn_tmi_ini_n = ', rn_tmi_ini_n 551 WRITE(numout,*) ' initial ice/snw temp in the south rn_tmi_ini_s = ', rn_tmi_ini_s 571 552 ENDIF 572 553 … … 595 576 #else 596 577 !!---------------------------------------------------------------------- 597 !! Default option : Empty module NO LIM sea-ice model578 !! Default option : Empty module NO ESIM sea-ice model 598 579 !!---------------------------------------------------------------------- 599 580 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceitd.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE iceitd *** 4 !! LIM3 ice model : ice thickness distribution: Thermodynamics4 !! sea-ice : ice thickness distribution 5 5 !!====================================================================== 6 6 !! History : - ! (W. H. Lipscomb and E.C. Hunke) CICE (c) original code … … 11 11 #if defined key_lim3 12 12 !!---------------------------------------------------------------------- 13 !! 'key_lim3' LIM3sea-ice model13 !! 'key_lim3' ESIM sea-ice model 14 14 !!---------------------------------------------------------------------- 15 !! ice_itd_rem : 16 !! ice_itd_reb : 17 !! ice_itd_glinear : 18 !! ice_itd_shiftice : 15 !! ice_itd_init : read ice thicknesses mean and min from namelist 16 !! ice_itd_rem : redistribute ice thicknesses after thermo growth and melt 17 !! ice_itd_reb : rebin ice thicknesses into bounded categories 19 18 !!---------------------------------------------------------------------- 20 USE par_oce ! ocean parameters21 19 USE dom_oce ! ocean domain 22 20 USE phycst ! physical constants … … 26 24 USE icetab ! sea-ice: convert 1D<=>2D 27 25 ! 28 USE prtctl ! Print control29 26 USE in_out_manager ! I/O manager 30 27 USE lib_mpp ! MPP library 31 USE lib_fortran ! to use key_nosignedzero 28 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 29 USE prtctl ! Print control 32 30 33 31 IMPLICIT NONE … … 36 34 PUBLIC ice_itd_init ! called in icestp 37 35 PUBLIC ice_itd_rem ! called in icethd 38 PUBLIC ice_itd_reb ! called in ice err39 40 ! ** ice-thickness distributionnamelist (namitd) **41 REAL(wp) :: rn_himean ! mean thickness of the domain (used to compute the distribution)36 PUBLIC ice_itd_reb ! called in icecor 37 38 ! ** namelist (namitd) ** 39 REAL(wp) :: rn_himean ! mean thickness of the domain 42 40 43 41 !!---------------------------------------------------------------------- … … 53 51 !! 54 52 !! ** Purpose : computes the redistribution of ice thickness 55 !! after thermodynamic growth of ice thickness56 !! 57 !! ** Method : Linear remapping58 !! 59 !! References : W.H. Lipscomb, JGR 200153 !! after thermodynamic growth of ice thickness 54 !! 55 !! ** Method : Linear remapping 56 !! 57 !! References : W.H. Lipscomb, JGR 2001 60 58 !!------------------------------------------------------------------ 61 59 INTEGER , INTENT (in) :: kt ! Ocean time step … … 696 694 #else 697 695 !!---------------------------------------------------------------------- 698 !! Default option : Empty module NO LIM sea-ice model696 !! Default option : Empty module NO ESIM sea-ice model 699 697 !!---------------------------------------------------------------------- 700 698 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icerst.F90
r8518 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icerst *** 4 !! Ice restart : writethe ice restart file4 !! sea-ice : write/read the ice restart file 5 5 !!====================================================================== 6 6 !! History: 3.0 ! 2005-04 (M. Vancoppenolle) Original code … … 10 10 #if defined key_lim3 11 11 !!---------------------------------------------------------------------- 12 !! 'key_lim3' LIM sea-ice model13 !!---------------------------------------------------------------------- 14 !! ice_rst_opn : open icerestart file15 !! ice_rst_write : write of therestart file16 !! ice_rst_read : read therestart file12 !! 'key_lim3' ESIM sea-ice model 13 !!---------------------------------------------------------------------- 14 !! ice_rst_opn : open restart file 15 !! ice_rst_write : write restart file 16 !! ice_rst_read : read restart file 17 17 !!---------------------------------------------------------------------- 18 18 USE ice ! sea-ice variables … … 22 22 ! 23 23 USE in_out_manager ! I/O manager 24 USE iom ! I/O library24 USE iom ! I/O manager library 25 25 USE lib_mpp ! MPP library 26 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 26 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 27 USE timing ! Timing 27 28 28 29 IMPLICIT NONE … … 44 45 !! *** ice_rst_opn *** 45 46 !! 46 !! ** purpose : o utput of sea-ice variable in a netcdffile47 !! ** purpose : open restart file 47 48 !!---------------------------------------------------------------------- 48 49 INTEGER, INTENT(in) :: kt ! number of iteration … … 95 96 !! *** ice_rst_write *** 96 97 !! 97 !! ** purpose : output of sea-ice variable in a netcdffile98 !! ** purpose : write restart file 98 99 !!---------------------------------------------------------------------- 99 100 INTEGER, INTENT(in) :: kt ! number of iteration … … 105 106 REAL(wp), DIMENSION(jpi,jpj) :: z2d 106 107 !!---------------------------------------------------------------------- 108 109 IF( nn_timing == 1 ) CALL timing_start('ice_rst') 107 110 108 111 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 … … 184 187 ENDIF 185 188 ! 189 IF( nn_timing == 1 ) CALL timing_stop('ice_rst') 186 190 ! 187 191 END SUBROUTINE ice_rst_write … … 192 196 !! *** ice_rst_read *** 193 197 !! 194 !! ** purpose : read of sea-ice variable restart in a netcdffile198 !! ** purpose : read restart file 195 199 !!---------------------------------------------------------------------- 196 200 INTEGER :: jk, jl … … 202 206 LOGICAL :: llok 203 207 !!---------------------------------------------------------------------- 208 209 IF( nn_timing == 1 ) CALL timing_start('ice_rst') 204 210 205 211 IF(lwp) THEN … … 279 285 CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 280 286 287 IF( nn_timing == 1 ) CALL timing_stop('ice_rst') 288 281 289 END SUBROUTINE ice_rst_read 282 290 283 291 #else 284 292 !!---------------------------------------------------------------------- 285 !! Default option : Empty module NO LIM sea-ice model293 !! Default option : Empty module NO ESIM sea-ice model 286 294 !!---------------------------------------------------------------------- 287 295 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icestp.F90
r8531 r8534 3 3 !! *** MODULE icestp *** 4 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 5 !! covered area using ESIM sea-ice model 7 6 !!===================================================================== 8 7 !! History : 2.0 ! 2006-12 (M. Vancoppenolle) Original code … … 17 16 #if defined key_lim3 18 17 !!---------------------------------------------------------------------- 19 !! 'key_lim3' LIM 3.0 sea-ice model 20 !!---------------------------------------------------------------------- 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 : 18 !! 'key_lim3' ESIM sea-ice model 19 !!---------------------------------------------------------------------- 20 !! ice_stp : sea-ice model time-stepping and update ocean SBC over ice-covered area 21 !! ice_init : initialize sea-ice 24 22 !!---------------------------------------------------------------------- 25 23 USE oce ! ocean dynamics and tracers … … 29 27 USE ice1D ! sea-ice: thermodynamical 1D variables 30 28 ! 29 USE phycst ! Define parameters for the routines 30 USE eosbn2 ! equation of state 31 31 USE sbc_oce ! Surface boundary condition: ocean fields 32 32 USE sbc_ice ! Surface boundary condition: ice fields 33 ! 33 34 USE iceforcing ! sea-ice: Surface boundary condition !!gm why not icesbc module name 34 !35 USE phycst ! Define parameters for the routines36 USE eosbn2 ! equation of state37 USE icerhg ! sea-ice: rheology38 USE iceadv ! sea-ice: advection39 35 USE icedyn ! sea-ice: dynamics 40 36 USE icethd ! sea-ice: thermodynamics 41 USE icerdgrft ! sea-ice: ridging/rafting 37 USE limmp ! sea-ice: melt ponds 38 USE icecor ! sea-ice: corrections 42 39 USE iceupdate ! sea-ice: sea surface boundary condition update 43 40 USE icedia ! sea-ice: budget diagnostics 44 41 USE icewri ! sea-ice: outputs 45 42 USE icerst ! sea-ice: restarts 46 USE icecor ! sea-ice: corrections47 43 USE icevar ! sea-ice: operations 48 44 USE icectl ! sea-ice: control 49 ! MV MP 201650 USE limmp ! sea-ice: melt ponds51 ! END MV MP 201652 45 USE iceistate ! sea-ice: initial state 53 USE icethd_sal ! sea-ice: thermodynamics and salinity54 46 USE iceitd ! sea-ice: remapping thickness distribution 55 47 USE icealb ! sea-ice: albedo … … 65 57 USE in_out_manager ! I/O manager 66 58 USE iom ! I/O manager library 59 USE lib_mpp ! MPP library 60 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 61 USE timing ! Timing 67 62 USE prtctl ! Print control 68 USE lib_fortran !69 USE lbclnk ! lateral boundary condition - MPP link70 USE lib_mpp ! MPP library71 USE timing ! Timing72 63 73 64 IMPLICIT NONE … … 202 193 !! IF( .NOT. Agrif_Root() ) CALL Agrif_ParentGrid_To_ChildGrid() 203 194 !!# endif 204 IF( ln_icediahsb ) CALL ice_dia( kt ) ! -- Diagnostics and outputs205 ! 206 CALL ice_wri( 1 ) ! -- Ice outputs207 ! 208 ! 209 IF( lrst_ice ) CALL ice_rst_write( kt ) ! -- Ice restart file210 ! 211 IF( ln_icectl ) CALL ice_ctl( kt ) !alerts in case of model crash195 IF( ln_icediahsb ) CALL ice_dia( kt ) ! -- Diagnostics and outputs 196 ! 197 CALL ice_wri( 1 ) ! -- Ice outputs 198 ! 199 ! 200 IF( lrst_ice ) CALL ice_rst_write( kt ) ! -- Ice restart file 201 ! 202 IF( ln_icectl ) CALL ice_ctl( kt ) ! -- alerts in case of model crash 212 203 ! 213 204 ENDIF ! End sea-ice time step only … … 230 221 !! *** ROUTINE ice_init *** 231 222 !! 232 !! ** purpose : Allocate all the dynamic arrays of the LIM-3 modules223 !! ** purpose : Initialize sea-ice parameters 233 224 !!---------------------------------------------------------------------- 234 225 INTEGER :: ji, jj, ierr … … 265 256 CALL ice_rst_read 266 257 ENDIF 258 CALL ice_var_glo2eqv 267 259 CALL ice_var_agg(2) 268 CALL ice_var_glo2eqv269 260 ! 270 261 CALL ice_forcing_init ! set ice-ocean and ice-atm. coupling parameters … … 301 292 !! *** ROUTINE par_init *** 302 293 !! 303 !! ** Purpose : Definition some run parameterfor ice model304 !! 305 !! ** Method : Read the namparnamelist and check the parameter294 !! ** Purpose : Definition generic parameters for ice model 295 !! 296 !! ** Method : Read namelist and check the parameter 306 297 !! values called at the first timestep (nit000) 307 298 !! … … 444 435 #else 445 436 !!---------------------------------------------------------------------- 446 !! Default option Dummy module NO LIM 3.0sea-ice model437 !! Default option Dummy module NO ESIM sea-ice model 447 438 !!---------------------------------------------------------------------- 448 439 CONTAINS -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icetab.F90
r8486 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icetab *** 4 !! LIM ice model: transform 1D (2D) array to a 2D (1D) table4 !! sea-ice : transform 1D (2D) array to a 2D (1D) table 5 5 !!====================================================================== 6 6 #if defined key_lim3 7 7 !!---------------------------------------------------------------------- 8 !! 'key_lim3' LIM3sea-ice model8 !! 'key_lim3' ESIM sea-ice model 9 9 !!---------------------------------------------------------------------- 10 !! tab_3d_2d : 3-D <==> 2-D 11 !! tab_2d_3d : 2-D <==> 3-D 10 12 !! tab_2d_1d : 2-D <==> 1-D 11 13 !! tab_1d_2d : 1-D <==> 2-D … … 111 113 #else 112 114 !!---------------------------------------------------------------------- 113 !! Default option Dummy module NO LIM 3.0sea-ice model115 !! Default option Dummy module NO ESIM sea-ice model 114 116 !!---------------------------------------------------------------------- 115 117 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd *** 4 !! LIM-3 : ice thermodynamic4 !! sea-ice : master routine for thermodynamics 5 5 !!====================================================================== 6 6 !! History : LIM ! 2000-01 (M.A. Morales Maqueda, H. Goosse, T. Fichefet) LIM-1 … … 15 15 #if defined key_lim3 16 16 !!---------------------------------------------------------------------- 17 !! 'key_lim3' LIM3sea-ice model18 !!---------------------------------------------------------------------- 19 !! ice_thd : thermodynamic of sea ice20 !! ice_thd_init : initialisation of sea-ice thermodynamic 17 !! 'key_lim3' ESIM sea-ice model 18 !!---------------------------------------------------------------------- 19 !! ice_thd : thermodynamics of sea ice 20 !! ice_thd_init : initialisation of sea-ice thermodynamics 21 21 !!---------------------------------------------------------------------- 22 22 USE phycst ! physical constants 23 23 USE dom_oce ! ocean space and time domain variables 24 USE ice ! sea-ice variables24 USE ice ! sea-ice: variables 25 25 !!gm list trop longue ==>>> why not passage en argument d'appel ? 26 26 USE sbc_oce , ONLY : sss_m, sst_m, e3t_m, utau, vtau, ssu_m, ssv_m, frq_m, qns_tot, qsr_tot, sprecip, ln_cpl 27 27 USE sbc_ice , ONLY : qsr_oce, qns_oce, qemp_oce, qsr_ice, qns_ice, dqns_ice, evap_ice, qprec_ice, qevap_ice, & 28 28 & fr1_i0, fr2_i0 29 USE ice1D ! thermodynamic sea-icevariables30 USE icethd_zdf ! verticaldiffusion31 USE icethd_dh ! ice-snow growth and melt32 USE icethd_da ! lateral melting33 USE icethd_sal ! icesalinity34 USE icethd_ent ! iceenthalpy redistribution35 USE icethd_do ! lateral accretion36 USE iceitd ! remapping thickness distribution37 USE icetab ! 1D <==> 2D transformation38 USE icevar ! 39 USE icectl ! control print29 USE ice1D ! sea-ice: thermodynamics variables 30 USE icethd_zdf ! sea-ice: vertical heat diffusion 31 USE icethd_dh ! sea-ice: ice-snow growth and melt 32 USE icethd_da ! sea-ice: lateral melting 33 USE icethd_sal ! sea-ice: salinity 34 USE icethd_ent ! sea-ice: enthalpy redistribution 35 USE icethd_do ! sea-ice: growth in open water 36 USE iceitd ! sea-ice: remapping thickness distribution 37 USE icetab ! sea-ice: 1D <==> 2D transformation 38 USE icevar ! sea-ice: operations 39 USE icectl ! sea-ice: control print 40 40 ! 41 41 USE in_out_manager ! I/O manager 42 USE lbclnk ! lateral boundary condition - MPP links43 42 USE lib_mpp ! MPP library 44 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 43 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 44 USE lbclnk ! lateral boundary conditions (or mpp links) 45 45 USE timing ! Timing 46 46 … … 84 84 !! - call ice_thd_da for lateral ice melt 85 85 !! - back to the geographic grid 86 !! - call ice_thd_rem for remapping thickness distribution 87 !! - call ice_thd_do for ice growth in leads 86 88 !!--------------------------------------------------------------------- 87 89 INTEGER, INTENT(in) :: kt ! number of iteration … … 578 580 #else 579 581 !!---------------------------------------------------------------------- 580 !! Default option Dummy module NO LIM3sea-ice model582 !! Default option Dummy module NO ESIM sea-ice model 581 583 !!---------------------------------------------------------------------- 582 584 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_da.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd_da *** 4 !! LIM-3 sea-ice : computation of lateral melting in the ice4 !! sea-ice : lateral melting 5 5 !!====================================================================== 6 6 !! History : 4.0 ! 2016-03 (C. Rousset) original code … … 8 8 #if defined key_lim3 9 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' LIM-3 sea-ice model 11 !!---------------------------------------------------------------------- 12 !! ice_thd_da : sea ice lateral melting 10 !! 'key_lim3' ESIM sea-ice model 11 !!---------------------------------------------------------------------- 12 !! ice_thd_da : sea ice lateral melting 13 !! ice_thd_da_init : sea ice lateral melting initialization 13 14 !!---------------------------------------------------------------------- 14 15 USE par_oce ! ocean parameters … … 195 196 #else 196 197 !!---------------------------------------------------------------------- 197 !! Default option Dummy Module No LIM-3sea-ice model198 !! Default option Dummy Module NO ESIM sea-ice model 198 199 !!---------------------------------------------------------------------- 199 200 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_dh.F90
r8522 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd_dh *** 4 !! LIM-3 : thermodynamic growth and decay of the ice4 !! seaice : thermodynamic growth and melt 5 5 !!====================================================================== 6 6 !! History : LIM ! 2003-05 (M. Vancoppenolle) Original code in 1D … … 12 12 #if defined key_lim3 13 13 !!---------------------------------------------------------------------- 14 !! 'key_lim3' LIM3sea-ice model14 !! 'key_lim3' ESIM sea-ice model 15 15 !!---------------------------------------------------------------------- 16 !! ice_thd_dh : vertical accr./abl. and lateral ablation of sea ice 17 !!---------------------------------------------------------------------- 18 USE par_oce ! ocean parameters 19 USE phycst ! physical constants (OCE directory) 20 USE ice ! LIM variables 21 USE ice1D ! LIM thermodynamics 16 !! ice_thd_dh : vertical sea-ice growth and melt 17 !! ice_thd_snwblow : distribute snow fall between ice and ocean 18 !!---------------------------------------------------------------------- 19 USE dom_oce ! ocean space and time domain 20 USE phycst ! physical constants 21 USE ice ! sea-ice: variables 22 USE ice1D ! sea-ice: thermodynamics variables 22 23 USE icethd_sal ! sea-ice: salinity profiles 23 24 ! 24 25 USE in_out_manager ! I/O manager 25 26 USE lib_mpp ! MPP library 26 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)27 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 27 28 28 29 IMPLICIT NONE 29 30 PRIVATE 30 31 31 PUBLIC ice_thd_dh ! called by ice_thd32 PUBLIC ice_thd_snwblow ! called in sbcblk/sbcclio/sbccpl and here32 PUBLIC ice_thd_dh ! called by ice_thd 33 PUBLIC ice_thd_snwblow ! called in sbcblk/sbcclio/sbccpl and here 33 34 34 35 INTERFACE ice_thd_snwblow … … 47 48 !! *** ROUTINE ice_thd_dh *** 48 49 !! 49 !! ** Purpose : determines variations of ice and snow thicknesses.50 !! ** Purpose : compute ice and snow thickness changes due to growing/melting 50 51 !! 51 52 !! ** Method : Ice/Snow surface melting arises from imbalance in surface fluxes … … 679 680 #else 680 681 !!---------------------------------------------------------------------- 681 !! Default option NO LIM3sea-ice model682 !! Default option NO ESIM sea-ice model 682 683 !!---------------------------------------------------------------------- 683 684 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_do.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd_do *** 4 !! lateral thermodynamic growth of the ice4 !! sea-ice: sea ice growth in the leads (open water) 5 5 !!====================================================================== 6 6 !! History : LIM ! 2005-12 (M. Vancoppenolle) Original code … … 11 11 #if defined key_lim3 12 12 !!---------------------------------------------------------------------- 13 !! 'key_lim3' LIM3sea-ice model14 !!---------------------------------------------------------------------- 15 !! ice_thd_do : ice growth in open water (=lateral accretion of ice)16 !! ----------------------------------------------------------------------17 USE par_oce ! ocean parameters18 USE dom_oce ! domain variables13 !! 'key_lim3' ESIM sea-ice model 14 !!---------------------------------------------------------------------- 15 !! ice_thd_do : ice growth in open water (=lateral accretion of ice) 16 !! ice_thd_do_init : initialization 17 !!---------------------------------------------------------------------- 18 USE dom_oce ! ocean space and time domain 19 19 USE phycst ! physical constants 20 20 USE sbc_oce , ONLY : sss_m 21 21 USE sbc_ice , ONLY : utau_ice, vtau_ice 22 USE ice1D ! sea-ice: thermodynamics 22 USE ice1D ! sea-ice: thermodynamics variables 23 23 USE ice ! sea-ice: variables 24 24 USE icetab ! sea-ice: 2D <==> 1D … … 30 30 USE in_out_manager ! I/O manager 31 31 USE lib_mpp ! MPP library 32 USE l bclnk ! ocean lateral boundary conditions (or mpp link)33 USE l ib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)32 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 33 USE lbclnk ! lateral boundary conditions (or mpp links) 34 34 35 35 IMPLICIT NONE … … 59 59 !! ** Purpose : Computation of the evolution of the ice thickness and 60 60 !! concentration as a function of the heat balance in the leads. 61 !! It is only used for lateral accretion62 61 !! 63 62 !! ** Method : Ice is formed in the open water when ocean lose heat … … 495 494 !! 496 495 !! ** Purpose : Physical constants and parameters associated with 497 !! ice thermodynamics496 !! ice growth in the leads 498 497 !! 499 498 !! ** Method : Read the namthd_do namelist and check the parameters … … 534 533 #else 535 534 !!---------------------------------------------------------------------- 536 !! Default option NO LIM3sea-ice model535 !! Default option NO ESIM sea-ice model 537 536 !!---------------------------------------------------------------------- 538 537 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_ent.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd_ent *** 4 !! Redistribution of Enthalpy in the ice 5 !! on the new vertical grid 6 !! after vertical growth/decay 4 !! sea-ice: redistribution of enthalpy in the ice on the new vertical grid 5 !! after vertical growth/melt 7 6 !!====================================================================== 8 7 !! History : LIM ! 2003-05 (M. Vancoppenolle) Original code in 1D … … 15 14 #if defined key_lim3 16 15 !!---------------------------------------------------------------------- 17 !! 'key_lim3' LIM3sea-ice model16 !! 'key_lim3' ESIM sea-ice model 18 17 !!---------------------------------------------------------------------- 19 18 !! ice_thd_ent : ice redistribution of enthalpy 20 19 !!---------------------------------------------------------------------- 21 USE par_oce ! ocean parameters22 20 USE dom_oce ! domain variables 23 21 USE domain ! 24 22 USE phycst ! physical constants 25 USE ice ! LIMvariables26 USE ice1D ! LIM thermodynamics23 USE ice ! sea-ice: variables 24 USE ice1D ! sea-ice: thermodynamics variables 27 25 ! 28 26 USE in_out_manager ! I/O manager … … 67 65 !! References : Bitz & Lipscomb, JGR 99; Vancoppenolle et al., GRL, 2005 68 66 !!------------------------------------------------------------------- 69 REAL(wp), INTENT(inout), DIMENSION(:,:) :: qnew! new enthlapies (J.m-3, remapped)70 67 REAL(wp), DIMENSION(:,:), INTENT(inout) :: qnew ! new enthlapies (J.m-3, remapped) 68 ! 71 69 INTEGER :: ji ! dummy loop indices 72 70 INTEGER :: jk0, jk1 ! old/new layer indices 73 71 ! 74 REAL(wp), DIMENSION(jpij,0:nlay_i+2) :: zeh_cum0, zh_cum0 ! old cumulative enthlapies and layers interfaces75 REAL(wp), DIMENSION(jpij,0:nlay_i) :: zeh_cum1, zh_cum1 ! new cumulative enthlapies and layers interfaces76 REAL(wp), DIMENSION(jpij) :: zhnew ! new layers thicknesses72 REAL(wp), DIMENSION(jpij,0:nlay_i+2) :: zeh_cum0, zh_cum0 ! old cumulative enthlapies and layers interfaces 73 REAL(wp), DIMENSION(jpij,0:nlay_i) :: zeh_cum1, zh_cum1 ! new cumulative enthlapies and layers interfaces 74 REAL(wp), DIMENSION(jpij) :: zhnew ! new layers thicknesses 77 75 !!------------------------------------------------------------------- 78 76 … … 141 139 #else 142 140 !!---------------------------------------------------------------------- 143 !! Default option NO LIM3sea-ice model141 !! Default option NO ESIM sea-ice model 144 142 !!---------------------------------------------------------------------- 145 143 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_sal.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd_sal *** 4 !! LIM-3 sea-ice :computation of salinity variations in the ice4 !! sea-ice : computation of salinity variations in the ice 5 5 !!====================================================================== 6 6 !! History : - ! 2003-05 (M. Vancoppenolle) UCL-ASTR first coding for LIM3-1D … … 10 10 #if defined key_lim3 11 11 !!---------------------------------------------------------------------- 12 !! 'key_lim3' LIM-3sea-ice model12 !! 'key_lim3' ESIM sea-ice model 13 13 !!---------------------------------------------------------------------- 14 !! ice_thd_sal : salinity variations in the ice 14 !! ice_thd_sal : salinity variations in the ice 15 !! ice_thd_sal_init : initialization 15 16 !!---------------------------------------------------------------------- 16 USE par_oce ! ocean parameters17 USE phycst ! physical constants (ocean directory)18 USE ice ! LIMvariables19 USE ice1D ! LIM thermodynamics20 USE icevar ! LIM variables17 USE dom_oce ! ocean space and time domain 18 USE phycst ! physical constants 19 USE ice ! sea-ice: variables 20 USE ice1D ! sea-ice: thermodynamics variables 21 USE icevar ! sea-ice: operations 21 22 ! 22 23 USE in_out_manager ! I/O manager 23 24 USE lib_mpp ! MPP library 24 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)25 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 25 26 26 27 IMPLICIT NONE … … 153 154 #else 154 155 !!---------------------------------------------------------------------- 155 !! Default option Dummy Module No LIM-3sea-ice model156 !! Default option Dummy Module No ESIM sea-ice model 156 157 !!---------------------------------------------------------------------- 157 158 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_zdf.F90
r8531 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icethd_zdf *** 4 !! heat diffusion in sea ice 5 !! computation of surface and inner T 4 !! sea-ice: vertical heat diffusion in sea ice (computation of temperatures) 6 5 !!====================================================================== 7 6 !! History : LIM ! 02-2003 (M. Vancoppenolle) original 1D code … … 14 13 #if defined key_lim3 15 14 !!---------------------------------------------------------------------- 16 !! 'key_lim3' LIM3sea-ice model15 !! 'key_lim3' ESIM sea-ice model 17 16 !!---------------------------------------------------------------------- 18 USE par_oce ! ocean parameters17 USE dom_oce ! ocean space and time domain 19 18 USE phycst ! physical constants (ocean directory) 20 19 USE ice ! sea-ice: variables 21 USE ice1D ! sea-ice: thermodynamics 20 USE ice1D ! sea-ice: thermodynamics variables 22 21 ! 23 22 USE in_out_manager ! I/O manager 24 23 USE lib_mpp ! MPP library 25 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)24 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 26 25 27 26 IMPLICIT NONE 28 27 PRIVATE 29 28 30 PUBLIC ice_thd_zdf ! called by ice _thd31 PUBLIC ice_thd_zdf_init ! called by ice _stp29 PUBLIC ice_thd_zdf ! called by icethd 30 PUBLIC ice_thd_zdf_init ! called by icestp 32 31 33 32 !!** namelist (namthd_zdf) ** … … 47 46 48 47 SUBROUTINE ice_thd_zdf 49 !!------------------------------------------------------------------ 48 !!------------------------------------------------------------------- 50 49 !! *** ROUTINE ice_thd_zdf *** 51 50 !! ** Purpose : … … 63 62 !! 64 63 !! The successive steps of this routine are 65 !! 1. Thermal conductivity at the interfaces of the ice layers 66 !! 2. Internal absorbed radiation 67 !! 3. Scale factors due to non-uniform grid 64 !! 1. initialization of ice-snow layers thicknesses 65 !! 2. Internal absorbed and transmitted radiation 66 !! Then iterative procedure begins 67 !! 3. Thermal conductivity 68 68 !! 4. Kappa factors 69 !! Then iterative procedure begins70 69 !! 5. specific heat in the ice 71 70 !! 6. eta factors … … 75 74 !! Iterative procedure ends according to a criterion on evolution 76 75 !! of temperature 76 !! 10. Fluxes at the interfaces 77 77 !! 78 78 !! ** Inputs / Ouputs : (global commons) … … 82 82 !! number of layers in the ice/snow: nlay_i, nlay_s 83 83 !! total ice/snow thickness : ht_i_1d, ht_s_1d 84 !!------------------------------------------------------------------ 84 !!------------------------------------------------------------------- 85 85 INTEGER :: ji, jk ! spatial loop index 86 86 INTEGER :: numeq ! current reference number of equation … … 149 149 END DO 150 150 151 !------------------ ------------------------------------------------------------!152 ! 1) Initialization !153 !------------------ ------------------------------------------------------------!151 !------------------ 152 ! 1) Initialization 153 !------------------ 154 154 DO ji = 1, nidx 155 155 isnow(ji)= 1._wp - MAX( 0._wp , SIGN(1._wp, - ht_s_1d(ji) ) ) ! is there snow or not … … 173 173 t_su_1d(1:nidx) = MIN( t_su_1d(1:nidx), rt0 - ztsu_err ) ! necessary 174 174 ! 175 !------------- -----------------------------------------------------------------|176 ! 2) Radiation |177 !------------- -----------------------------------------------------------------|175 !------------- 176 ! 2) Radiation 177 !------------- 178 178 ! 179 179 z1_hsu = 1._wp / 0.1_wp ! threshold for the computation of i0 180 180 DO ji = 1, nidx 181 !------------------- 182 ! Computation of i0 183 !------------------- 181 ! --- Computation of i0 --- ! 184 182 ! i0 describes the fraction of solar radiation which does not contribute 185 183 ! to the surface energy budget but rather penetrates inside the ice. … … 193 191 i0(ji) = ( 1._wp - isnow(ji) ) * ( fr1_i0_1d(ji) + zfac * fr2_i0_1d(ji) ) 194 192 195 !------------------------------------------------------- 196 ! Solar radiation absorbed / transmitted at the surface 197 ! Derivative of the non solar flux 198 !------------------------------------------------------- 193 ! --- Solar radiation absorbed / transmitted at the surface --- ! 194 ! Derivative of the non solar flux 199 195 zfsw (ji) = qsr_ice_1d(ji) * ( 1 - i0(ji) ) ! Shortwave radiation absorbed at surface 200 196 zftrice(ji) = qsr_ice_1d(ji) * i0(ji) ! Solar radiation transmitted below the surface layer … … 203 199 END DO 204 200 205 !--------------------------------------------------------- 206 ! Transmission - absorption of solar radiation in the ice 207 !--------------------------------------------------------- 201 ! --- Transmission/absorption of solar radiation in the ice --- ! 208 202 zradtr_s(1:nidx,0) = zftrice(1:nidx) 209 203 DO jk = 1, nlay_s … … 227 221 228 222 ftr_ice_1d(1:nidx) = zradtr_i(1:nidx,nlay_i) ! record radiation transmitted below the ice 229 230 !------------------------------------------------------------------------------|231 ! 3) Iterative procedure begins |232 !------------------------------------------------------------------------------|233 223 ! 234 224 iconv = 0 ! number of iterations 235 225 zdti_max = 1000._wp ! maximal value of error on all points 236 DO WHILE ( zdti_max > zdti_bnd .AND. iconv < iconv_max ) 226 ! !----------------------------! 227 DO WHILE ( zdti_max > zdti_bnd .AND. iconv < iconv_max ) ! Iterative procedure begins ! 228 ! !----------------------------! 237 229 ! 238 230 iconv = iconv + 1 … … 241 233 ztsb(1:nidx,:) = t_s_1d(1:nidx,:) 242 234 ! 243 !------------------------------------------------------------------------------| 244 ! 4) Sea ice thermal conductivity | 245 !------------------------------------------------------------------------------| 246 ! 235 !-------------------------------- 236 ! 3) Sea ice thermal conductivity 237 !-------------------------------- 247 238 IF( ln_cndi_U64 ) THEN !-- Untersteiner (1964) formula: k = k0 + beta.S/T 248 239 ! … … 277 268 ztcond_i(1:nidx,:) = MAX( zkimin, ztcond_i(1:nidx,:) ) 278 269 ! 279 !------------------------------------------------------------------------------| 280 ! 5) G(he) - enhancement of thermal conductivity in mono-category case | 281 !------------------------------------------------------------------------------| 282 ! 270 !--- G(he) : enhancement of thermal conductivity in mono-category case 283 271 ! Computation of effective thermal conductivity G(h) 284 272 ! Used in mono-category case only to simulate an ITD implicitly … … 309 297 END SELECT 310 298 ! 311 !------------------------------------------------------------------------------| 312 ! 6) kappa factors | 313 !------------------------------------------------------------------------------| 314 ! 299 !----------------- 300 ! 4) kappa factors 301 !----------------- 315 302 !--- Snow 316 303 DO jk = 0, nlay_s-1 … … 338 325 END DO 339 326 ! 340 !------------------------------------------------------------------------------| 341 ! 7) Sea ice specific heat, eta factors | 342 !------------------------------------------------------------------------------| 343 ! 327 !-------------------------------------- 328 ! 5) Sea ice specific heat, eta factors 329 !-------------------------------------- 344 330 DO jk = 1, nlay_i 345 331 DO ji = 1, nidx … … 355 341 END DO 356 342 ! 357 !------------------------------------------------------------------------------| 358 ! 8) surface flux computation | 359 !------------------------------------------------------------------------------| 360 ! 343 !---------------------------- 344 ! 6) surface flux computation 345 !---------------------------- 361 346 IF ( ln_dqns_i ) THEN 362 347 DO ji = 1, nidx … … 370 355 END DO 371 356 ! 372 !------------------------------------------------------------------------------| 373 ! 9) tridiagonal system terms | 374 !------------------------------------------------------------------------------| 375 ! 357 !---------------------------- 358 ! 7) tridiagonal system terms 359 !---------------------------- 376 360 !!layer denotes the number of the layer in the snow or in the ice 377 361 !!numeq denotes the reference number of the equation in the tridiagonal … … 414 398 415 399 DO ji = 1, nidx 416 IF ( ht_s_1d(ji) > 0.0 ) THEN 417 ! 418 !------------------------------------------------------------------------------| 419 ! snow-covered cells | 420 !------------------------------------------------------------------------------| 400 ! !---------------------! 401 IF ( ht_s_1d(ji) > 0.0 ) THEN ! snow-covered cells ! 402 ! !---------------------! 421 403 ! 422 404 !!snow interior terms (bottom equation has the same form as the others) … … 435 417 ENDIF 436 418 437 IF ( t_su_1d(ji) < rt0 ) THEN 438 439 !------------------------------------------------------------------------------| 440 ! case 1 : no surface melting - snow present | 441 !------------------------------------------------------------------------------| 419 IF ( t_su_1d(ji) < rt0 ) THEN !-- case 1 : no surface melting 420 442 421 numeqmin(ji) = 1 443 422 numeqmax(ji) = nlay_i + nlay_s + 1 … … 455 434 zindterm(ji,2) = ztsold(ji,1) + zeta_s(ji,1) * zradab_s(ji,1) 456 435 457 ELSE 458 ! 459 !------------------------------------------------------------------------------| 460 ! case 2 : surface is melting - snow present | 461 !------------------------------------------------------------------------------| 436 ELSE !-- case 2 : surface is melting 462 437 ! 463 438 numeqmin(ji) = 2 … … 471 446 & ( zradab_s(ji,1) + zkappa_s(ji,0) * zg1s * t_su_1d(ji) ) 472 447 ENDIF 473 ELSE 448 ! !---------------------! 449 ELSE ! cells without snow ! 450 ! !---------------------! 474 451 ! 475 !------------------------------------------------------------------------------| 476 ! cells without snow | 477 !------------------------------------------------------------------------------| 478 ! 479 IF ( t_su_1d(ji) < rt0 ) THEN 480 ! 481 !------------------------------------------------------------------------------| 482 ! case 3 : no surface melting - no snow | 483 !------------------------------------------------------------------------------| 452 IF ( t_su_1d(ji) < rt0 ) THEN !-- case 1 : no surface melting 484 453 ! 485 454 numeqmin(ji) = nlay_s + 1 … … 512 481 ENDIF 513 482 514 ELSE 515 516 ! 517 !------------------------------------------------------------------------------| 518 ! case 4 : surface is melting - no snow | 519 !------------------------------------------------------------------------------| 520 ! 483 ELSE !-- case 2 : surface is melting 484 521 485 numeqmin(ji) = nlay_s + 2 522 486 numeqmax(ji) = nlay_i + nlay_s + 1 … … 543 507 END DO 544 508 ! 545 !------------------------------------------------------------------------------| 546 ! 10) tridiagonal system solving | 547 !------------------------------------------------------------------------------| 548 ! 509 !------------------------------ 510 ! 8) tridiagonal system solving 511 !------------------------------ 549 512 ! Solve the tridiagonal system with Gauss elimination method. 550 ! Thomas algorithm, from Computational fluid Dynamics, J.D. ANDERSON, 551 ! McGraw-Hill 1984. 513 ! Thomas algorithm, from Computational fluid Dynamics, J.D. ANDERSON, McGraw-Hill 1984. 552 514 553 515 maxnumeqmax = 0 … … 595 557 END DO 596 558 ! 597 !-------------------------------------------------------------------------- 598 ! 11) Has the scheme converged ?, end of the iterative procedure | 599 !-------------------------------------------------------------------------- 600 ! 559 !-------------------------------------------------------------- 560 ! 9) Has the scheme converged ?, end of the iterative procedure 561 !-------------------------------------------------------------- 601 562 ! check that nowhere it has started to melt 602 563 ! zdti_max is a measure of error, it has to be under zdti_bnd … … 632 593 WRITE(numout,*) ' iconv : ', iconv 633 594 ENDIF 634 635 ! 636 !-------------------------------------------------------------------------! 637 ! 12) Fluxes at the interfaces ! 638 !-------------------------------------------------------------------------! 595 ! 596 !----------------------------- 597 ! 10) Fluxes at the interfaces 598 !----------------------------- 639 599 DO ji = 1, nidx 640 600 ! ! surface ice conduction flux … … 694 654 695 655 SUBROUTINE ice_thd_enmelt 696 !!------------------------------------------------------------------- ----656 !!------------------------------------------------------------------- 697 657 !! *** ROUTINE ice_thd_enmelt *** 698 658 !! … … 764 724 ! 765 725 IF ( ( ln_cndi_U64 .AND. ln_cndi_P07 ) .OR. ( .NOT.ln_cndi_U64 .AND. .NOT.ln_cndi_P07 ) ) THEN 766 CALL ctl_stop( 'ice_thd_zdf_init: choose one and only one formulation for thermal conducti vity(ln_cndi_U64 or ln_cndi_P07)' )726 CALL ctl_stop( 'ice_thd_zdf_init: choose one and only one formulation for thermal conduction (ln_cndi_U64 or ln_cndi_P07)' ) 767 727 ENDIF 768 728 ! … … 771 731 #else 772 732 !!---------------------------------------------------------------------- 773 !! Dummy ModuleNo ESIM sea-ice model733 !! Default option Dummy Module No ESIM sea-ice model 774 734 !!---------------------------------------------------------------------- 775 735 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceupdate.F90
r8518 r8534 16 16 #if defined key_lim3 17 17 !!---------------------------------------------------------------------- 18 !! 'key_lim3' LIM 3.0sea-ice model18 !! 'key_lim3' ESIM sea-ice model 19 19 !!---------------------------------------------------------------------- 20 20 !! ice_update_alloc : allocate the iceupdate arrays … … 23 23 !! ice_update_tau : update i- and j-stresses, and its modulus at the ocean surface 24 24 !!---------------------------------------------------------------------- 25 USE par_oce ! ocean parameters26 25 USE oce , ONLY : sshn, sshb 27 26 USE phycst ! physical constants … … 42 41 ! 43 42 USE in_out_manager ! I/O manager 44 USE iom ! xIO server 45 USE lbclnk ! ocean lateral boundary condition - MPP exchanges 43 USE iom ! I/O manager library 46 44 USE lib_mpp ! MPP library 47 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 45 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 46 USE lbclnk ! lateral boundary conditions (or mpp links) 48 47 USE timing ! Timing 49 48 … … 110 109 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalb_cs, zalb_os ! 3D workspace 111 110 !!--------------------------------------------------------------------- 112 IF( nn_timing == 1 ) CALL timing_start('ice_update _flx')111 IF( nn_timing == 1 ) CALL timing_start('ice_update') 113 112 114 113 IF( kt == nit000 .AND. lwp ) THEN … … 213 212 IF( ln_icectl ) CALL ice_prt (kt, iiceprt, jiceprt, 3, 'Final state ice_update') ! prints 214 213 IF( ln_ctl ) CALL ice_prt3D ('iceupdate') ! prints 215 IF( nn_timing == 1 ) CALL timing_stop ('ice_update _flx')! timing214 IF( nn_timing == 1 ) CALL timing_stop ('ice_update') ! timing 216 215 ! 217 216 END SUBROUTINE ice_update_flx … … 251 250 !!--------------------------------------------------------------------- 252 251 253 IF( nn_timing == 1 ) CALL timing_start('ice_update _tau')252 IF( nn_timing == 1 ) CALL timing_start('ice_update') 254 253 255 254 IF( kt == nit000 .AND. lwp ) THEN … … 297 296 CALL lbc_lnk_multi( utau, 'U', -1., vtau, 'V', -1. ) ! lateral boundary condition 298 297 ! 299 IF( nn_timing == 1 ) CALL timing_stop('ice_update _tau')298 IF( nn_timing == 1 ) CALL timing_stop('ice_update') 300 299 ! 301 300 END SUBROUTINE ice_update_tau … … 373 372 #else 374 373 !!---------------------------------------------------------------------- 375 !! Default option Dummy module NO LIM3sea-ice model374 !! Default option Dummy module NO ESIM sea-ice model 376 375 !!---------------------------------------------------------------------- 377 376 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icevar.F90
r8522 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icevar *** 4 !! 4 !! sea-ice: Different sets of ice model variables 5 5 !! how to switch from one to another 6 6 !! … … 36 36 #if defined key_lim3 37 37 !!---------------------------------------------------------------------- 38 !! 'key_lim3' LIM3sea-ice model38 !! 'key_lim3' ESIM sea-ice model 39 39 !!---------------------------------------------------------------------- 40 40 !! ice_var_agg : integrate variables over layers and categories … … 47 47 !! ice_var_itd : convert 1-cat to multiple cat 48 48 !!---------------------------------------------------------------------- 49 USE par_oce ! ocean parameters49 USE dom_oce ! ocean space and time domain 50 50 USE phycst ! physical constants (ocean directory) 51 51 USE sbc_oce , ONLY : sss_m 52 USE ice ! icevariables53 USE ice1D ! ice variables (thermodynamics)52 USE ice ! sea-ice: variables 53 USE ice1D ! sea-ice: thermodynamics variables 54 54 ! 55 55 USE in_out_manager ! I/O manager 56 56 USE lib_mpp ! MPP library 57 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)57 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 58 58 59 59 IMPLICIT NONE … … 77 77 78 78 SUBROUTINE ice_var_agg( kn ) 79 !!------------------------------------------------------------------ 79 !!------------------------------------------------------------------- 80 80 !! *** ROUTINE ice_var_agg *** 81 81 !! 82 82 !! ** Purpose : aggregates ice-thickness-category variables to 83 83 !! all-ice variables, i.e. it turns VGLO into VAGG 84 !!------------------------------------------------------------------ 84 !!------------------------------------------------------------------- 85 85 INTEGER, INTENT( in ) :: kn ! =1 state variables only 86 86 ! ! >1 state variables + others … … 88 88 INTEGER :: ji, jj, jk, jl ! dummy loop indices 89 89 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z1_at_i, z1_vt_i 90 !!------------------------------------------------------------------ 90 !!------------------------------------------------------------------- 91 91 ! 92 92 ! ! integrated values … … 143 143 144 144 SUBROUTINE ice_var_glo2eqv 145 !!------------------------------------------------------------------ 145 !!------------------------------------------------------------------- 146 146 !! *** ROUTINE ice_var_glo2eqv *** 147 147 !! 148 148 !! ** Purpose : computes equivalent variables as function of 149 149 !! global variables, i.e. it turns VGLO into VEQV 150 !!------------------------------------------------------------------ 150 !!------------------------------------------------------------------- 151 151 INTEGER :: ji, jj, jk, jl ! dummy loop indices 152 152 REAL(wp) :: ze_i ! local scalars … … 155 155 REAL(wp) :: zlay_i, zlay_s ! - - 156 156 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z1_a_i, z1_v_i 157 !!------------------------------------------------------------------ 157 !!------------------------------------------------------------------- 158 158 159 159 !!gm Question 2: It is possible to define existence of sea-ice in a common way between … … 242 242 243 243 SUBROUTINE ice_var_eqv2glo 244 !!------------------------------------------------------------------ 244 !!------------------------------------------------------------------- 245 245 !! *** ROUTINE ice_var_eqv2glo *** 246 246 !! 247 247 !! ** Purpose : computes global variables as function of 248 248 !! equivalent variables, i.e. it turns VEQV into VGLO 249 !!------------------------------------------------------------------ 249 !!------------------------------------------------------------------- 250 250 ! 251 251 v_i (:,:,:) = ht_i(:,:,:) * a_i(:,:,:) … … 257 257 258 258 SUBROUTINE ice_var_salprof 259 !!------------------------------------------------------------------ 259 !!------------------------------------------------------------------- 260 260 !! *** ROUTINE ice_var_salprof *** 261 261 !! … … 270 270 !! 271 271 !! ** References : Vancoppenolle et al., 2007 272 !!------------------------------------------------------------------ 272 !!------------------------------------------------------------------- 273 273 INTEGER :: ji, jj, jk, jl ! dummy loop index 274 274 REAL(wp) :: zsal, z1_dS … … 277 277 REAL(wp), PARAMETER :: zsi0 = 3.5_wp 278 278 REAL(wp), PARAMETER :: zsi1 = 4.5_wp 279 !!------------------------------------------------------------------ 279 !!------------------------------------------------------------------- 280 280 281 281 !!gm Question: Remove the option 3 ? How many years since it last use ? … … 355 355 356 356 SUBROUTINE ice_var_bv 357 !!------------------------------------------------------------------ 357 !!------------------------------------------------------------------- 358 358 !! *** ROUTINE ice_var_bv *** 359 359 !! … … 363 363 !! 364 364 !! References : Vancoppenolle et al., JGR, 2007 365 !!------------------------------------------------------------------ 365 !!------------------------------------------------------------------- 366 366 INTEGER :: ji, jj, jk, jl ! dummy loop indices 367 !!------------------------------------------------------------------ 367 !!------------------------------------------------------------------- 368 368 ! 369 369 !!gm I prefere to use WHERE / ELSEWHERE to set it to zero only where needed <<<=== to be done … … 398 398 REAL(wp), PARAMETER :: zsi0 = 3.5_wp 399 399 REAL(wp), PARAMETER :: zsi1 = 4.5_wp 400 !!------------------------------------------------------------------- --400 !!------------------------------------------------------------------- 401 401 ! 402 402 SELECT CASE ( nn_icesal ) … … 543 543 544 544 SUBROUTINE ice_var_itd( zhti, zhts, zai, zht_i, zht_s, za_i ) 545 !!------------------------------------------------------------------ 545 !!------------------------------------------------------------------- 546 546 !! *** ROUTINE ice_var_itd *** 547 547 !! … … 579 579 INTEGER , DIMENSION(4) :: itest 580 580 !!------------------------------------------------------------------- 581 582 !-------------------------------------------------------------------- 583 ! initialisation of variables 584 !-------------------------------------------------------------------- 581 ! 582 ! ---------------------------------------- 583 ! distribution over the jpl ice categories 584 ! ---------------------------------------- 585 ! a gaussian distribution for ice concentration is used 586 ! then we check whether the distribution fullfills 587 ! volume and area conservation, positivity and ice categories bounds 585 588 ijpij = SIZE( zhti , 1 ) 586 589 zht_i(1:ijpij,1:jpl) = 0._wp … … 588 591 za_i (1:ijpij,1:jpl) = 0._wp 589 592 590 ! ----------------------------------------591 ! distribution over the jpl ice categories592 ! ----------------------------------------593 593 DO ji = 1, ijpij 594 594 … … 604 604 END DO 605 605 606 ! initialisation of tests 607 itest(:) = 0 608 609 i_fill = jpl + 1 !==================================== 610 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 611 ! iteration !==================================== 606 itest(:) = 0 607 i_fill = jpl + 1 !------------------------------------ 608 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 609 ! !------------------------------------ 612 610 i_fill = i_fill - 1 613 614 ! initialisation of ice variables for each try 611 ! 615 612 zht_i(ji,1:jpl) = 0._wp 616 613 za_i (ji,1:jpl) = 0._wp 617 614 itest(:) = 0 618 615 619 ! *** case very thin ice: fill only category 1 620 IF ( i_fill == 1 ) THEN 616 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 621 617 zht_i(ji,1) = zhti(ji) 622 618 za_i (ji,1) = zai (ji) 623 624 ! *** case ice is thicker: fill categories >1 625 ELSE 626 627 ! Fill ice thicknesses in the (i_fill-1) cat by hmean 619 ELSE !-- case ice is thicker: fill categories >1 620 ! thickness 628 621 DO jl = 1, i_fill - 1 629 622 zht_i(ji,jl) = hi_mean(jl) 630 623 END DO 631 624 632 ! Concentrations in the (i_fill-1) categories625 ! concentration 633 626 za_i(ji,jl0) = zai(ji) / SQRT(REAL(jpl)) 634 627 DO jl = 1, i_fill - 1 … … 639 632 END DO 640 633 641 ! Concentration in the last (i_fill)category634 ! last category 642 635 za_i(ji,i_fill) = zai(ji) - SUM( za_i(ji,1:i_fill-1) ) 643 644 ! Ice thickness in the last (i_fill) category645 636 zV = SUM( za_i(ji,1:i_fill-1) * zht_i(ji,1:i_fill-1) ) 646 637 zht_i(ji,i_fill) = ( zhti(ji) * zai(ji) - zV ) / MAX( za_i(ji,i_fill), epsi10 ) … … 659 650 ENDIF 660 651 661 ENDIF ! case ice is thick or thin652 ENDIF 662 653 663 !---------------------664 654 ! Compatibility tests 665 !--------------------- 666 ! Test 1: area conservation 667 zconv = ABS( zai(ji) - SUM( za_i(ji,1:jpl) ) ) 668 IF ( zconv < epsi06 ) itest(1) = 1 655 zconv = ABS( zai(ji) - SUM( za_i(ji,1:jpl) ) ) 656 IF ( zconv < epsi06 ) itest(1) = 1 ! Test 1: area conservation 669 657 670 ! Test 2: volume conservation671 658 zconv = ABS( zhti(ji)*zai(ji) - SUM( za_i(ji,1:jpl)*zht_i(ji,1:jpl) ) ) 672 IF ( zconv < epsi06 ) itest(2) = 1 659 IF ( zconv < epsi06 ) itest(2) = 1 ! Test 2: volume conservation 673 660 674 ! Test 3: thickness of the last category is in-bounds ? 675 IF ( zht_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 661 IF ( zht_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ? 676 662 677 ! Test 4: positivity of ice concentrations678 663 itest(4) = 1 679 664 DO jl = 1, i_fill 680 IF ( za_i(ji,jl) < 0._wp ) itest(4) = 0 665 IF ( za_i(ji,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations 681 666 END DO 682 ! ! ============================667 ! !---------------------------- 683 668 END DO ! end iteration on categories 684 ! !============================ 685 ENDIF ! if zhti > 0 686 END DO ! i loop 687 688 ! ------------------------------------------------ 689 ! Adding Snow in each category where za_i is not 0 690 ! ------------------------------------------------ 669 ! !---------------------------- 670 ENDIF 671 END DO 672 673 ! Add Snow in each category where za_i is not 0 691 674 DO jl = 1, jpl 692 675 DO ji = 1, ijpij … … 707 690 #else 708 691 !!---------------------------------------------------------------------- 709 !! Default option Dummy module NO LIM3sea-ice model692 !! Default option Dummy module NO ESIM sea-ice model 710 693 !!---------------------------------------------------------------------- 711 694 #endif -
branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icewri.F90
r8522 r8534 2 2 !!====================================================================== 3 3 !! *** MODULE icewri *** 4 !! Ice diagnostics : write ice output files4 !! sea-ice : output ice variables 5 5 !!====================================================================== 6 6 #if defined key_lim3 7 7 !!---------------------------------------------------------------------- 8 !! 'key_lim3' LIM3sea-ice model8 !! 'key_lim3' ESIM sea-ice model 9 9 !!---------------------------------------------------------------------- 10 10 !! ice_wri : write of the diagnostics variables in ouput file … … 20 20 ! 21 21 USE ioipsl ! 22 USE in_out_manager ! 23 USE lbclnk !22 USE in_out_manager ! I/O manager 23 USE iom ! I/O manager library 24 24 USE lib_mpp ! MPP library 25 USE iom ! 25 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) 26 USE lbclnk ! lateral boundary conditions (or mpp links) 26 27 USE timing ! Timing 27 USE lib_fortran ! Fortran utilities28 28 29 29 IMPLICIT NONE … … 485 485 #else 486 486 !!---------------------------------------------------------------------- 487 !! Default option : Empty module NO LIM sea-ice model487 !! Default option : Empty module NO ESIM sea-ice model 488 488 !!---------------------------------------------------------------------- 489 489 #endif
Note: See TracChangeset
for help on using the changeset viewer.