MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
237 stars 317 forks source link

Validity check of fields for the GWDO scheme fails for regions over the ocean #416

Open marta-gil opened 4 years ago

marta-gil commented 4 years ago

Hello, This error message for the atmosphere model appears whenever the input is a region set completely over the ocean:


Beginning MPAS-atmosphere Error Log File for task 0 of 1
    Opened at 2019/12/12 11:26:13

ERROR: *******************************************************************************
ERROR: The GWDO scheme requires valid var2d, con, oa{1,2,3,4}, and ol{1,2,3,4} fields,
ERROR: but these fields appear to be zero everywhere in the model input.
ERROR: Either set config_gwdo_scheme = 'off' in the &physics namelist, or generate
ERROR: the GWDO static fields with the init_atmosphere core.
ERROR: *******************************************************************************
ERROR: Please correct issues with the model input fields and/or namelist.
CRITICAL ERROR: Core init failed for core atmosphere
Logging complete.  Closing file at 2019/12/12 11:26:13 

It seems like the check for the validity of the fields (var2d, con, oa{1,2,3,4}, and ol{1,2,3,4} fields) consists in looking for non-zero values. However, these fields are indeed zero over water so the model should be able to proceed.

MiCurry commented 4 years ago

Agreed! And can confirm the same behavior on our end for a region over the ocean that has zero terrain and GWDO fields. The above error is generated in the physics_compatibility_check subroutine in physics/mpas_atmphys_control.F:

https://github.com/MPAS-Dev/MPAS-Model/blob/51d5624709f75182130a2fd94715e1bb13310172/src/core_atmosphere/physics/mpas_atmphys_control.F#L476-L490

An easy fix, as provided by @mgduda, would be to check the landuse field is entirely water. If it is, we can let the model proceed and if not, raise this error.

Thanks for creating the issue @marta-gil!