Skip to content

Commit

Permalink
Only a single forcing group linked list should exist per core.
Browse files Browse the repository at this point in the history
These were put in by Adrian in PR 1333, but then removed
inadvertenly in PR 1427
  • Loading branch information
mark-petersen committed Nov 16, 2017
1 parent 7c7f92f commit d2a7f49
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
37 changes: 18 additions & 19 deletions src/core_ocean/shared/mpas_ocn_tracer_ecosys.F
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ module ocn_tracer_ecosys
integer, public:: &
numColumnsMax

type (MPAS_forcing_group_type), pointer :: ecosysForcingGroup
!--------------------------------------------------------------------
!
! Private module variables
Expand Down Expand Up @@ -1679,7 +1678,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{

call MPAS_pool_get_config(domain % configs, 'config_do_restart', config_do_restart)

call MPAS_forcing_init_group( ecosysForcingGroup, &
call MPAS_forcing_init_group( forcingGroupHead, &
"ecosysMonthlyClimatology", &
domain, &
'0000-01-01_00:00:00', &
Expand Down Expand Up @@ -1721,7 +1720,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
call mpas_pool_get_array(ecosysMonthlyForcing, 'riverFluzDOC', riverFluzDOC)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'depositionFluzNO3', &
'ecosys_monthly_flux', &
Expand All @@ -1732,7 +1731,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'depositionFluzNH4', &
'ecosys_monthly_flux', &
Expand All @@ -1743,7 +1742,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'IRON_FLUZ_IN', &
'ecosys_monthly_flux', &
Expand All @@ -1754,7 +1753,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'dust_FLUZ_IN', &
'ecosys_monthly_flux', &
Expand All @@ -1765,7 +1764,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzNO3', &
'ecosys_monthly_flux', &
Expand All @@ -1776,7 +1775,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzPO4', &
'ecosys_monthly_flux', &
Expand All @@ -1787,7 +1786,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzDON', &
'ecosys_monthly_flux', &
Expand All @@ -1798,7 +1797,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzDOP', &
'ecosys_monthly_flux', &
Expand All @@ -1809,7 +1808,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzSiO3', &
'ecosys_monthly_flux', &
Expand All @@ -1820,7 +1819,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzFe', &
'ecosys_monthly_flux', &
Expand All @@ -1831,7 +1830,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzDIC', &
'ecosys_monthly_flux', &
Expand All @@ -1842,7 +1841,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzALK', &
'ecosys_monthly_flux', &
Expand All @@ -1853,7 +1852,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
ecosysForcingGroup, &
forcingGroupHead, &
'ecosysMonthlyClimatology', &
'riverFluzDOC', &
'ecosys_monthly_flux', &
Expand All @@ -1863,7 +1862,7 @@ subroutine ocn_tracer_ecosys_init(domain,err)!{{{
forcingReferenceTimeMonthly, &
forcingIntervalMonthly)

call MPAS_forcing_init_field_data( ecosysForcingGroup, &
call MPAS_forcing_init_field_data( forcingGroupHead, &
'ecosysMonthlyClimatology', &
domain % streamManager, &
config_do_restart, &
Expand Down Expand Up @@ -1954,10 +1953,10 @@ subroutine ocn_get_ecosysData( streamManager, &

!maltrud debug
if (firstTimeStep .and. config_do_restart) then
call MPAS_forcing_get_forcing(ecosysForcingGroup, &
call MPAS_forcing_get_forcing(forcingGroupHead, &
'ecosysMonthlyClimatology', streamManager, 0.0_RKIND)
else
call MPAS_forcing_get_forcing(ecosysForcingGroup, &
call MPAS_forcing_get_forcing(forcingGroupHead, &
'ecosysMonthlyClimatology', streamManager, dt)
endif

Expand Down Expand Up @@ -2029,7 +2028,7 @@ subroutine ocn_ecosys_forcing_write_restart(domain)!{{{

type(domain_type) :: domain

call MPAS_forcing_write_restart_times(ecosysForcingGroup)
call MPAS_forcing_write_restart_times(forcingGroupHead)

end subroutine ocn_ecosys_forcing_write_restart!}}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module ocn_tracer_short_wave_absorption_variable
ocn_get_shortWaveData, &
ocn_shortwave_forcing_write_restart

type (MPAS_forcing_group_type), pointer :: shortwaveForcingGroup
!--------------------------------------------------------------------
!
! Private module variables
Expand Down Expand Up @@ -266,7 +265,7 @@ subroutine ocn_init_shortwave_forcing_ohlmann(domain)!{{{
forcingIntervalMonthly = "0000-01-00_00:00:00"
forcingReferenceTimeMonthly = "0000-01-01_00:00:00"

call MPAS_forcing_init_group( shortwaveForcingGroup, &
call MPAS_forcing_init_group( forcingGroupHead, &
"shortwave_monthly_observations", &
domain, &
'0000-01-01_00:00:00', &
Expand All @@ -275,7 +274,7 @@ subroutine ocn_init_shortwave_forcing_ohlmann(domain)!{{{
config_do_restart)

call MPAS_forcing_init_field( domain % streamManager, &
shortwaveForcingGroup, &
forcingGroupHead, &
'shortwave_monthly_observations', &
'chlorophyllData', &
'shortwave_forcing_data', &
Expand All @@ -286,7 +285,7 @@ subroutine ocn_init_shortwave_forcing_ohlmann(domain)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
shortwaveForcingGroup, &
forcingGroupHead, &
'shortwave_monthly_observations', &
'clearSkyRadiation', &
'shortwave_forcing_data', &
Expand All @@ -297,7 +296,7 @@ subroutine ocn_init_shortwave_forcing_ohlmann(domain)!{{{
forcingIntervalMonthly)

call MPAS_forcing_init_field( domain % streamManager, &
shortwaveForcingGroup, &
forcingGroupHead, &
'shortwave_monthly_observations', &
'zenithAngle', &
'shortwave_forcing_data', &
Expand All @@ -307,7 +306,7 @@ subroutine ocn_init_shortwave_forcing_ohlmann(domain)!{{{
forcingReferenceTimeMonthly, &
forcingIntervalMonthly)

call MPAS_forcing_init_field_data( shortwaveForcingGroup, &
call MPAS_forcing_init_field_data( forcingGroupHead, &
'shortwave_monthly_observations', &
domain % streamManager, &
config_do_restart, &
Expand Down Expand Up @@ -495,7 +494,7 @@ subroutine ocn_shortwave_forcing_write_restart(domain)!{{{
call MPAS_pool_get_config(domain % configs, "config_sw_absorption_type", config_sw_absorption_type)

if( trim(config_sw_absorption_type) == 'ohlmann00' ) then
call MPAS_forcing_write_restart_times(shortwaveForcingGroup)
call MPAS_forcing_write_restart_times(forcingGroupHead)
endif

end subroutine ocn_shortwave_forcing_write_restart!}}}
Expand Down
13 changes: 6 additions & 7 deletions src/core_ocean/shared/mpas_ocn_tracer_surface_restoring.F
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ module ocn_tracer_surface_restoring
ocn_salinity_restoring_forcing_write_restart, &
ocn_tracer_surface_restoring_init

type (MPAS_forcing_group_type), pointer :: surfaceSalinityForcingGroup
!--------------------------------------------------------------------
!
! Private module variables
Expand Down Expand Up @@ -263,7 +262,7 @@ subroutine ocn_get_surfaceSalinityData( streamManager, &
forcingIntervalMonthly = "0000-01-00_00:00:00"
forcingReferenceTimeMonthly = "0000-01-15_00:00:00"

call MPAS_forcing_init_group( surfaceSalinityForcingGroup, &
call MPAS_forcing_init_group( forcingGroupHead, &
"surfaceSalinityMonthlyClimatology", &
domain, &
timeStamp, &
Expand All @@ -272,7 +271,7 @@ subroutine ocn_get_surfaceSalinityData( streamManager, &
config_do_restart)

call MPAS_forcing_init_field( domain % streamManager, &
surfaceSalinityForcingGroup, &
forcingGroupHead, &
'surfaceSalinityMonthlyClimatology', & ! forcing group name
'surfaceSalinityMonthlyClimatologyValue', & ! array name
'surface_salinity_monthly_data', & ! stream name
Expand All @@ -282,7 +281,7 @@ subroutine ocn_get_surfaceSalinityData( streamManager, &
forcingReferenceTimeMonthly, &
forcingIntervalMonthly)

call MPAS_forcing_init_field_data( surfaceSalinityForcingGroup, &
call MPAS_forcing_init_field_data( forcingGroupHead, &
'surfaceSalinityMonthlyClimatology', &
domain % streamManager, &
config_do_restart, &
Expand All @@ -308,10 +307,10 @@ subroutine ocn_get_surfaceSalinityData( streamManager, &
surfaceSalinityMonthlyClimatologyValue)

if(firstTimestep .and. config_do_restart) then
call MPAS_forcing_get_forcing(surfaceSalinityForcingGroup, &
call MPAS_forcing_get_forcing(forcingGroupHead, &
'surfaceSalinityMonthlyClimatology', streamManager, 0.0_RKIND)
else
call MPAS_forcing_get_forcing(surfaceSalinityForcingGroup, &
call MPAS_forcing_get_forcing(forcingGroupHead, &
'surfaceSalinityMonthlyClimatology', streamManager, dt)
end if

Expand Down Expand Up @@ -431,7 +430,7 @@ subroutine ocn_salinity_restoring_forcing_write_restart(domain)!{{{

type(domain_type) :: domain

call MPAS_forcing_write_restart_times(surfaceSalinityForcingGroup)
call MPAS_forcing_write_restart_times(forcingGroupHead)

end subroutine ocn_salinity_restoring_forcing_write_restart!}}}

Expand Down

0 comments on commit d2a7f49

Please sign in to comment.