Conversation
Co-authored-by: Kieran Ricardo <u5824685@anu.edu.au>
anton-seaice
left a comment
There was a problem hiding this comment.
I didn't go through everything, but my main comment is - can we harmonise field names and code style with the rest of CMEPS
mediator/med_phases_post_atm_mod.F90
Outdated
| nullify(is_local%wrap) | ||
| call ESMF_GridCompGetInternalState(gcomp, is_local, rc) | ||
|
|
||
| call ESMF_FieldBundleGet(is_local%wrap%FBImp(compice, compatm), fieldName='ia_aicen', field=ice_frac_cat, rc=rc) |
There was a problem hiding this comment.
Presumable we should be running the ChkErr error, most of the rest of the code does that
| ! to atm: from ocn | ||
| ! --------------------------------------------------------------------- | ||
| allocate(S_flds(3)) | ||
| S_flds = (/'So_t', 'So_u', 'So_v'/) ! sea_surface_temperature |
There was a problem hiding this comment.
| S_flds = (/'So_t', 'So_u', 'So_v'/) ! sea_surface_temperature | |
| S_flds = (/'So_t', 'So_u', 'So_v'/) |
There's lots of comments like this which are wrong or only partially complete
| ! --------------------------------------------------------------------- | ||
| allocate(S_flds(9)) | ||
| S_flds = (/'Si_t', & | ||
| 'ia_aicen', & |
There was a problem hiding this comment.
| 'ia_aicen', & | |
| 'Si_ifrac_n', & |
Should we try and reuse existing names for these ?
There was a problem hiding this comment.
from
CMEPS/mediator/esmFldsExchange_cesm_mod.F90
Lines 1753 to 1754 in 63e4c6d
Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
- rename tti routine and add description - rename coupling mode to "access-esm" - delete unfinished comments - delete unused fields
mediator/CMakeLists.txt
Outdated
| project(cmeps Fortran) | ||
|
|
||
| set(SRCFILES esmFldsExchange_cesm_mod.F90 med_fraction_mod.F90 | ||
| set(SRCFILES esmFldsExchange_access_mod.F90 esmFldsExchange_cesm_mod.F90 med_fraction_mod.F90 |
There was a problem hiding this comment.
We don't use this file, so possibly this is confusing ([esmFldsExchange_hafs_mod.F90](https://github.com/ACCESS-NRI/CMEPS/blob/upstream-main/mediator/esmFldsExchange_hafs_mod.F90) isn't included, for example)
There was a problem hiding this comment.
It'd be nice to be able to use the same version of CMEPS in CM3 and OM3, but this CMakeList.txt is overridden in access3-share anyway, so I could put the change there. What do you think? Then we have a mediator that can compute both CM3 and OM3 fluxes.
mediator/med_phases_post_atm_mod.F90
Outdated
|
|
||
| do j = 1,lsize2 | ||
| do i = 1,lsize1 | ||
| if (ice_frac_cat_ptr(i, j) > 0.0) then |
There was a problem hiding this comment.
if ice_frac_cat_ptr is very small, won't there be a resulting overflow in ice_flux_cat_ptr ?
|
@anton-seaice this edge case doesn't occur in CM3. CICE zaps small ice fractions and the UM considers ocean fractions <0.01 as land, which limits how small |
|
Changed base to cmeps1.1.35-x, looks like it will merge fine |
anton-seaice
left a comment
There was a problem hiding this comment.
Thanks @kieranricardo
I made it as far through this as I had time for.
There are some features in esmFldsExchange_cesm which are missing here and are quite useful, including the configuration option for rof->ocn mapping files and the detection of which meshes are the same. There's also lots of duplication with the addfld/addmap/addmrg with those in cesm FldsExchange.
Would it work to call esmFldsExchange_cesm first, and then in this file, only add any extra fields needed? All the fields in esmFldsExchange_cesm are wrapped in if (fldchk(...) statements, so it should just pass over any fields which are not needed.
| ! to med: masks from components | ||
| !---------------------------------------------------------- | ||
| call addfld_from(compocn, 'So_omask') | ||
| call addfld_from(compice, 'Si_imask') |
There was a problem hiding this comment.
| call addfld_from(compice, 'Si_imask') | |
| if (is_local%wrap%comp_present(compice)) then | |
| call addfld_from(compice, 'Si_imask') | |
| endif |
?
| !===================================================================== | ||
|
|
||
| call addfld_to(compatm, 'So_ofrac') | ||
| call addfld_to(compatm, 'Si_ifrac') |
There was a problem hiding this comment.
Needs an if comp_present ?
There was a problem hiding this comment.
I'm not 100% on this, but I think doing the fieldchecks in esmFldsExchange_accessesm_init is sufficient (which I've now added). We can advertise whatever fields we want (which is what this does), as long as we don't try to map between fields that don't exist.
Also I can't see any comp_present checks in esmFldsExchange_cesm, so I think this should work :)
| call addmrg_to(compatm, 'sstfrz', mrg_from=compice, mrg_fld='sstfrz', mrg_type='copy') | ||
|
|
||
| allocate(S_flds(7)) | ||
| S_flds = (/'Si_ifrac_n', & |
There was a problem hiding this comment.
We should avoid redefining these lists twice and just reuse, them or set them as Parameters.
Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
|
@anton-seaice and @blimlim thanks for you reviews! Re. using the
So I think we're better off just using our own self-contained module. Re. the field names, most of these names were chosen to reuse existing fields in fd.yaml. Aside from rain, there aren’t many fields with the |
Description of changes
CM3 related changes to CMEPS. This adds an "access" coupling mode and associate field exchange module. Also adds in a custom access coupling routine to "mep_phases_post_atm_mod.F90".
Specific notes
Contributors other than yourself, if any: @blimlim
Are changes expected to change answers? No, this shouldn't affect OM3.