Opened 6 months ago

Last modified 5 weeks ago

#2375 assigned Feature request

Check useless lbc_lnk in icb code

Reported by: mathiot Owned by: mathiot
Priority: low Milestone: Unscheduled
Component: ICB Version: release-4.0-HEAD
Severity: minor Keywords: lbclnk,
Cc: Review: failed
MP ready?: no
Progress: Unspecified

Description

Context

After a grep on lbc_lnk (by curiousity), I found some lbc_lnk I don't really understood why they are needed.
After checking which interpolated variable at icb location are used, I think some are useless (8/16 for icbthd.F90 and 2/16 for icbdyn.F90).

Proposal

  • Build an idealised test case to test the iceberg code (GYRE like with a lot of calving point)
  • Check if these lbc_lnk / interpolation are useful (block below are simply as reminder of where these calls exactly are):

1 : I am no convinced these 2 call of lbc_lnk. I don't understand why stored_ice need to be different to 0 over the haloes.

  • src/OCE/ICB/icbclv.F90

     
    172172      END DO 
    173173      ! 
    174174      DO jn = 1, nclasses 
    175          CALL lbc_lnk( 'icbclv', berg_grid%stored_ice(:,:,jn), 'T', 1._wp ) 
     175         CALL lbc_lnk( 'icbclv', berg_grid%stored_ice(:,:,jn), 'T', 1._wp )    ! useless PM ? 
    176176      END DO 
    177       CALL lbc_lnk( 'icbclv', berg_grid%stored_heat, 'T', 1._wp ) 
     177      CALL lbc_lnk( 'icbclv', berg_grid%stored_heat, 'T', 1._wp )              ! useless PM ? 
    178178      ! 
    179179      IF( nn_verbose_level > 0 .AND. icntmax > 1 )   WRITE(numicb,*) 'icb_clv: icnt=', icnt,' on', narea 
    180180      ! 

2 : zsst and zcn are computed but not used ⇒ need to find an easy to use solution in case more variables are used in the future (grounding scheme, new sea-ice/iceberg drag formulation …)

  • src/OCE/ICB/icbdyn.F90

     
    269269 
    270270      ! Interpolate gridded fields to berg 
    271271      nknberg = berg%number(1) 
    272       CALL icb_utl_interp( pxi, pe1, zuo, zui, zua, zssh_x,                     & 
    273          &                 pyj, pe2, zvo, zvi, zva, zssh_y, zsst, zcn, zhi, zff ) 
     272      CALL icb_utl_interp( pxi, pe1, zuo, zui, zua, zssh_x,                     & ! zsst, zcn useless PM ? 
     273         &                 pyj, pe2, zvo, zvi, zva, zssh_y, zsst, zcn, zhi, zff )  
    274274 
    275275      zM = berg%current_point%mass 
    276276      zT = berg%current_point%thickness               ! total thickness 

3 : pt%e1, pt%e2, pt%ssh_x, pt%ssh_y, zff, pt%ui, pt%vi, pt%hi are computed but not used ⇒ need to find an easy to use solution in case more variables are used in the future (new melting formulations).

  • src/OCE/ICB/icbthm.F90

     
    8282         ! 
    8383         pt => this%current_point 
    8484         nknberg = this%number(1) 
    85          CALL icb_utl_interp( pt%xi, pt%e1, pt%uo, pt%ui, pt%ua, pt%ssh_x,   & 
     85         CALL icb_utl_interp( pt%xi, pt%e1, pt%uo, pt%ui, pt%ua, pt%ssh_x,   &   ! pt%e1, pt%e2, pt%ssh_x, pt%ssh_y, zff, pt%ui, pt%vi, pt%hi useless PM ? 
    8686            &                 pt%yj, pt%e2, pt%vo, pt%vi, pt%va, pt%ssh_y,   & 
    8787            &                 pt%sst, pt%cn, pt%hi, zff ) 
    8888         ! 

4 : fr_e, tt_e and hi_e seems to be used only for the thermodynamic (1d with no icb over the haloes). So probably these 3 lbc_lnk call are useless.

  • src/OCE/ICB/icbutl.F90

     
    8282      CALL lbc_lnk_icb( 'icbutl', ff_e, 'F', +1._wp, 1, 1 ) 
    8383      CALL lbc_lnk_icb( 'icbutl', ua_e, 'U', -1._wp, 1, 1 ) 
    8484      CALL lbc_lnk_icb( 'icbutl', va_e, 'V', -1._wp, 1, 1 ) 
    85       CALL lbc_lnk_icb( 'icbutl', fr_e, 'T', +1._wp, 1, 1 ) 
    86       CALL lbc_lnk_icb( 'icbutl', tt_e, 'T', +1._wp, 1, 1 ) 
     85      CALL lbc_lnk_icb( 'icbutl', fr_e, 'T', +1._wp, 1, 1 ) ! useless PM ? 
     86      CALL lbc_lnk_icb( 'icbutl', tt_e, 'T', +1._wp, 1, 1 ) ! useless PM ? 
    8787#if defined key_si3 
    8888      hi_e(1:jpi, 1:jpj) = hm_i (:,:)   
    8989      ui_e(1:jpi, 1:jpj) = u_ice(:,:) 
     
    9393      zssh_lead_m(:,:) = ice_var_sshdyn(ssh_m, snwice_mass, snwice_mass_b) 
    9494      ssh_e(1:jpi, 1:jpj) = zssh_lead_m(:,:) * tmask(:,:,1) 
    9595      ! 
    96       CALL lbc_lnk_icb( 'icbutl', hi_e , 'T', +1._wp, 1, 1 ) 
     96      CALL lbc_lnk_icb( 'icbutl', hi_e , 'T', +1._wp, 1, 1 ) ! useless PM ? 
    9797      CALL lbc_lnk_icb( 'icbutl', ui_e , 'U', -1._wp, 1, 1 ) 
    9898      CALL lbc_lnk_icb( 'icbutl', vi_e , 'V', -1._wp, 1, 1 ) 
    9999#else 

Commit History (4)

ChangesetAuthorTimeChangeLog
13276mathiot2020-07-09T09:47:18+02:00

ticket #2494 and #2375: wrong point type inn lbc_lnk_icb for umask_e and vmask_e (see ticket #2492)

13273mathiot2020-07-08T18:06:39+02:00

ticket #2494 and #2375: remove useless lbclnk mentioned in ticket #2375

13265mathiot2020-07-08T13:34:28+02:00

ticket #2494 and #2375: ticket #2494 changes and part of ticket #2375 (lbc_icb_lnk on extended variable at T point removed), ff_e initialisation and lbc_lnk move in the icbini.F90; tests on possible useless lbc_lnk in icbclv not yet done

13243mathiot2020-07-03T17:42:57+02:00

ticket #2494 and #2375: creation branch

Change History (7)

comment:1 Changed 4 months ago by clevy

  • Type changed from Enhancement to Feature request

comment:2 Changed 4 months ago by clevy

  • Version changed from trunk to release-4.0-HEAD

comment:3 Changed 6 weeks ago by mathiot

  • Status changed from new to assigned
  • To keep in mind, every nn_sample time step icb_trj_write, icb%* need to be fully defined.

comment:4 Changed 5 weeks ago by mathiot

In 13243:

ticket #2494 and #2375: creation branch

comment:5 Changed 5 weeks ago by mathiot

In 13265:

ticket #2494 and #2375: ticket #2494 changes and part of ticket #2375 (lbc_icb_lnk on extended variable at T point removed), ff_e initialisation and lbc_lnk move in the icbini.F90; tests on possible useless lbc_lnk in icbclv not yet done

comment:6 Changed 5 weeks ago by mathiot

In 13273:

ticket #2494 and #2375: remove useless lbclnk mentioned in ticket #2375

comment:7 Changed 5 weeks ago by mathiot

In 13276:

ticket #2494 and #2375: wrong point type inn lbc_lnk_icb for umask_e and vmask_e (see ticket #2492)

Note: See TracTickets for help on using tickets.