Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMEPS is forced to use custom merges because sign of field imported from ATM is wrong or unit conversion is required #93

Closed
DeniseWorthen opened this issue Jun 16, 2023 · 0 comments · Fixed by ufs-community/ufs-weather-model#1807, #97 or NOAA-EMC/fv3atm#675
Assignees

Comments

@DeniseWorthen
Copy link
Collaborator

DeniseWorthen commented Jun 16, 2023

CMEPS has the capability to define generic merges between components. However, these generic merges are not available when the sign of the field needs to change, or the field needs to be converted to one of different units (ie, latent->evap).

Because of this issue, multiple "custom" merges are required in med_phases_prep_ocn. For example, the sensible heat flux from the ATM has the wrong sign, requiring a custom merge:

       customwgt(:) = -ofrac(:)
       call med_merge_field(is_local%wrap%FBExp(compocn),      'Faxa_sen',  &
            FBinA=is_local%wrap%FBImp(compatm,compocn), fnameA='Faxa_sen', wgtA=customwgt, rc=rc)
       if (ChkErr(rc,__LINE__,u_FILE_u)) return

The ATM exports the latent heat flux, but the ocean requires the evaporative flux, which requires a custom merge to change the sign and units of the field:

       customwgt(:) = -ofrac(:) / const_lhvap
       call med_merge_field(is_local%wrap%FBExp(compocn),      'Faxa_evap', &
            FBinA=is_local%wrap%FBImp(compatm,compocn), fnameA='Faxa_lat' , wgtA=customwgt, rc=rc)
       if (ChkErr(rc,__LINE__,u_FILE_u)) return

The momemtum fluxes from the ATM also require a custom merge to change the sign.

This adds needless complexity to maintain these custom merges when a better solution is to have the ATM export the coupling field with the right sign or unit. This also makes it possible to leverage the existing diagnostic capabilities with CMEPS to examine global budgets for UFS applications.

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