From 1bd381bcf7a87f213c7ab69a9871f2d6916ea03e Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Thu, 30 Jun 2016 08:43:54 -0400 Subject: [PATCH 1/2] Allocated fluxes%buoy in MOM_ice_shelf This change avoids [this](https://github.com/NOAA-GFDL/MOM6/blob/dev/master/src/parameterizations/vertical/MOM_entrain_diffusive.F90#L277) fatal error when using pure layer mode without defining BULKMIXEDLAYER. --- src/ice_shelf/MOM_ice_shelf.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ice_shelf/MOM_ice_shelf.F90 b/src/ice_shelf/MOM_ice_shelf.F90 index b4533b3de5..e10119af53 100644 --- a/src/ice_shelf/MOM_ice_shelf.F90 +++ b/src/ice_shelf/MOM_ice_shelf.F90 @@ -1391,6 +1391,9 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, fluxes, Ti !GM, the following is necessary to make ENERGETICS_SFC_PBL work call allocate_forcing_type(G, fluxes, ustar=.true., shelf=.true., & press=.true., water=.true., heat=.true.) + ! This is to make it work with layer mode without BULKMIXEDLAYER + allocate( fluxes%buoy(isd:ied,jsd:jed) ) + fluxes%buoy(:,:) = 0.0 else if (is_root_pe()) print *,"allocating fluxes in solo mode" call allocate_forcing_type(G, fluxes, ustar=.true., shelf=.true., press=.true.) From 30bc60bb37f21aaabf99d27453a1d8ead742f700 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Fri, 1 Jul 2016 08:59:52 -0400 Subject: [PATCH 2/2] Chaged allocation of water/heat fluxes This change assures that water/heat fluxes are just allocated when SHELF_THERMO = True. These fluxes are necessary if one wants to use either ENERGETICS_SFC_PBL (ALE mode) or BULKMIXEDLAYER (layer mode). --- src/ice_shelf/MOM_ice_shelf.F90 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ice_shelf/MOM_ice_shelf.F90 b/src/ice_shelf/MOM_ice_shelf.F90 index 1d146e5797..1136b32941 100644 --- a/src/ice_shelf/MOM_ice_shelf.F90 +++ b/src/ice_shelf/MOM_ice_shelf.F90 @@ -1392,12 +1392,11 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, fluxes, Ti ! Allocate the arrays for passing ice-shelf data through the forcing type. if (.not. solo_ice_sheet) then if (is_root_pe()) print *,"initialize_ice_shelf: allocating fluxes" - !GM, the following is necessary to make ENERGETICS_SFC_PBL work + ! GM: the following assures that water/heat fluxes are just allocated + ! when SHELF_THERMO = True. These fluxes are necessary if one wants to + ! use either ENERGETICS_SFC_PBL (ALE mode) or BULKMIXEDLAYER (layer mode). call allocate_forcing_type(G, fluxes, ustar=.true., shelf=.true., & - press=.true., water=.true., heat=.true.) - ! This is to make it work with layer mode without BULKMIXEDLAYER - allocate( fluxes%buoy(isd:ied,jsd:jed) ) - fluxes%buoy(:,:) = 0.0 + press=.true., water=CS%isthermo, heat=CS%isthermo) else if (is_root_pe()) print *,"allocating fluxes in solo mode" call allocate_forcing_type(G, fluxes, ustar=.true., shelf=.true., press=.true.)