Skip to content

Commit

Permalink
Merge branch 'dev/ncar_nuopc' of https://github.com/mvertens/MOM6 int…
Browse files Browse the repository at this point in the history
…o dev/nuopc

Conflicts:
	config_src/coupled_driver/MOM_surface_forcing.F90
	config_src/mct_driver/ocn_comp_mct.F90
  • Loading branch information
rsdunlapiv committed May 21, 2018
2 parents 5a58c34 + 93d7a07 commit 0a49485
Show file tree
Hide file tree
Showing 8 changed files with 10,156 additions and 3 deletions.
56 changes: 55 additions & 1 deletion config_src/coupled_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ module MOM_surface_forcing

#include <MOM_memory.h>

public convert_IOB_to_fluxes, convert_IOB_to_forces
public IOB_allocate
public convert_IOB_to_fluxes
public convert_IOB_to_forces
public surface_forcing_init
public ice_ocn_bnd_type_chksum
public forcing_save_restart
Expand Down Expand Up @@ -839,6 +841,58 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, CS)
call cpu_clock_end(id_clock_forcing)
end subroutine convert_IOB_to_forces

subroutine IOB_allocate(IOB, isc, iec, jsc, jec)

type(ice_ocean_boundary_type), intent(inout) :: IOB !< An ice-ocean boundary type with fluxes to drive
integer, intent(in) :: isc, iec, jsc, jec !< The ocean's local grid size

allocate ( IOB% u_flux (isc:iec,jsc:jec), &
IOB% v_flux (isc:iec,jsc:jec), &
IOB% t_flux (isc:iec,jsc:jec), &
IOB% q_flux (isc:iec,jsc:jec), &
IOB% salt_flux (isc:iec,jsc:jec), &
IOB% lw_flux (isc:iec,jsc:jec), &
IOB% sw_flux_vis_dir (isc:iec,jsc:jec), &
IOB% sw_flux_vis_dif (isc:iec,jsc:jec), &
IOB% sw_flux_nir_dir (isc:iec,jsc:jec), &
IOB% sw_flux_nir_dif (isc:iec,jsc:jec), &
IOB% lprec (isc:iec,jsc:jec), &
IOB% fprec (isc:iec,jsc:jec), &
IOB% runoff (isc:iec,jsc:jec), &
IOB% ustar_berg (isc:iec,jsc:jec), &
IOB% area_berg (isc:iec,jsc:jec), &
IOB% mass_berg (isc:iec,jsc:jec), &
IOB% calving (isc:iec,jsc:jec), &
IOB% runoff_hflx (isc:iec,jsc:jec), &
IOB% calving_hflx (isc:iec,jsc:jec), &
IOB% mi (isc:iec,jsc:jec), &
IOB% p (isc:iec,jsc:jec))

IOB%u_flux = 0.0
IOB%v_flux = 0.0
IOB%t_flux = 0.0
IOB%q_flux = 0.0
IOB%salt_flux = 0.0
IOB%lw_flux = 0.0
IOB%sw_flux_vis_dir = 0.0
IOB%sw_flux_vis_dif = 0.0
IOB%sw_flux_nir_dir = 0.0
IOB%sw_flux_nir_dif = 0.0
IOB%lprec = 0.0
IOB%fprec = 0.0
IOB%runoff = 0.0
IOB%ustar_berg = 0.0
IOB%area_berg = 0.0
IOB%mass_berg = 0.0
IOB%calving = 0.0
IOB%runoff_hflx = 0.0
IOB%calving_hflx = 0.0
IOB%mi = 0.0
IOB%p = 0.0

end subroutine IOB_allocate


!> Adds thermodynamic flux adjustments obtained via data_override
!! Component name is 'OCN'
!! Available adjustments are:
Expand Down
42 changes: 40 additions & 2 deletions config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module ocean_model_mod
implicit none ; private

public ocean_model_init, ocean_model_end, update_ocean_model
public get_ocean_grid ! add by Jiande
public ocean_model_save_restart, Ocean_stock_pe
public ice_ocean_boundary_type
public ocean_model_init_sfc, ocean_model_flux_init
Expand Down Expand Up @@ -1092,8 +1093,28 @@ subroutine ocean_model_data2D_get(OS,Ocean, name, array2D,isc,jsc)
array2D(isc:,jsc:) = Ocean%t_surf(isc:,jsc:)-CELSIUS_KELVIN_OFFSET
case('btfHeat')
array2D(isc:,jsc:) = 0
case('tlat')
array2D(isc:,jsc:) = OS%grid%geoLatT(g_isc:g_iec,g_jsc:g_jec)
case('tlon')
array2D(isc:,jsc:) = OS%grid%geoLonT(g_isc:g_iec,g_jsc:g_jec)
case('ulat')
array2D(isc:,jsc:) = OS%grid%geoLatCu(g_isc:g_iec,g_jsc:g_jec)
case('ulon')
array2D(isc:,jsc:) = OS%grid%geoLonCu(g_isc:g_iec,g_jsc:g_jec)
case('vlat')
array2D(isc:,jsc:) = OS%grid%geoLatCv(g_isc:g_iec,g_jsc:g_jec)
case('vlon')
array2D(isc:,jsc:) = OS%grid%geoLonCv(g_isc:g_iec,g_jsc:g_jec)
case('geoLatBu')
array2D(isc:,jsc:) = OS%grid%geoLatBu(g_isc:g_iec,g_jsc:g_jec)
case('geoLonBu')
array2D(isc:,jsc:) = OS%grid%geoLonBu(g_isc:g_iec,g_jsc:g_jec)
case('cos_rot')
array2D(isc:,jsc:) = OS%grid%cos_rot(g_isc:g_iec,g_jsc:g_jec) ! =1
case('sin_rot')
array2D(isc:,jsc:) = OS%grid%sin_rot(g_isc:g_iec,g_jsc:g_jec) ! =0
case default
call MOM_error(FATAL,'get_ocean_grid_data2D: unknown argument name='//name)
call MOM_error(FATAL,'ocean_model_data2D_get: unknown argument name='//name)
end select


Expand All @@ -1112,7 +1133,7 @@ subroutine ocean_model_data1D_get(OS,Ocean, name, value)
case('c_p')
value = OS%C_p
case default
call MOM_error(FATAL,'get_ocean_grid_data1D: unknown argument name='//name)
call MOM_error(FATAL,'ocean_model_data1D_get: unknown argument name='//name)
end select


Expand Down Expand Up @@ -1140,4 +1161,21 @@ subroutine ocean_public_type_chksum(id, timestep, ocn)

end subroutine ocean_public_type_chksum

!#######################################################################
! <SUBROUTINE NAME="get_ocean_grid">
!
! <DESCRIPTION>
! Obtain the ocean grid.
! </DESCRIPTION>
!
subroutine get_ocean_grid(OS, Gridp)
type(ocean_state_type) :: OS
type(ocean_grid_type) , pointer :: Gridp

Gridp => OS%grid
return

end subroutine get_ocean_grid
! </SUBROUTINE> NAME="get_ocean_grid"

end module ocean_model_mod
Loading

0 comments on commit 0a49485

Please sign in to comment.