Opened 4 years ago
Closed 3 years ago
#2375 closed Bug (fixed)
Check useless lbc_lnk in icb code
Reported by: | mathiot | Owned by: | mathiot |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | ICB | Version: | |
Severity: | minor | Keywords: | lbclnk, |
Cc: |
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
172 172 END DO 173 173 ! 174 174 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 ? 176 176 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 ? 178 178 ! 179 179 IF( nn_verbose_level > 0 .AND. icntmax > 1 ) WRITE(numicb,*) 'icb_clv: icnt=', icnt,' on', narea 180 180 !
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
269 269 270 270 ! Interpolate gridded fields to berg 271 271 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 ) 274 274 275 275 zM = berg%current_point%mass 276 276 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
82 82 ! 83 83 pt => this%current_point 84 84 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 ? 86 86 & pt%yj, pt%e2, pt%vo, pt%vi, pt%va, pt%ssh_y, & 87 87 & pt%sst, pt%cn, pt%hi, zff ) 88 88 !
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
82 82 CALL lbc_lnk_icb( 'icbutl', ff_e, 'F', +1._wp, 1, 1 ) 83 83 CALL lbc_lnk_icb( 'icbutl', ua_e, 'U', -1._wp, 1, 1 ) 84 84 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 ? 87 87 #if defined key_si3 88 88 hi_e(1:jpi, 1:jpj) = hm_i (:,:) 89 89 ui_e(1:jpi, 1:jpj) = u_ice(:,:) … … 93 93 zssh_lead_m(:,:) = ice_var_sshdyn(ssh_m, snwice_mass, snwice_mass_b) 94 94 ssh_e(1:jpi, 1:jpj) = zssh_lead_m(:,:) * tmask(:,:,1) 95 95 ! 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 ? 97 97 CALL lbc_lnk_icb( 'icbutl', ui_e , 'U', -1._wp, 1, 1 ) 98 98 CALL lbc_lnk_icb( 'icbutl', vi_e , 'V', -1._wp, 1, 1 ) 99 99 #else
Commit History (4)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
13276 | mathiot | 2020-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) |
13273 | mathiot | 2020-07-08T18:06:39+02:00 | ticket #2494 and #2375: remove useless lbclnk mentioned in ticket #2375 |
13265 | mathiot | 2020-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 |
13243 | mathiot | 2020-07-03T17:42:57+02:00 |
Change History (8)
comment:1 Changed 4 years ago by clevy
- Type changed from Enhancement to Feature request
comment:2 Changed 4 years ago by clevy
- Version changed from trunk to v4.0.*
comment:3 Changed 3 years 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 3 years ago by mathiot
In 13243:
comment:5 Changed 3 years ago by mathiot
In 13265:
comment:6 Changed 3 years ago by mathiot
In 13273:
comment:7 Changed 3 years ago by mathiot
In 13276:
comment:8 Changed 3 years ago by mathiot
- Resolution set to fixed
- Status changed from assigned to closed
- Type changed from Feature request to Bug
- Version v4.0.* deleted
Done as part of commit 14030 (merge end 2020)