Skip to content

Commit

Permalink
Adds static diagnostic sftof
Browse files Browse the repository at this point in the history
- CMIP6 needs a fractional ocean cell area which is provided by
  this new static variable, sftof.
- Addresses NOAA-GFDL/MOM6-examples#156.
  • Loading branch information
adcroft committed Sep 18, 2017
1 parent 03308f3 commit 913e71a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,8 @@ subroutine write_static_fields(G, diag)
type(ocean_grid_type), intent(in) :: G !< ocean grid structure
type(diag_ctrl), target, intent(inout) :: diag !< regulates diagnostic output
! Local variables
integer :: id
real :: tmp_h(SZI_(G),SZJ_(G))
integer :: id, i, j

id = register_static_field('ocean_model', 'geolat', diag%axesT1, &
'Latitude of tracer (T) points', 'degrees_N')
Expand Down Expand Up @@ -3312,6 +3313,19 @@ subroutine write_static_fields(G, diag)
'Delta(y) at v points (meter)', 'm', interp_method='none')
if (id > 0) call post_data(id, G%dyCv, diag, .true.)

! This static diagnostic is from CF 1.8, and is the fraction of a cell
! covered by ocean, given as a percentage (poorly named).
id = register_static_field('ocean_model', 'area_t_percent', diag%axesT1, &
'Percentage of cell area covered by ocean', '%', &
cmor_field_name='sftof', cmor_standard_name='SeaAreaFraction', &
cmor_units='%', cmor_long_name='Sea Area Fraction', &
x_cell_method='mean', y_cell_method='mean')
if (id > 0) then
tmp_h(:,:) = 0.
tmp_h(G%isc:G%iec,G%jsc:G%jec) = 100. * G%mask2dT(G%isc:G%iec,G%jsc:G%jec)
call post_data(id, tmp_h, diag, .true.)
endif

end subroutine write_static_fields


Expand Down

0 comments on commit 913e71a

Please sign in to comment.