From 5e0bc3576b3d3db11608efbafd820417908a2df2 Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:46:20 -0400 Subject: [PATCH 1/8] MOM_input cleanup --- ocean_only/dumbbell/common/MOM_input | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocean_only/dumbbell/common/MOM_input b/ocean_only/dumbbell/common/MOM_input index 3596b51c..31796b9c 100644 --- a/ocean_only/dumbbell/common/MOM_input +++ b/ocean_only/dumbbell/common/MOM_input @@ -281,7 +281,7 @@ KH_VEL_SCALE = 0.003 ! [m s-1] default = 0.0 ! spacing to calculate the Laplacian viscosity. ! The final viscosity is the largest of this scaled ! viscosity, the Smagorinsky viscosity and KH. -SMAG_BI_CONST = 0.03 ! [nondim] default = 0.0 +SMAG_BI_CONST = 0.03 ! [nondim] default = 0.0 ! The nondimensional biharmonic Smagorinsky constant, ! typically 0.015 - 0.06. BOUND_CORIOLIS_VEL = 10.0 ! [m s-1] default = 1.0 @@ -459,7 +459,7 @@ MAXCPU = 2.88E+04 ! [wall-clock seconds] default = -1.0 ! factor of the number of processors used. ! === module MOM_main (MOM_driver) === -DT_FORCING = 600.0 ! [s] default = 900.0 +DT_FORCING = 300.0 ! [s] default = 900.0 ! The time step for changing forcing, coupling with other ! components, or potentially writing certain diagnostics. ! The default value is given by DT. From 7862db1b6435eb32eb7dfcb0ad48e9402c3f44cd Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:48:17 -0400 Subject: [PATCH 2/8] Fixes for create_bcs.py --- ocean_only/dumbbell/z/create_bcs.py | 56 +++++++++++++++++------------ 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/ocean_only/dumbbell/z/create_bcs.py b/ocean_only/dumbbell/z/create_bcs.py index 31c82b7c..c59eb145 100644 --- a/ocean_only/dumbbell/z/create_bcs.py +++ b/ocean_only/dumbbell/z/create_bcs.py @@ -3,8 +3,8 @@ import netCDF4 as nc import numpy as np -e=nc.Dataset('east_new.nc','w',format='NETCDF3_CLASSIC') -w=nc.Dataset('west_new.nc','w',format='NETCDF3_CLASSIC') +e=nc.Dataset('east.nc','w',format='NETCDF3_CLASSIC') +w=nc.Dataset('west.nc','w',format='NETCDF3_CLASSIC') p=nc.Dataset('prog.nc','r') grd=nc.Dataset('ocean_geometry.nc','r') ic=nc.Dataset('MOM_IC.nc','r') @@ -15,8 +15,8 @@ FillVal=-1.e20 for r,i,cnum in zip((e,w),(79,39),('002','001')): - tdim=r.createDimension('time',None) - tdimv=r.createVariable('time','f8',('time'),fill_value=FillVal) + tdim=r.createDimension('Time',None) + tdimv=r.createVariable('Time','f8',('Time'),fill_value=FillVal) tdimv.units='days since 0001-01-01 00:00:00' tdimv.cartesian_axis='T' tdimv.calendar_type='julian' @@ -46,26 +46,31 @@ yqv.cartesian_axis='Y' yqv[:]=yq vnam='zeta_segment_'+cnum - zvv=r.createVariable(vnam,'f8',('time','yh','xq'),fill_value=FillVal) + zvv=r.createVariable(vnam,'f8',('Time','yh','xq'),fill_value=FillVal) vnam='salt_segment_'+cnum - sv=r.createVariable(vnam,'f8',('time','zl','yh','xq'),fill_value=FillVal) + sv=r.createVariable(vnam,'f8',('Time','zl','yh','xq'),fill_value=FillVal) vnam='dz_salt_segment_'+cnum - hsv=r.createVariable(vnam,'f8',('time','zl','yh','xq'),fill_value=FillVal) + hsv=r.createVariable(vnam,'f8',('Time','zl','yh','xq'),fill_value=FillVal) vnam='u_segment_'+cnum - uv=r.createVariable(vnam,'f8',('time','zl','yh','xq'),fill_value=FillVal) + uv=r.createVariable(vnam,'f8',('Time','zl','yh','xq'),fill_value=FillVal) vnam='dz_u_segment_'+cnum - huv=r.createVariable(vnam,'f8',('time','zl','yh','xq'),fill_value=FillVal) + huv=r.createVariable(vnam,'f8',('Time','zl','yh','xq'),fill_value=FillVal) vnam='v_segment_'+cnum - vv=r.createVariable(vnam,'f8',('time','zl','yq','xq'),fill_value=FillVal) + vv=r.createVariable(vnam,'f8',('Time','zl','yq','xq'),fill_value=FillVal) vnam='dz_v_segment_'+cnum - hvv=r.createVariable(vnam,'f8',('time','zl','yq','xq'),fill_value=FillVal) + hvv=r.createVariable(vnam,'f8',('Time','zl','yq','xq'),fill_value=FillVal) vnam='dvdx_segment_'+cnum - dvdxv=r.createVariable(vnam,'f8',('time','zl','yq','xq'),fill_value=FillVal) - + dvdxv=r.createVariable(vnam,'f8',('Time','zl','yq','xq'),fill_value=FillVal) + vnam='dz_dvdx_segment_'+cnum + hdvdxv=r.createVariable(vnam,'f8',('Time','zl','yq','xq'),fill_value=FillVal) +# vnam='uhbt_segment_'+cnum +# uhbtv=r.createVariable(vnam,'f8',('Time','yh','xq'),fill_value=FillVal) + zvv[0]=0.5*(ic.variables['sfc'][:,:,i]+ic.variables['sfc'][:,:,i+1]) sv[0]=0.5*(ic.variables['Salt'][:,:,:,i]+ic.variables['Salt'][:,:,:,i+1]) hsv[0]=0.5*(ic.variables['h'][:,:,:,i]+ic.variables['h'][:,:,:,i+1]) uv[0]=ic.variables['u'][:,:,:,i+1] +# uhbtv[0]=ic.variables['uhbt_IC'][:,:,i+1] huv[0]=0.5*(ic.variables['h'][:,:,:,i]+ic.variables['h'][:,:,:,i+1]) vv[0]=0.5*(ic.variables['v'][:,:,:,i]+ic.variables['v'][:,:,:,i+1]) hijp=np.roll(ic.variables['h'][:,:,:,i],shift=-1,axis=2) @@ -81,17 +86,20 @@ a=(ic.variables['v'][:,:,:,i+1]-ic.variables['v'][:,:,:,i]) dvdxv[0]=a/dx tdimv[0]=0.0 - - zvv[1:]=0.5*(p.variables['SSH'][:,:,i]+p.variables['SSH'][:,:,i+1]) + hdvdxv[0]=hvv[0] + + hvar='hav' + zvv[1:]=0.5*(p.variables['ssh'][:,:,i]+p.variables['ssh'][:,:,i+1]) sv[1:]=0.5*(p.variables['salt'][:,:,:,i]+p.variables['salt'][:,:,:,i+1]) - hsv[1:]=0.5*(p.variables['h'][:,:,:,i]+p.variables['h'][:,:,:,i+1]) + hsv[1:]=0.5*(p.variables[hvar][:,:,:,i]+p.variables[hvar][:,:,:,i+1]) uv[1:]=p.variables['u'][:,:,:,i+1] - huv[1:]=0.5*(p.variables['h'][:,:,:,i]+p.variables['h'][:,:,:,i+1]) +# uhbtv[1:]=p.variables['uhbt'][:,:,i+1] + huv[1:]=0.5*(p.variables[hvar][:,:,:,i]+p.variables[hvar][:,:,:,i+1]) vv[1:]=0.5*(p.variables['v'][:,:,:,i]+p.variables['v'][:,:,:,i+1]) - hijp=np.roll(p.variables['h'][:,:,:,i],shift=-1,axis=2) - hipjp=np.roll(p.variables['h'][:,:,:,i+1],shift=-1,axis=2) - hij=p.variables['h'][:,:,:,i] - hipj=p.variables['h'][:,:,:,i+1] + hijp=np.roll(p.variables[hvar][:,:,:,i],shift=-1,axis=2) + hipjp=np.roll(p.variables[hvar][:,:,:,i+1],shift=-1,axis=2) + hij=p.variables[hvar][:,:,:,i] + hipj=p.variables[hvar][:,:,:,i+1] a=0.25*(hij+hipj+hijp+hipjp) a0=a[:,:,0][:,:,np.newaxis] a=np.concatenate((a0,a),axis=2) @@ -101,18 +109,20 @@ a=(p.variables['v'][:,:,:,i+1]-p.variables['v'][:,:,:,i]) dvdxv[1:]=a/dx tdimv[1:]=p.variables['Time'][:] - + hdvdxv[1:]=hvv[1:] + for tp in np.arange(2): nt= tdimv.shape[0] zvv[nt]=zvv[nt-1] sv[nt]=sv[nt-1] hsv[nt]=hsv[nt-1] uv[nt]=uv[nt-1] +# uhbtv[nt]=uhbtv[nt-1] huv[nt]=huv[nt-1] vv[nt]=vv[nt-1] hvv[nt]=hvv[nt-1] dvdxv[nt]=dvdxv[nt-1] tdimv[nt]=2*tdimv[nt-1]-tdimv[nt-2] - + hdvdxv[nt]=hvv[nt] r.sync() r.close() From e05939e3d7a81702ba1dc8b60247cdf7752cff4c Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:50:21 -0400 Subject: [PATCH 3/8] Matt's suggested defaults for regional model --- ocean_only/dumbbell/z_sub/MOM_override | 17 +++++++++-------- ocean_only/dumbbell/z_sub/MOM_param_parse.py~ | 6 ++++++ 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 ocean_only/dumbbell/z_sub/MOM_param_parse.py~ diff --git a/ocean_only/dumbbell/z_sub/MOM_override b/ocean_only/dumbbell/z_sub/MOM_override index 26e490a6..58c2afb9 100644 --- a/ocean_only/dumbbell/z_sub/MOM_override +++ b/ocean_only/dumbbell/z_sub/MOM_override @@ -8,21 +8,22 @@ SPONGE = False SPONGE_CONFIG = "DUMBBELL" DUMBBELL_SPONGE_TIME_SCALE = 8.64e4 -#override DAYMAX = 30. +!#override DAYMAX = 30. #override WESTLON = -100 #override LENLON = 200 #override NIGLOBAL = 40 !!#override DUMBBELL_S_RANGE = 0.0 ! === OBC options === OBC_NUMBER_OF_SEGMENTS = 2 ! [Integer] The number of open boundary segments. -OBC_SEGMENT_001 = "I=0,J=N:0,FLATHER,OBLIQUE,NUDGED" -OBC_SEGMENT_002 = "I=N,J=0:N,FLATHER,OBLIQUE,NUDGED" +OBC_SEGMENT_001 = "I=0,J=N:0,FLATHER,ORLANSKI,NUDGED" +OBC_SEGMENT_002 = "I=N,J=0:N,FLATHER,ORLANSKI,NUDGED" OBC_SEGMENT_001_DATA = "U=file:west.nc(u),V=file:west.nc(v),SSH=file:west.nc(zeta),SALT=file:west.nc(salt)" OBC_SEGMENT_002_DATA = "U=file:east.nc(u),V=file:east.nc(v),SSH=file:east.nc(zeta),SALT=file:east.nc(salt)" -OBC_SEGMENT_001_VELOCITY_NUDGING_TIMESCALES = 2, 200 -OBC_SEGMENT_002_VELOCITY_NUDGING_TIMESCALES = 2, 200 -OBC_TRACER_RESERVOIR_LENGTH_SCALE_OUT = 5000 -OBC_TRACER_RESERVOIR_LENGTH_SCALE_IN = 5000 -OBC_COMPUTED_VORTICITY = True ! [Boolean] default = False +OBC_SEGMENT_001_VELOCITY_NUDGING_TIMESCALES = 0, 0 +OBC_SEGMENT_002_VELOCITY_NUDGING_TIMESCALES = 0, 0 +OBC_TRACER_RESERVOIR_LENGTH_SCALE_OUT = 0 +OBC_TRACER_RESERVOIR_LENGTH_SCALE_IN = 0 +OBC_SPECIFIED_VORTICITY = True ! [Boolean] default = False OBC_COMPUTED_STRAIN = True ! [Boolean] default = False OBC_ZERO_BIHARMONIC = True ! [Boolean] default = False +OBC_RAD_VEL_WT = 0.3 diff --git a/ocean_only/dumbbell/z_sub/MOM_param_parse.py~ b/ocean_only/dumbbell/z_sub/MOM_param_parse.py~ new file mode 100644 index 00000000..d83bff66 --- /dev/null +++ b/ocean_only/dumbbell/z_sub/MOM_param_parse.py~ @@ -0,0 +1,6 @@ +with open("MOM_parameter_doc.all") as f: + for line in f: + D.append(line) + +print D + From 5095fc145d0103d74951a70e10ff253238f67ac7 Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:51:22 -0400 Subject: [PATCH 4/8] Matt's logfiles --- .../dumbbell/z_sub/MOM_parameter_doc.all | 26 ++++++++--------- .../dumbbell/z_sub/MOM_parameter_doc.short | 28 ++++--------------- 2 files changed, 19 insertions(+), 35 deletions(-) diff --git a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all index b7f108f9..c959a2cd 100644 --- a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all +++ b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all @@ -54,12 +54,12 @@ BATHYMETRY_AT_VEL = False ! [Boolean] default = False ! If true, there are separate values for the basin depths ! at velocity points. Otherwise the effects of topography ! are entirely determined from thickness points. -DT = 600.0 ! [s] +DT = 300.0 ! [s] ! The (baroclinic) dynamics time step. The time-step that ! is actually used will be an integer fraction of the ! forcing time-step (DT_FORCING in ocean-only mode or the ! coupling timestep in coupled mode.) -DT_THERM = 600.0 ! [s] default = 600.0 +DT_THERM = 300.0 ! [s] default = 300.0 ! The thermodynamic and tracer advection time step. ! Ideally DT_THERM should be an integer multiple of DT ! and less than the forcing or coupling time-step, unless @@ -257,11 +257,11 @@ OBC_FREESLIP_VORTICITY = False ! [Boolean] default = False ! If true, sets the normal gradient of tangential velocity to ! zero in the relative vorticity on open boundaries. This cannot ! be true if another OBC_XXX_VORTICITY option is True. -OBC_COMPUTED_VORTICITY = True ! [Boolean] default = False +OBC_COMPUTED_VORTICITY = False ! [Boolean] default = False ! If true, uses the external values of tangential velocity ! in the relative vorticity on open boundaries. This cannot ! be true if another OBC_XXX_VORTICITY option is True. -OBC_SPECIFIED_VORTICITY = False ! [Boolean] default = False +OBC_SPECIFIED_VORTICITY = True ! [Boolean] default = False ! If true, uses the external values of tangential velocity ! in the relative vorticity on open boundaries. This cannot ! be true if another OBC_XXX_VORTICITY option is True. @@ -284,15 +284,15 @@ OBC_ZERO_BIHARMONIC = True ! [Boolean] default = False ! viscosity term. MASK_OUTSIDE_OBCS = False ! [Boolean] default = False ! If true, set the areas outside open boundaries to be land. -OBC_SEGMENT_001 = "I=0,J=N:0,FLATHER,OBLIQUE,NUDGED" ! +OBC_SEGMENT_001 = "I=0,J=N:0,FLATHER,ORLANSKI,NUDGED" ! ! Documentation needs to be dynamic????? -OBC_SEGMENT_001_VELOCITY_NUDGING_TIMESCALES = 2.0, 200.0 ! [days] default = 0.0 +OBC_SEGMENT_001_VELOCITY_NUDGING_TIMESCALES = 2*0.0 ! [days] default = 0.0 ! Timescales in days for nudging along a segment, ! for inflow, then outflow. Setting both to zero should ! behave like SIMPLE obcs for the baroclinic velocities. -OBC_SEGMENT_002 = "I=N,J=0:N,FLATHER,OBLIQUE,NUDGED" ! +OBC_SEGMENT_002 = "I=N,J=0:N,FLATHER,ORLANSKI,NUDGED" ! ! Documentation needs to be dynamic????? -OBC_SEGMENT_002_VELOCITY_NUDGING_TIMESCALES = 2.0, 200.0 ! [days] default = 0.0 +OBC_SEGMENT_002_VELOCITY_NUDGING_TIMESCALES = 2*0.0 ! [days] default = 0.0 ! Timescales in days for nudging along a segment, ! for inflow, then outflow. Setting both to zero should ! behave like SIMPLE obcs for the baroclinic velocities. @@ -314,11 +314,11 @@ OBC_RAD_THICK_WT = 0.2 ! [nondim] default = 0.2 ! time level (1) or the running mean (0) for thicknesses. ! Valid values range from 0 to 1. This is only used if ! one of the open boundary segments is using Orlanski. -OBC_TRACER_RESERVOIR_LENGTH_SCALE_OUT = 5000.0 ! [m] default = 0.0 +OBC_TRACER_RESERVOIR_LENGTH_SCALE_OUT = 0.0 ! [m] default = 0.0 ! An effective length scale for restoring the tracer concentration ! at the boundaries to externally imposed values when the flow ! is exiting the domain. -OBC_TRACER_RESERVOIR_LENGTH_SCALE_IN = 5000.0 ! [m] default = 0.0 +OBC_TRACER_RESERVOIR_LENGTH_SCALE_IN = 0.0 ! [m] default = 0.0 ! An effective length scale for restoring the tracer concentration ! at the boundaries to values from the interior when the flow ! is entering the domain. @@ -996,7 +996,7 @@ BOUND_AH = True ! [Boolean] default = True BETTER_BOUND_AH = True ! [Boolean] default = True ! If true, the biharmonic coefficient is locally limited ! to be stable with a better bounding than just BOUND_AH. -SMAG_BI_CONST = 0.015 ! [nondim] default = 0.0 +SMAG_BI_CONST = 0.03 ! [nondim] default = 0.0 ! The nondimensional biharmonic Smagorinsky constant, ! typically 0.015 - 0.06. BOUND_CORIOLIS_BIHARM = True ! [Boolean] default = True @@ -1656,11 +1656,11 @@ LA_DEPTH_RATIO = 0.04 ! [nondim] default = 0.04 ! Lanmguir number calculation, where La = sqrt(ust/Stokes). ! === module MOM_main (MOM_driver) === -DT_FORCING = 600.0 ! [s] default = 600.0 +DT_FORCING = 300.0 ! [s] default = 300.0 ! The time step for changing forcing, coupling with other ! components, or potentially writing certain diagnostics. ! The default value is given by DT. -DAYMAX = 30.0 ! [days] +DAYMAX = 5.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is diff --git a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short index 2cbeb594..696fef27 100644 --- a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short +++ b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short @@ -4,7 +4,7 @@ USE_REGRIDDING = True ! [Boolean] default = False ! If True, use the ALE algorithm (regridding/remapping). ! If False, use the layered isopycnal algorithm. -DT = 600.0 ! [s] +DT = 300.0 ! [s] ! The (baroclinic) dynamics time step. The time-step that ! is actually used will be an integer fraction of the ! forcing time-step (DT_FORCING in ocean-only mode or the @@ -105,7 +105,7 @@ MINIMUM_DEPTH = 1.0 ! [m] default = 0.0 ! Controls where open boundaries are located, what kind of boundary condition to impose, and what data to apply, if any. OBC_NUMBER_OF_SEGMENTS = 2 ! default = 0 ! The number of open boundary segments. -OBC_COMPUTED_VORTICITY = True ! [Boolean] default = False +OBC_SPECIFIED_VORTICITY = True ! [Boolean] default = False ! If true, uses the external values of tangential velocity ! in the relative vorticity on open boundaries. This cannot ! be true if another OBC_XXX_VORTICITY option is True. @@ -116,26 +116,10 @@ OBC_COMPUTED_STRAIN = True ! [Boolean] default = False OBC_ZERO_BIHARMONIC = True ! [Boolean] default = False ! If true, zeros the Laplacian of flow on open boundaries in the biharmonic ! viscosity term. -OBC_SEGMENT_001 = "I=0,J=N:0,FLATHER,OBLIQUE,NUDGED" ! +OBC_SEGMENT_001 = "I=0,J=N:0,FLATHER,ORLANSKI,NUDGED" ! ! Documentation needs to be dynamic????? -OBC_SEGMENT_001_VELOCITY_NUDGING_TIMESCALES = 2.0, 200.0 ! [days] default = 0.0 - ! Timescales in days for nudging along a segment, - ! for inflow, then outflow. Setting both to zero should - ! behave like SIMPLE obcs for the baroclinic velocities. -OBC_SEGMENT_002 = "I=N,J=0:N,FLATHER,OBLIQUE,NUDGED" ! +OBC_SEGMENT_002 = "I=N,J=0:N,FLATHER,ORLANSKI,NUDGED" ! ! Documentation needs to be dynamic????? -OBC_SEGMENT_002_VELOCITY_NUDGING_TIMESCALES = 2.0, 200.0 ! [days] default = 0.0 - ! Timescales in days for nudging along a segment, - ! for inflow, then outflow. Setting both to zero should - ! behave like SIMPLE obcs for the baroclinic velocities. -OBC_TRACER_RESERVOIR_LENGTH_SCALE_OUT = 5000.0 ! [m] default = 0.0 - ! An effective length scale for restoring the tracer concentration - ! at the boundaries to externally imposed values when the flow - ! is exiting the domain. -OBC_TRACER_RESERVOIR_LENGTH_SCALE_IN = 5000.0 ! [m] default = 0.0 - ! An effective length scale for restoring the tracer concentration - ! at the boundaries to values from the interior when the flow - ! is entering the domain. ROTATION = "betaplane" ! default = "2omegasinlat" ! This specifies how the Coriolis parameter is specified: ! 2omegasinlat - Use twice the planetary rotation rate @@ -354,7 +338,7 @@ BOUND_CORIOLIS = True ! [Boolean] default = False SMAGORINSKY_AH = True ! [Boolean] default = False ! If true, use a biharmonic Smagorinsky nonlinear eddy ! viscosity. -SMAG_BI_CONST = 0.015 ! [nondim] default = 0.0 +SMAG_BI_CONST = 0.03 ! [nondim] default = 0.0 ! The nondimensional biharmonic Smagorinsky constant, ! typically 0.015 - 0.06. @@ -483,7 +467,7 @@ WIND_CONFIG = "zero" ! ! === module MOM_restart === ! === module MOM_main (MOM_driver) === -DAYMAX = 30.0 ! [days] +DAYMAX = 5.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is From 012e9757344b531480cbf69d9d171497bc7785b0 Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:54:32 -0400 Subject: [PATCH 5/8] update src pointers --- src/MOM6 | 2 +- src/icebergs | 2 +- src/mkmf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MOM6 b/src/MOM6 index 7d1a50cc..ffcb7e00 160000 --- a/src/MOM6 +++ b/src/MOM6 @@ -1 +1 @@ -Subproject commit 7d1a50cc1eb6fa2d009203458b4bbefe432e286e +Subproject commit ffcb7e00060f7c5827f84ecb37c90ed2f7659460 diff --git a/src/icebergs b/src/icebergs index 33603c93..b114a809 160000 --- a/src/icebergs +++ b/src/icebergs @@ -1 +1 @@ -Subproject commit 33603c93e5807969476bcb4a9cdc37ec2e360089 +Subproject commit b114a809187317909e19fdca7ff843f2a603f011 diff --git a/src/mkmf b/src/mkmf index 8dde14a1..7a0a1a7a 160000 --- a/src/mkmf +++ b/src/mkmf @@ -1 +1 @@ -Subproject commit 8dde14a1808cab1b70bfbef2d607b09e008aa91c +Subproject commit 7a0a1a7a2025309fc715cd7917a50b4c52f21a23 From 71fb26dee13e8ea53a9b170b7de3895c21b37b8f Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:55:47 -0400 Subject: [PATCH 6/8] dumbbell diag table --- ocean_only/dumbbell/common/diag_table | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ocean_only/dumbbell/common/diag_table b/ocean_only/dumbbell/common/diag_table index 7d249e86..298c4c95 100644 --- a/ocean_only/dumbbell/common/diag_table +++ b/ocean_only/dumbbell/common/diag_table @@ -1,19 +1,20 @@ "Dumbbell experiment" 1 1 1 0 0 0 -"prog", 10,"minutes",1,"days","Time" +"prog", 5,"minutes",1,"days","Time" #This is the field section of the diag_table. # Prognostic Ocean fields: #========================= -"ocean_model","u","u","prog","all",.false.,"none",2 -"ocean_model","v","v","prog","all",.false.,"none",2 +"ocean_model","ssh","ssh","prog","all",.false.,"none",2 +"ocean_model","uav","u","prog","all",.false.,"none",2 +"ocean_model","vav","v","prog","all",.false.,"none",2 "ocean_model","h","h","prog","all",.false.,"none",1 "ocean_model","p_surf","p_surf","prog","all",.false.,"none",1 "ocean_model","e","e","prog","all",.false.,"none",2 -"ocean_model","SSH","SSH","prog","all",.false.,"none",2 "ocean_model","RV","RV","prog","all",.false.,"none",2 +"ocean_model","PV","PV","prog","all",.false.,"none",2 "ocean_model","salt","salt","prog","all",.false.,"none",2 From 98ac455e0bf4ed10d8159d469dded490707fb67e Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 07:59:37 -0400 Subject: [PATCH 7/8] fix create_bcs.py --- ocean_only/dumbbell/z/create_bcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocean_only/dumbbell/z/create_bcs.py b/ocean_only/dumbbell/z/create_bcs.py index c59eb145..6d214d78 100644 --- a/ocean_only/dumbbell/z/create_bcs.py +++ b/ocean_only/dumbbell/z/create_bcs.py @@ -88,7 +88,7 @@ tdimv[0]=0.0 hdvdxv[0]=hvv[0] - hvar='hav' + hvar='h' zvv[1:]=0.5*(p.variables['ssh'][:,:,i]+p.variables['ssh'][:,:,i+1]) sv[1:]=0.5*(p.variables['salt'][:,:,:,i]+p.variables['salt'][:,:,:,i+1]) hsv[1:]=0.5*(p.variables[hvar][:,:,:,i]+p.variables[hvar][:,:,:,i+1]) From 02d860ac5e594de623b036cadef3ad3adf396884 Mon Sep 17 00:00:00 2001 From: matthew harrison Date: Sun, 13 May 2018 08:43:10 -0400 Subject: [PATCH 8/8] new answers for proposed reference case --- ocean_only/dumbbell/common/MOM_input | 8 ++-- ocean_only/dumbbell/z/MOM_override | 2 +- ocean_only/dumbbell/z/MOM_parameter_doc.all | 45 ++++++++++++++----- ocean_only/dumbbell/z/MOM_parameter_doc.short | 28 +++++++++--- ocean_only/dumbbell/z_sub/MOM_override | 1 - .../dumbbell/z_sub/MOM_parameter_doc.all | 37 ++++++++++++--- .../dumbbell/z_sub/MOM_parameter_doc.short | 24 ++++++++-- 7 files changed, 113 insertions(+), 32 deletions(-) diff --git a/ocean_only/dumbbell/common/MOM_input b/ocean_only/dumbbell/common/MOM_input index 31796b9c..de1895bd 100644 --- a/ocean_only/dumbbell/common/MOM_input +++ b/ocean_only/dumbbell/common/MOM_input @@ -250,7 +250,7 @@ ETA_TOLERANCE = 1.0E-12 ! [m] default = 1.0E-09 ! tolerance for SSH is 4 times this value. The default ! is 0.5*NK*ANGSTROM, and this should not be set less x ! than about 10^-15*MAXIMUM_DEPTH. -CORIOLIS_SCHEME = "SADOURNY75_ENERGY" ! default = "SADOURNY75_ENERGY" +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" ! CORIOLIS_SCHEME selects the discretization for the ! Coriolis terms. Valid values are: ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. @@ -271,12 +271,12 @@ BOUND_CORIOLIS = True ! [Boolean] default = False ! CORIOLIS_SCHEME set to SADOURNY75_ENERGY. ! === module MOM_hor_visc === -LAPLACIAN = False ! [Boolean] default = False +LAPLACIAN = True ! [Boolean] default = False ! If true, use a Laplacian horizontal viscosity. BIHARMONIC = True ! [Boolean] default = True ! If true, se a biharmonic horizontal viscosity. ! BIHARMONIC may be used with LAPLACIAN. -KH_VEL_SCALE = 0.003 ! [m s-1] default = 0.0 +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 ! The velocity scale which is multiplied by the grid ! spacing to calculate the Laplacian viscosity. ! The final viscosity is the largest of this scaled @@ -463,7 +463,7 @@ DT_FORCING = 300.0 ! [s] default = 900.0 ! The time step for changing forcing, coupling with other ! components, or potentially writing certain diagnostics. ! The default value is given by DT. -DAYMAX = 5.0 ! [days] +DAYMAX = 10.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is diff --git a/ocean_only/dumbbell/z/MOM_override b/ocean_only/dumbbell/z/MOM_override index 5f2545b3..5603bb02 100644 --- a/ocean_only/dumbbell/z/MOM_override +++ b/ocean_only/dumbbell/z/MOM_override @@ -7,4 +7,4 @@ REMAPPING_SCHEME = "PPM_IH4" SPONGE = True SPONGE_CONFIG = "DUMBBELL" DUMBBELL_SPONGE_TIME_SCALE = 8.64e4 -! #override DAYMAX = 30. + diff --git a/ocean_only/dumbbell/z/MOM_parameter_doc.all b/ocean_only/dumbbell/z/MOM_parameter_doc.all index 9286aa45..fcc007b1 100644 --- a/ocean_only/dumbbell/z/MOM_parameter_doc.all +++ b/ocean_only/dumbbell/z/MOM_parameter_doc.all @@ -54,12 +54,12 @@ BATHYMETRY_AT_VEL = False ! [Boolean] default = False ! If true, there are separate values for the basin depths ! at velocity points. Otherwise the effects of topography ! are entirely determined from thickness points. -DT = 600.0 ! [s] +DT = 300.0 ! [s] ! The (baroclinic) dynamics time step. The time-step that ! is actually used will be an integer fraction of the ! forcing time-step (DT_FORCING in ocean-only mode or the ! coupling timestep in coupled mode.) -DT_THERM = 600.0 ! [s] default = 600.0 +DT_THERM = 300.0 ! [s] default = 300.0 ! The thermodynamic and tracer advection time step. ! Ideally DT_THERM should be an integer multiple of DT ! and less than the forcing or coupling time-step, unless @@ -839,7 +839,7 @@ CORIOLIS_EN_DIS = True ! [Boolean] default = False ! If true, two estimates of the thickness fluxes are used ! to estimate the Coriolis term, and the one that ! dissipates energy relative to the other one is used. -CORIOLIS_SCHEME = "SADOURNY75_ENERGY" ! default = "SADOURNY75_ENERGY" +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" ! CORIOLIS_SCHEME selects the discretization for the ! Coriolis terms. Valid values are: ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. @@ -851,9 +851,9 @@ CORIOLIS_SCHEME = "SADOURNY75_ENERGY" ! default = "SADOURNY75_ENERGY" BOUND_CORIOLIS = True ! [Boolean] default = False ! If true, the Coriolis terms at u-points are bounded by ! the four estimates of (f+rv)v from the four neighboring - ! v-points, and similarly at v-points. This option is - ! always effectively false with CORIOLIS_EN_DIS defined and - ! CORIOLIS_SCHEME set to SADOURNY75_ENERGY. + ! v-points, and similarly at v-points. This option would + ! have no effect on the SADOURNY Coriolis scheme if it + ! were possible to use centered difference thickness fluxes. KE_SCHEME = "KE_ARAKAWA" ! default = "KE_ARAKAWA" ! KE_SCHEME selects the discretization for acceleration ! due to the kinetic energy gradient. Valid values are: @@ -894,8 +894,33 @@ BOUNDARY_EXTRAPOLATION_PRESSURE = True ! [Boolean] default = True ! used as is used for the interior cells. ! === module MOM_hor_visc === -LAPLACIAN = False ! [Boolean] default = False +LAPLACIAN = True ! [Boolean] default = False ! If true, use a Laplacian horizontal viscosity. +KH = 0.0 ! [m2 s-1] default = 0.0 + ! The background Laplacian horizontal viscosity. +KH_BG_MIN = 0.0 ! [m2 s-1] default = 0.0 + ! The minimum value allowed for Laplacian horizontal viscosity, KH. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid + ! spacing to calculate the Laplacian viscosity. + ! The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. +KH_SIN_LAT = 0.0 ! [m2 s-1] default = 0.0 + ! The amplitude of a latidutinally-dependent background + ! viscosity of the form KH_SIN_LAT*(SIN(LAT)**KH_PWR_OF_SINE). +SMAGORINSKY_KH = False ! [Boolean] default = False + ! If true, use a Smagorinsky nonlinear eddy viscosity. +LEITH_KH = False ! [Boolean] default = False + ! If true, use a Leith nonlinear eddy viscosity. +MODIFIED_LEITH = False ! [Boolean] default = False + ! If true, add a term to Leith viscosity which is + ! proportional to the gradient of divergence. +BOUND_KH = True ! [Boolean] default = True + ! If true, the Laplacian coefficient is locally limited + ! to be stable. +BETTER_BOUND_KH = True ! [Boolean] default = True + ! If true, the Laplacian coefficient is locally limited + ! to be stable with a better bounding than just BOUND_KH. BIHARMONIC = True ! [Boolean] default = True ! If true, use a biharmonic horizontal viscosity. ! BIHARMONIC may be used with LAPLACIAN. @@ -918,7 +943,7 @@ BOUND_AH = True ! [Boolean] default = True BETTER_BOUND_AH = True ! [Boolean] default = True ! If true, the biharmonic coefficient is locally limited ! to be stable with a better bounding than just BOUND_AH. -SMAG_BI_CONST = 0.015 ! [nondim] default = 0.0 +SMAG_BI_CONST = 0.03 ! [nondim] default = 0.0 ! The nondimensional biharmonic Smagorinsky constant, ! typically 0.015 - 0.06. BOUND_CORIOLIS_BIHARM = True ! [Boolean] default = True @@ -1578,11 +1603,11 @@ LA_DEPTH_RATIO = 0.04 ! [nondim] default = 0.04 ! Lanmguir number calculation, where La = sqrt(ust/Stokes). ! === module MOM_main (MOM_driver) === -DT_FORCING = 600.0 ! [s] default = 600.0 +DT_FORCING = 300.0 ! [s] default = 300.0 ! The time step for changing forcing, coupling with other ! components, or potentially writing certain diagnostics. ! The default value is given by DT. -DAYMAX = 30.0 ! [days] +DAYMAX = 10.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is diff --git a/ocean_only/dumbbell/z/MOM_parameter_doc.short b/ocean_only/dumbbell/z/MOM_parameter_doc.short index 68c38a8d..bd12e7a5 100644 --- a/ocean_only/dumbbell/z/MOM_parameter_doc.short +++ b/ocean_only/dumbbell/z/MOM_parameter_doc.short @@ -4,7 +4,7 @@ USE_REGRIDDING = True ! [Boolean] default = False ! If True, use the ALE algorithm (regridding/remapping). ! If False, use the layered isopycnal algorithm. -DT = 600.0 ! [s] +DT = 300.0 ! [s] ! The (baroclinic) dynamics time step. The time-step that ! is actually used will be an integer fraction of the ! forcing time-step (DT_FORCING in ocean-only mode or the @@ -322,22 +322,38 @@ CORIOLIS_EN_DIS = True ! [Boolean] default = False ! If true, two estimates of the thickness fluxes are used ! to estimate the Coriolis term, and the one that ! dissipates energy relative to the other one is used. +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" + ! CORIOLIS_SCHEME selects the discretization for the + ! Coriolis terms. Valid values are: + ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. + ! ARAKAWA_HSU90 - Arakawa & Hsu, 1990 + ! SADOURNY75_ENSTRO - Sadourny, 1975; enstrophy cons. + ! ARAKAWA_LAMB81 - Arakawa & Lamb, 1981; En. + Enst. + ! ARAKAWA_LAMB_BLEND - A blend of Arakawa & Lamb with + ! Arakawa & Hsu and Sadourny energy BOUND_CORIOLIS = True ! [Boolean] default = False ! If true, the Coriolis terms at u-points are bounded by ! the four estimates of (f+rv)v from the four neighboring - ! v-points, and similarly at v-points. This option is - ! always effectively false with CORIOLIS_EN_DIS defined and - ! CORIOLIS_SCHEME set to SADOURNY75_ENERGY. + ! v-points, and similarly at v-points. This option would + ! have no effect on the SADOURNY Coriolis scheme if it + ! were possible to use centered difference thickness fluxes. ! === module MOM_PressureForce === ! === module MOM_PressureForce_AFV === ! === module MOM_hor_visc === +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid + ! spacing to calculate the Laplacian viscosity. + ! The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. SMAGORINSKY_AH = True ! [Boolean] default = False ! If true, use a biharmonic Smagorinsky nonlinear eddy ! viscosity. -SMAG_BI_CONST = 0.015 ! [nondim] default = 0.0 +SMAG_BI_CONST = 0.03 ! [nondim] default = 0.0 ! The nondimensional biharmonic Smagorinsky constant, ! typically 0.015 - 0.06. @@ -466,7 +482,7 @@ WIND_CONFIG = "zero" ! ! === module MOM_restart === ! === module MOM_main (MOM_driver) === -DAYMAX = 30.0 ! [days] +DAYMAX = 10.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is diff --git a/ocean_only/dumbbell/z_sub/MOM_override b/ocean_only/dumbbell/z_sub/MOM_override index 58c2afb9..36c80564 100644 --- a/ocean_only/dumbbell/z_sub/MOM_override +++ b/ocean_only/dumbbell/z_sub/MOM_override @@ -8,7 +8,6 @@ SPONGE = False SPONGE_CONFIG = "DUMBBELL" DUMBBELL_SPONGE_TIME_SCALE = 8.64e4 -!#override DAYMAX = 30. #override WESTLON = -100 #override LENLON = 200 #override NIGLOBAL = 40 diff --git a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all index c959a2cd..537eb712 100644 --- a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all +++ b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.all @@ -917,7 +917,7 @@ CORIOLIS_EN_DIS = True ! [Boolean] default = False ! If true, two estimates of the thickness fluxes are used ! to estimate the Coriolis term, and the one that ! dissipates energy relative to the other one is used. -CORIOLIS_SCHEME = "SADOURNY75_ENERGY" ! default = "SADOURNY75_ENERGY" +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" ! CORIOLIS_SCHEME selects the discretization for the ! Coriolis terms. Valid values are: ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. @@ -929,9 +929,9 @@ CORIOLIS_SCHEME = "SADOURNY75_ENERGY" ! default = "SADOURNY75_ENERGY" BOUND_CORIOLIS = True ! [Boolean] default = False ! If true, the Coriolis terms at u-points are bounded by ! the four estimates of (f+rv)v from the four neighboring - ! v-points, and similarly at v-points. This option is - ! always effectively false with CORIOLIS_EN_DIS defined and - ! CORIOLIS_SCHEME set to SADOURNY75_ENERGY. + ! v-points, and similarly at v-points. This option would + ! have no effect on the SADOURNY Coriolis scheme if it + ! were possible to use centered difference thickness fluxes. KE_SCHEME = "KE_ARAKAWA" ! default = "KE_ARAKAWA" ! KE_SCHEME selects the discretization for acceleration ! due to the kinetic energy gradient. Valid values are: @@ -972,8 +972,33 @@ BOUNDARY_EXTRAPOLATION_PRESSURE = True ! [Boolean] default = True ! used as is used for the interior cells. ! === module MOM_hor_visc === -LAPLACIAN = False ! [Boolean] default = False +LAPLACIAN = True ! [Boolean] default = False ! If true, use a Laplacian horizontal viscosity. +KH = 0.0 ! [m2 s-1] default = 0.0 + ! The background Laplacian horizontal viscosity. +KH_BG_MIN = 0.0 ! [m2 s-1] default = 0.0 + ! The minimum value allowed for Laplacian horizontal viscosity, KH. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid + ! spacing to calculate the Laplacian viscosity. + ! The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. +KH_SIN_LAT = 0.0 ! [m2 s-1] default = 0.0 + ! The amplitude of a latidutinally-dependent background + ! viscosity of the form KH_SIN_LAT*(SIN(LAT)**KH_PWR_OF_SINE). +SMAGORINSKY_KH = False ! [Boolean] default = False + ! If true, use a Smagorinsky nonlinear eddy viscosity. +LEITH_KH = False ! [Boolean] default = False + ! If true, use a Leith nonlinear eddy viscosity. +MODIFIED_LEITH = False ! [Boolean] default = False + ! If true, add a term to Leith viscosity which is + ! proportional to the gradient of divergence. +BOUND_KH = True ! [Boolean] default = True + ! If true, the Laplacian coefficient is locally limited + ! to be stable. +BETTER_BOUND_KH = True ! [Boolean] default = True + ! If true, the Laplacian coefficient is locally limited + ! to be stable with a better bounding than just BOUND_KH. BIHARMONIC = True ! [Boolean] default = True ! If true, use a biharmonic horizontal viscosity. ! BIHARMONIC may be used with LAPLACIAN. @@ -1660,7 +1685,7 @@ DT_FORCING = 300.0 ! [s] default = 300.0 ! The time step for changing forcing, coupling with other ! components, or potentially writing certain diagnostics. ! The default value is given by DT. -DAYMAX = 5.0 ! [days] +DAYMAX = 10.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is diff --git a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short index 696fef27..50cbf6a2 100644 --- a/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short +++ b/ocean_only/dumbbell/z_sub/MOM_parameter_doc.short @@ -323,18 +323,34 @@ CORIOLIS_EN_DIS = True ! [Boolean] default = False ! If true, two estimates of the thickness fluxes are used ! to estimate the Coriolis term, and the one that ! dissipates energy relative to the other one is used. +CORIOLIS_SCHEME = "SADOURNY75_ENSTRO" ! default = "SADOURNY75_ENERGY" + ! CORIOLIS_SCHEME selects the discretization for the + ! Coriolis terms. Valid values are: + ! SADOURNY75_ENERGY - Sadourny, 1975; energy cons. + ! ARAKAWA_HSU90 - Arakawa & Hsu, 1990 + ! SADOURNY75_ENSTRO - Sadourny, 1975; enstrophy cons. + ! ARAKAWA_LAMB81 - Arakawa & Lamb, 1981; En. + Enst. + ! ARAKAWA_LAMB_BLEND - A blend of Arakawa & Lamb with + ! Arakawa & Hsu and Sadourny energy BOUND_CORIOLIS = True ! [Boolean] default = False ! If true, the Coriolis terms at u-points are bounded by ! the four estimates of (f+rv)v from the four neighboring - ! v-points, and similarly at v-points. This option is - ! always effectively false with CORIOLIS_EN_DIS defined and - ! CORIOLIS_SCHEME set to SADOURNY75_ENERGY. + ! v-points, and similarly at v-points. This option would + ! have no effect on the SADOURNY Coriolis scheme if it + ! were possible to use centered difference thickness fluxes. ! === module MOM_PressureForce === ! === module MOM_PressureForce_AFV === ! === module MOM_hor_visc === +LAPLACIAN = True ! [Boolean] default = False + ! If true, use a Laplacian horizontal viscosity. +KH_VEL_SCALE = 0.01 ! [m s-1] default = 0.0 + ! The velocity scale which is multiplied by the grid + ! spacing to calculate the Laplacian viscosity. + ! The final viscosity is the largest of this scaled + ! viscosity, the Smagorinsky and Leith viscosities, and KH. SMAGORINSKY_AH = True ! [Boolean] default = False ! If true, use a biharmonic Smagorinsky nonlinear eddy ! viscosity. @@ -467,7 +483,7 @@ WIND_CONFIG = "zero" ! ! === module MOM_restart === ! === module MOM_main (MOM_driver) === -DAYMAX = 5.0 ! [days] +DAYMAX = 10.0 ! [days] ! The final time of the whole simulation, in units of ! TIMEUNIT seconds. This also sets the potential end ! time of the present run segment if the end time is