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.
Changeset 5600 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 – NEMO

Ignore:
Timestamp:
2015-07-15T17:46:12+02:00 (9 years ago)
Author:
andrewryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90

    r5034 r5600  
    1818   USE sbc_oce        ! Surface boundary condition: ocean fields 
    1919   USE ice            ! LIM variables 
    20    USE par_ice        ! LIM parameters 
    2120   USE thd_ice        ! LIM thermodynamics 
    2221   USE limvar         ! LIM variables 
     
    3029 
    3130   PUBLIC   lim_thd_sal        ! called by limthd module 
    32    PUBLIC   lim_thd_sal_init   ! called by iceini module 
     31   PUBLIC   lim_thd_sal_init   ! called by sbc_lim_init 
    3332 
    3433   !!---------------------------------------------------------------------- 
     
    4645      !! 
    4746      !! ** Method  :  3 possibilities 
    48       !!               -> num_sal = 1 -> Sice = cst    [ice salinity constant in both time & space]  
    49       !!               -> num_sal = 2 -> Sice = S(z,t) [Vancoppenolle et al. 2005] 
    50       !!               -> num_sal = 3 -> Sice = S(z)   [multiyear ice] 
     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] 
    5150      !!--------------------------------------------------------------------- 
    5251      INTEGER, INTENT(in) ::   kideb, kiut   ! thickness category index 
     
    6665      ! 1) Constant salinity, constant in time                                       | 
    6766      !------------------------------------------------------------------------------| 
    68 !!gm comment: if num_sal = 1 s_i_new, s_i_1d and sm_i_1d can be set to bulk_sal one for all in the initialisation phase !! 
    69 !!gm           ===>>>   simplification of almost all test on num_sal value 
    70       IF(  num_sal == 1  ) THEN 
    71             s_i_1d (kideb:kiut,1:nlay_i) =  bulk_sal 
    72             sm_i_1d(kideb:kiut)          =  bulk_sal  
    73             s_i_new(kideb:kiut)          =  bulk_sal 
     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 
    7473      ENDIF 
    7574 
     
    7776      !  Module 2 : Constant salinity varying in time                                | 
    7877      !------------------------------------------------------------------------------| 
    79       IF(  num_sal == 2  ) THEN 
     78      IF(  nn_icesal == 2  ) THEN 
    8079 
    8180         DO ji = kideb, kiut 
     
    8382            ! Switches  
    8483            !---------- 
    85             iflush  = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rtt )        )     ! =1 if summer  
     84            iflush  = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 )        )     ! =1 if summer  
    8685            igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) )    ! =1 if t_su < t_bo 
    8786 
     
    9089            !--------------------- 
    9190            ! drainage by gravity drainage 
    92             dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - sal_G , 0._wp ) / time_G * rdt_ice  
     91            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice  
    9392            ! drainage by flushing   
    94             dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_1d(ji) - sal_F , 0._wp ) / time_F * rdt_ice 
     93            dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice 
    9594 
    9695            !----------------- 
     
    116115      !  Module 3 : Profile of salinity, constant in time                            | 
    117116      !------------------------------------------------------------------------------| 
    118       IF(  num_sal == 3  )   CALL lim_var_salprof1d( kideb, kiut ) 
     117      IF(  nn_icesal == 3  )   CALL lim_var_salprof1d( kideb, kiut ) 
    119118 
    120119      ! 
     
    134133      !!------------------------------------------------------------------- 
    135134      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    136       NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F,   & 
    137          &                s_i_max, s_i_min, s_i_0, s_i_1 
     135      NAMELIST/namicesal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd, rn_sal_fl, rn_time_fl,   & 
     136         &                rn_simax, rn_simin  
    138137      !!------------------------------------------------------------------- 
    139138      ! 
     
    151150         WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity ' 
    152151         WRITE(numout,*) '~~~~~~~~~~~~~~~~' 
    153          WRITE(numout,*) ' switch for salinity num_sal        : ', num_sal 
    154          WRITE(numout,*) ' bulk salinity value if num_sal = 1 : ', bulk_sal 
    155          WRITE(numout,*) ' restoring salinity for GD          : ', sal_G 
    156          WRITE(numout,*) ' restoring time for GD              : ', time_G 
    157          WRITE(numout,*) ' restoring salinity for flushing    : ', sal_F 
    158          WRITE(numout,*) ' restoring time for flushing        : ', time_F 
    159          WRITE(numout,*) ' Maximum tolerated ice salinity     : ', s_i_max 
    160          WRITE(numout,*) ' Minimum tolerated ice salinity     : ', s_i_min 
    161          WRITE(numout,*) ' 1st salinity for salinity profile  : ', s_i_0 
    162          WRITE(numout,*) ' 2nd salinity for salinity profile  : ', s_i_1 
     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 
    163160      ENDIF 
    164161      ! 
Note: See TracChangeset for help on using the changeset viewer.