NOAA-GFDL / FMS

GFDL's Flexible Modeling System
Other
87 stars 128 forks source link

Modern diag manager: Updates for the mask_variant=.true. case #1464

Closed uramirez8707 closed 4 months ago

uramirez8707 commented 4 months ago

Description

  1. Makes the weight_sum an array instead of a scalar:
    • If the mask changes over time (i.e mask_variant is set to .true. in the register_diag_field call), weight_sum is set to be the size of the compute domain, otherwise it is set to to (1,1,1,1)
    • The weight sum is increased at every grid point only if it is not masked at that grid point
    • If a grid point is masked at every time step, the output buffer will be set to the fill_value This is different from old behavior where the output buffer will be set to 0 instead of the fill value!
  2. Adds a unit to test to test the mask_variant=.true. case
  3. Since the allocate_buffer interface was changed, the unit tests were also updated to account for this
  4. Updates the logic in update_buffer_time so that if send_data has not been called, it still counts as a new model time. This was added because if send_data was called at initialization new_time was set to .false. so the counter was off by one

Fixes # (issue)

How Has This Been Tested? CI, included added tests 1 year long run of c96L33_am4p0_cmip6Diag

Checklist: