Changeset 2475 for branches/nemo_v3_3_beta
- Timestamp:
- 2010-12-17T07:45:43+01:00 (14 years ago)
- Location:
- branches/nemo_v3_3_beta/NEMOGCM/NEMO
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90
r2370 r2475 15 15 IMPLICIT NONE 16 16 PRIVATE 17 18 INTEGER , PUBLIC :: numit !: ice iteration index 19 REAL(wp), PUBLIC :: rdt_ice !: ice time step 17 20 18 ! !* Share parameters namelist (namicerun read in iceini)*21 ! !!* namicerun read in iceini * 19 22 CHARACTER(len=32) , PUBLIC :: cn_icerst_in = "restart_ice_in" !: suffix of ice restart name (input) 20 23 CHARACTER(len=32) , PUBLIC :: cn_icerst_out = "restart_ice" !: suffix of ice restart name (output) … … 22 25 LOGICAL , PUBLIC :: ln_limdmp = .FALSE. !: Ice damping 23 26 LOGICAL , PUBLIC :: ln_nicep = .TRUE. !: flag grid points output (T) or not (F) 24 REAL(wp) , PUBLIC :: hsndif = 0.e0 !: computation of temp. in snow (0) or not (9999) 25 REAL(wp) , PUBLIC :: hicdif = 0.e0 !: computation of temp. in ice (0) or not (9999) 26 REAL(wp), DIMENSION(2), PUBLIC :: acrit = (/ 1.e-06 , 1.e-06 /) !: minimum fraction for leads in 27 ! !: north and south hemisphere 28 !!* ice-dynamic namelist (namicedyn) * 29 INTEGER , PUBLIC :: nbiter = 1 !: number of sub-time steps for relaxation 30 INTEGER , PUBLIC :: nbitdr = 250 !: maximum number of iterations for relaxation 31 INTEGER , PUBLIC :: nevp = 360 !: number of EVP subcycling iterations 32 INTEGER , PUBLIC :: telast = 3600 !: timescale for EVP elastic waves 33 REAL(wp), PUBLIC :: rdt_ice !: ice time step 34 REAL(wp), PUBLIC :: epsd = 1.0e-20 !: tolerance parameter for dynamic 35 REAL(wp), PUBLIC :: alpha = 0.5 !: coefficient for semi-implicit coriolis 36 REAL(wp), PUBLIC :: dm = 0.6e+03 !: diffusion constant for dynamics 37 REAL(wp), PUBLIC :: om = 0.5 !: relaxation constant 38 REAL(wp), PUBLIC :: resl = 5.0e-05 !: maximum value for the residual of relaxation 39 REAL(wp), PUBLIC :: cw = 5.0e-03 !: drag coefficient for oceanic stress 40 REAL(wp), PUBLIC :: angvg = 0.e0 !: turning angle for oceanic stress 41 REAL(wp), PUBLIC :: pstar = 1.0e+04 !: first bulk-rheology parameter 42 REAL(wp), PUBLIC :: c_rhg = 20.e0 !: second bulk-rhelogy parameter 43 REAL(wp), PUBLIC :: etamn = 0.e+07 !: minimun value for viscosity 44 REAL(wp), PUBLIC :: creepl = 2.e-08 !: creep limit 45 REAL(wp), PUBLIC :: ecc = 2.e0 !: eccentricity of the elliptical yield curve 46 REAL(wp), PUBLIC :: ahi0 = 350.e0 !: sea-ice hor. eddy diffusivity coeff. (m2/s) 47 REAL(wp), PUBLIC :: alphaevp = 1.e0 !: coefficient for the solution of EVP int. stresses 27 REAL(wp) , PUBLIC :: hsndif = 0._wp !: snow temp. computation (0) or not (9999) 28 REAL(wp) , PUBLIC :: hicdif = 0._wp !: ice temp. computation (0) or not (9999) 29 REAL(wp), DIMENSION(2), PUBLIC :: acrit = (/ 1.e-6_wp , 1.e-6_wp /) !: minimum lead fraction in the 2 hemisphere 30 31 ! !!* ice-dynamic namelist (namicedyn) * 32 INTEGER , PUBLIC :: nbiter = 1 !: number of sub-time steps for relaxation 33 INTEGER , PUBLIC :: nbitdr = 250 !: maximum number of iterations for relaxation 34 INTEGER , PUBLIC :: nevp = 360 !: number of EVP subcycling iterations 35 INTEGER , PUBLIC :: telast = 3600 !: timescale for EVP elastic waves 36 REAL(wp), PUBLIC :: epsd = 1.0e-20_wp !: tolerance parameter for dynamic 37 REAL(wp), PUBLIC :: alpha = 0.5_wp !: coefficient for semi-implicit coriolis 38 REAL(wp), PUBLIC :: dm = 0.6e+03_wp !: diffusion constant for dynamics 39 REAL(wp), PUBLIC :: om = 0.5_wp !: relaxation constant 40 REAL(wp), PUBLIC :: resl = 5.0e-05_wp !: maximum value for the residual of relaxation 41 REAL(wp), PUBLIC :: cw = 5.0e-03_wp !: drag coefficient for oceanic stress 42 REAL(wp), PUBLIC :: angvg = 0._wp !: turning angle for oceanic stress 43 REAL(wp), PUBLIC :: pstar = 1.0e+04_wp !: first bulk-rheology parameter 44 REAL(wp), PUBLIC :: c_rhg = 20._wp !: second bulk-rhelogy parameter 45 REAL(wp), PUBLIC :: etamn = 0._wp !: minimun value for viscosity 46 REAL(wp), PUBLIC :: creepl = 2.e-08_wp !: creep limit 47 REAL(wp), PUBLIC :: ecc = 2._wp !: eccentricity of the elliptical yield curve 48 REAL(wp), PUBLIC :: ahi0 = 350._wp !: sea-ice hor. eddy diffusivity coeff. (m2/s) 49 REAL(wp), PUBLIC :: alphaevp = 1._wp !: coefficient for the solution of EVP int. stresses 48 50 49 REAL(wp), PUBLIC :: usecc2 !: = 1.0 / ( ecc * ecc )50 REAL(wp), PUBLIC :: rhoco !: = rau0 * cw51 REAL(wp), PUBLIC :: sangvg, cangvg !: sin and cos of the turning angle for ocean stress52 REAL(wp), PUBLIC :: pstarh !: pstar / 2.051 REAL(wp), PUBLIC :: usecc2 !: = 1.0 / ( ecc * ecc ) 52 REAL(wp), PUBLIC :: rhoco !: = rau0 * cw 53 REAL(wp), PUBLIC :: sangvg, cangvg !: sin and cos of the turning angle for ocean stress 54 REAL(wp), PUBLIC :: pstarh !: pstar / 2.0 53 55 54 56 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ahiu , ahiv !: hor. diffusivity coeff. at ocean U- and V-points (m2/s) … … 58 60 !!* Ice Rheology 59 61 # if defined key_lim2_vp 60 ! 62 ! !!* VP rheology * 61 63 LOGICAL , PUBLIC :: lk_lim2_vp = .TRUE. !: Visco-Plactic reology flag 62 64 ! … … 64 66 ! 65 67 # else 66 ! 68 ! !!* EVP rheology * 67 69 LOGICAL , PUBLIC:: lk_lim2_vp = .FALSE. !: Visco-Plactic reology flag 68 70 ! … … 96 98 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: rdmicif !: Variation of ice mass 97 99 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qldif !: heat balance of the lead (or of the open ocean) 98 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qcmif !: Energy needed to bring the ocean surface layer until its freezing100 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qcmif !: Energy needed to freeze the ocean surface layer 99 101 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fdtcn !: net downward heat flux from the ice to the ocean 100 102 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qdtcn !: energy from the ice to the ocean point (at a factor 2) 101 103 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: thcm !: part of the solar energy used in the lead heat budget 102 104 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fstric !: Solar flux transmitted trough the ice 103 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ffltbif !: Arraylinked with the max heat contained in brine pockets (?)105 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ffltbif !: linked with the max heat contained in brine pockets (?) 104 106 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fscmbq !: Linked with the solar flux below the ice (?) 105 107 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fsbbq !: Also linked with the solar flux below the ice (?) 106 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qfvbq !: Arrayused to store energy in case of toral lateral ablation (?)108 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qfvbq !: used to store energy in case of toral lateral ablation (?) 107 109 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: dmgwi !: Variation of the mass of snow ice 108 109 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: u_ice, v_ice !: two components of the ice velocity at I-point (m/s) 110 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: u_oce, v_oce !: two components of the ocean velocity at I-point (m/s) 110 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: u_ice, v_ice !: two components of the ice velocity at I-point (m/s) 111 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: u_oce, v_oce !: two components of the ocean velocity at I-point (m/s) 111 112 112 113 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jplayersp1) :: tbif !: Temperature inside the ice/snow layer -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
r2319 r2475 32 32 PUBLIC ice_init_2 ! called by sbcice_lim_2.F90 33 33 34 INTEGER, PUBLIC :: numit !: iteration number35 36 34 !!---------------------------------------------------------------------- 37 35 !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010) 38 36 !! $Id$ 39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)37 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 40 38 !!---------------------------------------------------------------------- 41 42 39 CONTAINS 43 40 … … 49 46 !!---------------------------------------------------------------------- 50 47 ! 51 ! Open the namelist file52 CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 53 CALL ice_run_2 ! read in namelist some run parameters54 55 ! Louvain la Neuve Ice model56 rdt_ice = nn_fsbc * rdttra(1) 48 ! ! Open the namelist file 49 CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 50 ! 51 CALL ice_run_2 ! read in namelist some run parameters 52 ! 53 rdt_ice = nn_fsbc * rdttra(1) ! sea-ice time step 57 54 numit = nit000 - 1 58 59 CALL lim_msh_2 ! ice mesh initialization 60 61 ! Initial sea-ice state 62 IF( .NOT.ln_rstart ) THEN 63 CALL lim_istate_2 ! start from rest: sea-ice deduced from sst 64 ELSE 65 CALL lim_rst_read_2 ! start from a restart file 55 ! 56 CALL lim_msh_2 ! ice mesh initialization 57 ! 58 ! ! Initial sea-ice state 59 IF( .NOT.ln_rstart ) THEN ; CALL lim_istate_2 ! start from rest: sea-ice deduced from sst 60 ELSE ; CALL lim_rst_read_2 ! start from a restart file 66 61 ENDIF 67 68 tn_ice(:,:,1) = sist(:,:) 69 fr_i (:,:) = 1.0 - frld(:,:) ! initialisation of sea-ice fraction62 ! 63 tn_ice(:,:,1) = sist(:,:) ! initialisation of ice temperature 64 fr_i (:,:) = 1.0 - frld(:,:) ! initialisation of sea-ice fraction 70 65 ! 71 66 END SUBROUTINE ice_init_2 … … 86 81 !!------------------------------------------------------------------- 87 82 ! 88 REWIND ( numnam_ice )! Read Namelist namicerun89 READ 90 91 IF(lwp) THEN 83 REWIND( numnam_ice ) ! Read Namelist namicerun 84 READ ( numnam_ice , namicerun ) 85 ! 86 IF(lwp) THEN ! control print 92 87 WRITE(numout,*) 93 88 WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
r2370 r2475 12 12 !! 'key_lim2' : LIM 2.0 sea-ice model 13 13 !!---------------------------------------------------------------------- 14 !!----------------------------------------------------------------------15 14 !! lim_rst_opn_2 : open ice restart file 16 15 !! lim_rst_write_2 : write of the ice restart file 17 16 !! lim_rst_read_2 : read the ice restart file 18 17 !!---------------------------------------------------------------------- 19 USE dom_oce ! ocean space and time domain 20 USE ice_2 21 USE sbc_oce 22 USE sbc_ice 23 24 USE in_out_manager 25 USE iom 18 USE dom_oce ! ocean domain 19 USE ice_2 ! LIM-2: sea-ice variables 20 USE sbc_oce ! Surface Boundary Condition: ocean 21 USE sbc_ice ! Surface Boundary Condition: sea-ice 22 USE in_out_manager ! I/O manager 23 USE iom ! I/O library 26 24 27 25 IMPLICIT NONE … … 38 36 !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010) 39 37 !! $Id$ 40 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 41 !!---------------------------------------------------------------------- 42 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 39 !!---------------------------------------------------------------------- 43 40 CONTAINS 44 41 … … 84 81 ! 85 82 END SUBROUTINE lim_rst_opn_2 83 86 84 87 85 SUBROUTINE lim_rst_write_2( kt ) -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
r2287 r2475 1 1 MODULE ice 2 !!====================================================================== 3 !! *** MODULE ice *** 4 !! LIM-3 Sea Ice physics: diagnostics variables of ice defined in memory 5 !!===================================================================== 6 !! History : 3.0 ! 2008-03 (M. Vancoppenolle) : original code LIM-3 7 !!---------------------------------------------------------------------- 2 8 #if defined key_lim3 3 9 !!---------------------------------------------------------------------- 4 10 !! 'key_lim3' : LIM3 sea-ice model 5 11 !!---------------------------------------------------------------------- 6 !! History :7 !! 2.0 ! 03-08 (C. Ethe) F90: Free form and module8 !! 3.0 ! 08-03 (M. Vancoppenolle) : LIM3 !9 !!----------------------------------------------------------------------10 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)11 !! $Id$12 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)13 !!----------------------------------------------------------------------14 !! * Modules used15 12 USE par_ice ! LIM sea-ice parameters 16 13 17 14 IMPLICIT NONE 18 15 PRIVATE 19 !! 16 20 17 !!====================================================================== 21 !! *** MODULE ice ***22 !!23 !! **************24 !! * L I M 3.0 *25 !! **************26 !!27 !! ''in ice we trust''28 !!29 !! This module contains the sea ice30 !! diagnostics variables of ice defined31 !! in memory32 !!33 !!======================================================================34 !!35 18 !! LIM3 by the use of sweat, agile fingers and sometimes brain juice, 36 19 !! was developed in Louvain-la-Neuve by : … … 64 47 !! * Bouillon et al., in prep for 2008. 65 48 !! 66 !! Or the reference manual, that should be available by 2009 67 !! 49 !! Or the reference manual, that should be available by 2010 68 50 !!====================================================================== 69 51 !! | 70 !! ***************************************** | 71 !! * * | 72 !! ************ I C E S T A T E V A R I A B L E S **************** | 73 !! * * | 74 !! ***************************************** | 52 !! I C E S T A T E V A R I A B L E S | 75 53 !! | 76 54 !! Introduction : | 77 55 !! -------------- | 78 !! |79 56 !! Every ice-covered grid cell is characterized by a series of state | 80 57 !! variables. To account for unresolved spatial variability in ice | … … 130 107 !! | 131 108 !! ** Global variables | 132 !! |133 109 !!-------------|-------------|---------------------------------|-------| 134 110 !! a_i | a_i_b | Ice concentration | | … … 145 121 !! | 146 122 !! ** Equivalent variables | 147 !! |148 123 !!-------------|-------------|---------------------------------|-------| 149 124 !! | … … 179 154 !! et_s ! - ! Total snow enthalpy | 10^9 J| 180 155 !! bv_i ! - ! Mean relative brine volume | ??? | 181 !! |182 !! |183 156 !!===================================================================== 184 157 185 LOGICAL, PUBLIC :: & 186 con_i = .false. ! switch for conservation test 158 LOGICAL, PUBLIC :: con_i = .false. ! switch for conservation test 187 159 188 160 !!-------------------------------------------------------------------------- 189 161 !! * Share Module variables 190 162 !!-------------------------------------------------------------------------- 191 REAL(wp), PUBLIC :: rdt_ice !: ice time step 163 INTEGER , PUBLIC :: nstart !: iteration number of the begining of the run 164 INTEGER , PUBLIC :: nlast !: iteration number of the end of the run 165 INTEGER , PUBLIC :: nitrun !: number of iteration 166 INTEGER , PUBLIC :: numit !: iteration number 167 REAL(wp), PUBLIC :: tpstot !: time of the run in seconds 168 REAL(wp), PUBLIC :: rdt_ice !: ice time step 192 169 193 170 INTEGER , PUBLIC :: & !!: ** ice-dynamic namelist (namicedyn) ** -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90
r2287 r2475 4 4 !! Sea-ice model : LIM Sea ice model Initialization 5 5 !!====================================================================== 6 !! History : 3.0 ! 2008-03 (M. Vancoppenolle) LIM-3 original code 7 !! 3.3 ! 2010-12 (G. Madec) add call to lim_thd_init and lim_thd_sal_init 8 !!---------------------------------------------------------------------- 6 9 #if defined key_lim3 7 10 !!---------------------------------------------------------------------- … … 10 13 !! ice_init : sea-ice model initialization 11 14 !!---------------------------------------------------------------------- 12 USE dom_oce 13 USE in_out_manager 14 USE sbc_oce ! Surface boundary condition: ocean fields 15 USE sbc_ice ! Surface boundary condition: ice fields 16 USE phycst ! Define parameters for the routines 17 USE ice 18 USE limmsh 19 USE limistate 20 USE limrst 21 USE par_ice 22 USE limvar 23 USE lib_mpp 15 USE phycst ! physical constants 16 USE dom_oce ! ocean domain 17 USE sbc_oce ! Surface boundary condition: ocean fields 18 USE sbc_ice ! Surface boundary condition: ice fields 19 USE ice ! LIM: sea-ice variables 20 USE limmsh ! LIM: mesh 21 USE limistate ! LIM: initial state 22 USE limrst ! LIM: restart 23 USE limthd ! LIM: ice thermodynamics 24 USE limthd_sal ! LIM: ice thermodynamics: salinity 25 USE par_ice ! LIM: sea-ice parameters 26 USE limvar ! LIM: variables 27 USE in_out_manager ! I/O manager 28 USE lib_mpp ! MPP library 24 29 25 30 IMPLICIT NONE 26 31 PRIVATE 27 32 28 !! * Routine accessibility 29 PUBLIC ice_init ! called by opa.F90 30 PUBLIC lim_itd_ini 31 32 !! * Share Module variables 33 INTEGER , PUBLIC :: & !: 34 nstart , & !: iteration number of the begining of the run 35 nlast , & !: iteration number of the end of the run 36 nitrun , & !: number of iteration 37 numit !: iteration number 38 REAL(wp), PUBLIC :: & !: 39 tpstot !: time of the run in seconds 33 PUBLIC ice_init ! called by opa.F90 34 40 35 !!---------------------------------------------------------------------- 41 36 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 42 37 !! $Id$ 43 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 44 !!---------------------------------------------------------------------- 45 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 39 !!---------------------------------------------------------------------- 46 40 CONTAINS 47 41 … … 51 45 !! 52 46 !! ** purpose : 53 !!54 !! History :55 !! 2.0 ! 02-08 (G. Madec) F90: Free form and modules56 !! 3.0 ! 08-03 (M. Vancop) ITD, salinity, EVP-C57 47 !!---------------------------------------------------------------------- 58 59 ! Open the namelist file48 ! 49 ! ! Open the namelist file 60 50 CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 61 62 CALL ice_run ! read in namelist some run parameters 63 64 ! Louvain la Neuve Ice model 65 IF( nacc == 1 ) THEN 66 rdt_ice = nn_fsbc * rdtmin 67 ELSE 68 rdt_ice = nn_fsbc * rdt 69 ENDIF 70 71 CALL lim_msh ! ice mesh initialization 72 73 CALL lim_itd_ini ! initialize the ice thickness 74 ! distribution 75 ! Initial sea-ice state 76 IF( .NOT.ln_rstart ) THEN 51 ! 52 CALL ice_run ! namelist read some ice run parameters 53 ! 54 CALL lim_thd_init ! namelist read ice thermodynics parameters 55 ! 56 CALL lim_thd_sal_init ! namelist read ice salinity parameters 57 ! 58 rdt_ice = nn_fsbc * rdttra(1) ! sea-ice timestep 59 ! 60 CALL lim_msh ! ice mesh initialization 61 ! 62 CALL lim_itd_ini ! initialize the ice thickness distribution 63 64 ! ! Initial sea-ice state 65 IF( .NOT.ln_rstart ) THEN ! start from rest 77 66 numit = 0 78 67 numit = nit000 - 1 79 CALL lim_istate ! start from rest: sea-ice deduced from sst 80 CALL lim_var_agg(1) ! aggregate category variables in 81 ! bulk variables 82 CALL lim_var_glo2eqv ! convert global variables in equivalent 83 ! variables 84 ELSE 85 CALL lim_rst_read ! start from a restart file 86 68 CALL lim_istate ! start from rest: sea-ice deduced from sst 69 CALL lim_var_agg(1) ! aggregate category variables in bulk variables 70 CALL lim_var_glo2eqv ! convert global variables in equivalent variables 71 ELSE ! start from a restart file 72 CALL lim_rst_read ! read the restart file 87 73 numit = nit000 - 1 88 CALL lim_var_agg(1) ! aggregate ice variables89 CALL lim_var_glo2eqv ! convert global var in equivalent variables90 ENDIF 91 74 CALL lim_var_agg(1) ! aggregate ice variables 75 CALL lim_var_glo2eqv ! convert global var in equivalent variables 76 ENDIF 77 ! 92 78 fr_i(:,:) = at_i(:,:) ! initialisation of sea-ice fraction 93 79 ! 94 80 nstart = numit + nn_fsbc 95 81 nitrun = nitend - nit000 + 1 96 82 nlast = numit + nitrun 97 98 IF( nstock == 0 ) nstock = nlast + 199 83 ! 84 IF( nstock == 0 ) nstock = nlast + 1 85 ! 100 86 END SUBROUTINE ice_init 87 101 88 102 89 SUBROUTINE ice_run … … 110 97 !! 111 98 !! ** input : Namelist namicerun 112 !!113 !! history :114 !! 2.0 ! 03-08 (C. Ethe) Original code115 !! 3.0 ! 08-03 (M. Vancop) LIM3116 99 !!------------------------------------------------------------------- 117 100 NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, acrit, hsndif, hicdif, cai, cao, ln_nicep 118 101 !!------------------------------------------------------------------- 119 120 ! ! Read Namelist namicerun 121 REWIND ( numnam_ice ) 122 READ ( numnam_ice , namicerun ) 123 102 ! 103 REWIND( numnam_ice ) ! Read Namelist namicerun 104 READ ( numnam_ice , namicerun ) 105 ! 124 106 IF( lk_mpp .AND. ln_nicep ) THEN 125 107 ln_nicep = .FALSE. 126 108 CALL ctl_warn( 'ice_run : specific control print for LIM3 desactivated with MPI' ) 127 109 ENDIF 128 129 IF(lwp) THEN 110 ! 111 IF(lwp) THEN ! control print 130 112 WRITE(numout,*) 131 113 WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' … … 137 119 WRITE(numout,*) ' atmospheric drag over sea ice = ', cai 138 120 WRITE(numout,*) ' atmospheric drag over ocean = ', cao 139 WRITE(numout,*) ' Several ice points in the ice or not in ocean.output = ', ln_nicep140 ENDIF 141 121 WRITE(numout,*) ' Several ice points in the ice or not in ocean.output = ', ln_nicep 122 ENDIF 123 ! 142 124 END SUBROUTINE ice_run 125 143 126 144 127 SUBROUTINE lim_itd_ini 145 128 !!------------------------------------------------------------------ 146 129 !! *** ROUTINE lim_itd_ini *** 147 !! ** Purpose : 148 !! Initializes the ice thickness distribution 149 !! ** Method : 150 !! Very simple. Currently there are no ice types in the 151 !! model... 152 !! 153 !! ** Arguments : 154 !! kideb , kiut : Starting and ending points on which the 155 !! the computation is applied 156 !! 157 !! ** Inputs / Ouputs : (global commons) 158 !! 159 !! ** External : 160 !! 161 !! ** References : 162 !! 163 !! ** History : 164 !! (12-2005) Martin Vancoppenolle 165 !! 130 !! 131 !! ** Purpose : Initializes the ice thickness distribution 132 !! ** Method : ... 166 133 !!------------------------------------------------------------------ 167 !! * Arguments 168 169 !! * Local variables 170 INTEGER :: jl, & ! ice category dummy loop index 171 jm ! ice types dummy loop index 172 173 REAL(wp) :: & ! constant values 174 zeps = 1.0e-10, & ! 175 zc1 , & ! 176 zc2 , & ! 177 zc3 , & ! 178 zx1 179 134 INTEGER :: jl, jm ! dummy loop index 135 REAL(wp) :: zc1, zc2, zc3, zx1 ! local scalars 136 !!------------------------------------------------------------------ 137 138 IF(lwp) WRITE(numout,*) 180 139 IF(lwp) WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution ' 181 140 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 182 183 !!-- End of declarations184 !!------------------------------------------------------------------------------185 141 186 142 !------------------------------------------------------------------------------! … … 220 176 !- Thickness categories boundaries 221 177 !---------------------------------- 222 hi_max(:) = 0. 0223 hi_max_typ(:,:) = 0. 0178 hi_max(:) = 0._wp 179 hi_max_typ(:,:) = 0._wp 224 180 225 181 !- Type 1 - undeformed ice 226 zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)227 zc2 = 10. 0*zc1228 zc3 = 3.0182 zc1 = 3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) 183 zc2 = 10._wp * zc1 184 zc3 = 3._wp 229 185 230 186 DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 231 zx1 = REAL( jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)232 hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1. 0 + TANH ( zc3 * (zx1 - 1.0) ) )187 zx1 = REAL( jl-1 , wp ) / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) 188 hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) ) 233 189 END DO 234 190 235 191 !- Fill in the hi_max_typ vector, useful in other circumstances 236 ! Tricky trick 237 ! hi_max_typ is actually not used in the code and will be removed in a 238 ! next flyspray at this time, the tricky trick will also be removed 239 ! Martin, march 08 192 ! Tricky trick: hi_max_typ is actually not used in the code and will be removed in a 193 ! next flyspray at this time, the tricky trick will also be removed (Martin, march 08) 240 194 DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 241 195 hi_max_typ(jl,1) = hi_max(jl) … … 252 206 END DO 253 207 ENDIF 254 208 ! 255 209 DO jl = 1, jpl 256 hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0257 END DO 258 210 hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) * 0.5_wp 211 END DO 212 ! 259 213 tn_ice(:,:,:) = t_su(:,:,:) 260 214 ! 261 215 END SUBROUTINE lim_itd_ini 262 216 … … 268 222 SUBROUTINE ice_init ! Empty routine 269 223 END SUBROUTINE ice_init 270 271 SUBROUTINE lim_itd_ini272 END SUBROUTINE lim_itd_ini273 224 #endif 274 225 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90
r2439 r2475 16 16 USE ice ! LIM-3: sea-ice variable 17 17 USE par_ice ! LIM-3: ice parameters 18 ! USE ice_oce ! LIM-3: ice-ocean share variables19 USE iceini ! LIM-3: sea-ice initialization20 USE limistate ! LIM-3: sea-ice initial state21 18 USE dom_ice ! LIM-3: sea-ice domain 22 19 USE dom_oce ! ocean domain -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90
r2370 r2475 22 22 USE sbc_oce ! Surface boundary condition: ocean fields 23 23 USE sbc_ice ! Surface boundary condition: ice fields 24 USE iceini25 USE limistate26 24 USE limrhg ! ice rheology 27 25 USE lbclnk -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r2287 r2475 4 4 !! Initialisation of diagnostics ice variables 5 5 !!====================================================================== 6 !! History : 2.0 ! 2004-01 (C. Ethe, G. Madec) Original code 7 !!---------------------------------------------------------------------- 6 8 #if defined key_lim3 7 9 !!---------------------------------------------------------------------- … … 11 13 !! lim_istate_init : initialization of ice state and namelist read 12 14 !!---------------------------------------------------------------------- 13 !! * Modules used 14 USE phycst 15 USE oce ! dynamics and tracers variables 16 USE dom_oce 17 USE sbc_oce ! Surface boundary condition: ocean fields 18 USE par_ice ! ice parameters 19 USE eosbn2 ! equation of state 20 USE in_out_manager 21 USE dom_ice 22 USE ice 23 USE lbclnk 15 USE phycst ! physical constant 16 USE oce ! dynamics and tracers variables 17 USE dom_oce ! ocean domain 18 USE sbc_oce ! Surface boundary condition: ocean fields 19 USE eosbn2 ! equation of state 20 USE ice ! sea-ice variables 21 USE par_ice ! ice parameters 22 USE dom_ice ! sea-ice domain 23 USE in_out_manager ! I/O manager 24 USE lbclnk ! lateral boundary condition - MPP exchanges 24 25 25 26 IMPLICIT NONE 26 27 PRIVATE 27 28 28 !! * Accessibility 29 PUBLIC lim_istate ! routine called by lim_init.F90 30 31 !! * Module variables 32 REAL(wp) :: & !!! ** init namelist (namiceini) ** 33 ttest = 2.0 , & ! threshold water temperature for initial sea ice 34 hninn = 0.5 , & ! initial snow thickness in the north 35 hginn_u = 2.5 , & ! initial ice thickness in the north 36 aginn_u = 0.7 , & ! initial leads area in the north 37 hginn_d = 5.0 , & ! initial ice thickness in the north 38 aginn_d = 0.25 , & ! initial leads area in the north 39 hnins = 0.1 , & ! initial snow thickness in the south 40 hgins_u = 1.0 , & ! initial ice thickness in the south 41 agins_u = 0.7 , & ! initial leads area in the south 42 hgins_d = 2.0 , & ! initial ice thickness in the south 43 agins_d = 0.2 , & ! initial leads area in the south 44 sinn = 6.301 , & ! initial salinity 45 sins = 6.301 46 47 REAL(wp) :: & ! constant values 48 zzero = 0.0 , & 49 zone = 1.0 29 PUBLIC lim_istate ! routine called by lim_init.F90 30 31 ! !!** init namelist (namiceini) ** 32 REAL(wp) :: ttest = 2.0_wp ! threshold water temperature for initial sea ice 33 REAL(wp) :: hninn = 0.5_wp ! initial snow thickness in the north 34 REAL(wp) :: hginn_u = 2.5_wp ! initial ice thickness in the north 35 REAL(wp) :: aginn_u = 0.7_wp ! initial leads area in the north 36 REAL(wp) :: hginn_d = 5.0_wp ! initial ice thickness in the north 37 REAL(wp) :: aginn_d = 0.25_wp ! initial leads area in the north 38 REAL(wp) :: hnins = 0.1_wp ! initial snow thickness in the south 39 REAL(wp) :: hgins_u = 1.0_wp ! initial ice thickness in the south 40 REAL(wp) :: agins_u = 0.7_wp ! initial leads area in the south 41 REAL(wp) :: hgins_d = 2.0_wp ! initial ice thickness in the south 42 REAL(wp) :: agins_d = 0.2_wp ! initial leads area in the south 43 REAL(wp) :: sinn = 6.301_wp ! initial salinity 44 REAL(wp) :: sins = 6.301_wp ! 50 45 51 46 !!---------------------------------------------------------------------- 52 47 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 53 48 !! $Id$ 54 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 55 !!---------------------------------------------------------------------- 56 49 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 50 !!---------------------------------------------------------------------- 57 51 CONTAINS 58 52 … … 65 59 !! ** Method : restart from a state defined in a binary file 66 60 !! or from arbitrary sea-ice conditions 67 !! 68 !! History : 69 !! 2.0 ! 01-04 (C. Ethe, G. Madec) Original code 70 !!-------------------------------------------------------------------- 71 72 !! * Local variables 61 !!------------------------------------------------------------------- 73 62 INTEGER :: ji, jj, jk, jl ! dummy loop indices 74 75 REAL(wp) :: & ! temporary scalar 76 zeps6, zeps, ztmelts, & 77 epsi06 78 REAL(wp), DIMENSION(jpm) :: & 79 zgfactorn, zhin, & 80 zgfactors, zhis 81 REAL(wp) :: & 82 zvol, zare, zh, zh1, zh2, zh3, zan, zbn, zas, zbs 83 REAL(wp), DIMENSION(jpi,jpj) :: zidto ! ice indicator 63 REAL(wp) :: zeps6, zeps, ztmelts, epsi06 ! local scalars 64 REAL(wp) :: zvol, zare, zh, zh1, zh2, zh3, zan, zbn, zas, zbs 65 REAL(wp), DIMENSION(jpm) :: zgfactorn, zhin 66 REAL(wp), DIMENSION(jpm) :: zgfactors, zhis 67 REAL(wp), DIMENSION(jpi,jpj) :: zidto ! ice indicator 84 68 !-------------------------------------------------------------------- 85 69 … … 87 71 ! 1) Preliminary things 88 72 !-------------------------------------------------------------------- 89 epsi06 = 1. 0e-673 epsi06 = 1.e-6_wp 90 74 91 75 CALL lim_istate_init ! reading the initials parameters of the ice … … 116 100 117 101 ! constants for heat contents 118 zeps = 1. 0d-20119 zeps6 = 1. 0d-06102 zeps = 1.e-20_wp 103 zeps6 = 1.e-06_wp 120 104 121 105 ! zgfactor for initial ice distribution 122 zgfactorn(:) = 0. 0123 zgfactors(:) = 0. 0106 zgfactorn(:) = 0._wp 107 zgfactors(:) = 0._wp 124 108 125 109 ! first ice type 126 110 DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 127 zhin (1) = ( hi_max(jl-1) + hi_max(jl) ) / 2.0128 zgfactorn(1) = zgfactorn(1) + exp(-(zhin(1)-hginn_u)*(zhin(1)-hginn_u) /2.0)129 zhis (1) = ( hi_max(jl-1) + hi_max(jl) ) / 2.0130 zgfactors(1) = zgfactors(1) + exp(-(zhis(1)-hgins_u)*(zhis(1)-hgins_u) /2.0)111 zhin (1) = ( hi_max(jl-1) + hi_max(jl) ) * 0.5_wp 112 zgfactorn(1) = zgfactorn(1) + exp(-(zhin(1)-hginn_u)*(zhin(1)-hginn_u) * 0.5_wp ) 113 zhis (1) = ( hi_max(jl-1) + hi_max(jl) ) * 0.5_wp 114 zgfactors(1) = zgfactors(1) + exp(-(zhis(1)-hgins_u)*(zhis(1)-hgins_u) * 0.5_wp ) 131 115 END DO ! jl 132 116 zgfactorn(1) = aginn_u / zgfactorn(1) … … 135 119 ! ------------- 136 120 ! new distribution, polynom of second order, conserving area and volume 137 zh1 = 0. 0138 zh2 = 0. 0139 zh3 = 0. 0121 zh1 = 0._wp 122 zh2 = 0._wp 123 zh3 = 0._wp 140 124 DO jl = 1, jpl 141 zh = ( hi_max(jl-1) + hi_max(jl) ) / 2.0125 zh = ( hi_max(jl-1) + hi_max(jl) ) * 0.5_wp 142 126 zh1 = zh1 + zh 143 zh2 = zh2 + zh *zh144 zh3 = zh3 + zh *zh*zh127 zh2 = zh2 + zh * zh 128 zh3 = zh3 + zh * zh * zh 145 129 END DO 146 130 IF(lwp) WRITE(numout,*) ' zh1 : ', zh1 … … 148 132 IF(lwp) WRITE(numout,*) ' zh3 : ', zh3 149 133 150 zvol = aginn_u *hginn_u134 zvol = aginn_u * hginn_u 151 135 zare = aginn_u 152 IF ( jpl .GE.2 ) THEN136 IF( jpl >= 2 ) THEN 153 137 zbn = ( zvol*zh2 - zare*zh3 ) / ( zh2*zh2 - zh1*zh3) 154 138 zan = ( zare - zbn*zh1 ) / zh2 … … 160 144 IF(lwp) WRITE(numout,*) ' zan : ', zan 161 145 162 zvol = agins_u *hgins_u146 zvol = agins_u * hgins_u 163 147 zare = agins_u 164 IF ( jpl .GE.2 ) THEN148 IF( jpl >= 2 ) THEN 165 149 zbs = ( zvol*zh2 - zare*zh3 ) / ( zh2*zh2 - zh1*zh3) 166 150 zas = ( zare - zbs*zh1 ) / zh2 … … 205 189 !--- Northern hemisphere 206 190 !---------------------------------------------------------------- 207 IF( fcor(ji,jj) >= 0. e0) THEN191 IF( fcor(ji,jj) >= 0._wp ) THEN 208 192 209 193 !----------------------- … … 453 437 ENDIF ! on fcor 454 438 455 END DO456 END DO439 END DO 440 END DO 457 441 458 442 !-------------------------------------------------------------------- … … 494 478 495 479 DO jl = 1, jpl 496 497 480 CALL lbc_lnk( a_i(:,:,jl) , 'T', 1. ) 498 481 CALL lbc_lnk( v_i(:,:,jl) , 'T', 1. ) … … 500 483 CALL lbc_lnk( smv_i(:,:,jl), 'T', 1. ) 501 484 CALL lbc_lnk( oa_i(:,:,jl) , 'T', 1. ) 502 485 ! 503 486 CALL lbc_lnk( ht_i(:,:,jl) , 'T', 1. ) 504 487 CALL lbc_lnk( ht_s(:,:,jl) , 'T', 1. ) … … 514 497 CALL lbc_lnk(e_i(:,:,jk,jl), 'T', 1. ) 515 498 END DO 516 517 a_i (:,:,jl) = tms(:,:) * a_i(:,:,jl) 518 499 ! 500 a_i(:,:,jl) = tms(:,:) * a_i(:,:,jl) 519 501 END DO 520 502 521 503 CALL lbc_lnk( at_i , 'T', 1. ) 522 504 at_i(:,:) = tms(:,:) * at_i(:,:) ! put 0 over land 523 505 ! 524 506 CALL lbc_lnk( fsbbq , 'T', 1. ) 525 507 ! 526 508 END SUBROUTINE lim_istate 509 527 510 528 511 SUBROUTINE lim_istate_init … … 532 515 !! ** Purpose : Definition of initial state of the ice 533 516 !! 534 !! ** Method : Read the namiceini namelist and check the parameter535 !! values called at the first timestep (nit000)517 !! ** Method : Read the namiceini namelist and check the parameter 518 !! values called at the first timestep (nit000) 536 519 !! 537 !! ** input : 538 !! Namelist namiceini 539 !! 540 !! history : 541 !! 8.5 ! 03-08 (C. Ethe) original code 520 !! ** input : namelist namiceini 542 521 !!----------------------------------------------------------------------------- 543 NAMELIST/namiceini/ ttest, hninn, hginn_u, aginn_u, hginn_d, aginn_d, hnins, &544 hgins_u, agins_u, hgins_d, agins_d, sinn, sins522 NAMELIST/namiceini/ ttest, hninn, hginn_u, aginn_u, hginn_d, aginn_d, hnins, & 523 & hgins_u, agins_u, hgins_d, agins_d, sinn, sins 545 524 !!----------------------------------------------------------------------------- 546 547 ! Define the initial parameters 548 ! ------------------------- 549 550 ! Read Namelist namiceini 551 REWIND ( numnam_ice ) 525 ! 526 REWIND ( numnam_ice ) ! Read Namelist namiceini 552 527 READ ( numnam_ice , namiceini ) 553 IF(lwp) THEN 528 ! 529 IF(lwp) THEN ! control print 554 530 WRITE(numout,*) 555 531 WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation ' … … 569 545 WRITE(numout,*) ' initial ice salinity in the south sins = ', sins 570 546 ENDIF 571 547 ! 572 548 END SUBROUTINE lim_istate_init 573 549 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
r2287 r2475 19 19 USE sbc_oce ! Surface boundary condition: ocean fields 20 20 USE thd_ice 21 USE limistate22 21 USE in_out_manager 23 22 USE ice … … 25 24 USE limthd_lac 26 25 USE limvar 27 USE iceini28 26 USE limcons 29 27 USE prtctl ! Print control -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90
r2287 r2475 1 1 MODULE limitd_th 2 #if defined key_lim33 !!----------------------------------------------------------------------4 !! 'key_lim3' : LIM3 sea-ice model5 !!----------------------------------------------------------------------6 2 !!====================================================================== 7 3 !! *** MODULE limitd_th *** … … 9 5 !! computation of changes in g(h) 10 6 !!====================================================================== 11 7 #if defined key_lim3 12 8 !!---------------------------------------------------------------------- 13 !! * Modules used 9 !! 'key_lim3' : LIM3 sea-ice model 10 !!---------------------------------------------------------------------- 11 !!---------------------------------------------------------------------- 14 12 USE dom_ice 15 13 USE par_oce ! ocean parameters … … 17 15 USE phycst ! physical constants (ocean directory) 18 16 USE thd_ice 19 USE limistate20 USE in_out_manager21 17 USE ice 22 18 USE par_ice 23 19 USE limthd_lac 24 20 USE limvar 25 USE iceini26 21 USE limcons 27 22 USE prtctl ! Print control 23 USE in_out_manager 28 24 USE lib_mpp 29 25 … … 31 27 PRIVATE 32 28 33 !! * Routine accessibility34 29 PUBLIC lim_itd_th ! called by ice_stp 35 30 PUBLIC lim_itd_th_rem … … 38 33 PUBLIC lim_itd_shiftice 39 34 40 !! * Module variables41 35 REAL(wp) :: & ! constant values 42 36 epsi20 = 1e-20 , & -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
r2370 r2475 28 28 USE ice ! LIM-3: ice variables 29 29 USE dom_ice ! LIM-3: ice domain 30 USE iceini ! LIM-3: ice initialisation31 30 USE limitd_me ! LIM-3: 32 31 #else 33 32 USE ice_2 ! LIM2: ice variables 34 33 USE dom_ice_2 ! LIM2: ice domain 35 USE iceini_2 ! LIM2: ice initialisation36 34 #endif 37 35 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
r2287 r2475 4 4 !! Ice restart : write the ice restart file 5 5 !!====================================================================== 6 !! History: - ! 2005-04 (M. Vancoppenolle) Original code 7 !! 3.0 ! 2008-03 (C. Ethe) restart files in using IOM interface 8 !!---------------------------------------------------------------------- 6 9 #if defined key_lim3 7 10 !!---------------------------------------------------------------------- … … 12 15 !! lim_rst_read : read the restart file 13 16 !!---------------------------------------------------------------------- 14 !! * Modules used 15 USE ice 16 USE par_ice 17 USE in_out_manager 18 USE dom_oce 19 USE sbc_oce ! Surface boundary condition: ocean fields 20 USE sbc_ice ! Surface boundary condition: ice fields 21 USE iom 17 USE ice ! sea-ice variables 18 USE par_ice ! sea-ice parameters 19 USE dom_oce ! ocean domain 20 USE sbc_oce ! Surface boundary condition: ocean fields 21 USE sbc_ice ! Surface boundary condition: ice fields 22 USE in_out_manager ! I/O manager 23 USE iom ! I/O library 22 24 23 25 IMPLICIT NONE 24 26 PRIVATE 25 27 26 !! * Accessibility 27 PUBLIC lim_rst_opn ! routine called by icestep.F90 28 PUBLIC lim_rst_write ! routine called by icestep.F90 29 PUBLIC lim_rst_read ! routine called by iceinit.F90 28 PUBLIC lim_rst_opn ! routine called by icestep.F90 29 PUBLIC lim_rst_write ! routine called by icestep.F90 30 PUBLIC lim_rst_read ! routine called by iceini.F90 30 31 31 32 LOGICAL, PUBLIC :: lrst_ice !: logical to control the ice restart write … … 35 36 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 36 37 !! $Id$ 37 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 38 !!---------------------------------------------------------------------- 39 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 39 !!---------------------------------------------------------------------- 40 40 CONTAINS 41 41 … … 48 48 INTEGER, INTENT(in) :: kt ! number of iteration 49 49 ! 50 CHARACTER(LEN=20) :: clkt ! ocean time-step de ine as a character50 CHARACTER(LEN=20) :: clkt ! ocean time-step define as a character 51 51 CHARACTER(LEN=50) :: clname ! ice output restart file name 52 52 !!---------------------------------------------------------------------- … … 54 54 IF( kt == nit000 ) lrst_ice = .FALSE. ! default definition 55 55 56 ! to get better performances with NetCDF format: 57 ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1) 58 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 59 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 56 ! in order to get better performances with NetCDF format, we open and define the ice restart file 57 ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice 58 ! restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 59 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc & 60 & .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 60 61 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 61 62 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst … … 75 76 ENDIF 76 77 ENDIF 77 78 ! 78 79 CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib ) 79 80 lrst_ice = .TRUE. … … 82 83 END SUBROUTINE lim_rst_opn 83 84 85 84 86 SUBROUTINE lim_rst_write( kt ) 85 87 !!---------------------------------------------------------------------- … … 87 89 !! 88 90 !! ** purpose : output of sea-ice variable in a netcdf file 91 !!---------------------------------------------------------------------- 92 INTEGER, INTENT(in) :: kt ! number of iteration 89 93 !! 90 !!---------------------------------------------------------------------- 91 ! Arguments : 92 INTEGER, INTENT(in) :: kt ! number of iteration 93 94 ! Local variables : 94 INTEGER :: ji, jj, jk ,jl ! dummy loop indices 95 INTEGER :: iter 96 CHARACTER(len=15) :: znam 97 CHARACTER(len=1) :: zchar, zchar1 95 98 REAL(wp), DIMENSION(jpi,jpj) :: z2d 96 INTEGER :: ji, jj, jk ,jl97 INTEGER :: iter98 CHARACTER(len=15) :: znam99 CHARACTER(len=1) :: zchar, zchar1100 99 !!---------------------------------------------------------------------- 101 100 … … 111 110 ! ------------------ 112 111 ! ! calendar control 113 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step114 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp) )! date112 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step 113 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ) ) ! date 115 114 116 115 ! Prognostic variables … … 288 287 ENDIF 289 288 ! 290 291 IF( ln_nicep) THEN292 WRITE(numout,*)293 WRITE(numout,*) ' lim_rst_write : CHUKCHI SEA POINT '294 WRITE(numout,*) ' ~~~~~~~~~~'295 WRITE(numout,*) ' ~~~ Arctic'296 297 ji = jiindx298 jj = jjindx299 300 WRITE(numout,*) ' ji, jj ', ji, jj301 WRITE(numout,*) ' ICE VARIABLES '302 WRITE(numout,*) ' open water ', ato_i(ji,jj)303 DO jl = 1, jpl304 WRITE(numout,*) ' *** CATEGORY NUMBER *** ', jl305 WRITE(numout,*) ' '306 WRITE(numout,*) ' a_i : ', a_i(ji,jj,jl)307 WRITE(numout,*) ' v_i : ', v_i(ji,jj,jl)308 WRITE(numout,*) ' v_s : ', v_s(ji,jj,jl)309 WRITE(numout,*) ' e_s : ', e_s(ji,jj,1,jl)/1.0e9310 WRITE(numout,*) ' e_i1 : ', e_i(ji,jj,1,jl)/1.0e9311 WRITE(numout,*) ' e_i2 : ', e_i(ji,jj,2,jl)/1.0e9312 WRITE(numout,*) ' smv_i : ', smv_i(ji,jj,jl)313 WRITE(numout,*) ' oa_i : ', oa_i(ji,jj,jl)314 WRITE(numout,*) ' t_su : ', t_su(ji,jj,jl)315 END DO316 317 WRITE(numout,*) ' MOMENTS OF ADVECTION '318 319 WRITE(numout,*) ' open water '320 WRITE(numout,*) ' sxopw ', sxopw(ji,jj)321 WRITE(numout,*) ' syopw ', syopw(ji,jj)322 WRITE(numout,*) ' sxxopw ', sxxopw(ji,jj)323 WRITE(numout,*) ' syyopw ', syyopw(ji,jj)324 WRITE(numout,*) ' sxyopw ', sxyopw(ji,jj)325 DO jl = 1, jpl326 WRITE(numout,*) ' jl, ice volume content ', jl327 WRITE(numout,*) ' sxice ', sxice(ji,jj,jl)328 WRITE(numout,*) ' syice ', syice(ji,jj,jl)329 WRITE(numout,*) ' sxxice ', sxxice(ji,jj,jl)330 WRITE(numout,*) ' syyice ', syyice(ji,jj,jl)331 WRITE(numout,*) ' sxyice ', sxyice(ji,jj,jl)332 WRITE(numout,*) ' jl, snow volume content ', jl333 WRITE(numout,*) ' sxsn ', sxsn(ji,jj,jl)334 WRITE(numout,*) ' sysn ', sysn(ji,jj,jl)335 WRITE(numout,*) ' sxxsn ', sxxsn(ji,jj,jl)336 WRITE(numout,*) ' syysn ', syysn(ji,jj,jl)337 WRITE(numout,*) ' sxysn ', sxysn(ji,jj,jl)338 WRITE(numout,*) ' jl, ice area in category ', jl339 WRITE(numout,*) ' sxa ', sxa (ji,jj,jl)340 WRITE(numout,*) ' sya ', sya (ji,jj,jl)341 WRITE(numout,*) ' sxxa ', sxxa (ji,jj,jl)342 WRITE(numout,*) ' syya ', syya (ji,jj,jl)343 WRITE(numout,*) ' sxya ', sxya (ji,jj,jl)344 WRITE(numout,*) ' jl, snow temp ', jl345 WRITE(numout,*) ' sxc0 ', sxc0(ji,jj,jl)346 WRITE(numout,*) ' syc0 ', syc0(ji,jj,jl)347 WRITE(numout,*) ' sxxc0 ', sxxc0(ji,jj,jl)348 WRITE(numout,*) ' syyc0 ', syyc0(ji,jj,jl)349 WRITE(numout,*) ' sxyc0 ', sxyc0(ji,jj,jl)350 WRITE(numout,*) ' jl, ice salinity ', jl351 WRITE(numout,*) ' sxsal ', sxsal(ji,jj,jl)352 WRITE(numout,*) ' sysal ', sysal(ji,jj,jl)353 WRITE(numout,*) ' sxxsal ', sxxsal(ji,jj,jl)354 WRITE(numout,*) ' syysal ', syysal(ji,jj,jl)355 WRITE(numout,*) ' sxysal ', sxysal(ji,jj,jl)356 WRITE(numout,*) ' jl, ice age ', jl357 WRITE(numout,*) ' sxage ', sxage(ji,jj,jl)358 WRITE(numout,*) ' syage ', syage(ji,jj,jl)359 WRITE(numout,*) ' sxxage ', sxxage(ji,jj,jl)360 WRITE(numout,*) ' syyage ', syyage(ji,jj,jl)361 WRITE(numout,*) ' sxyage ', sxyage(ji,jj,jl)362 END DO363 DO jl = 1, jpl364 DO jk = 1, nlay_i365 WRITE(numout,*) ' jk, jl, ice heat content', jk, jl366 WRITE(numout,*) ' sxe ', sxe(ji,jj,jk,jl)367 WRITE(numout,*) ' sye ', sye(ji,jj,jk,jl)368 WRITE(numout,*) ' sxxe ', sxxe(ji,jj,jk,jl)369 WRITE(numout,*) ' syye ', syye(ji,jj,jk,jl)370 WRITE(numout,*) ' sxye ', sxye(ji,jj,jk,jl)371 END DO372 END DO373 374 ENDIF375 376 289 END SUBROUTINE lim_rst_write 290 377 291 378 292 SUBROUTINE lim_rst_read … … 382 296 !! ** purpose : read of sea-ice variable restart in a netcdf file 383 297 !!---------------------------------------------------------------------- 384 ! Local variables385 298 INTEGER :: ji, jj, jk, jl, indx 386 299 REAL(wp) :: zfice, ziter 387 REAL(wp) :: & !parameters for the salinity profile 388 zs_inf, z_slope_s, zsmax, zsmin, zalpha, zindb 389 REAL(wp), DIMENSION(nlay_i) :: zs_zero 390 REAL(wp), DIMENSION(jpi,jpj) :: z2d 391 CHARACTER(len=15) :: znam 392 CHARACTER(len=1) :: zchar, zchar1 393 INTEGER :: jlibalt = jprstlib 394 LOGICAL :: llok 300 REAL(wp) :: zs_inf, z_slope_s, zsmax, zsmin, zalpha, zindb ! local scalars used for the salinity profile 301 REAL(wp), DIMENSION(nlay_i) :: zs_zero 302 REAL(wp), DIMENSION(jpi,jpj) :: z2d 303 CHARACTER(len=15) :: znam 304 CHARACTER(len=1) :: zchar, zchar1 305 INTEGER :: jlibalt = jprstlib 306 LOGICAL :: llok 395 307 !!---------------------------------------------------------------------- 396 308 … … 469 381 END DO 470 382 471 ! Salinity profile 472 !----------------- 473 WRITE(numout,*) ' num_sal - will restart understand salinity profile ', num_sal 474 475 num_sal = 2 476 IF(num_sal.eq.2) THEN 477 ! CALL lim_var_salprof 383 IF( num_sal == 2 ) THEN ! Salinity profile 478 384 DO jl = 1, jpl 479 385 DO jk = 1, nlay_i … … 481 387 DO ji = 1, jpi 482 388 zs_inf = sm_i(ji,jj,jl) 483 z_slope_s = 2. 0*sm_i(ji,jj,jl)/MAX(0.01,ht_i(ji,jj,jl))389 z_slope_s = 2._wp * sm_i(ji,jj,jl) / MAX( 0.01_wp , ht_i(ji,jj,jl) ) 484 390 !- slope of the salinity profile 485 zs_zero(jk) = z_slope_s * ( FLOAT(jk)-1.0/2.0 ) * & 486 ht_i(ji,jj,jl) / FLOAT(nlay_i) 487 zsmax = 4.5 488 zsmin = 3.5 391 zs_zero(jk) = z_slope_s * ( REAL(jk,wp) - 0.5_wp ) * ht_i(ji,jj,jl) / REAL(nlay_i,wp) 392 zsmax = 4.5_wp 393 zsmin = 3.5_wp 489 394 IF( sm_i(ji,jj,jl) .LT. zsmin ) THEN 490 zalpha = 1. 0395 zalpha = 1._wp 491 396 ELSEIF( sm_i(ji,jj,jl) .LT.zsmax ) THEN 492 zalpha = sm_i(ji,jj,jl) / ( zsmin-zsmax) + zsmax / (zsmax-zsmin)397 zalpha = sm_i(ji,jj,jl) / ( zsmin - zsmax ) + zsmax / ( zsmax - zsmin ) 493 398 ELSE 494 zalpha = 0. 0399 zalpha = 0._wp 495 400 ENDIF 496 s_i(ji,jj,jk,jl) = zalpha *zs_zero(jk) + ( 1.0 - zalpha )*zs_inf401 s_i(ji,jj,jk,jl) = zalpha * zs_zero(jk) + ( 1._wp - zalpha ) * zs_inf 497 402 END DO 498 403 END DO … … 646 551 END DO 647 552 END DO 648 553 ! 649 554 CALL iom_close( numrir ) 650 651 !+++++++++++ CHECK EVERYTHING ++++++++++ 652 653 WRITE(numout,*) 654 WRITE(numout,*) ' lim_rst_read : CHUKCHI SEA POINT ' 655 WRITE(numout,*) ' ~~~~~~~~~~' 656 WRITE(numout,*) ' ~~~ Arctic' 657 658 indx = 1 659 ji = 24 660 jj = 24 661 WRITE(numout,*) ' ji, jj ', ji, jj 662 WRITE(numout,*) ' ICE VARIABLES ' 663 WRITE(numout,*) ' open water ', ato_i(ji,jj) 664 665 DO jl = 1, jpl 666 WRITE(numout,*) ' *** CATEGORY NUMBER *** ', jl 667 WRITE(numout,*) ' ' 668 WRITE(numout,*) ' a_i : ', a_i(ji,jj,jl) 669 WRITE(numout,*) ' v_i : ', v_i(ji,jj,jl) 670 WRITE(numout,*) ' v_s : ', v_s(ji,jj,jl) 671 WRITE(numout,*) ' e_i1 : ', e_i(ji,jj,1,jl)/1.0e9 672 WRITE(numout,*) ' e_i2 : ', e_i(ji,jj,2,jl)/1.0e9 673 WRITE(numout,*) ' e_s : ', e_s(ji,jj,1,jl) 674 WRITE(numout,*) ' smv_i : ', smv_i(ji,jj,jl) 675 WRITE(numout,*) ' oa_i : ', oa_i(ji,jj,jl) 676 WRITE(numout,*) ' t_su : ', t_su(ji,jj,jl) 677 END DO 678 679 WRITE(numout,*) ' open water ' 680 WRITE(numout,*) ' sxopw ', sxopw(ji,jj) 681 WRITE(numout,*) ' syopw ', syopw(ji,jj) 682 WRITE(numout,*) ' sxxopw ', sxxopw(ji,jj) 683 WRITE(numout,*) ' syyopw ', syyopw(ji,jj) 684 WRITE(numout,*) ' sxyopw ', sxyopw(ji,jj) 685 DO jl = 1, jpl 686 WRITE(numout,*) ' jl, ice volume content ', jl 687 WRITE(numout,*) ' sxice ', sxice(ji,jj,jl) 688 WRITE(numout,*) ' syice ', syice(ji,jj,jl) 689 WRITE(numout,*) ' sxxice ', sxxice(ji,jj,jl) 690 WRITE(numout,*) ' syyice ', syyice(ji,jj,jl) 691 WRITE(numout,*) ' sxyice ', sxyice(ji,jj,jl) 692 WRITE(numout,*) ' jl, snow volume content ', jl 693 WRITE(numout,*) ' sxsn ', sxsn(ji,jj,jl) 694 WRITE(numout,*) ' sysn ', sysn(ji,jj,jl) 695 WRITE(numout,*) ' sxxsn ', sxxsn(ji,jj,jl) 696 WRITE(numout,*) ' syysn ', syysn(ji,jj,jl) 697 WRITE(numout,*) ' sxysn ', sxysn(ji,jj,jl) 698 WRITE(numout,*) ' jl, ice area in category ', jl 699 WRITE(numout,*) ' sxa ', sxa (ji,jj,jl) 700 WRITE(numout,*) ' sya ', sya (ji,jj,jl) 701 WRITE(numout,*) ' sxxa ', sxxa (ji,jj,jl) 702 WRITE(numout,*) ' syya ', syya (ji,jj,jl) 703 WRITE(numout,*) ' sxya ', sxya (ji,jj,jl) 704 WRITE(numout,*) ' jl, snow temp ', jl 705 WRITE(numout,*) ' sxc0 ', sxc0(ji,jj,jl) 706 WRITE(numout,*) ' syc0 ', syc0(ji,jj,jl) 707 WRITE(numout,*) ' sxxc0 ', sxxc0(ji,jj,jl) 708 WRITE(numout,*) ' syyc0 ', syyc0(ji,jj,jl) 709 WRITE(numout,*) ' sxyc0 ', sxyc0(ji,jj,jl) 710 WRITE(numout,*) ' jl, ice salinity ', jl 711 WRITE(numout,*) ' sxsal ', sxsal(ji,jj,jl) 712 WRITE(numout,*) ' sysal ', sysal(ji,jj,jl) 713 WRITE(numout,*) ' sxxsal ', sxxsal(ji,jj,jl) 714 WRITE(numout,*) ' syysal ', syysal(ji,jj,jl) 715 WRITE(numout,*) ' sxysal ', sxysal(ji,jj,jl) 716 WRITE(numout,*) ' jl, ice age ', jl 717 WRITE(numout,*) ' sxage ', sxage(ji,jj,jl) 718 WRITE(numout,*) ' syage ', syage(ji,jj,jl) 719 WRITE(numout,*) ' sxxage ', sxxage(ji,jj,jl) 720 WRITE(numout,*) ' syyage ', syyage(ji,jj,jl) 721 WRITE(numout,*) ' sxyage ', sxyage(ji,jj,jl) 722 END DO 723 DO jl = 1, jpl 724 DO jk = 1, nlay_i 725 WRITE(numout,*) ' jk, jl, ice heat content', jk, jl 726 WRITE(numout,*) ' sxe ', sxe(ji,jj,jk,jl) 727 WRITE(numout,*) ' sye ', sye(ji,jj,jk,jl) 728 WRITE(numout,*) ' sxxe ', sxxe(ji,jj,jk,jl) 729 WRITE(numout,*) ' syye ', syye(ji,jj,jk,jl) 730 WRITE(numout,*) ' sxye ', sxye(ji,jj,jk,jl) 731 END DO 732 END DO 733 734 !+++++++++++ END CHECK +++++++++++++++++ 735 555 ! 736 556 END SUBROUTINE lim_rst_read 737 738 557 739 558 #else -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
r2383 r2475 23 23 USE sbc_oce ! Surface boundary condition: ocean fields 24 24 USE phycst ! physical constants 25 USE albedo ! albedo parameters 25 26 USE ice ! LIM sea-ice variables 26 USE iceini ! ???27 28 27 USE lbclnk ! ocean lateral boundary condition 29 28 USE in_out_manager ! I/O manager 30 USE albedo ! albedo parameters31 29 USE prtctl ! Print control 32 30 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
r2383 r2475 27 27 USE dom_ice ! LIM sea-ice domain 28 28 USE domvvl ! domain: variable volume level 29 USE iceini ! LIM: sea-ice initialization30 29 USE limthd_dif ! LIM: thermodynamics, vertical diffusion 31 30 USE limthd_dh ! LIM: thermodynamics, ice and snow thickness variation … … 33 32 USE limthd_ent ! LIM: thermodynamics, ice enthalpy redistribution 34 33 USE limtab ! LIM: 1D <==> 2D transformation 35 USE limvar ! LIM: ???34 USE limvar ! LIM: sea-ice variables 36 35 USE lbclnk ! lateral boundary condition - MPP links 37 36 USE lib_mpp ! MPP library … … 42 41 PRIVATE 43 42 44 PUBLIC lim_thd ! called by lim_step 43 PUBLIC lim_thd ! called by limstp module 44 PUBLIC lim_thd_init ! called by iceini module 45 45 46 46 REAL(wp) :: epsi20 = 1e-20_wp ! constant values … … 90 90 REAL(wp), DIMENSION(jpi,jpj) :: zqlbsbq ! link with lead energy budget qldif 91 91 !!------------------------------------------------------------------- 92 93 IF( numit == nstart ) CALL lim_thd_init ! Initialization (first time-step only)94 95 IF( numit == nstart ) CALL lim_thd_sal_init ! Initialization (first time-step only)96 92 97 93 !------------------------------------------------------------------------------! … … 823 819 & kappa_i, nconv_i_thd, maxer_i_thd, thcon_i_swi 824 820 !!------------------------------------------------------------------- 825 821 ! 826 822 IF(lwp) THEN 827 823 WRITE(numout,*) … … 829 825 WRITE(numout,*) '~~~~~~~' 830 826 ENDIF 831 827 ! 832 828 REWIND( numnam_ice ) ! read Namelist numnam_ice 833 829 READ ( numnam_ice , namicethd ) 834 830 ! 835 831 IF(lwp) THEN ! control print 836 832 WRITE(numout,*) … … 870 866 #else 871 867 !!---------------------------------------------------------------------- 872 !! Default option 868 !! Default option Dummy module NO LIM3 sea-ice model 873 869 !!---------------------------------------------------------------------- 874 CONTAINS875 SUBROUTINE lim_thd ! Empty routine876 END SUBROUTINE lim_thd877 SUBROUTINE lim_thd_con_dif878 END SUBROUTINE lim_thd_con_dif879 870 #endif 880 871 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
r2287 r2475 17 17 USE phycst ! physical constants (OCE directory) 18 18 USE sbc_oce ! Surface boundary condition: ocean fields 19 USE thd_ice20 USE iceini21 USE limistate22 USE in_out_manager23 19 USE ice 24 20 USE par_ice 21 USE thd_ice 22 USE in_out_manager 25 23 USE lib_mpp 26 24 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
r2287 r2475 1 1 MODULE limthd_dif 2 #if defined key_lim33 !!----------------------------------------------------------------------4 !! 'key_lim3' LIM3 sea-ice model5 !!----------------------------------------------------------------------6 2 !!====================================================================== 7 3 !! *** MODULE limthd_dif *** … … 9 5 !! computation of surface and inner T 10 6 !!====================================================================== 11 12 7 !!---------------------------------------------------------------------- 13 !! * Modules used 8 #if defined key_lim3 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' LIM3 sea-ice model 11 !!---------------------------------------------------------------------- 14 12 USE par_oce ! ocean parameters 15 13 USE phycst ! physical constants (ocean directory) 16 14 USE thd_ice 17 USE iceini18 USE limistate19 15 USE in_out_manager 20 16 USE ice … … 25 21 PRIVATE 26 22 27 !! * Routine accessibility 28 PUBLIC lim_thd_dif ! called by lim_thd 29 30 !! * Module variables 23 PUBLIC lim_thd_dif ! called by lim_thd 24 31 25 REAL(wp) :: & ! constant values 32 26 epsi20 = 1e-20 , & … … 40 34 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 41 35 !!---------------------------------------------------------------------- 42 43 36 CONTAINS 44 37 … … 872 865 END SUBROUTINE lim_thd_dif 873 866 #endif 867 !!====================================================================== 874 868 END MODULE limthd_dif -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
r2287 r2475 1 1 MODULE limthd_ent 2 #if defined key_lim33 !!----------------------------------------------------------------------4 !! 'key_lim3' LIM3 sea-ice model5 !!----------------------------------------------------------------------6 2 !!====================================================================== 7 3 !! *** MODULE limthd_ent *** … … 10 6 !! after vertical growth/decay 11 7 !!====================================================================== 8 #if defined key_lim3 9 !!---------------------------------------------------------------------- 10 !! 'key_lim3' LIM3 sea-ice model 11 !!---------------------------------------------------------------------- 12 12 !! lim_thd_ent : ice redistribution of enthalpy 13 14 !! * Modules used 13 !!---------------------------------------------------------------------- 15 14 USE par_oce ! ocean parameters 16 15 USE dom_oce … … 19 18 USE phycst 20 19 USE thd_ice 21 USE iceini22 USE limistate23 20 USE ice 24 21 USE limvar … … 29 26 PRIVATE 30 27 31 !! * Routine accessibility 32 PUBLIC lim_thd_ent ! called by lim_thd 33 34 !! * Module variables 28 PUBLIC lim_thd_ent ! called by lim_thd 29 35 30 REAL(wp) :: & ! constant values 36 31 epsi20 = 1.e-20 , & … … 39 34 zone = 1.e0 , & 40 35 epsi10 = 1.0e-10 41 42 36 !!---------------------------------------------------------------------- 43 37 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 44 38 !! $Id$ 45 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 46 40 !!---------------------------------------------------------------------- 47 48 41 CONTAINS 49 42 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90
r2287 r2475 1 1 MODULE limthd_lac 2 !!----------------------------------------------------------------------3 !! 'key_lim3' LIM3 sea-ice model4 !!----------------------------------------------------------------------5 2 !!====================================================================== 6 3 !! *** MODULE limthd_lac *** … … 9 6 #if defined key_lim3 10 7 !!---------------------------------------------------------------------- 8 !! 'key_lim3' LIM3 sea-ice model 9 !!---------------------------------------------------------------------- 11 10 !! lim_lat_acr : lateral accretion of ice 12 !! * Modules used11 !!---------------------------------------------------------------------- 13 12 USE par_oce ! ocean parameters 14 13 USE dom_oce … … 21 20 USE par_ice 22 21 USE ice 23 USE iceini24 22 USE limtab 25 23 USE limcons -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90
r2287 r2475 1 1 MODULE limthd_sal 2 !!----------------------------------------------------------------------3 !! 'key_lim3' LIM3 sea-ice model4 !!----------------------------------------------------------------------5 2 !!====================================================================== 6 3 !! *** MODULE limthd_sal *** 7 !! computation salinity variations in 8 !! the ice 4 !! LIM-3 sea-ice : computation of salinity variations in the ice 9 5 !!====================================================================== 6 !! History : - ! 2003-05 (M. Vancoppenolle) UCL-ASTR first coding for LIM3-1D 7 !! 3.0 ! 2005-12 (M. Vancoppenolle) adapted to the 3-D version 8 !!--------------------------------------------------------------------- 10 9 #if defined key_lim3 11 10 !!---------------------------------------------------------------------- 11 !! 'key_lim3' LIM-3 sea-ice model 12 !!---------------------------------------------------------------------- 12 13 !! lim_thd_sal : salinity variations in the ice 13 !! * Modules used14 !!---------------------------------------------------------------------- 14 15 USE par_oce ! ocean parameters 15 16 USE phycst ! physical constants (ocean directory) 16 17 USE sbc_oce ! Surface boundary condition: ocean fields 17 USE thd_ice 18 USE iceini 19 USE ice 20 USE limistate 21 USE in_out_manager 22 USE limvar 23 USE par_ice 18 USE ice ! LIM: sea-ice variables 19 USE par_ice ! LIM: sea-ice parameters 20 USE thd_ice ! LIM: sea-ice thermodynamics 21 USE limvar ! LIM: sea-ice variables 22 USE in_out_manager ! I/O manager 24 23 25 24 IMPLICIT NONE 26 25 PRIVATE 27 26 28 !! * Routine accessibility 29 PUBLIC lim_thd_sal ! called by lim_thd 30 PUBLIC lim_thd_sal_init ! called by lim_thd 31 32 !! * Module variables 33 REAL(wp) :: & ! constant values 34 epsi20 = 1e-20 , & 35 epsi13 = 1e-13 , & 36 zzero = 0.e0 , & 37 zone = 1.e0 27 PUBLIC lim_thd_sal ! called by limthd module 28 PUBLIC lim_thd_sal_init ! called by iceini module 38 29 39 30 !!---------------------------------------------------------------------- 40 31 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 41 32 !! $Id$ 42 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 43 !!---------------------------------------------------------------------- 44 33 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 34 !!---------------------------------------------------------------------- 45 35 CONTAINS 46 36 47 SUBROUTINE lim_thd_sal( kideb,kiut)37 SUBROUTINE lim_thd_sal( kideb, kiut ) 48 38 !!------------------------------------------------------------------- 49 !! *** ROUTINE lim_thd_sal *** 50 !! ** Purpose :51 !! This routinecomputes new salinities in the ice39 !! *** ROUTINE lim_thd_sal *** 40 !! 41 !! ** Purpose : computes new salinities in the ice 52 42 !! 53 43 !! ** Method : 4 possibilities … … 56 46 !! -> num_sal = 3 -> S = S(z) [multiyear ice] 57 47 !! -> num_sal = 4 -> S = S(h) [Cox and Weeks 74] 58 !!59 !! ** Steps60 !!61 !! ** Arguments62 !!63 !! ** Inputs / Outputs64 !!65 !! ** External66 !!67 !! ** References68 !!69 !! ** History :70 !!71 !! "Je ne suis pour l'instant qu'a 80% de ma condition, mais c'est72 !! les 30% qui restent qui seront les plus difficiles"73 !! E. Mpenza74 !!75 !!-------------------------------------------------------------------76 !! History :77 !! ori ! 03-05 M. Vancoppenolle UCL-ASTR first coding for LIM-1D78 !! 3.0 ! 05-12 Routine rewritten for the 3-D version79 48 !!--------------------------------------------------------------------- 80 !! 81 !! * Local variables 82 INTEGER, INTENT(in) :: & 83 kideb, kiut !: thickness category index 84 85 INTEGER :: & 86 ji, jk , & !: geographic and layer index 87 zji, zjj 88 89 REAL(wp) :: & 90 zsold, & !: old salinity 91 zeps=1.0e-06 , & !: very small 92 iflush , & !: flushing (1) or not (0) 93 iaccrbo , & !: bottom accretion (1) or not (0) 94 igravdr , & !: gravity drainage or not 95 isnowic , & !: gravity drainage or not 96 i_ice_switch , & !: ice thickness above a certain treshold or not 97 ztmelts , & !: freezing point of sea ice 98 zaaa , & !: dummy factor 99 zbbb , & !: dummy factor 100 zccc , & !: dummy factor 101 zdiscrim !: dummy factor 102 103 REAL(wp), DIMENSION(jpij) :: & 104 ze_init , & !initial total enthalpy 105 zhiold , & 106 zsiold 107 49 INTEGER, INTENT(in) :: kideb, kiut ! thickness category index 50 ! 51 INTEGER :: ji, jk ! dummy loop indices 52 INTEGER :: zji, zjj ! local integers 53 REAL(wp) :: zsold, zeps, iflush, iaccrbo, igravdr, isnowic, i_ice_switch, ztmelts ! local scalars 54 REAL(wp) :: zaaa, zbbb, zccc, zdiscrim ! local scalars 55 REAL(wp), DIMENSION(jpij) :: ze_init, zhiold, zsiold ! 1D workspace 108 56 !!--------------------------------------------------------------------- 109 57 58 zeps=1.0e-06_wp 59 110 60 !------------------------------------------------------------------------------| 111 61 ! 1) Constant salinity, constant in time | 112 62 !------------------------------------------------------------------------------| 113 63 114 IF (num_sal.eq.1) THEN 115 116 ! WRITE(numout,*) 117 ! WRITE(numout,*) 'lim_thd_sal : Ice salinity computation module ', & 118 ! num_sal 119 ! WRITE(numout,*) '~~~~~~~~~~~~' 120 64 IF( num_sal == 1 ) THEN 121 65 DO jk = 1, nlay_i 122 66 DO ji = kideb, kiut … … 124 68 END DO ! ji 125 69 END DO ! jk 126 70 ! 127 71 DO ji = kideb, kiut 128 72 sm_i_b(ji) = bulk_sal 129 73 END DO ! ji 130 131 ENDIF ! num_sal .EQ. 174 ! 75 ENDIF 132 76 133 77 !------------------------------------------------------------------------------| … … 176 120 ! isnowic : 1 if snow ice formation 177 121 i_ice_switch = 1.0 - MAX ( 0.0 , SIGN ( 1.0 , - ht_i_b(ji) + 1.0e-2 ) ) 178 isnowic = 1.0 - MAX ( 0.0 , SIGN ( 1.0 , - dh_snowice(ji) ) ) * & 179 i_ice_switch 122 isnowic = 1.0 - MAX ( 0.0 , SIGN ( 1.0 , - dh_snowice(ji) ) ) * i_ice_switch 180 123 181 124 !--------------------- … … 184 127 185 128 ! drainage by gravity drainage 186 dsm_i_gd_1d(ji) = - igravdr * & 187 MAX( sm_i_b(ji) - sal_G , 0.0 ) / & 188 time_G * rdt_ice 129 dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_b(ji) - sal_G , 0._wp ) / time_G * rdt_ice 189 130 190 131 ! drainage by flushing 191 dsm_i_fl_1d(ji) = - iflush * & 192 MAX( sm_i_b(ji) - sal_F , 0.0 ) / & 193 time_F * rdt_ice 132 dsm_i_fl_1d(ji) = - iflush * MAX( sm_i_b(ji) - sal_F , 0._wp ) / time_F * rdt_ice 194 133 195 134 !----------------- … … 201 140 ! to conserve energy 202 141 zsiold(ji) = sm_i_b(ji) 203 sm_i_b(ji) = sm_i_b(ji) & 204 + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) ! & 142 sm_i_b(ji) = sm_i_b(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) 205 143 206 144 ! if no ice, salinity eq 0.1 207 i_ice_switch = 1.0 - MAX ( 0.0, SIGN (1.0 , - ht_i_b(ji) ) ) 208 sm_i_b(ji) = i_ice_switch*sm_i_b(ji) + s_i_min * ( 1.0 - & 209 i_ice_switch ) 145 i_ice_switch = 1._wp - MAX ( 0._wp, SIGN( 1._wp , - ht_i_b(ji) ) ) 146 sm_i_b(ji) = i_ice_switch*sm_i_b(ji) + s_i_min * ( 1._wp - i_ice_switch ) 210 147 END DO ! ji 211 148 212 149 ! Salinity profile 213 CALL lim_var_salprof1d( kideb,kiut)150 CALL lim_var_salprof1d( kideb, kiut ) 214 151 215 152 !---------------------------- … … 219 156 DO ji = kideb, kiut 220 157 ! iflush : 1 if summer 221 iflush = MAX( 0.0 , SIGN ( 1.0, t_su_b(ji) - rtt ) )158 iflush = MAX( 0._wp , SIGN ( 1._wp , t_su_b(ji) - rtt ) ) 222 159 ! igravdr : 1 if t_su lt t_bo 223 igravdr = MAX( 0.0 , SIGN ( 1.0, t_bo_b(ji) - t_su_b(ji) ) )160 igravdr = MAX( 0._wp , SIGN ( 1._wp , t_bo_b(ji) - t_su_b(ji) ) ) 224 161 ! iaccrbo : 1 if bottom accretion 225 iaccrbo = MAX( 0.0 , SIGN ( 1.0, dh_i_bott(ji) ) )226 227 fhbri_1d(ji) = 0. 0162 iaccrbo = MAX( 0._wp , SIGN ( 1._wp , dh_i_bott(ji) ) ) 163 ! 164 fhbri_1d(ji) = 0._wp 228 165 END DO ! ji 229 166 … … 232 169 !---------------------------- 233 170 DO ji = kideb, kiut 234 i_ice_switch = 1.0 - MAX ( 0.0, SIGN (1.0 , - ht_i_b(ji) ) ) 235 fsbri_1d(ji) = fsbri_1d(ji) - & 236 i_ice_switch * rhoic * a_i_b(ji) * ht_i_b(ji) * & 237 ( MAX(dsm_i_gd_1d(ji) + dsm_i_fl_1d(ji), & 238 sm_i_b(ji) - zsiold(ji) ) ) / rdt_ice 239 IF ( num_sal .EQ. 4 ) fsbri_1d(ji) = 0.0 240 171 i_ice_switch = 1._wp - MAX ( 0._wp, SIGN( 1._wp , - ht_i_b(ji) ) ) 172 fsbri_1d(ji) = fsbri_1d(ji) - i_ice_switch * rhoic * a_i_b(ji) * ht_i_b(ji) & 173 & * ( MAX(dsm_i_gd_1d(ji) + dsm_i_fl_1d(ji), sm_i_b(ji) - zsiold(ji) ) ) / rdt_ice 174 IF( num_sal == 4 ) fsbri_1d(ji) = 0._wp 241 175 END DO ! ji 242 176 … … 246 180 !-------------------- 247 181 DO jk = 1, nlay_i 248 249 182 DO ji = kideb, kiut 250 251 183 ztmelts = -tmut*s_i_b(ji,jk) + rtt 252 184 !Conversion q(S,T) -> T (second order equation) 253 185 zaaa = cpic 254 zbbb = ( rcp - cpic ) * ( ztmelts - rtt ) + & 255 q_i_b(ji,jk) / rhoic - lfus 186 zbbb = ( rcp - cpic ) * ( ztmelts - rtt ) + q_i_b(ji,jk) / rhoic - lfus 256 187 zccc = lfus * ( ztmelts - rtt ) 257 188 zdiscrim = SQRT( MAX(zbbb*zbbb - 4.0*zaaa*zccc,0.0) ) 258 t_i_b(ji,jk) = rtt - ( zbbb + zdiscrim ) / & 259 ( 2.0 *zaaa ) 189 t_i_b(ji,jk) = rtt - ( zbbb + zdiscrim ) / ( 2.0 *zaaa ) 260 190 END DO !ji 261 262 191 END DO !jk 263 192 ! 264 193 ENDIF ! num_sal .EQ. 2 265 194 … … 268 197 !------------------------------------------------------------------------------| 269 198 270 IF 199 IF( num_sal .EQ. 3 ) THEN 271 200 272 201 WRITE(numout,*) … … 322 251 zji = MOD( npb(ji) - 1, jpi ) + 1 323 252 zjj = ( npb(ji) - 1 ) / jpi + 1 324 fseqv_1d(ji) = fseqv_1d(ji) + & 325 ( sss_m(zji,zjj) - bulk_sal ) * & 326 rhoic * a_i_b(ji) * & 327 MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice 253 fseqv_1d(ji) = fseqv_1d(ji) + ( sss_m(zji,zjj) - bulk_sal ) & 254 & * rhoic * a_i_b(ji) * MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice 328 255 END DO 329 256 ELSE … … 331 258 zji = MOD( npb(ji) - 1, jpi ) + 1 332 259 zjj = ( npb(ji) - 1 ) / jpi + 1 333 fseqv_1d(ji) = fseqv_1d(ji) + & 334 ( sss_m(zji,zjj) - s_i_new(ji) ) * & 335 rhoic * a_i_b(ji) * & 336 MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice 260 fseqv_1d(ji) = fseqv_1d(ji) + ( sss_m(zji,zjj) - s_i_new(ji) ) & 261 & * rhoic * a_i_b(ji) * MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice 337 262 END DO ! ji 338 263 ENDIF 339 340 !-- End of salinity computations 264 ! 341 265 END SUBROUTINE lim_thd_sal 342 !============================================================================== 266 343 267 344 268 SUBROUTINE lim_thd_sal_init … … 348 272 !! ** Purpose : initialization of ice salinity parameters 349 273 !! 350 !! ** Method : Read the namicesal namelist and check the parameter351 !! values called at the first timestep (nit000)274 !! ** Method : Read the namicesal namelist and check the parameter 275 !! values called at the first timestep (nit000) 352 276 !! 353 277 !! ** input : Namelist namicesal 354 !!355 !! history :356 !! 3.0 ! July 2005 M. Vancoppenolle Original code357 278 !!------------------------------------------------------------------- 358 NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F, &359 s_i_max, s_i_min, s_i_0, s_i_1279 NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F, & 280 & s_i_max, s_i_min, s_i_0, s_i_1 360 281 !!------------------------------------------------------------------- 361 362 ! Read Namelist namicesal363 RE WIND ( numnam_ice)364 READ ( numnam_ice , namicesal )365 IF(lwp) THEN 282 ! 283 REWIND( numnam_ice ) ! Read Namelist namicesal 284 READ ( numnam_ice , namicesal ) 285 ! 286 IF(lwp) THEN ! control print 366 287 WRITE(numout,*) 367 288 WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity ' … … 378 299 WRITE(numout,*) ' 2nd salinity for salinity profile : ', s_i_1 379 300 ENDIF 380 301 ! 381 302 END SUBROUTINE lim_thd_sal_init 382 303 383 304 #else 384 305 !!---------------------------------------------------------------------- 385 !! Default option Empty Module No sea-ice model 386 !!---------------------------------------------------------------------- 387 CONTAINS 388 SUBROUTINE lim_thd_sal ! Empty routine 389 END SUBROUTINE lim_thd_sal 306 !! Default option Dummy Module No LIM-3 sea-ice model 307 !!---------------------------------------------------------------------- 390 308 #endif 391 309 !!====================================================================== -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
r2287 r2475 11 11 !! lim_trp_init : initialization and namelist read 12 12 !!---------------------------------------------------------------------- 13 !! * Modules used14 13 USE phycst 15 14 USE dom_oce … … 18 17 USE dom_ice 19 18 USE ice 20 USE iceini21 USE limistate22 19 USE limadv 23 20 USE limhdf -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limupdate.F90
r2287 r2475 13 13 !! 'key_lim3' LIM3 sea-ice model 14 14 !!---------------------------------------------------------------------- 15 !! lim_update : computes update of sea-ice global variables 16 !! from trend terms 15 !! lim_update : computes update of sea-ice global variables from trend terms 17 16 !!---------------------------------------------------------------------- 18 !! * Modules used19 USE limistate20 17 USE limrhg ! ice rheology 21 18 USE lbclnk … … 29 26 USE phycst ! Define parameters for the routines 30 27 USE ice 31 USE iceini32 28 USE lbclnk 33 29 USE limdyn -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
r2364 r2475 1 1 MODULE limwri 2 !!----------------------------------------------------------------------3 !! 'key_lim3' LIM3 sea-ice model4 !!----------------------------------------------------------------------5 2 !!====================================================================== 6 3 !! *** MODULE limwri *** … … 9 6 #if defined key_lim3 10 7 !!---------------------------------------------------------------------- 11 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 12 !! $Id$ 13 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 8 !! 'key_lim3' LIM3 sea-ice model 14 9 !!---------------------------------------------------------------------- 15 10 !! lim_wri : write of the diagnostics variables in ouput file 16 11 !! lim_wri_init : initialization and namelist read 17 12 !!---------------------------------------------------------------------- 18 !! * Modules used19 13 USE ioipsl 20 14 USE dianam ! build name of file (routine) … … 26 20 USE dom_ice 27 21 USE ice 28 USE iceini29 22 USE lbclnk 30 23 USE par_ice … … 64 57 zzero = 0.e0 , & 65 58 zone = 1.e0 66 59 60 !!---------------------------------------------------------------------- 61 !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 62 !! $Id$ 63 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 64 !!---------------------------------------------------------------------- 67 65 CONTAINS 66 68 67 #if defined key_dimgout 69 70 68 # include "limwri_dimg.h90" 71 72 69 #else 73 70
Note: See TracChangeset
for help on using the changeset viewer.