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 13284 for NEMO/releases/r4.0/r4.0-HEAD/src/OCE/BDY – NEMO

Ignore:
Timestamp:
2020-07-09T17:12:23+02:00 (4 years ago)
Author:
smasson
Message:

4.0-HEAD: merge 4.0-HEAD_r12713_clem_dan_fixcpl into 4.0-HEAD

Location:
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/BDY
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/BDY/bdy_oce.F90

    r11536 r13284  
    6363      REAL(wp), POINTER, DIMENSION(:,:) ::  aip    !: now ice  pond concentration 
    6464      REAL(wp), POINTER, DIMENSION(:,:) ::  hip    !: now ice  pond depth 
     65      REAL(wp), POINTER, DIMENSION(:,:) ::  hil    !: now ice  pond lid depth 
    6566#if defined key_top 
    6667      CHARACTER(LEN=20)                   :: cn_obc  !: type of boundary condition to apply 
     
    115116   REAL(wp), DIMENSION(jp_bdy) ::   rice_apnd               !: pond conc.  of incoming sea ice 
    116117   REAL(wp), DIMENSION(jp_bdy) ::   rice_hpnd               !: pond thick. of incoming sea ice 
     118   REAL(wp), DIMENSION(jp_bdy) ::   rice_hlid               !: pond lid thick. of incoming sea ice 
    117119   ! 
    118120   !!---------------------------------------------------------------------- 
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/BDY/bdydta.F90

    r13255 r13284  
    4343   PUBLIC   bdy_dta_init     ! routine called by nemogcm.F90 
    4444 
    45    INTEGER , PARAMETER ::   jpbdyfld  = 16    ! maximum number of files to read  
     45   INTEGER , PARAMETER ::   jpbdyfld  = 17    ! maximum number of files to read  
    4646   INTEGER , PARAMETER ::   jp_bdyssh = 1     !  
    4747   INTEGER , PARAMETER ::   jp_bdyu2d = 2     !  
     
    6060   INTEGER , PARAMETER ::   jp_bdyaip = 15    !  
    6161   INTEGER , PARAMETER ::   jp_bdyhip = 16    !  
     62   INTEGER , PARAMETER ::   jp_bdyhil = 17    !  
    6263#if ! defined key_si3 
    6364   INTEGER , PARAMETER ::   jpl = 1 
     
    190191                        dta_bdy(jbdy)%aip(ib,jl) =  a_ip(ii,ij,jl) * tmask(ii,ij,1)  
    191192                        dta_bdy(jbdy)%hip(ib,jl) =  h_ip(ii,ij,jl) * tmask(ii,ij,1)  
     193                        dta_bdy(jbdy)%hil(ib,jl) =  h_il(ii,ij,jl) * tmask(ii,ij,1)  
    192194                     END DO 
    193195                  END DO 
     
    299301               &                                                                         bf_alias(jp_bdya_i)%fnow(:,1,:)     !   ( a_ip = rice_apnd * a_i ) 
    300302            IF( TRIM(bf_alias(jp_bdyhip)%clrootname) == 'NOT USED' )   bf_alias(jp_bdyhip)%fnow(:,1,:) = rice_hpnd(jbdy) 
     303            IF( TRIM(bf_alias(jp_bdyhil)%clrootname) == 'NOT USED' )   bf_alias(jp_bdyhil)%fnow(:,1,:) = rice_hlid(jbdy) 
    301304 
    302305            ! if T_i is read and not T_su, set T_su = T_i 
     
    323326               bf_alias(jp_bdyaip)%fnow(:,1,:) = 0._wp 
    324327               bf_alias(jp_bdyhip)%fnow(:,1,:) = 0._wp 
     328               bf_alias(jp_bdyhil)%fnow(:,1,:) = 0._wp 
     329            ENDIF 
     330            IF ( .NOT.ln_pnd_lids ) THEN 
     331               bf_alias(jp_bdyhil)%fnow(:,1,:) = 0._wp 
    325332            ENDIF 
    326333             
     
    328335            ipl = SIZE(bf_alias(jp_bdya_i)%fnow, 3)             
    329336            IF( ipl /= jpl ) THEN      ! ice: convert N-cat fields (input) into jpl-cat (output) 
    330                CALL ice_var_itd( bf_alias(jp_bdyh_i)%fnow(:,1,:), bf_alias(jp_bdyh_s)%fnow(:,1,:), bf_alias(jp_bdya_i)%fnow(:,1,:), & 
    331                   &              dta_alias%h_i                  , dta_alias%h_s                  , dta_alias%a_i                  , & 
    332                   &              bf_alias(jp_bdyt_i)%fnow(:,1,:), bf_alias(jp_bdyt_s)%fnow(:,1,:), & 
    333                   &              bf_alias(jp_bdytsu)%fnow(:,1,:), bf_alias(jp_bdys_i)%fnow(:,1,:), & 
    334                   &              bf_alias(jp_bdyaip)%fnow(:,1,:), bf_alias(jp_bdyhip)%fnow(:,1,:), & 
    335                   &              dta_alias%t_i                  , dta_alias%t_s                  , & 
    336                   &              dta_alias%tsu                  , dta_alias%s_i                  , & 
    337                   &              dta_alias%aip                  , dta_alias%hip ) 
     337               CALL ice_var_itd( bf_alias(jp_bdyh_i)%fnow(:,1,:), bf_alias(jp_bdyh_s)%fnow(:,1,:), bf_alias(jp_bdya_i)%fnow(:,1,:), & ! in 
     338                  &              dta_alias%h_i                  , dta_alias%h_s                  , dta_alias%a_i                  , & ! out 
     339                  &              bf_alias(jp_bdyt_i)%fnow(:,1,:), bf_alias(jp_bdyt_s)%fnow(:,1,:), &                                  ! in (optional) 
     340                  &              bf_alias(jp_bdytsu)%fnow(:,1,:), bf_alias(jp_bdys_i)%fnow(:,1,:), &                                  ! in     - 
     341                  &              bf_alias(jp_bdyaip)%fnow(:,1,:), bf_alias(jp_bdyhip)%fnow(:,1,:), bf_alias(jp_bdyhil)%fnow(:,1,:), & ! in     - 
     342                  &              dta_alias%t_i                  , dta_alias%t_s                  , &                                  ! out    - 
     343                  &              dta_alias%tsu                  , dta_alias%s_i                  , &                                  ! out    - 
     344                  &              dta_alias%aip                  , dta_alias%hip                  , dta_alias%hil )                    ! out    - 
    338345            ENDIF 
    339346         ENDIF 
     
    379386      !                                                         ! =F => baroclinic velocities in 3D boundary data 
    380387      LOGICAL                                ::   ln_zinterp    ! =T => requires a vertical interpolation of the bdydta 
    381       REAL(wp)                               ::   rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd  
     388      REAL(wp)                               ::   rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd, rn_ice_hlid 
    382389      INTEGER                                ::   ipk,ipl       ! 
    383390      INTEGER                                ::   idvar         ! variable ID 
     
    392399      TYPE(FLD_N), DIMENSION(1), TARGET  ::   bn_tem, bn_sal, bn_u3d, bn_v3d   ! must be an array to be used with fld_fill 
    393400      TYPE(FLD_N), DIMENSION(1), TARGET  ::   bn_ssh, bn_u2d, bn_v2d           ! informations about the fields to be read 
    394       TYPE(FLD_N), DIMENSION(1), TARGET  ::   bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip        
     401      TYPE(FLD_N), DIMENSION(1), TARGET  ::   bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip, bn_hil        
    395402      TYPE(FLD_N), DIMENSION(:), POINTER ::   bn_alias                        ! must be an array to be used with fld_fill 
    396403      TYPE(FLD  ), DIMENSION(:), POINTER ::   bf_alias 
    397404      ! 
    398       NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d,         & 
    399                          & bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip, & 
    400                          & rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd,           & 
     405      NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d,                 & 
     406                         & bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip, bn_hil, & 
     407                         & rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd, rn_ice_hlid,      & 
    401408                         & ln_full_vel, ln_zinterp 
    402409      !!--------------------------------------------------------------------------- 
     
    455462#if defined key_si3 
    456463         IF( .NOT.ln_pnd ) THEN 
    457             rn_ice_apnd = 0. ; rn_ice_hpnd = 0. 
    458             CALL ctl_warn( 'rn_ice_apnd & rn_ice_hpnd = 0 when no ponds' ) 
     464            rn_ice_apnd = 0. ; rn_ice_hpnd = 0. ; rn_ice_hlid = 0. 
     465            CALL ctl_warn( 'rn_ice_apnd & rn_ice_hpnd = 0 & rn_ice_hlid = 0 when no ponds' ) 
     466         ENDIF 
     467         IF( .NOT.ln_pnd_lids ) THEN 
     468            rn_ice_hlid = 0. 
    459469         ENDIF 
    460470#endif 
     
    466476         rice_apnd(jbdy) = rn_ice_apnd 
    467477         rice_hpnd(jbdy) = rn_ice_hpnd 
    468           
     478         rice_hlid(jbdy) = rn_ice_hlid 
     479 
    469480          
    470481         DO jfld = 1, jpbdyfld 
     
    567578            IF(  jfld == jp_bdya_i .OR. jfld == jp_bdyh_i .OR. jfld == jp_bdyh_s .OR. & 
    568579               & jfld == jp_bdyt_i .OR. jfld == jp_bdyt_s .OR. jfld == jp_bdytsu .OR. & 
    569                & jfld == jp_bdys_i .OR. jfld == jp_bdyaip .OR. jfld == jp_bdyhip     ) THEN 
     580               & jfld == jp_bdys_i .OR. jfld == jp_bdyaip .OR. jfld == jp_bdyhip .OR. jfld == jp_bdyhil ) THEN 
    570581               igrd = 1                                                    ! T point 
    571582               ipk = ipl                                                   ! jpl-cat data 
     
    618629               bf_alias => bf(jp_bdyhip,jbdy:jbdy)                         ! alias for hip structure of bdy number jbdy 
    619630               bn_alias => bn_hip                                          ! alias for hip structure of nambdy_dta  
     631            ENDIF 
     632            IF( jfld == jp_bdyhil ) THEN 
     633               cl3 = 'hil' 
     634               bf_alias => bf(jp_bdyhil,jbdy:jbdy)                         ! alias for hil structure of bdy number jbdy 
     635               bn_alias => bn_hil                                          ! alias for hil structure of nambdy_dta  
    620636            ENDIF 
    621637 
     
    687703                  ENDIF 
    688704               ENDIF 
     705               IF( jfld == jp_bdyhil ) THEN 
     706                  IF( ipk == jpl ) THEN   ;   dta_bdy(jbdy)%hil => bf_alias(1)%fnow(:,1,:) 
     707                  ELSE                    ;   ALLOCATE( dta_bdy(jbdy)%hil(iszdim,jpl) ) 
     708                  ENDIF 
     709               ENDIF 
    689710            ENDIF 
    690711 
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/BDY/bdyice.F90

    r12520 r13284  
    9494         IF( ANY(llsend1) .OR. ANY(llrecv1) ) THEN   ! if need to send/recv in at least one direction 
    9595            ! exchange 3d arrays 
    96             CALL lbc_lnk_multi( 'bdyice', a_i , 'T', 1., h_i , 'T', 1., h_s , 'T', 1., oa_i, 'T', 1. & 
    97                  &                      , a_ip, 'T', 1., v_ip, 'T', 1., s_i , 'T', 1., t_su, 'T', 1. & 
    98                  &                      , v_i , 'T', 1., v_s , 'T', 1., sv_i, 'T', 1.                & 
    99                  &                      , kfillmode=jpfillnothing ,lsend=llsend1, lrecv=llrecv1      ) 
     96            CALL lbc_lnk_multi( 'bdyice', a_i , 'T', 1., h_i , 'T', 1., h_s , 'T', 1., oa_i, 'T', 1.                 & 
     97               &                        , s_i , 'T', 1., t_su, 'T', 1., v_i , 'T', 1., v_s , 'T', 1., sv_i, 'T', 1. & 
     98               &                        , a_ip, 'T', 1., v_ip, 'T', 1., v_il, 'T', 1.                                & 
     99               &                        , kfillmode=jpfillnothing ,lsend=llsend1, lrecv=llrecv1 ) 
    100100            ! exchange 4d arrays :   third dimension = 1   and then   third dimension = jpk 
    101101            CALL lbc_lnk_multi( 'bdyice', t_s , 'T', 1., e_s , 'T', 1., kfillmode=jpfillnothing ,lsend=llsend1, lrecv=llrecv1 ) 
     
    163163            a_ip(ji,jj,  jl) = ( a_ip(ji,jj,  jl) * zwgt1 + dta%aip(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Ice  pond concentration 
    164164            h_ip(ji,jj,  jl) = ( h_ip(ji,jj,  jl) * zwgt1 + dta%hip(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Ice  pond depth 
     165            h_il(ji,jj,  jl) = ( h_il(ji,jj,  jl) * zwgt1 + dta%hil(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Ice  pond lid depth 
    165166            ! 
    166167            sz_i(ji,jj,:,jl) = s_i(ji,jj,jl) 
     
    170171               a_ip(ji,jj,jl) = 0._wp 
    171172               h_ip(ji,jj,jl) = 0._wp 
     173               h_il(ji,jj,jl) = 0._wp 
     174            ENDIF 
     175 
     176            IF( .NOT.ln_pnd_lids ) THEN 
     177               h_il(ji,jj,jl) = 0._wp 
    172178            ENDIF 
    173179            ! 
     
    231237               a_ip(ji,jj,  jl) = a_ip(ib,jb,  jl) 
    232238               h_ip(ji,jj,  jl) = h_ip(ib,jb,  jl) 
     239               h_il(ji,jj,  jl) = h_il(ib,jb,  jl) 
    233240               ! 
    234241               sz_i(ji,jj,:,jl) = sz_i(ib,jb,:,jl) 
     
    268275               ! 
    269276               ! melt ponds 
    270                IF( a_i(ji,jj,jl) > epsi10 ) THEN 
    271                   a_ip_frac(ji,jj,jl) = a_ip(ji,jj,jl) / a_i (ji,jj,jl) 
    272                ELSE 
    273                   a_ip_frac(ji,jj,jl) = 0._wp 
    274                ENDIF 
    275277               v_ip(ji,jj,jl) = h_ip(ji,jj,jl) * a_ip(ji,jj,jl) 
     278               v_il(ji,jj,jl) = h_il(ji,jj,jl) * a_ip(ji,jj,jl) 
    276279               ! 
    277280            ELSE   ! no ice at the boundary 
     
    281284               h_s (ji,jj,  jl) = 0._wp 
    282285               oa_i(ji,jj,  jl) = 0._wp 
    283                a_ip(ji,jj,  jl) = 0._wp 
    284                v_ip(ji,jj,  jl) = 0._wp 
    285286               t_su(ji,jj,  jl) = rt0 
    286287               t_s (ji,jj,:,jl) = rt0 
    287288               t_i (ji,jj,:,jl) = rt0  
    288289 
    289                a_ip_frac(ji,jj,jl) = 0._wp 
    290                h_ip     (ji,jj,jl) = 0._wp 
    291                a_ip     (ji,jj,jl) = 0._wp 
    292                v_ip     (ji,jj,jl) = 0._wp 
     290               a_ip(ji,jj,jl) = 0._wp 
     291               h_ip(ji,jj,jl) = 0._wp 
     292               h_il(ji,jj,jl) = 0._wp 
    293293                
    294294               IF( nn_icesal == 1 ) THEN     ! if constant salinity 
     
    306306               e_s (ji,jj,:,jl) = 0._wp 
    307307               e_i (ji,jj,:,jl) = 0._wp 
     308               v_ip(ji,jj,  jl) = 0._wp 
     309               v_il(ji,jj,  jl) = 0._wp 
    308310 
    309311            ENDIF 
Note: See TracChangeset for help on using the changeset viewer.