@@ -4,7 +4,7 @@ module cvmix_put_get
44! \newpage
55! !MODULE: cvmix_put_get
66!
7- ! !AUTHOR:
7+ ! !AUTHOR:
88! Michael N. Levy, NCAR ([email protected] )99!
1010! !DESCRIPTION:
@@ -57,7 +57,7 @@ subroutine cvmix_put_int(CVmix_vars, varname, val, nlev_in)
5757!\\
5858
5959! !USES:
60- ! Only those used by entire module.
60+ ! Only those used by entire module.
6161
6262! !INPUT PARAMETERS:
6363 character (len=* ), intent (in ) :: varname
@@ -72,7 +72,7 @@ subroutine cvmix_put_int(CVmix_vars, varname, val, nlev_in)
7272
7373 ! Local variables
7474 integer :: nlev
75-
75+
7676 if (present (nlev_in)) then
7777 nlev = nlev_in
7878 else
@@ -85,7 +85,7 @@ subroutine cvmix_put_int(CVmix_vars, varname, val, nlev_in)
8585 print * , " You tried to set " , trim (varname)
8686 stop 1
8787 end if
88-
88+
8989 select case (trim (cvmix_att_name(varname)))
9090 case (' nlev' )
9191 CVmix_vars% nlev = val
@@ -118,7 +118,7 @@ subroutine cvmix_put_real(CVmix_vars, varname, val, nlev_in)
118118!\\
119119
120120! !USES:
121- ! Only those used by entire module.
121+ ! Only those used by entire module.
122122
123123! !INPUT PARAMETERS:
124124 character (len=* ), intent (in ) :: varname
@@ -132,7 +132,7 @@ subroutine cvmix_put_real(CVmix_vars, varname, val, nlev_in)
132132
133133 ! Local variables
134134 integer :: nlev
135-
135+
136136 if (present (nlev_in)) then
137137 nlev = nlev_in
138138 else
@@ -145,7 +145,7 @@ subroutine cvmix_put_real(CVmix_vars, varname, val, nlev_in)
145145 print * , " You tried to set " , trim (varname)
146146 stop 1
147147 end if
148-
148+
149149 select case (trim (cvmix_att_name(varname)))
150150 case (' OceanDepth' )
151151 CVmix_vars% OceanDepth = val
@@ -170,10 +170,12 @@ subroutine cvmix_put_real(CVmix_vars, varname, val, nlev_in)
170170 CVmix_vars% LangmuirEnhancementFactor = val
171171 case (" SurfaceStokesDrift" )
172172 CVmix_vars% SurfaceStokesDrift = val
173+ case (' SimmonsCoeff' )
174+ CVmix_vars% SimmonsCoeff = val
173175
174176 case (" dzw" )
175- print * , " WARNING: you are setting the cell midpoint to midpoint" , &
176- " distance in all levels to a constant value"
177+ ! print*, "WARNING: you are setting the cell midpoint to midpoint ", &
178+ ! "distance in all levels to a constant value"
177179 if (.not. associated (CVmix_vars% dzw)) then
178180 allocate (CVmix_vars% dzw(nlev+1 ))
179181 end if
@@ -194,15 +196,15 @@ subroutine cvmix_put_real(CVmix_vars, varname, val, nlev_in)
194196 end if
195197 CVmix_vars% Sdiff_iface(:) = val
196198 case (" ShearRichardson_iface" )
197- print * , " WARNING: you are setting the Richardson number in all" , &
198- " levels to a constant value"
199+ ! print*, "WARNING: you are setting the Richardson number in all ", &
200+ ! "levels to a constant value"
199201 if (.not. associated (CVmix_vars% ShearRichardson_iface)) then
200202 allocate (CVmix_vars% ShearRichardson_iface(nlev+1 ))
201203 end if
202204 CVmix_vars% ShearRichardson_iface(:) = val
203205 case (" SqrBuoyancyFreq_iface" )
204- print * , " WARNING: you are setting the buoyancy in all levels to a" , &
205- " constant value"
206+ ! print*, "WARNING: you are setting the buoyancy in all levels to a ", &
207+ ! "constant value"
206208 if (.not. associated (CVmix_vars% SqrBuoyancyFreq_iface)) then
207209 allocate (CVmix_vars% SqrBuoyancyFreq_iface(nlev+1 ))
208210 end if
@@ -228,52 +230,57 @@ subroutine cvmix_put_real(CVmix_vars, varname, val, nlev_in)
228230 CVmix_vars% kpp_Snonlocal_iface(:) = val
229231
230232 case (" dzt" )
231- print * , " WARNING: you are setting the cell thickness in all levels" , &
232- " to a constant value"
233+ ! print*, "WARNING: you are setting the cell thickness in all levels ", &
234+ ! "to a constant value"
233235 if (.not. associated (CVmix_vars% dzt)) then
234236 allocate (CVmix_vars% dzt(nlev))
235237 end if
236238 CVmix_vars% dzt(:) = val
237239 case (" WaterDensity_cntr" )
238- print * , " WARNING: you are setting the density in all levels to a" , &
239- " constant value"
240+ ! print*, "WARNING: you are setting the density in all levels to a ", &
241+ ! "constant value"
240242 if (.not. associated (CVmix_vars% WaterDensity_cntr)) then
241243 allocate (CVmix_vars% WaterDensity_cntr(nlev))
242244 end if
243245 CVmix_vars% WaterDensity_cntr(:) = val
244246 case (" AdiabWaterDensity_cntr" )
245- print * , " WARNING: you are setting the adiabatic density in all" , &
246- " levels to a constant value"
247+ ! print*, "WARNING: you are setting the adiabatic density in all ", &
248+ ! "levels to a constant value"
247249 if (.not. associated (CVmix_vars% AdiabWaterDensity_cntr)) then
248250 allocate (CVmix_vars% AdiabWaterDensity_cntr(nlev))
249251 end if
250252 CVmix_vars% AdiabWaterDensity_cntr(:) = val
251253 case (" BulkRichardson_cntr" )
252- print * , " WARNING: you are setting the bulk Richardson number in all" , &
253- " levels to a constant value"
254+ ! print*, "WARNING: you are setting the bulk Richardson number in all", &
255+ ! " levels to a constant value"
254256 if (.not. associated (CVmix_vars% BulkRichardson_cntr)) then
255257 allocate (CVmix_vars% BulkRichardson_cntr(nlev))
256258 end if
257259 CVmix_vars% BulkRichardson_cntr(:) = val
258260 case (' strat_param_num' )
259- print * , " WARNING: you are setting the numerator of the" , &
260- " stratification parameter in all levels to a constant value"
261+ ! print*, "WARNING: you are setting the numerator of the ", &
262+ ! "stratification parameter in all levels to a constant value"
261263 if (.not. associated (CVmix_vars% strat_param_num)) then
262264 allocate (CVmix_vars% strat_param_num(nlev))
263265 end if
264266 CVmix_vars% strat_param_num(:) = val
265267 case (' strat_param_denom' )
266- print * , " WARNING: you are setting the denominator of the" , &
267- " stratification parameter in all levels to a constant value"
268+ ! print*, "WARNING: you are setting the denominator of the ", &
269+ ! "stratification parameter in all levels to a constant value"
268270 if (.not. associated (CVmix_vars% strat_param_denom)) then
269271 allocate (CVmix_vars% strat_param_denom(nlev))
270272 end if
271273 CVmix_vars% strat_param_denom(:) = val
274+ case (" VertDep_iface" )
275+ if (.not. associated (CVmix_vars% VertDep_iface)) then
276+ allocate (CVmix_vars% VertDep_iface(nlev+1 ))
277+ end if
278+ CVmix_vars% VertDep_iface(:) = val
272279
273280 case default
274- print * , " ERROR: " , trim (varname), " not a valid choice!"
281+ print * , " ERROR: " , trim (varname), " not a valid choice for cvmix_put !"
275282 stop 1
276-
283+
277284 end select
278285! EOC
279286
@@ -292,7 +299,7 @@ subroutine cvmix_put_real_1D(CVmix_vars, varname, val, nlev_in)
292299!\\
293300
294301! !USES:
295- ! Only those used by entire module.
302+ ! Only those used by entire module.
296303
297304! !INPUT PARAMETERS:
298305 character (len=* ), intent (in ) :: varname
@@ -306,7 +313,7 @@ subroutine cvmix_put_real_1D(CVmix_vars, varname, val, nlev_in)
306313
307314 ! Local variables
308315 integer :: nlev
309-
316+
310317 if (present (nlev_in)) then
311318 nlev = nlev_in
312319 else
@@ -319,7 +326,7 @@ subroutine cvmix_put_real_1D(CVmix_vars, varname, val, nlev_in)
319326 print * , " You tried to set " , trim (varname)
320327 stop 1
321328 end if
322-
329+
323330 select case (trim (cvmix_att_name(varname)))
324331 case (" zw_iface" )
325332 if (.not. associated (CVmix_vars% zw_iface)) then
@@ -375,7 +382,11 @@ subroutine cvmix_put_real_1D(CVmix_vars, varname, val, nlev_in)
375382 allocate (CVmix_vars% kpp_Snonlocal_iface(nlev+1 ))
376383 end if
377384 CVmix_vars% kpp_Snonlocal_iface(:) = val
378-
385+ case (" VertDep_iface" )
386+ if (.not. associated (CVmix_vars% VertDep_iface)) then
387+ allocate (CVmix_vars% VertDep_iface(nlev+1 ))
388+ end if
389+ CVmix_vars% VertDep_iface(:) = val
379390 case (" zt_cntr" )
380391 if (.not. associated (CVmix_vars% zt_cntr)) then
381392 allocate (CVmix_vars% zt_cntr(nlev))
@@ -423,9 +434,9 @@ subroutine cvmix_put_real_1D(CVmix_vars, varname, val, nlev_in)
423434 CVmix_vars% Vy_cntr(:) = val
424435
425436 case default
426- print * , " ERROR: " , trim (varname), " not a valid choice!"
437+ print * , " ERROR: " , trim (varname), " not a valid choice for cvmix_put !"
427438 stop 1
428-
439+
429440 end select
430441
431442! EOC
@@ -445,7 +456,7 @@ subroutine cvmix_put_global_params_int(CVmix_params, varname, val)
445456!\\
446457
447458! !USES:
448- ! Only those used by entire module.
459+ ! Only those used by entire module.
449460
450461! !INPUT PARAMETERS:
451462 character (len=* ), intent (in ) :: varname
@@ -459,11 +470,11 @@ subroutine cvmix_put_global_params_int(CVmix_params, varname, val)
459470 select case (trim (varname))
460471 case (' max_nlev' )
461472 CVmix_params% max_nlev = val
462-
473+
463474 case default
464475 print * , " ERROR: " , trim (varname), " not a valid choice!"
465476 stop 1
466-
477+
467478 end select
468479! EOC
469480
@@ -482,7 +493,7 @@ subroutine cvmix_put_global_params_real(CVmix_params, varname, val)
482493!\\
483494
484495! !USES:
485- ! Only those used by entire module.
496+ ! Only those used by entire module.
486497
487498! !INPUT PARAMETERS:
488499 character (len=* ), intent (in ) :: varname
@@ -494,17 +505,17 @@ subroutine cvmix_put_global_params_real(CVmix_params, varname, val)
494505! BOC
495506
496507 select case (trim (varname))
497- case (' prandtl' )
508+ case (' prandtl' , ' Prandtl ' )
498509 CVmix_params% prandtl = val
499510 case (' fw_rho' ,' FreshWaterDensity' )
500511 CVmix_params% FreshWaterDensity = val
501512 case (' sw_rho' ,' SaltWaterDensity' )
502513 CVmix_params% SaltWaterDensity= val
503-
514+
504515 case default
505516 print * , " ERROR: " , trim (varname), " not a valid choice!"
506517 stop 1
507-
518+
508519 end select
509520! EOC
510521
0 commit comments