Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to cesm-style field names in MOM6 cap #120

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 81 additions & 77 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -724,40 +724,37 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
call fld_list_add(fldsFrOcn_num, fldsFrOcn, trim(scalar_field_name), "will_provide")
endif


!--------- import fields -------------
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_salt_rate" , "will provide") ! from ice
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_zonal_moment_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_merid_moment_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_sensi_heat_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_evap_rate" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_net_lw_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_net_sw_vis_dir_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_net_sw_vis_dif_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_net_sw_ir_dir_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_net_sw_ir_dif_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_prec_rate" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_fprec_rate" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "inst_pres_height_surface" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_rofl" , "will provide") !-> liquid runoff
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_rofi" , "will provide") !-> ice runoff
call fld_list_add(fldsToOcn_num, fldsToOcn, "Si_ifrac" , "will provide") !-> ice fraction
call fld_list_add(fldsToOcn_num, fldsToOcn, "So_duu10n" , "will provide") !-> wind^2 at 10m
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_fresh_water_to_ocean_rate", "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "net_heat_flx_to_ocn" , "will provide")

if (cesm_coupled) then
call fld_list_add(fldsToOcn_num, fldsToOcn, "heat_content_lprec", "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "heat_content_fprec", "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "heat_content_evap" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "heat_content_cond" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "heat_content_rofl" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "heat_content_rofi" , "will provide")
endif
call fld_list_add(fldsToOcn_num, fldsToOcn, "Fioi_salt" , "will provide") ! from ice
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_taux" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_tauy" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_sen" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_evap" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_lwnet" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_swnet_vdr" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_swnet_vdf" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_swnet_idr" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_swnet_idf" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Faxa_rain" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Faxa_snow" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Sa_pslv" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_rofl" , "will provide") !-> liquid runoff
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_rofi" , "will provide") !-> ice runoff
call fld_list_add(fldsToOcn_num, fldsToOcn, "Si_ifrac" , "will provide") !-> ice fraction
call fld_list_add(fldsToOcn_num, fldsToOcn, "So_duu10n" , "will provide") !-> wind^2 at 10m
call fld_list_add(fldsToOcn_num, fldsToOcn, "Fioi_meltw" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Fioi_melth" , "will provide")

call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_hrain" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_hsnow" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_hevap" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_hcond" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_hrofl" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_hrofi" , "will provide")

if (use_waves) then
if (wave_method == "EFACTOR") then
call fld_list_add(fldsToOcn_num, fldsToOcn, "Sw_lamult" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "Sw_lamult" , "will provide")
else if (wave_method == "SURFACE_BANDS") then
call fld_list_add(fldsToOcn_num, fldsToOcn, "Sw_pstokes_x", "will provide", &
ungridded_lbound=1, ungridded_ubound=Ice_ocean_boundary%num_stk_bands)
Expand All @@ -769,15 +766,15 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
endif

!--------- export fields -------------
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "ocean_mask" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "sea_surface_temperature" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "s_surf" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "ocn_current_zonal" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "ocn_current_merid" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "sea_surface_slope_zonal" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "sea_surface_slope_merid" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "freezing_melting_potential" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_bldepth" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_omask" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_t" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_s" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_u" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_v" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_dhdx" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_dhdy" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "Fioo_q" , "will provide")
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_bldepth" , "will provide")

do n = 1,fldsToOcn_num
call NUOPC_Advertise(importState, standardName=fldsToOcn(n)%stdname, name=fldsToOcn(n)%shortname, rc=rc)
Expand Down Expand Up @@ -1627,7 +1624,7 @@ subroutine ModelAdvance(gcomp, rc)
! Import data
!---------------

call mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, cesm_coupled, rc=rc)
call mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

!---------------
Expand Down Expand Up @@ -2433,7 +2430,7 @@ end subroutine shr_log_setLogUnit
!! <th>Description</td>
!! <th>Notes</td>
!! <tr>
!! <td>inst_pres_height_surface</td>
!! <td>Sa_pslv</td>
!! <td>Pa</td>
!! <td>p</td>
!! <td>pressure of overlying sea ice and atmosphere</td>
Expand All @@ -2447,14 +2444,14 @@ end subroutine shr_log_setLogUnit
!! <td></td>
!! </tr>
!! <tr>
!! <td>seaice_melt_heat</td>
!! <td>Fioi_melth</td>
!! <td>W m-2</td>
!! <td>seaice_melt_heat</td>
!! <td>sea ice and snow melt heat flux</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>seaice_melt</td>
!! <td>Fioi_meltw</td>
!! <td>kg m-2 s-1</td>
!! <td>seaice_melt</td>
!! <td>water flux due to sea ice and snow melting</td>
Expand All @@ -2468,138 +2465,145 @@ end subroutine shr_log_setLogUnit
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_evap_rate</td>
!! <td>Foxx_evap</td>
!! <td>kg m-2 s-1</td>
!! <td>q_flux</td>
!! <td>specific humidity flux</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_fprec_rate</td>
!! <td>Faxa_snow</td>
!! <td>kg m-2 s-1</td>
!! <td>fprec</td>
!! <td>mass flux of frozen precip</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_merid_moment_flx</td>
!! <td>Pa</td>
!! <td>v_flux</td>
!! <td>j-directed wind stress into ocean</td>
!! <td>[vector rotation] (@ref VectorRotations) applied - lat-lon to tripolar</td>
!! </tr>
!! <tr>
!! <td>mean_net_lw_flx</td>
!! <td>Foxx_lwnet</td>
!! <td>W m-2</td>
!! <td>lw_flux</td>
!! <td>long wave radiation</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_net_sw_ir_dif_flx</td>
!! <td>Foxx_swnet_idf</td>
!! <td>W m-2</td>
!! <td>sw_flux_nir_dif</td>
!! <td>diffuse near IR shortwave radiation</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_net_sw_ir_dir_flx</td>
!! <td>Foxx_swnet_idr</td>
!! <td>W m-2</td>
!! <td>sw_flux_nir_dir</td>
!! <td>direct near IR shortwave radiation</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_net_sw_vis_dif_flx</td>
!! <td>Foxx_swnet_vdf</td>
!! <td>W m-2</td>
!! <td>sw_flux_vis_dif</td>
!! <td>diffuse visible shortware radiation</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_net_sw_vis_dir_flx</td>
!! <td>Foxx_swnet_idr</td>
!! <td>W m-2</td>
!! <td>sw_flux_vis_dir</td>
!! <td>direct visible shortware radiation</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_prec_rate</td>
!! <td>Faxa_rain</td>
!! <td>kg m-2 s-1</td>
!! <td>lprec</td>
!! <td>mass flux of liquid precip</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>heat_content_lprec</td>
!! <td>Foxx_hrain</td>
!! <td>W m-2</td>
!! <td>hrain</td>
!! <td>heat content (enthalpy) of liquid water entering the ocean</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>heat_content_fprec</td>
!! <td>Foxx_hsnow</td>
!! <td>W m-2</td>
!! <td>hsnow</td>
!! <td>heat content (enthalpy) of frozen water entering the ocean</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>heat_content_evap</td>
!! <td>Foxx_hevap</td>
!! <td>W m-2</td>
!! <td>hevap</td>
!! <td>heat content (enthalpy) of water leaving the ocean</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>heat_content_cond</td>
!! <td>Foxx_hcond</td>
!! <td>W m-2</td>
!! <td>hcond</td>
!! <td>heat content (enthalpy) of liquid water entering the ocean due to condensation</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>heat_content_rofl</td>
!! <td>Foxx_hrofl</td>
!! <td>W m-2</td>
!! <td>hrofl</td>
!! <td>heat content (enthalpy) of liquid runoff</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>heat_content_rofi</td>
!! <td>Foxx_hrofi</td>
!! <td>W m-2</td>
!! <td>hrofi</td>
!! <td>heat content (enthalpy) of frozen runoff</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_runoff_rate</td>
!! <td>Foxx_rofl</td>
!! <td>kg m-2 s-1</td>
!! <td>runoff</td>
!! <td>mass flux of liquid runoff</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_salt_rate</td>
!! <td>Foxx_rofi</td>
!! <td>kg m-2 s-1</td>
!! <td>runoff</td>
!! <td>mass flux of frozen runoff</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>Fioi_salt</td>
!! <td>kg m-2 s-1</td>
!! <td>salt_flux</td>
!! <td>salt flux</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_sensi_heat_flx</td>
!! <td>Foxx_sen</td>
!! <td>W m-2</td>
!! <td>t_flux</td>
!! <td>sensible heat flux into ocean</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>mean_zonal_moment_flx</td>
!! <td>Foxx_taux</td>
!! <td>Pa</td>
!! <td>u_flux</td>
!! <td>i-directed wind stress into ocean</td>
!! <td>[vector rotation] (@ref VectorRotations) applied - lat-lon to tripolar</td>
!! </tr>
!! <tr>
!! <td>Foxx_tauy</td>
!! <td>Pa</td>
!! <td>v_flux</td>
!! <td>j-directed wind stress into ocean</td>
!! <td>[vector rotation] (@ref VectorRotations) applied - lat-lon to tripolar</td>
!! </tr>
!! </table>
!!
!! @subsection ExportField Export Fields
Expand All @@ -2616,63 +2620,63 @@ end subroutine shr_log_setLogUnit
!! <th>Notes</th>
!! </tr>
!! <tr>
!! <td>freezing_melting_potential</td>
!! <td>Fioo_q</td>
!! <td>W m-2</td>
!! <td>combination of frazil and melt_potential</td>
!! <td>cap converts model units (J m-2) to (W m-2) for export</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>ocean_mask</td>
!! <td>So_omask</td>
!! <td></td>
!! <td></td>
!! <td>ocean mask</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>ocn_current_merid</td>
!! <td>So_v</td>
!! <td>m s-1</td>
!! <td>v_surf</td>
!! <td>j-directed surface velocity on u-cell</td>
!! <td>[vector rotation] (@ref VectorRotations) applied - tripolar to lat-lon</td>
!! </tr>
!! <tr>
!! <td>ocn_current_zonal</td>
!! <td>So_u</td>
!! <td>m s-1</td>
!! <td>u_surf</td>
!! <td>i-directed surface velocity on u-cell</td>
!! <td>[vector rotation] (@ref VectorRotations) applied - tripolar to lat-lon</td>
!! </tr>
!! <tr>
!! <td>s_surf</td>
!! <td>So_s</td>
!! <td>psu</td>
!! <td>s_surf</td>
!! <td>sea surface salinity on t-cell</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>sea_surface_temperature</td>
!! <td>So_t</td>
!! <td>K</td>
!! <td>t_surf</td>
!! <td>sea surface temperature on t-cell</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>sea_surface_slope_zonal</td>
!! <td>So_dhdx</td>
!! <td>unitless</td>
!! <td>created from ssh</td>
!! <td>sea surface zonal slope</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>sea_surface_slope_merid</td>
!! <td>So_dhy</td>
!! <td>unitless</td>
!! <td>created from ssh</td>
!! <td>sea surface meridional slope</td>
!! <td></td>
!! </tr>
!! <tr>
!! <td>so_bldepth</td>
!! <td>So_bldepth</td>
!! <td>m</td>
!! <td>obld</td>
!! <td>ocean surface boundary layer depth</td>
Expand Down
Loading