mo_grid_io: add allow_static attribute to var container

This MR adds an input-side allow_static flag to var so input_dataset can accept static variables even when they are declared as temporal (static=.false.).

The change keeps static as the authoritative flag for output handling and for strict input validation. On input, in_var_init now detects whether a variable is static or temporal from its rank after accounting for layered, and applies validation based on static/allow_static.

What is changed:

  • Added allow_static to type(var) in mo_grid_io
  • Updated input_variable%init to infer static vs temporal variables from NetCDF rank
  • Implemented the following input rules:
    • static=.true. requires a static variable
    • static=.false., allow_static=.false. requires a temporal variable
    • static=.false., allow_static=.true. accepts static or temporal input
  • Kept output behavior unchanged:
    • output dimensions still depend only on static
    • allow_static has no effect in output_dataset
  • Regenerated src/mo_grid_io.f90 from src/mo_grid_io.fypp

Merge request reports

Loading