Skip to content

Update to CMIP7 diagnostics#35

Merged
anton-seaice merged 81 commits intoaccess-esm1.6from
spo_edit_gsi8.1
Nov 13, 2025
Merged

Update to CMIP7 diagnostics#35
anton-seaice merged 81 commits intoaccess-esm1.6from
spo_edit_gsi8.1

Conversation

@anton-seaice
Copy link
Collaborator

These are some fixes to CMIP diagnostics. They need reviewing in conjunction with output, however this is progress.

I will check this as part of #30

@anton-seaice anton-seaice requested a review from blimlim June 3, 2025 06:20
@anton-seaice anton-seaice self-assigned this Jun 3, 2025
Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like there are a few places where there are issues with the units. The different weightings and units always confuse me when I try and dig through the cice code though, and so my questions might not be relevant.

@anton-seaice anton-seaice marked this pull request as draft August 21, 2025 02:23
anton-seaice and others added 4 commits November 6, 2025 15:01
Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
@ofa001
Copy link

ofa001 commented Nov 7, 2025

Hi @anton-seaice _"So sisnmass, sisndmasssi, sisndmasssubl, sisndmasssnf, sisndmassmelt, sisndmassdyn

All need an "extra" aice weighting ? (as they are intensive averages of grid cell quantities_?)_"

We are going round in circles, glad we have @bimlim giving fresh eyes on this, and the interpretation of what Notz et al meant, and what the current SIMIP/CMIP7 descriptions are saying.

I did see Chloe in the canteen last week she helped write the CMIP7 data request, (she led our CMIP6 data processing and built APP4) she did say though that she was full on the CMIP7 international side and was staying away from any of local CMIP7 diagnostics.

I don't think this diagnostic code is going to lead to many extra change in Manodeep's optimization, same as the stash request that Martin mentioned this morning, its mostly one or two subroutines.

Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anton-seaice for adding these latest changes and for bearing with my incessant questions and comments! I like the addition of the the _intensive variables, it's a good way to cover all bases until (if?) we can get more clarification about the data request.

I've added a few more comments and questions, mostly smaller clarifications for comments, error messages and typos.

I've put together a list of variables I still find confusing, and would be keen to investigate further probably in a separate/future issue. These are mainly the remaining intensive+grid box mean variables, but I don't think they need to be changed here, as it seems like the most accurate read of the data request.

  • sistrxdtop
  • sistrydtop
  • sistrxubot
  • sistryubot
  • siforcetiltx
  • siforcetilty
  • siforcecoriolx
  • siforcecorioly
  • siforceintstrx
  • siforceintstry
  • sicompstren
  • sidivvel
  • siflfwdrain
  • siflsaltbot
  • siflfwbot
  • sipr
  • siflswutop (a bit confused about units)
  • sisnthick

if ( f_sifllwdtop /= 'x' ) call abort_ice("f_sifllwdtop not available, set to 'x'")
if ( f_sifllwutop /= 'x' ) call abort_ice("f_sifllwutop not available, set to 'x'")
if ( f_siflswdtop /= 'x' ) call abort_ice("f_siflswdtop not available, set to 'x'")
if ( f_siflswutop /= 'x' ) call abort_ice("f_siflswutop not available, set to 'x'")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f_flwup_ai, fsens_ai, f_flwdn, f_fswdn, and f_fswup all use (at least in part) the same data as the above variables. Should they be added to this list of unavailable diagnostics?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of scope creep, can we make an issue for this ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point!

@anton-seaice
Copy link
Collaborator Author

There is a new set of example output in

/g/data/tm70/as2285/experiments/esm1.6-cmip7_vars-2025.11.11

The sign of the mass flux terms seems better now

e.g.

( monthly_ds.sidmassgrowthwat
+ monthly_ds.sidmassgrowthbot
+ monthly_ds.sidmassgrowthsi
+ monthly_ds.sidmassevapsubl
+ monthly_ds.sidmassmelttop
+ monthly_ds.sidmassmeltbot
+ monthly_ds.sidmassmeltlat) equals sea ice mass change

Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
@ofa001
Copy link

ofa001 commented Nov 12, 2025

I will have a look at your latest outputs @anton-seaice, sorry for disappearing from yesterdays meeting, traced it to the broadband going down in our locality. Had a USB to get back on after my system restart took 10 minutes. I saw you were doubling up on snow stats yesterday, I will look at whats in this version of the output.

Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-seaice, just adding a few small comments and bumping a couple of old ones. Otherwise I think everything is looking good

Comment on lines +542 to +547
if (aice(i,j,iblk) > 2e-4) &
snowfrac(i,j,iblk) = c1 - exp(-p2*rhos*(vsno(i,j,iblk) / aice(i,j,iblk)))
else
snowfrac(i,j,iblk) = snowfrac(i,j,iblk) & ! for history
+ snowfracn(i,j,n,iblk)*aicen(i,j,n,iblk)
endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-seaice what are your thoughts on this one. In the ( .not. tr_pond .and. .not. calc_Tsfc ) case, I'm guessing snowfrac would be a fraction of the ice as the calculation is using the actual snow hight?

The diagnostics treat it as a grid cell fraction:

call define_hist_field(n_snowfrac,"snowfrac","1",tstr2D, tcstr, &
"grid cell mean snow fraction", &
"snow fraction per unit grid cell area", c1, c0, &

cice5/source/ice_history.F90

Lines 2202 to 2204 in 2e8071f

if (f_sisnconc(1:1) /= 'x') &
! intensive + ice area mean -> use snowfrac (grid box mean)
call accum_hist_field(n_sisnconc, iblk, snowfrac(:,:,iblk), a2D)

Though we might need to be careful with sisnthick

cice5/source/ice_history.F90

Lines 2206 to 2212 in 2e8071f

if (f_sisnthick(1:1) /= 'x') then
worka(:,:) = c0
do j = jlo, jhi
do i = ilo, ihi
if (snowfrac(i,j,iblk) > puny) then
! intensive + ice area mean -> calculate grid box mean
worka(i,j) = vsno(i,j,iblk) / snowfrac(i,j,iblk)

'put att cell methods time mean '//avail_hist_fields(n)%vname)
else
if (TRIM(avail_hist_fields(n)%vname(1:2))/='si') then !native diags
call check(nf90_put_att(ncid,varid,'cell_methods','time: mean'), &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-seaice should I defer this to a separate issue?

Comment on lines +2168 to +2171
if (snowfrac(i,j,iblk) > puny) then
! intensive + ice area mean -> calculate grid box mean
worka(i,j) = vsno(i,j,iblk) / snowfrac(i,j,iblk)
endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that sounds ok to me! I might add this one to the list of variables I still am a bit confused about

Comment on lines 1347 to 1352
call define_hist_field(n_snow_ai,"sndmasssnf","kg m^-2 s^-1",tstr2D, tcstr, &
"Snow Mass Change Through Snowfall", &
"none", c1, c0, &
ns1, f_sndmasssnf, avg_ice_present=.true., mask_ice_free_points=.true.)
"per unit grid cell area", c1, c0, &
ns1, f_sndmasssnf)

call define_hist_field(n_sndmasssnf,"sisndmasssnf","kg m^-2 s^-1",tstr2D, tcstr, &
call define_hist_field(n_snow_ai,"sisndmasssnf","kg m^-2 s^-1",tstr2D, tcstr, &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-seaice just bumping this one!

anton-seaice and others added 2 commits November 12, 2025 16:21
Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
@ofa001
Copy link

ofa001 commented Nov 12, 2025

Hi @bimlim @anton-seaice on snow fraction issues.

I hadnt realised you has picked up the UM/JULES snow frac formula but its as good as the ponds or CICE radiation ones and its consistent with the UM. you are correct about it being trick in the snow thickness calculation that was the first place I realised that we didnt have a snow frac flowing through to ice_history correctly in one of older set ups.

Leaving both the intensive and the non weighted set up for the other snow variables for now is OK until their is a clarification, I note they have written a few extra words in their descriptions from their original wording on CMIP7 site so they may be continually be updating them after queries.

I have rechecked most of the recent variables in your output and followed most of your discussion.

Copy link
Collaborator Author

@anton-seaice anton-seaice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find where the comment about snowfrac is to respond

I disabled sisnconc and sisnthick within #ifdef ACCESS in the end because it doesn't representative anything prognostic in cice (e.g. the snow concentration is only used in the UM for flux calculations ?)

'put att cell methods time mean '//avail_hist_fields(n)%vname)
else
if (TRIM(avail_hist_fields(n)%vname(1:2))/='si') then !native diags
call check(nf90_put_att(ncid,varid,'cell_methods','time: mean'), &
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'area: mean where sea time: mean' is ok for sice - so fine to ignore I think?

Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two tiny things but otherwise I think it all looks good!

ns1, f_sidmassmeltlat)

call define_hist_field(n_snow_ai,"sndmasssnf","kg m^-2 s^-1",tstr2D, tcstr, &
call define_hist_field(n_sndmasssnf,"sndmasssnf","kg m^-2 s^-1",tstr2D, tcstr, &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think n_sndmasssnf now just needs to be added to the accum_hist_field call

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am glad someone is paying attention !

'put att cell methods time mean '//avail_hist_fields(n)%vname)
else
if (TRIM(avail_hist_fields(n)%vname(1:2))/='si') then !native diags
call check(nf90_put_att(ncid,varid,'cell_methods','time: mean'), &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good to leave as is!

anton-seaice and others added 2 commits November 13, 2025 09:22
Co-authored-by: Spencer Wong <88933912+blimlim@users.noreply.github.com>
@anton-seaice anton-seaice requested a review from blimlim November 12, 2025 22:32
Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anton-seaice, the changes are looking good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants