Skip to content

OM5 crashes in debug mode because land%mom_rough is set to zero #9

Description

@nikizadehgfdl

When I try OM5 in debug mode it gets a division by zero:

forrtl: error (73): floating divide by zero                                                                             
Image              PC                Routine            Line        Source                                              
libc.so.6          000014DE0F33B900  Unknown               Unknown  Unknown                                             
fms_OM5_cobv3_com  000000000811974C  monin_obukhov_int         130  monin_obukhov_inter.inc                             
fms_OM5_cobv3_com  0000000006285095  monin_obukhov_mod          49  monin_obukhov.inc                                   
fms_OM5_cobv3_com  00000000005EFEDB  surface_flux_mod_         386  surface_flux.F90                                    
fms_OM5_cobv3_com  00000000004AB544  atm_land_ice_flux        1242  atm_land_ice_flux_exchange.F90                      
fms_OM5_cobv3_com  000000000043A214  full_coupler_mod_        2006  full_coupler_mod.F90                                
fms_OM5_cobv3_com  0000000000413252  MAIN__                    481  coupler_main.F90          

I tracked this to land%mom_rough being set to zero and passed to Monin-Obukhov scheme which devides by it.
The following (line of code in land_null [https://github.com/NOAA-GFDL/land_null/blob/main/land_model.F90#L354])
land2cplr%rough_mom = 0.0
Indeed, setting this to 1.0 instead of 0 makes the debug run go fine.
Does anyone know a realistic order of magnitude for land%rough_mom that this can be set to?
Also, should the value matter for ocean-ice runs/answers at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions