Skip to content

Commit 2df6568

Browse files
authored
nws8 support and other additions to namelist to Make_f15 (#317)
* adding nws8 namelist for switchin to CLE15 vortex model and other options * adding a forward slash final line to ensure namelist is correctly identified * combining the velwd and limit into the wetdry namelist as per the current official adcirc version * changelog for namelist changes and additions
1 parent 0750c62 commit 2df6568

File tree

3 files changed

+50
-16
lines changed

3 files changed

+50
-16
lines changed

@msh/private/writefort15.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
fprintf( fid, '%s = "%s",\n',f15dat.controllist(k).var(m).name,val);
345345
end
346346
end
347+
fprintf( fid, '/ ! -- End %s Control Namelist -- \n', f15dat.controllist(k).type ) ;
347348
end
348349

349350
fclose(fid) ;

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
178178
## Fixed
179179
- User inputted edge constraints are now saved when no weirs are being constrained during mesh generation.
180180
## Added
181-
- Added a check in `Read_shapefile.m` to handle, warn, and correct cases where there are empty objects in a shapefile. https://github.com/CHLNDDEV/OceanMesh2D/pull/315
181+
- Check in `Read_shapefile.m` to handle, warn, and correct cases where there are empty objects in a shapefile. https://github.com/CHLNDDEV/OceanMesh2D/pull/315
182+
- `nws8` namelist for switching to CLE15 vortex model and option vortex model options implemented into a developement branch (https://github.com/adcirc/adcirc/pull/393) of ADCIRC. https://github.com/CHLNDDEV/OceanMesh2D/pull/317
183+
## Changed
184+
- Combine `limit` and `velwd` namelists into `wetdry` namelist to match ADCIRC release code. https://github.com/CHLNDDEV/OceanMesh2D/pull/317
182185
183186
### [6.0.0] - 2024-02-28
184187
## Added

utilities/Make_f15.m

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
% https://wiki.adcirc.org/Supplemental_meteorological/wave/ice_parameters
6060
%
6161
% 'namelist' : cell/string list of namelists to add from the following:
62-
% {'met', 'dynamicWaterLevelCorrection', 'limit', 'velwd','swanoutput'}
62+
% {'met', 'dynamicWaterLevelCorrection', 'wetdry','swanoutput','nws8'}
6363
% https://wiki.adcirc.org/Fort.15_file_format#Namelists
6464
%
6565
% Outputs: 1) msh class obj with f15 struct populated
@@ -392,21 +392,28 @@
392392
obj.f15.controllist(ci).var(6).name = [obj.f15.controllist(ci).type 'SkipSnaps'];
393393
obj.f15.controllist(ci).var(6).val = 0;
394394
end
395-
if find(contains(namelists,'limit'),1)
395+
if find(contains(namelists,'wetdry'),1)
396396
ci = ci + 1;
397-
% limit control
398-
obj.f15.controllist(ci).type = 'limit';
399-
obj.f15.controllist(ci).var(1).name = 'slim';
400-
obj.f15.controllist(ci).var(1).val = 4e-4;
401-
obj.f15.controllist(ci).var(2).name = 'windlim';
402-
obj.f15.controllist(ci).var(2).val = true;
403-
end
404-
if find(contains(namelists,'velwd'),1)
405-
ci = ci + 1;
406-
% wetdry velocity control
407-
obj.f15.controllist(ci).type = 'velwd';
408-
obj.f15.controllist(ci).var(1).name = 'directvelWD';
409-
obj.f15.controllist(ci).var(1).val = true;
397+
% wetdry control
398+
obj.f15.controllist(ci).type = 'wetDry';
399+
obj.f15.controllist(ci).var(1).name = 'outputNodeCode';
400+
obj.f15.controllist(ci).var(1).val = false;
401+
obj.f15.controllist(ci).var(2).name = 'outputNOFF';
402+
obj.f15.controllist(ci).var(2).val = false;
403+
obj.f15.controllist(ci).var(3).name = 'noffActive';
404+
obj.f15.controllist(ci).var(3).val = true;
405+
obj.f15.controllist(ci).var(4).name = 'StatPartWetFix';
406+
obj.f15.controllist(ci).var(4).val = false;
407+
obj.f15.controllist(ci).var(5).name = 'How2FixStatPartWet';
408+
obj.f15.controllist(ci).var(5).val = 0;
409+
obj.f15.controllist(ci).var(6).name = 'slim';
410+
obj.f15.controllist(ci).var(6).val = 1e9;
411+
obj.f15.controllist(ci).var(7).name = 'windLim';
412+
obj.f15.controllist(ci).var(7).val = false;
413+
obj.f15.controllist(ci).var(8).name = 'directvelWD';
414+
obj.f15.controllist(ci).var(8).val = false;
415+
obj.f15.controllist(ci).var(9).name = 'useHF';
416+
obj.f15.controllist(ci).var(9).val = false;
410417
end
411418
if find(contains(namelists,'swanoutput'),1)
412419
% SWAN output
@@ -418,6 +425,29 @@
418425
obj.f15.controllist(ci).var(vv).val = vv <= 3;
419426
end
420427
end
428+
if find(contains(namelists,'nws8'),1)
429+
% NWS8
430+
ci = ci + 1;
431+
obj.f15.controllist(ci).type = 'nws8';
432+
obj.f15.controllist(ci).var(1).name = 'vortexModel';
433+
obj.f15.controllist(ci).var(1).val = 'Holland';
434+
obj.f15.controllist(ci).var(2).name = 'backgroundWindModel';
435+
obj.f15.controllist(ci).var(2).val = 'radialVelocityWeighted';
436+
obj.f15.controllist(ci).var(3).name = 'BCalc';
437+
obj.f15.controllist(ci).var(3).val = 'limited';
438+
obj.f15.controllist(ci).var(4).name = 'thetaLatDep';
439+
obj.f15.controllist(ci).var(4).val = false;
440+
obj.f15.controllist(ci).var(5).name = 'useInflow';
441+
obj.f15.controllist(ci).var(5).val = false;
442+
obj.f15.controllist(ci).var(6).name = 'windspeed_averaging_minute';
443+
obj.f15.controllist(ci).var(6).val = 1;
444+
obj.f15.controllist(ci).var(7).name = 'w_cool';
445+
obj.f15.controllist(ci).var(7).val = 2.0;
446+
obj.f15.controllist(ci).var(8).name = 'CkCd_calc';
447+
obj.f15.controllist(ci).var(8).val = false;
448+
obj.f15.controllist(ci).var(9).name = 'CkCd';
449+
obj.f15.controllist(ci).var(9).val = 1.0;
450+
end
421451
end
422452

423453
end

0 commit comments

Comments
 (0)