Skip to content

Commit 9359ab7

Browse files
committed
More comment clean-up
1. Made sure all real variables have descriptive comments and units in MARBL_tracers.F90 and MARBL_forcing_mod.F90 2. Cleaned up units in mom_surface_forcing_nuopc.F90 (W/m^2 -> W m-2 and similar)
1 parent b268de4 commit 9359ab7

3 files changed

Lines changed: 89 additions & 80 deletions

File tree

config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -162,66 +162,66 @@ module MOM_surface_forcing_nuopc
162162
!> Structure corresponding to forcing, but with the elements, units, and conventions
163163
!! that exactly conform to the use for MOM-based coupled models.
164164
type, public :: ice_ocean_boundary_type
165-
real, pointer, dimension(:,:) :: lrunoff =>NULL() !< liquid runoff [kg/m2/s]
166-
real, pointer, dimension(:,:) :: frunoff =>NULL() !< ice runoff [kg/m2/s]
167-
real, pointer, dimension(:,:) :: lrunoff_glc =>NULL() !< liquid glc runoff via rof [kg/m2/s]
168-
real, pointer, dimension(:,:) :: frunoff_glc =>NULL() !< frozen glc runoff via rof [kg/m2/s]
165+
real, pointer, dimension(:,:) :: lrunoff =>NULL() !< liquid runoff [km m-2 s-1]
166+
real, pointer, dimension(:,:) :: frunoff =>NULL() !< ice runoff [km m-2 s-1]
167+
real, pointer, dimension(:,:) :: lrunoff_glc =>NULL() !< liquid glc runoff via rof [km m-2 s-1]
168+
real, pointer, dimension(:,:) :: frunoff_glc =>NULL() !< frozen glc runoff via rof [km m-2 s-1]
169169
real, pointer, dimension(:,:) :: u_flux =>NULL() !< i-direction wind stress [Pa]
170170
real, pointer, dimension(:,:) :: v_flux =>NULL() !< j-direction wind stress [Pa]
171-
real, pointer, dimension(:,:) :: t_flux =>NULL() !< sensible heat flux [W/m2]
172-
real, pointer, dimension(:,:) :: q_flux =>NULL() !< specific humidity flux [kg/m2/s]
173-
real, pointer, dimension(:,:) :: salt_flux =>NULL() !< salt flux [kg/m2/s]
174-
real, pointer, dimension(:,:) :: seaice_melt_heat =>NULL() !< sea ice and snow melt heat flux [W/m2]
175-
real, pointer, dimension(:,:) :: seaice_melt =>NULL() !< water flux due to sea ice and snow melting [kg/m2/s]
176-
real, pointer, dimension(:,:) :: lw_flux =>NULL() !< long wave radiation [W/m2]
177-
real, pointer, dimension(:,:) :: sw_flux_vis_dir =>NULL() !< direct visible sw radiation [W/m2]
178-
real, pointer, dimension(:,:) :: sw_flux_vis_dif =>NULL() !< diffuse visible sw radiation [W/m2]
179-
real, pointer, dimension(:,:) :: sw_flux_nir_dir =>NULL() !< direct Near InfraRed sw radiation [W/m2]
180-
real, pointer, dimension(:,:) :: sw_flux_nir_dif =>NULL() !< diffuse Near InfraRed sw radiation [W/m2]
181-
real, pointer, dimension(:,:) :: lprec =>NULL() !< mass flux of liquid precip [kg/m2/s]
182-
real, pointer, dimension(:,:) :: fprec =>NULL() !< mass flux of frozen precip [kg/m2/s]
183-
real, pointer, dimension(:,:) :: ustar_berg =>NULL() !< frictional velocity beneath icebergs [m/s]
184-
real, pointer, dimension(:,:) :: area_berg =>NULL() !< area covered by icebergs[m2/m2]
185-
real, pointer, dimension(:,:) :: mass_berg =>NULL() !< mass of icebergs(kg/m2)
186-
real, pointer, dimension(:,:) :: hrofl =>NULL() !< heat content from liquid runoff [W/m2]
187-
real, pointer, dimension(:,:) :: hrofi =>NULL() !< heat content from frozen runoff [W/m2]
188-
real, pointer, dimension(:,:) :: hrofl_glc =>NULL() !< heat content from liquid glc runoff [W/m2]
189-
real, pointer, dimension(:,:) :: hrofi_glc =>NULL() !< heat content from frozen glc runoff [W/m2]
190-
real, pointer, dimension(:,:) :: hrain =>NULL() !< heat content from liquid precipitation [W/m2]
191-
real, pointer, dimension(:,:) :: hsnow =>NULL() !< heat content from frozen precipitation [W/m2]
192-
real, pointer, dimension(:,:) :: hevap =>NULL() !< heat content from evaporation [W/m2]
193-
real, pointer, dimension(:,:) :: hcond =>NULL() !< heat content from condensation [W/m2]
171+
real, pointer, dimension(:,:) :: t_flux =>NULL() !< sensible heat flux [W m-2]
172+
real, pointer, dimension(:,:) :: q_flux =>NULL() !< specific humidity flux [km m-2 s-1]
173+
real, pointer, dimension(:,:) :: salt_flux =>NULL() !< salt flux [km m-2 s-1]
174+
real, pointer, dimension(:,:) :: seaice_melt_heat =>NULL() !< sea ice and snow melt heat flux [W m-2]
175+
real, pointer, dimension(:,:) :: seaice_melt =>NULL() !< water flux due to sea ice and snow melting [km m-2 s-1]
176+
real, pointer, dimension(:,:) :: lw_flux =>NULL() !< long wave radiation [W m-2]
177+
real, pointer, dimension(:,:) :: sw_flux_vis_dir =>NULL() !< direct visible sw radiation [W m-2]
178+
real, pointer, dimension(:,:) :: sw_flux_vis_dif =>NULL() !< diffuse visible sw radiation [W m-2]
179+
real, pointer, dimension(:,:) :: sw_flux_nir_dir =>NULL() !< direct Near InfraRed sw radiation [W m-2]
180+
real, pointer, dimension(:,:) :: sw_flux_nir_dif =>NULL() !< diffuse Near InfraRed sw radiation [W m-2]
181+
real, pointer, dimension(:,:) :: lprec =>NULL() !< mass flux of liquid precip [km m-2 s-1]
182+
real, pointer, dimension(:,:) :: fprec =>NULL() !< mass flux of frozen precip [km m-2 s-1]
183+
real, pointer, dimension(:,:) :: ustar_berg =>NULL() !< frictional velocity beneath icebergs [m s-1]
184+
real, pointer, dimension(:,:) :: area_berg =>NULL() !< area covered by icebergs[m2 m-2]
185+
real, pointer, dimension(:,:) :: mass_berg =>NULL() !< mass of icebergs(kg m-2)
186+
real, pointer, dimension(:,:) :: hrofl =>NULL() !< heat content from liquid runoff [W m-2]
187+
real, pointer, dimension(:,:) :: hrofi =>NULL() !< heat content from frozen runoff [W m-2]
188+
real, pointer, dimension(:,:) :: hrofl_glc =>NULL() !< heat content from liquid glc runoff [W m-2]
189+
real, pointer, dimension(:,:) :: hrofi_glc =>NULL() !< heat content from frozen glc runoff [W m-2]
190+
real, pointer, dimension(:,:) :: hrain =>NULL() !< heat content from liquid precipitation [W m-2]
191+
real, pointer, dimension(:,:) :: hsnow =>NULL() !< heat content from frozen precipitation [W m-2]
192+
real, pointer, dimension(:,:) :: hevap =>NULL() !< heat content from evaporation [W m-2]
193+
real, pointer, dimension(:,:) :: hcond =>NULL() !< heat content from condensation [W m-2]
194194
real, pointer, dimension(:,:) :: p =>NULL() !< pressure of overlying ice and atmosphere
195195
!< on ocean surface [Pa]
196-
real, pointer, dimension(:,:) :: ice_fraction =>NULL() !< fractional ice area [nondim]
197-
real, pointer, dimension(:,:) :: u10_sqr =>NULL() !< wind speed squared at 10m [m2/s2]
198-
real, pointer, dimension(:,:) :: nhx_dep =>NULL() !< Nitrogen deposition [kg/m^2/s]
199-
real, pointer, dimension(:,:) :: noy_dep =>NULL() !< Nitrogen deposition [kg/m^2/s]
196+
real, pointer, dimension(:,:) :: ice_fraction =>NULL() !< fractional ice area [1]
197+
real, pointer, dimension(:,:) :: u10_sqr =>NULL() !< wind speed squared at 10m [m2 s-2]
198+
real, pointer, dimension(:,:) :: nhx_dep =>NULL() !< Nitrogen deposition [kg m-2 s-1]
199+
real, pointer, dimension(:,:) :: noy_dep =>NULL() !< Nitrogen deposition [kg m-2 s-1]
200200
real, pointer, dimension(:,:) :: atm_co2_prog =>NULL() !< Prognostic atmospheric co2 concentration [ppm]
201201
real, pointer, dimension(:,:) :: atm_co2_diag =>NULL() !< Diagnostic atmospheric co2 concentration [ppm]
202-
real, pointer, dimension(:,:) :: atm_fine_dust_flux =>NULL() !< Fine dust flux from atmosphere [kg/m^2/s]
203-
real, pointer, dimension(:,:) :: atm_coarse_dust_flux =>NULL() !< Coarse dust flux from atmosphere [kg/m^2/s]
204-
real, pointer, dimension(:,:) :: seaice_dust_flux =>NULL() !< Dust flux from seaice [kg/m^2/s]
205-
real, pointer, dimension(:,:) :: atm_bc_flux =>NULL() !< Black carbon flux from atmosphere [kg/m^2/s]
206-
real, pointer, dimension(:,:) :: seaice_bc_flux =>NULL() !< Black carbon flux from seaice [kg/m^2/s]
207-
real, pointer, dimension(:,:) :: afracr =>NULL() !< Fractional atmosphere coverage wrt ocean [nondim]
202+
real, pointer, dimension(:,:) :: atm_fine_dust_flux =>NULL() !< Fine dust flux from atmosphere [kg m-2 s-1]
203+
real, pointer, dimension(:,:) :: atm_coarse_dust_flux =>NULL() !< Coarse dust flux from atmosphere [kg m-2 s-1]
204+
real, pointer, dimension(:,:) :: seaice_dust_flux =>NULL() !< Dust flux from seaice [kg m-2 s-1]
205+
real, pointer, dimension(:,:) :: atm_bc_flux =>NULL() !< Black carbon flux from atmosphere [kg m-2 s-1]
206+
real, pointer, dimension(:,:) :: seaice_bc_flux =>NULL() !< Black carbon flux from seaice [kg m-2 s-1]
207+
real, pointer, dimension(:,:) :: afracr =>NULL() !< Fractional atmosphere coverage wrt ocean [1]
208208
real, pointer, dimension(:,:) :: swnet_afracr =>NULL() !< Net shortwave radiation times atmosphere fraction
209-
!! positive => into the ocean [W/m^2]
209+
!! positive => into the ocean [W m-2]
210210
real, pointer, dimension(:,:,:) :: swpen_ifrac_n =>NULL() !< Net shortwave radiation penetrating into ice and
211211
!! ocean times ice fraction for thickness
212-
!! positive => into the ocean [W/m^2]
213-
real, pointer, dimension(:,:,:) :: ifrac_n =>NULL() !< Ice fraction per category [nondim]
214-
real, pointer, dimension(:,:) :: mi =>NULL() !< mass of ice [kg/m2]
212+
!! positive => into the ocean [W m-2]
213+
real, pointer, dimension(:,:,:) :: ifrac_n =>NULL() !< Ice fraction per category [1]
214+
real, pointer, dimension(:,:) :: mi =>NULL() !< mass of ice [km m-2]
215215
real, pointer, dimension(:,:) :: ice_rigidity =>NULL() !< rigidity of the sea ice, sea-ice and
216216
!! ice-shelves, expressed as a coefficient
217217
!! for divergence damping, as determined
218-
!! outside of the ocean model in [m3/s]
219-
real, pointer, dimension(:,:) :: lamult => NULL() !< Langmuir enhancement factor [nondim]
218+
!! outside of the ocean model in [m3 s-1]
219+
real, pointer, dimension(:,:) :: lamult => NULL() !< Langmuir enhancement factor [1]
220220
real, pointer, dimension(:) :: stk_wavenumbers => NULL() !< The central wave number of Stokes bands [rad/m]
221-
real, pointer, dimension(:,:,:) :: ustkb => NULL() !< Stokes Drift spectrum, zonal [m/s]
221+
real, pointer, dimension(:,:,:) :: ustkb => NULL() !< Stokes Drift spectrum, zonal [m s-1]
222222
!! Horizontal - u points
223223
!! 3rd dimension - wavenumber
224-
real, pointer, dimension(:,:,:) :: vstkb => NULL() !< Stokes Drift spectrum, meridional [m/s]
224+
real, pointer, dimension(:,:,:) :: vstkb => NULL() !< Stokes Drift spectrum, meridional [m s-1]
225225
!! Horizontal - v points
226226
!! 3rd dimension - wavenumber
227227
integer :: num_stk_bands !< Number of Stokes drift bands passed through the coupler
@@ -273,10 +273,10 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
273273
data_restore, & !< The surface value toward which to restore [S ~> ppt] or [C ~> degC]
274274
PmE_adj, & !< The adjustment to PminusE that will cause the salinity
275275
!! to be restored toward its target value [kg/(m^2 * s)]
276-
net_FW, & !< The area integrated net freshwater flux into the ocean [kg/s]
277-
net_FW2, & !< The area integrated net freshwater flux into the ocean [kg/s]
276+
net_FW, & !< The area integrated net freshwater flux into the ocean [kg s-1]
277+
net_FW2, & !< The area integrated net freshwater flux into the ocean [kg s-1]
278278
work_sum, & !< A 2-d array that is used as the work space for a global
279-
!! sum, used with units of m2 or [kg/s]
279+
!! sum, used with units of m2 or [kg s-1]
280280
open_ocn_mask !< a binary field indicating where ice is present based on frazil criteria
281281

282282
integer :: i, j, is, ie, js, je, Isq, Ieq, Jsq, Jeq, i0, j0
@@ -526,11 +526,11 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
526526
if (associated(IOB%t_flux)) &
527527
fluxes%sens(i,j) = US%W_m2_to_QRZ_T * IOB%t_flux(i-i0,j-j0) * G%mask2dT(i,j)
528528

529-
! sea ice and snow melt heat flux [Q R Z T-1 ~> W/m2]
529+
! sea ice and snow melt heat flux [Q R Z T-1 ~> W m-2]
530530
if (associated(IOB%seaice_melt_heat)) &
531531
fluxes%seaice_melt_heat(i,j) = US%W_m2_to_QRZ_T * G%mask2dT(i,j) * IOB%seaice_melt_heat(i-i0,j-j0)
532532

533-
! water flux due to sea ice and snow melt [kg/m2/s]
533+
! water flux due to sea ice and snow melt [km m-2 s-1]
534534
if (associated(IOB%seaice_melt)) &
535535
fluxes%seaice_melt(i,j) = kg_m2_s_conversion * G%mask2dT(i,j) * IOB%seaice_melt(i-i0,j-j0)
536536

@@ -604,10 +604,10 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
604604
fluxes%heat_content_frunoff_glc(i,j) = US%W_m2_to_QRZ_T * IOB%hrofi_glc(i-i0,j-j0) * G%mask2dT(i,j)
605605
endif
606606

607-
! sea ice fraction [nondim]
607+
! sea ice fraction [1]
608608
if (associated(IOB%ice_fraction) .and. associated(fluxes%ice_fraction)) &
609609
fluxes%ice_fraction(i,j) = G%mask2dT(i,j) * IOB%ice_fraction(i-i0,j-j0)
610-
! 10-m wind speed squared [m2/s2]
610+
! 10-m wind speed squared [m2 s-2]
611611
if (associated(IOB%u10_sqr) .and. associated(fluxes%u10_sqr)) &
612612
fluxes%u10_sqr(i,j) = US%m_to_L**2 * US%T_to_s**2 * G%mask2dT(i,j) * IOB%u10_sqr(i-i0,j-j0)
613613

src/tracer/MARBL_forcing_mod.F90

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,18 @@ subroutine convert_driver_fields_to_forcings(atm_fine_dust_flux, atm_coarse_dust
195195
!! [kg m-2 s-1]
196196
real, dimension(:,:), pointer, intent(in) :: seaice_bc_flux !< sea ice black carbon flux from IOB
197197
!! [kg m-2 s-1]
198-
real, dimension(:,:), pointer, intent(in) :: afracr !< open ocean fraction
198+
real, dimension(:,:), pointer, intent(in) :: afracr !< open ocean fraction [1]
199199
real, dimension(:,:), pointer, intent(in) :: nhx_dep !< NHx flux from atmosphere [kg m-2 s-1]
200200
real, dimension(:,:), pointer, intent(in) :: noy_dep !< NOy flux from atmosphere [kg m-2 s-1]
201201
real, dimension(:,:), pointer, intent(in) :: atm_co2_prog !< Prognostic atmospheric CO2 concentration
202+
!! [ppm]
202203
real, dimension(:,:), pointer, intent(in) :: atm_co2_diag !< Diagnostic atmospheric CO2 concentration
204+
!! [ppm]
203205
real, dimension(:,:), pointer, intent(in) :: swnet_afracr !< shortwave flux * open ocean fraction
204-
real, dimension(:,:,:), pointer, intent(in) :: ifrac_n !< per-category ice fraction
206+
!! [W m-2]
207+
real, dimension(:,:,:), pointer, intent(in) :: ifrac_n !< per-category ice fraction [1]
205208
real, dimension(:,:,:), pointer, intent(in) :: swpen_ifrac_n !< per-category shortwave flux * ice fraction
209+
!! [W m-2]
206210
type(time_type), intent(in) :: Time !< The time of the fluxes, used for
207211
!! interpolating the salinity to the
208212
!! right time, when it is being

0 commit comments

Comments
 (0)