Skip to content

Conversation

SmithJos13
Copy link

Description of changes

Added code for CICE coupling.

Specific notes

Contributors other than yourself, if any:

CMEPS Issues Fixed (include github issue #):

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)

Any User Interface Changes (namelist or namelist defaults changes)?

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

@SmithJos13 SmithJos13 changed the title merged changes related to CICE coupling to esmFldExchange_coastal_mod… CICE ufs-coastal implementation Jun 18, 2025
@SmithJos13 SmithJos13 changed the title CICE ufs-coastal implementation CICE UFS-coastal implementation Jun 18, 2025
@SmithJos13 SmithJos13 changed the title CICE UFS-coastal implementation UFS-coastal CICE implementation Jun 18, 2025
@SmithJos13 SmithJos13 changed the title UFS-coastal CICE implementation UFS-coastal: CICE implementation Jun 18, 2025
end if

if (coastal_attr%ice_present .and. coastal_attr%ocn_present) then
! call addfld_from(compocn, 'So_omask')
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Please remove the section related to ocean mask if it is not required.

! ---------------------------------------------------------------------
if (coastal_attr%atm_present .and. coastal_attr%ice_present) then
allocate(S_flds(14))
S_flds = (/'Sa_u10m', & ! inst_zonal_wind_height10m
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 You might want to change Sa_u10 and v10 as Sa_u and v since we are trying to keep the changes in CICE side minimal. Please also fallow the convention about indentations. BTW, all strings in the array needs to be same length. Otherwise, we could have issue with some compilers.

! ---------------------------------------------------------------------
! to ice: ocean fields
! ---------------------------------------------------------------------
if (coastal_attr%ocn_present .and. coastal_attr%ice_present) then
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Same in here. Please make sure to use same length for strings in the array.

! ---------------------------------------------------------------------
if (coastal_attr%ocn_present .and. coastal_attr%ice_present) then
allocate(S_flds(13))
S_flds = (/'Si_ifrac' , & ! Ice area fraction aice
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Again, preserve same length for strings.

'So_hmix', & ! depth of ml
'So_dhdx', & ! tilt-x
'So_dhdy'/) ! tilt-y
!'Fioo_q'/) ! heat flux
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Please remove unused variables.

! to ice: atm fields
! ---------------------------------------------------------------------
if (coastal_attr%atm_present .and. coastal_attr%ice_present) then
allocate(S_flds(14))
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 You have 13 field but the size is 14. Please check also other sections. They must be consistent.

! ---------------------------------------
if (coastal_attr%atm_present .and. coastal_attr%ice_present) then
allocate(S_flds(14))
S_flds = (/'Sa_u10m', & ! inst_zonal_wind_height10m
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Again, all strings needs to be in same length. Please add space to some variables to fix it.

'So_hmix', & ! Mixed layer depth
'So_dhdx', & ! tilt-x
'So_dhdy'/) ! tilt-y
! 'Fioo_q'/) ! heat flux
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Please remove unused variable.

fldchk(is_local%wrap%FBImp(compatm,compatm),trim(fldname),rc=rc) &
) then
call addmap_from(compatm, trim(fldname), compice, &
mapbilnr_nstod, coastal_attr%mapnorm, coastal_attr%atm2ice_smap) !!mapnstod_consf conservative interp
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 these variables are area dependent. Maybe it would be nice to use conservative type interpolation rather than just bilinear. Please check following part from UFS WM -

if (trim(coupling_mode) == 'ufs.nfrac' .or. trim(coupling_mode) == 'ufs.nfrac.aoflux') then
Of course this also depends on resolution differences between atm, ocn and ice. First order conservative type interpolation could create some patch output and not like smooth bilinear interpolation.

fldchk(is_local%wrap%FBImp(compice,compice),trim(fldname),rc=rc) &
) then
call addmap_from(compice, trim(fldname), compocn, &
mapbilnr_nstod, coastal_attr%mapnorm, coastal_attr%ice2ocn_smap)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SmithJos13 Again bilinear vs. conservative.

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.

2 participants