New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
limthd_sal.F90 in branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 @ 5600

Last change on this file since 5600 was 5600, checked in by andrewryan, 9 years ago

merged in latest version of trunk alongside changes to SAO_SRC to be compatible with latest OBS

  • Property svn:keywords set to Id
File size: 8.3 KB
RevLine 
[825]1MODULE limthd_sal
2   !!======================================================================
3   !!                       ***  MODULE limthd_sal ***
[2528]4   !! LIM-3 sea-ice :  computation of salinity variations in the ice
[825]5   !!======================================================================
[2528]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
[2715]8   !!            4.0  ! 2011-02 (G. Madec) dynamical allocation
[2528]9   !!---------------------------------------------------------------------
[888]10#if defined key_lim3
[825]11   !!----------------------------------------------------------------------
[2528]12   !!   'key_lim3'                                      LIM-3 sea-ice model
13   !!----------------------------------------------------------------------
[3625]14   !!   lim_thd_sal   : salinity variations in the ice
[2528]15   !!----------------------------------------------------------------------
[3625]16   USE par_oce        ! ocean parameters
17   USE phycst         ! physical constants (ocean directory)
18   USE sbc_oce        ! Surface boundary condition: ocean fields
19   USE ice            ! LIM variables
20   USE thd_ice        ! LIM thermodynamics
21   USE limvar         ! LIM variables
22   USE in_out_manager ! I/O manager
23   USE lib_mpp        ! MPP library
24   USE wrk_nemo       ! work arrays
25   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
[825]26
27   IMPLICIT NONE
28   PRIVATE
29
[2528]30   PUBLIC   lim_thd_sal        ! called by limthd module
[5600]31   PUBLIC   lim_thd_sal_init   ! called by sbc_lim_init
[825]32
[1156]33   !!----------------------------------------------------------------------
[4161]34   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
[1156]35   !! $Id$
[2528]36   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[1156]37   !!----------------------------------------------------------------------
[921]38CONTAINS
[825]39
[2528]40   SUBROUTINE lim_thd_sal( kideb, kiut )
[825]41      !!-------------------------------------------------------------------
[2528]42      !!                ***  ROUTINE lim_thd_sal  ***   
43      !!   
44      !! ** Purpose :   computes new salinities in the ice
[825]45      !!
[3625]46      !! ** Method  :  3 possibilities
[5600]47      !!               -> nn_icesal = 1 -> Sice = cst    [ice salinity constant in both time & space]
48      !!               -> nn_icesal = 2 -> Sice = S(z,t) [Vancoppenolle et al. 2005]
49      !!               -> nn_icesal = 3 -> Sice = S(z)   [multiyear ice]
[825]50      !!---------------------------------------------------------------------
[3625]51      INTEGER, INTENT(in) ::   kideb, kiut   ! thickness category index
[2528]52      !
53      INTEGER  ::   ji, jk     ! dummy loop indices
[5034]54      REAL(wp) ::   iflush, igravdr   ! local scalars
[2528]55      !!---------------------------------------------------------------------
[825]56
[5034]57      !---------------------------------------------------------
58      !  0) Update ice salinity from snow-ice and bottom growth
59      !---------------------------------------------------------
60      DO ji = kideb, kiut
61         sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_se_1d(ji) + dsm_i_si_1d(ji)
62      END DO
63 
[921]64      !------------------------------------------------------------------------------|
65      ! 1) Constant salinity, constant in time                                       |
66      !------------------------------------------------------------------------------|
[5600]67!!gm comment: if nn_icesal = 1 s_i_new, s_i_1d and sm_i_1d can be set to rn_icesal one for all in the initialisation phase !!
68!!gm           ===>>>   simplification of almost all test on nn_icesal value
69      IF(  nn_icesal == 1  ) THEN
70            s_i_1d (kideb:kiut,1:nlay_i) =  rn_icesal
71            sm_i_1d(kideb:kiut)          =  rn_icesal 
72            s_i_new(kideb:kiut)          =  rn_icesal
[2528]73      ENDIF
[825]74
[921]75      !------------------------------------------------------------------------------|
76      !  Module 2 : Constant salinity varying in time                                |
77      !------------------------------------------------------------------------------|
[5600]78      IF(  nn_icesal == 2  ) THEN
[825]79
80         DO ji = kideb, kiut
[2715]81            !
[825]82            ! Switches
83            !----------
[5600]84            iflush  = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 )        )     ! =1 if summer
[5034]85            igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) )    ! =1 if t_su < t_bo
[825]86
87            !---------------------
88            ! Salinity tendencies
89            !---------------------
[5034]90            ! drainage by gravity drainage
[5600]91            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice 
[5034]92            ! drainage by flushing 
[5600]93            dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice
[825]94
95            !-----------------
96            ! Update salinity   
97            !-----------------
98            ! only drainage terms ( gravity drainage and flushing )
[2715]99            ! snow ice / bottom sources are added in lim_thd_ent to conserve energy
[5034]100            sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)
[825]101
[4161]102            !----------------------------
103            ! Salt flux - brine drainage
104            !----------------------------
[5034]105            sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_1d(ji) * ht_i_1d(ji) * ( dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) ) * r1_rdtice
[3625]106
[4161]107         END DO
[825]108
[4161]109         ! Salinity profile
110         CALL lim_var_salprof1d( kideb, kiut )
[2528]111         !
[3625]112      ENDIF 
[825]113
[921]114      !------------------------------------------------------------------------------|
115      !  Module 3 : Profile of salinity, constant in time                            |
116      !------------------------------------------------------------------------------|
[5600]117      IF(  nn_icesal == 3  )   CALL lim_var_salprof1d( kideb, kiut )
[825]118
[2528]119      !
[825]120   END SUBROUTINE lim_thd_sal
121
[2528]122
[825]123   SUBROUTINE lim_thd_sal_init
124      !!-------------------------------------------------------------------
125      !!                  ***  ROUTINE lim_thd_sal_init  ***
126      !!
127      !! ** Purpose :   initialization of ice salinity parameters
128      !!
[2528]129      !! ** Method  :   Read the namicesal namelist and check the parameter
130      !!              values called at the first timestep (nit000)
[825]131      !!
132      !! ** input   :   Namelist namicesal
133      !!-------------------------------------------------------------------
[4147]134      INTEGER  ::   ios                 ! Local integer output status for namelist read
[5600]135      NAMELIST/namicesal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd, rn_sal_fl, rn_time_fl,   &
136         &                rn_simax, rn_simin 
[825]137      !!-------------------------------------------------------------------
[2528]138      !
[4147]139      REWIND( numnam_ice_ref )              ! Namelist namicesal in reference namelist : Ice salinity
140      READ  ( numnam_ice_ref, namicesal, IOSTAT = ios, ERR = 901)
141901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in reference namelist', lwp )
142
143      REWIND( numnam_ice_cfg )              ! Namelist namicesal in configuration namelist : Ice salinity
144      READ  ( numnam_ice_cfg, namicesal, IOSTAT = ios, ERR = 902 )
145902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in configuration namelist', lwp )
[4624]146      IF(lwm) WRITE ( numoni, namicesal )
[2528]147      !
148      IF(lwp) THEN                           ! control print
[825]149         WRITE(numout,*)
150         WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity '
151         WRITE(numout,*) '~~~~~~~~~~~~~~~~'
[5600]152         WRITE(numout,*) '   switch for salinity nn_icesal        = ', nn_icesal
153         WRITE(numout,*) '   bulk salinity value if nn_icesal = 1 = ', rn_icesal
154         WRITE(numout,*) '   restoring salinity for GD            = ', rn_sal_gd
155         WRITE(numout,*) '   restoring time for GD                = ', rn_time_gd
156         WRITE(numout,*) '   restoring salinity for flushing      = ', rn_sal_fl
157         WRITE(numout,*) '   restoring time for flushing          = ', rn_time_fl
158         WRITE(numout,*) '   Maximum tolerated ice salinity       = ', rn_simax
159         WRITE(numout,*) '   Minimum tolerated ice salinity       = ', rn_simin
[825]160      ENDIF
[2528]161      !
[825]162   END SUBROUTINE lim_thd_sal_init
163
164#else
165   !!----------------------------------------------------------------------
[2528]166   !!   Default option         Dummy Module          No LIM-3 sea-ice model
[825]167   !!----------------------------------------------------------------------
168#endif
169   !!======================================================================
170END MODULE limthd_sal
Note: See TracBrowser for help on using the repository browser.