Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling population of individual namelist parameters #1355

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions control_file_gen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@
my $outputWindDrag = $p->{metControl}->{outputWindDrag} eq "yes" ? "T" : "F";
my $invertedBarometerOnElevationBoundary = $p->{metControl}->{invertedBarometerOnElevationBoundary} eq "yes" ? "T" : "F";
my $met_control_line ="&metControl WindDragLimit=$p->{metControl}->{WindDragLimit}, DragLawString=\"$p->{metControl}->{DragLawString}\", outputWindDrag=$outputWindDrag, invertedBarometerOnElevationBoundary=$invertedBarometerOnElevationBoundary /";

#
# construct wetDryControl namelist
# &wetDryControl outputNodeCode=logicalValue, outputNOFF=logicalValue, noffActive=logicalValue
Expand Down Expand Up @@ -619,6 +620,26 @@
s/%wetdry_control_namelist%/$wetdry_control_line/;
s/%inundation_output_control_namelist%/$inundation_output_control_line/;
s/%dynamic_water_level_correction_namelist%/$dynamic_water_level_correction_line/;
# individual namelist parameters
s/%WindDragLimit%/$p->{metControl}->{WindDragLimit}/; # &metControl
s/%DragLawString%/\"$p->{metControl}->{DragLawString}\"/;
s/%outputWindDrag%/$outputWindDrag/;
s/%invertedBarometerOnElevationBoundary%/$invertedBarometerOnElevationBoundary/;
s/%outputNodeCode%/$outputNodeCode/; # &wetDryControl
s/%outputNOFF%/$outputNOFF/;
s/%noffActive%/$noffActive/;
s/%slim%/$p->{wetDryControl}->{slim}/;
s/%windlim%/$windlim/;
s/%directvelWD%/$directvelWD/;
s/%useHF%/$useHF/;
s/%inundationOutput%/$inundationOutput/; # &inundationOutputControl
s/%inunThresh%/$p->{inundationOutputControl}->{inunThresh}/;
s/%SWAN_OutputTPS%/$SWAN_OutputTPS/; # &SWANOutputControl
s/%SWAN_OutputTM01%/$SWAN_OutputTM01/;
s/%SWAN_OutputHS%/$SWAN_OutputHS/;
s/%SWAN_OutputDIR%/$SWAN_OutputDIR/;
s/%SWAN_OutputTMM10%/$SWAN_OutputTMM10/;
s/%SWAN_OutputTM02%/$SWAN_OutputTM02/;
#
unless (/NO LINE HERE/) {
print $_;
Expand Down
6 changes: 2 additions & 4 deletions input/meshes/SABv20a/SABv20a.15.ASGS2024.1.template
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,5 @@ K2
%CSYEAR%-%CSMONTH%-%CSDAY% %CSHOUR%:00:00%NCDATE-Line%
!
! namelists:
%met_control_namelist%
%wetdry_control_namelist%
%inundation_output_control_namelist%
%dynamic_water_level_correction_namelist%
&inundationOutputControl inundationOutput=%inundationOutput% /
&metControl WindDragLimit=%WindDragLimit% DragLawString=%DragLawString% /
6 changes: 2 additions & 4 deletions input/meshes/hsofs/hsofs-parameters.15.template
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,5 @@ K2
%CSYEAR%-%CSMONTH%-%CSDAY% %CSHOUR%:00:00%NCDATE-Line%
!
! namelists:
%met_control_namelist%
%wetdry_control_namelist%
%inundation_output_control_namelist%
%dynamic_water_level_correction_namelist%
&inundationOutputControl inundationOutput=%inundationOutput% /
&metControl WindDragLimit=%WindDragLimit% /