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 14021 for NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/ICE/icedyn.F90 – NEMO

Ignore:
Timestamp:
2020-12-02T20:53:00+01:00 (3 years ago)
Author:
laurent
Message:

Caught up with trunk rev 14020...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/ICE/icedyn.F90

    r13472 r14021  
    22   !!====================================================================== 
    33   !!                     ***  MODULE  icedyn  *** 
    4    !!   Sea-Ice dynamics : master routine for sea ice dynamics  
     4   !!   Sea-Ice dynamics : master routine for sea ice dynamics 
    55   !!====================================================================== 
    66   !! history :  4.0  ! 2018  (C. Rousset)  original code SI3 [aka Sea Ice cube] 
     
    2929   USE lbclnk         ! lateral boundary conditions (or mpp links) 
    3030   USE timing         ! Timing 
     31   USE fldread        ! read input fields 
    3132 
    3233   IMPLICIT NONE 
     
    3536   PUBLIC   ice_dyn        ! called by icestp.F90 
    3637   PUBLIC   ice_dyn_init   ! called by icestp.F90 
    37     
     38 
    3839   INTEGER ::              nice_dyn   ! choice of the type of dynamics 
    3940   !                                        ! associated indices: 
    4041   INTEGER, PARAMETER ::   np_dynALL     = 1   ! full ice dynamics               (rheology + advection + ridging/rafting + correction) 
    41    INTEGER, PARAMETER ::   np_dynRHGADV  = 2   ! pure dynamics                   (rheology + advection)  
     42   INTEGER, PARAMETER ::   np_dynRHGADV  = 2   ! pure dynamics                   (rheology + advection) 
    4243   INTEGER, PARAMETER ::   np_dynADV1D   = 3   ! only advection 1D - test case from Schar & Smolarkiewicz 1996 
    4344   INTEGER, PARAMETER ::   np_dynADV2D   = 4   ! only advection 2D w prescribed vel.(rn_uvice + advection) 
     
    5051   REAL(wp) ::   rn_uice          !    prescribed u-vel (case np_dynADV1D & np_dynADV2D) 
    5152   REAL(wp) ::   rn_vice          !    prescribed v-vel (case np_dynADV1D & np_dynADV2D) 
    52     
     53 
     54   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_icbmsk   ! structure of input grounded icebergs mask (file informations, fields read) 
     55 
    5356   !! * Substitutions 
    5457#  include "do_loop_substitute.h90" 
     
    6366      !!------------------------------------------------------------------- 
    6467      !!               ***  ROUTINE ice_dyn  *** 
    65       !!                
     68      !! 
    6669      !! ** Purpose :   this routine manages sea ice dynamics 
    6770      !! 
     
    8184      ! 
    8285      ! controls 
    83       IF( ln_timing )   CALL timing_start('icedyn') 
     86      IF( ln_timing )   CALL timing_start('ice_dyn') 
    8487      ! 
    8588      IF( kt == nit000 .AND. lwp ) THEN 
     
    8891         WRITE(numout,*)'~~~~~~~' 
    8992      ENDIF 
    90       !                       
     93      ! 
    9194      ! retrieve thickness from volume for landfast param. and UMx advection scheme 
    9295      WHERE( a_i(:,:,:) >= epsi20 ) 
     
    106109      END WHERE 
    107110      ! 
     111      IF( ln_landfast_L16 ) THEN 
     112         CALL fld_read( kt, 1, sf_icbmsk ) 
     113         icb_mask(:,:) = sf_icbmsk(1)%fnow(:,:,1) 
     114      ENDIF 
    108115      ! 
    109116      SELECT CASE( nice_dyn )          !-- Set which dynamics is running 
     
    111118      CASE ( np_dynALL )           !==  all dynamical processes  ==! 
    112119         ! 
    113          CALL ice_dyn_rhg   ( kt, Kmm )                                     ! -- rheology   
     120         CALL ice_dyn_rhg   ( kt, Kmm )                                     ! -- rheology 
    114121         CALL ice_dyn_adv   ( kt )                                          ! -- advection of ice 
    115          CALL ice_dyn_rdgrft( kt )                                          ! -- ridging/rafting  
     122         CALL ice_dyn_rdgrft( kt )                                          ! -- ridging/rafting 
    116123         CALL ice_cor       ( kt , 1 )                                      ! -- Corrections 
    117124         ! 
    118125      CASE ( np_dynRHGADV  )       !==  no ridge/raft & no corrections ==! 
    119126         ! 
    120          CALL ice_dyn_rhg   ( kt, Kmm )                                     ! -- rheology   
     127         CALL ice_dyn_rhg   ( kt, Kmm )                                     ! -- rheology 
    121128         CALL ice_dyn_adv   ( kt )                                          ! -- advection of ice 
    122129         CALL Hpiling                                                       ! -- simple pile-up (replaces ridging/rafting) 
     
    127134         ! --- monotonicity test from Schar & Smolarkiewicz 1996 --- ! 
    128135         ! CFL = 0.5 at a distance from the bound of 1/6 of the basin length 
    129          ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s  
     136         ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s 
    130137         DO_2D( 1, 1, 1, 1 ) 
    131138            zcoefu = ( REAL(jpiglo+1)*0.5_wp - REAL(ji+nimpp-1) ) / ( REAL(jpiglo+1)*0.5_wp - 1._wp ) 
     
    149156      ! 
    150157      ! 
    151       ! diagnostics: divergence at T points  
     158      ! diagnostics: divergence at T points 
    152159      IF( iom_use('icediv') ) THEN 
    153160         ! 
     
    172179      ! 
    173180      ! controls 
    174       IF( ln_timing )   CALL timing_stop ('icedyn') 
     181      IF( ln_timing )   CALL timing_stop ('ice_dyn') 
    175182      ! 
    176183   END SUBROUTINE ice_dyn 
     
    216223      !! ** input   :   Namelist namdyn 
    217224      !!------------------------------------------------------------------- 
    218       INTEGER ::   ios, ioptio   ! Local integer output status for namelist read 
     225      INTEGER ::   ios, ioptio, ierror   ! Local integer output status for namelist read 
     226      ! 
     227      CHARACTER(len=256) ::   cn_dir     ! Root directory for location of ice files 
     228      TYPE(FLD_N)        ::   sn_icbmsk  ! informations about the grounded icebergs field to be read 
    219229      !! 
    220230      NAMELIST/namdyn/ ln_dynALL, ln_dynRHGADV, ln_dynADV1D, ln_dynADV2D, rn_uice, rn_vice,  & 
    221231         &             rn_ishlat ,                                                           & 
    222          &             ln_landfast_L16, rn_lf_depfra, rn_lf_bfr, rn_lf_relax, rn_lf_tensile 
     232         &             ln_landfast_L16, rn_lf_depfra, rn_lf_bfr, rn_lf_relax, rn_lf_tensile, & 
     233         &             sn_icbmsk, cn_dir 
    223234      !!------------------------------------------------------------------- 
    224235      ! 
     
    248259      ENDIF 
    249260      !                             !== set the choice of ice dynamics ==! 
    250       ioptio = 0  
     261      ioptio = 0 
    251262      !      !--- full dynamics                               (rheology + advection + ridging/rafting + correction) 
    252263      IF( ln_dynALL    ) THEN   ;   ioptio = ioptio + 1   ;   nice_dyn = np_dynALL       ;   ENDIF 
     
    269280      IF( .NOT.ln_landfast_L16 )   tau_icebfr(:,:) = 0._wp 
    270281      ! 
     282      !                                      !--- allocate and fill structure for grounded icebergs mask 
     283      IF( ln_landfast_L16 ) THEN 
     284         ALLOCATE( sf_icbmsk(1), STAT=ierror ) 
     285         IF( ierror > 0 ) THEN 
     286            CALL ctl_stop( 'ice_dyn_init: unable to allocate sf_icbmsk structure' ) ; RETURN 
     287         ENDIF 
     288         ! 
     289         CALL fld_fill( sf_icbmsk, (/ sn_icbmsk /), cn_dir, 'ice_dyn_init',   & 
     290            &                                               'landfast ice is a function of read grounded icebergs', 'icedyn' ) 
     291         ! 
     292         ALLOCATE( sf_icbmsk(1)%fnow(jpi,jpj,1) ) 
     293         IF( sf_icbmsk(1)%ln_tint )   ALLOCATE( sf_icbmsk(1)%fdta(jpi,jpj,1,2) ) 
     294         IF( TRIM(sf_icbmsk(1)%clrootname) == 'NOT USED' ) sf_icbmsk(1)%fnow(:,:,1) = 0._wp   ! not used field  (set to 0) 
     295      ELSE 
     296         icb_mask(:,:) = 0._wp 
     297      ENDIF 
     298      !                                      !--- other init 
    271299      CALL ice_dyn_rdgrft_init          ! set ice ridging/rafting parameters 
    272300      CALL ice_dyn_rhg_init             ! set ice rheology parameters 
     
    279307   !!   Default option         Empty module           NO SI3 sea-ice model 
    280308   !!---------------------------------------------------------------------- 
    281 #endif  
     309#endif 
    282310 
    283311   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.