Opened 4 years ago
Last modified 3 years ago
#2487 assigned Defect
Inflexible calendar year and approximate conversion in option 2 of the freshwater-budget adjustment mechanism
Reported by: | smueller | Owned by: | smueller |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | SBC | Version: | v4.0.* |
Severity: | minor | Keywords: | fwb, SBC |
Cc: |
Description
Context
Option 2 of the freshwater-budget adjustment mechanism (nn_fwb = 2, module sbcfwb) uses a fixed calendar year of 365 days rather than that of the selected model calendar to time annual updates of the adjustment flux; this issue has previously been reported in the form of source-code comments (source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L129 and source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L135). Further, the conversion of the combined sea-level, sea-ice, and snow anomaly into an equivalent freshwater flux is approximate and not in line with corresponding conversions used elsewhere in the model.
Analysis
In option 2 of the freshwater-budget adjustment mechanism, year boundaries are identified whenever the reminder of the division of the time step counter by 365 * 86400 / rdt equals zero (source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L130). This i) fixes the adjustment interval to 365 days, ii) sets the date for annual adjustment-flux updates to the date of nit000 - 1 rather than the start of 1 January, and iii) leads to an update of the adjustment flux near the start of the final time step of each year (i.e., before completion of that model year).
Line source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@12578#L134 implements the conversion of a combined sea-level, sea ice, and snow anomaly into an equivalent annual-average freshwater flux using a literal value of 1000.0 for the density of sea water and 365 for the number of days in a year rather than variables rau0 and nyear_len(1), respectively.
The impact of these approximations can be demonstrated using reference configuration GYRE_PISCES (which uses calendar years of 360 days) after replacing source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/USR/usrdef_sbc.F90@12578#L134 by zsumemp = 0.0_wp and activation of the freshwater-budget adjustment by setting namelist parameter nn_fwb = 2.
Recommendation
The annual average freshwater adjustment based on the sea-level and sea-ice anomaly at the end of the preceding model year should be computed using daymod variable nyear_len (i.e., the calendar year during which the adjustment will be applied) and using the reference sea-water density rau0 rather than the literal values 365 and 1000.0, respectively. Further, it would be useful for interpretability of the effect of the freshwater-adjustment mechanism to exactly align the annual computation of the freshwater-budget adjustment with the model calendar. Therefore, adjustment-flux updates could occur in the first time step of each new year, which should be identified using variables updated by module daymod such as through the conditional ( ( nday_year == 1 ) .AND. ( nsec_day == NINT( 0.5_wp * rdt ) ) ).
Commit History (15)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
15451 | clem | 2021-10-27T16:46:28+02:00 | 4.0-HEAD only: change vertical scale factors for embedded sea ice as proposed in ticket #2487. |
15439 | clem | 2021-10-22T19:53:09+02:00 | trunk: freshwater budget is now corrected for option nn_fwb=2. The option could be improved. There is a drift the 1st year and the correction applied can lead to oscillations in the solution. It is related to tickets #2718 and part of #2487 though the fix is somewhat different than proposed in the tickets. |
15438 | clem | 2021-10-22T16:56:07+02:00 | 4.0-HEAD: freshwater budget is now corrected for option nn_fwb=2. The option could be improved. There is a drift the 1st year and the correction applied can lead to oscillations in the solution. It is related to tickets #2718 and part of #2487 though the fix is somewhat different than proposed in the tickets. |
15418 | smueller | 2021-10-20T16:53:18+02:00 | Addition of vertical-scale-factor and water-column-height updates to complete initial SSH adjustments due to non-zero sea-ice/snow mass (ticket #2487) |
15414 | smueller | 2021-10-20T13:13:14+02:00 | Transfer of a reusable section of subroutine dom_vvl_init into the new module subroutine dom_vvl_zgr (backport from trunk, ticket #2487) |
15410 | smueller | 2021-10-20T11:10:59+02:00 | Synchronizing with /NEMO/releases/r4.0/r4.0-HEAD@15405 (ticket #2487) |
15264 | smueller | 2021-09-16T12:42:20+02:00 | Synchronizing with /NEMO/releases/r4.0/r4.0-HEAD@15236 (ticket #2487) |
13301 | smueller | 2020-07-13T16:12:27+02:00 | Addition of warning output from model runs with sea ice, with active freshwater-budget adjustment, but without sea-level compensation for non-zero initial sea-ice/snow mass (see ticket #2487) |
13300 | smueller | 2020-07-13T15:06:28+02:00 | Activation of sea-level compensation for non-zero initial sea-ice/snow mass in reference configuration ORCA2_ICE_PISCES (see ticket #2487) |
13299 | smueller | 2020-07-13T14:34:12+02:00 | Addition of a namelist parameter to enable the selectability of sea-level compensation for non-zero sea-ice/snow mass (see ticket #2487) |
13294 | smueller | 2020-07-10T20:15:20+02:00 | Overriding of the initial sea-level compensation for non-zero sea-ice/snow mass in nested domains (see ticket #2487) |
13180 | smueller | 2020-06-29T21:31:19+02:00 | Inclusion of ice-shelf cavities in the sea-level compensation due to initial sea-ice/snow mass and in the freshwater-budget adjustment (see ticket #2487) |
13179 | smueller | 2020-06-29T20:04:05+02:00 | Addition of initial sea-level compensation for non-zero sea-ice/snow mass (see ticket #2487) |
13177 | smueller | 2020-06-29T18:50:21+02:00 | Replacement of hard-coded constants with model variables and modification of the adjustment-update synchronization in option 2 of the freshwater-budget adjustment mechanism (see ticket #2487) |
13171 | smueller | 2020-06-29T12:05:58+02:00 | Inception of a branch associated with ticket #2487 |
Change History (25)
comment:1 Changed 4 years ago by smueller
comment:2 Changed 4 years ago by smueller
In a discussion with Gurvan and Seb, Gurvan pointed out two further bugs related to this defect:
i) in contrast to model configurations with embedded sea-ice, in the presence of levitating sea-ice/snow (ln_ice_embd = .FALSE., default case) the initial sea-level is not adjusted to compensate for the initial combined sea-ice and snow mass (missing adjustment of initial sshn and sshb values by the global average of the initial snwice_mass field converted to an equivalent sea-level anomaly during initialisation of both SI3 and the CICE coupling interface), which leads to a non-zero global-average sea-level anomaly for an ice/snow-less ocean with identical total mass of water, and, when nn_fwb = 2 to an extra freshwater adjustment fluxes early in the simulation; and
ii) the freshwater-budget adjustment computation does not take into account under-ice-shelf areas (if any) as the computation of the surface area masks the grid-cell areas by tmask(:,:,1), instead of by ssmask(:,:) only (as applied in function glob_sum).
These two bugs could be fixed by making the modifications
-
src/ICE/iceistate.F90
91 91 INTEGER, INTENT(in) :: kt ! time step 92 92 !! 93 93 INTEGER :: ji, jj, jk, jl ! dummy loop indices 94 REAL(wp) :: ztmelts 94 REAL(wp) :: ztmelts, z1_area, zsshadj 95 95 INTEGER , DIMENSION(4) :: itest 96 96 REAL(wp), DIMENSION(jpi,jpj) :: z2d 97 97 REAL(wp), DIMENSION(jpi,jpj) :: zswitch ! ice indicator … … 424 424 gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) 425 425 END DO 426 426 ENDIF 427 ELSE 428 z1_area = 1.0_wp / glob_sum( 'iceistate', e1e2t(:,:) ) 429 zsshadj = glob_sum( 'iceistate', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 430 WRITE(ctmp1,'(A34,F10.6,A32)') 'iceistate: mean ssh adjusted by ', -1.0_wp * zsshadj, ' m to compensate for the initial' 431 CALL ctl_warn( ctmp1, ' ice+snow mass' ) 432 sshn(:,:) = sshn(:,:) - zsshadj 433 sshb(:,:) = sshb(:,:) - zsshadj 427 434 ENDIF 428 435 429 436 !------------------------------------
-
src/OCE/SBC/sbcice_cice.F90
154 154 !!--------------------------------------------------------------------- 155 155 INTEGER, INTENT( in ) :: ksbc ! surface forcing type 156 156 REAL(wp), DIMENSION(jpi,jpj) :: ztmp1, ztmp2 157 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar 157 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalars 158 REAL(wp) :: z1_area, zsshadj ! " " 158 159 INTEGER :: ji, jj, jl, jk ! dummy loop indices 159 160 !!--------------------------------------------------------------------- 160 161 ! … … 265 266 gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) 266 267 END DO 267 268 ENDIF 269 ELSE 270 z1_area = 1.0_wp / glob_sum( 'sbcice_cice', e1e2t(:,:) ) 271 zsshadj = glob_sum( 'sbcice_cice', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 272 WRITE(ctmp1,'(A38,F10.6,A24)') 'sbcicce_cice: mean ssh adjusted by ', -1.0_wp * zsshadj, ' m to compensate for the' 273 CALL ctl_warn( ctmp1, ' initial ice+snow mass' ) 274 sshn(:,:) = sshn(:,:) - zsshadj 275 sshb(:,:) = sshb(:,:) - zsshadj 268 276 ENDIF 269 277 ENDIF 270 278 !
and
-
src/OCE/SBC/sbcfwb.F90
37 37 REAL(wp) :: a_fwb ! for 2 year before (_b) and before year. 38 38 REAL(wp) :: fwfold ! fwfold to be suppressed 39 39 REAL(wp) :: area ! global mean ocean surface (interior domain) 40 REAL(wp) :: area2 ! global ocean surface area (interior domain) incl. ice-shelf cavities 40 41 41 42 !! * Substitutions 42 43 # include "vectopt_loop_substitute.h90" … … 90 91 area = glob_sum( 'sbcfwb', e1e2t(:,:) * tmask(:,:,1)) ! interior global domain surface 91 92 ! isf cavities are excluded because it can feedback to the melting with generation of inhibition of plumes 92 93 ! and in case of no melt, it can generate HSSW. 94 area2 = glob_sum( 'sbcfwb', e1e2t(:,:) ) ! global interior-domain ocean surface incl. ice-shelf cavities 93 95 ! 94 96 #if ! defined key_si3 && ! defined key_cice 95 97 snwice_mass_b(:,:) = 0.e0 ! no sea-ice model is being used : no snow+ice mass … … 131 133 a_fwb_b = a_fwb ! mean sea level taking into account the ice+snow 132 134 ! sum over the global domain 133 135 a_fwb = glob_sum( 'sbcfwb', e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) ) 134 a_fwb = a_fwb * 1.e+3 / ( area * rday * 365. ) ! convert in Kg/m3/s = mm/s136 a_fwb = a_fwb * 1.e+3 / ( area2 * rday * 365. ) ! convert in Kg/m3/s = mm/s 135 137 !!gm ! !!bug 365d year 136 138 fwfold = a_fwb ! current year freshwater budget correction 137 139 ! ! estimate from the previous year budget
comment:3 Changed 4 years ago by smueller
In 13171:
comment:4 Changed 4 years ago by smueller
Gurvan pointed out another bug related to those described in comment:2: in the presence of embedded sea ice (ln_ice_embd = .TRUE.), the adjustment of the vertical scale factors e3t_n and e3t_b following the sea-level adjustment due to the initial sea-ice/snow mass in both SI3 and the CICE coupling interface ignores under-ice-shelf areas (if any). He recommends to make the modifications
-
src/ICE/iceistate.F90
387 387 ! 388 388 IF( .NOT.ln_linssh ) THEN 389 389 ! 390 WHERE( ht_0(:,:) > 0 ) ; z2d(:,:) = 1._wp + sshn(:,:)*tmask(:,:,1) / ht_0(:,:) 391 ELSEWHERE ; z2d(:,:) = 1._wp ; END WHERE 390 z2d(:,:) = 1._wp + sshn(:,:) * ssmask(:,:) / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) 392 391 ! 393 392 DO jk = 1,jpkm1 ! adjust initial vertical scale factors 394 393 e3t_n(:,:,jk) = e3t_0(:,:,jk) * z2d(:,:)
and
-
src/OCE/SBC/sbcice_cice.F90
234 234 IF( .NOT.ln_linssh ) THEN 235 235 ! 236 236 DO jk = 1,jpkm1 ! adjust initial vertical scale factors 237 e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)* tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )238 e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)* tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )237 e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*ssmask(:,:)/(ht_0(:,:) + 1._wp - ssmask(:,:)) ) 238 e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*ssmask(:,:)/(ht_0(:,:) + 1._wp - ssmask(:,:)) ) 239 239 ENDDO 240 240 e3t_a(:,:,:) = e3t_b(:,:,:) 241 241 ! Reconstruction of all vertical scale factors at now and before time-steps
comment:5 Changed 4 years ago by smueller
In 13177:
comment:6 Changed 4 years ago by smueller
In 13179:
comment:7 Changed 4 years ago by smueller
In 13180:
comment:8 Changed 4 years ago by smueller
Using source:/NEMO/branches/2020/ticket2487@13180, runs of the model in the AGRIF_DEMO reference configuration terminate with an error during time step 59 of the nested domain 2.
A possible reason for this error could be the substantial differences between the initial sea-level adjustments made in the different domains (about -0.125 m in the global domain, 0.0 m in nested domain 1, about -0.881 m in nested domain 2, and about -1.491 in nested domain 3). For consistency, the initial sea-levels of all domains should be adjusted by the same amount.
comment:9 Changed 4 years ago by smueller
In 13294:
comment:10 Changed 4 years ago by smueller
source:/NEMO/branches/2020/ticket2487@13294 passes the AGRIF_DEMO SETTE tests.
In order to reduce the number of reference configurations that are affected by the addition of the sea-level adjustment due to initial sea-ice and snow mass, the sea-level adjustment could be made conditional on a new namelist parameter and be activated in reference configurations with activated freshwater adjustment only (nn_fwb > 0; currently ORCA2_ICE_PISCES).
comment:11 Changed 4 years ago by smueller
In 13299:
comment:12 Changed 4 years ago by smueller
In 13300:
comment:13 Changed 4 years ago by smueller
In 13301:
comment:14 Changed 4 years ago by smueller
- Owner changed from systeam to smueller
- Status changed from new to assigned
- Version v4.0.* deleted
comment:15 Changed 4 years ago by smueller
- Version set to v4.0
comment:16 Changed 4 years ago by nemo
- Version changed from v4.0 to v4.0.*
comment:17 Changed 3 years ago by smueller
In 15264:
comment:18 Changed 3 years ago by smueller
In 15410:
comment:19 Changed 3 years ago by smueller
In 15414:
comment:20 Changed 3 years ago by smueller
In 15418:
comment:21 Changed 3 years ago by smueller
source:/NEMO/branches/2020/ticket2487@15418 has passed the standard SETTE tests of reference configuration ORCA2_ICE_PISCES.
comment:22 Changed 3 years ago by clem
In 15438:
comment:23 Changed 3 years ago by clem
In 15439:
comment:24 Changed 3 years ago by smueller
- branch_review changed from failed to pending
comment:25 Changed 3 years ago by clem
In 15451:
In order to implement the recommendation above, source:/NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcfwb.F90@13098 could be modified according to:
src/OCE/SBC/sbcfwb.F90