diff --git a/.gitmodules b/.gitmodules index 710f790..09504a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,6 @@ [submodule "WW3"] path = WW3 -url = https://github.com/ESCOMP/WW3.git -fxtag = dev/unified_0.1.0 +url = https://github.com/NorESMhub/WW3.git +fxtag = dev/unified_0.1.0_noresm_v0 fxrequired = AlwaysRequired -fxDONOTUSEurl = https://github.com/ESCOMP/WW3.git - +fxDONOTUSEurl = https://github.com/NorESMhub/WW3.git diff --git a/README.md b/README.md index 743d835..fbcce98 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # WW3_interface -This repository encapsulates the newest CESM WaveWatch III repository (forked from NOAA-EMC) and acts as an interface between WW3 and CESM. +This repository encapsulates the newest NorESM WaveWatch III repository (forked from NOAA-EMC) and acts as an interface between WW3 and NorESM. diff --git a/WW3 b/WW3 index cc6f1a3..f373cec 160000 --- a/WW3 +++ b/WW3 @@ -1 +1 @@ -Subproject commit cc6f1a35661d0285eb8c6f7c36dcfe4c9bf9505f +Subproject commit f373cecfa6f8a9effa94e5b3aebf07c7223f749b diff --git a/cime_config/buildnml b/cime_config/buildnml index b9cf573..7bf078f 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -81,27 +81,19 @@ def _create_namelists(case, confdir, namelist_infile, nmlgen, data_list_path): else: nmlgen.set_value("initfile", "") - # error check + # error check dtcpl = basedt / int(ncpl) dtmax = int(float(nmlgen.get_value('dtmax'))) if dtcpl%dtmax != 0: expect(False, 'dtcpl {} is not a multiple of dtmax {}'.format(dtcpl,dtmax)) - nmlgen.set_value("domain_percent_start", f"{start_date} {start_tod}") - - nmlgen.set_value("date_percent_field_percent_start" , f"{start_date} {start_tod}") - nmlgen.set_value("date_percent_restart_percent_start", f"{start_date} {start_tod}") - - nmlgen.set_value("date_percent_field_percent_stride" , f"{dtime_sync}") - nmlgen.set_value("date_percent_restart_percent_stride", f"{dtime_sync}") - # write diagnostic info logger.debug("ww3 initial conditions file is %s", nmlgen.get_value("initfile")) namelist_file = os.path.join(confdir, "wav_in") - nmlgen.write_output_file(namelist_file, data_list_path, - groups=["domain_nml","input_nml","output_type_nml","output_date_nml","ww3_inparm"], + nmlgen.write_output_file(namelist_file, data_list_path, + groups=["input_nml","output_type_nml","ww3_inparm"], sorted_groups=False) from pathlib import Path @@ -196,7 +188,7 @@ def buildnml(case, caseroot, compname): shutil.copy2(file1, file2) _prestage_inputs(case) - + ############################################################################### def _prestage_inputs(case): ############################################################################### @@ -228,7 +220,7 @@ def _prestage_inputs(case): for filename in files: if not os.path.isfile(os.path.join(output_dir, filename)): safe_copy(os.path.join(input_dir, filename), os.path.join(output_dir, filename)) - + # Create mod_def file using ww3_grid and the grid_input files if not os.path.isfile(os.path.join(output_dir,"ww3_grid")): logger.warning("ww3_grid file not found. The mod_def.ww3 file will be created after the build phase.") @@ -245,12 +237,12 @@ def _prestage_inputs(case): shutil.move(os.path.join(output_dir,"mod_def.ww3"), os.path.join(rundir, "mod_def.ww3")) else: - # Use mod_def already created + # Use mod_def already created mod_def_in = case.get_value("WW3_MODDEF") if os.path.isfile(mod_def_in): import filecmp copy_file = False - if not os.path.isfile(os.path.join(rundir, "mod_def.ww3")): + if not os.path.isfile(os.path.join(rundir, "mod_def.ww3")): copy_file = True elif not filecmp.cmp(mod_def_in, os.path.join(rundir, "mod_def.ww3")): copy_file = True @@ -258,7 +250,7 @@ def _prestage_inputs(case): shutil.copy(mod_def_in, os.path.join(rundir, "mod_def.ww3")) else: raise RuntimeError("mod_def_in {} does not exist on disk".format(mod_def_in)) - + ############################################################################### def _main_func(): ############################################################################### diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 2019866..7528e25 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -46,7 +46,7 @@ case_comp env_build.xml mod_def file to use. The value depends on the switches, if you have an unstructured mesh and the - wave propoagation scheme. Note that this file is renamed to mod_def.ww3 in the run directory. + wave propagation scheme. Note that this file is renamed to mod_def.ww3 in the run directory. diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 00e6c6c..1990581 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -4,15 +4,15 @@ Each compset node is associated with the following elements - - lname - - alias + - lname + - alias - support (optional description of the support level for this compset) Each compset node can also have the following attributes - grid (optional regular expression match for grid to work with the compset) - WW3test + WW3test 2000_DATM%NYF_SLND_SICE_SOCN_SROF_SGLC_WW3 diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml index 1be9473..f0490e8 100644 --- a/cime_config/config_pes.xml +++ b/cime_config/config_pes.xml @@ -1,43 +1,118 @@ - + none - 256 - 256 - 256 - 256 - 256 + 256 + 256 + 256 + 256 + 256 256 - 256 - 256 + 256 + 256 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + none + + -8 + -8 + -8 + -8 + -8 + -8 + -8 + -8 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + none + + -4 + -4 + -4 + -4 + -4 + -4 + -4 + -4 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + diff --git a/cime_config/namelist_definition_ww3.xml b/cime_config/namelist_definition_ww3.xml index 3a9cfac..83624e5 100644 --- a/cime_config/namelist_definition_ww3.xml +++ b/cime_config/namelist_definition_ww3.xml @@ -33,18 +33,13 @@ ww3_inparm setup - "" - "" - "calm_strt.ww3" - "calm_strt.ww3" - ' ' - ' ' - $DIN_LOC_ROOT/wav/ww3/wtnx1v4.restart.ww3.230308 - $DIN_LOC_ROOT/wav/ww3/wtnx1v4.restart.ww3.230308 + "" + "" Initial condition file. This is set in ww buildnml from refacase and refdate for branch runs + For initial runs assume calm data - or point to a netcdf restart file. @@ -217,39 +212,6 @@ Minimum dynamic time step for source - - - char - domain_nml - setup - - unset - - - - char - domain_nml - setup - - '99990101 0' - - - - - integer - domain_nml - setup - - WW3 restart/output I/O type. 0 = no dedicated output process, each process - writes its own data (requires a parallel file system); 1 = no dedicated - output process, gather to a single writer (any file system); 2 = single - dedicated output process; 3 = multiple dedicated output processes. - - - 1 - - - char input_nml @@ -392,9 +354,10 @@ output_type_nml setup - WND ICE HS T02 T0M1 T01 FP DIR EF USS TOC + WND ICE HS T02 T0M1 T01 FP DP DIR EF USS TOC PHS PDIR PT01 PTM10 + char output_type_nml @@ -404,86 +367,37 @@ - - char - output_date_nml - setup - - 1 - - - - char - output_date_nml - setup - - unset - - - - char - output_date_nml - setup - - unset - - - + char - output_date_nml - setup - - 99990101 0 - - - - - char - output_date_nml - setup - - unset - - - - char - output_date_nml - setup - - unset - - - - char - output_date_nml - setup + time + ww3_inparm + never,nseconds,nhours,ndays,nmonths,nyears,monthly,yearly,end + + ww3 history output option (used with history_n) + history_option alarms are: + [never], turns option off + [nseconds] , history snapshot every history_n nseconds, relative to current run start time + [nhours] , history snapshot every history_n nhours , relative to current run start time + [ndays] , history snapshot every history_n ndays , relative to current run start time + [monthly] , history snapshot every month , relative to current run start time + [nmonths] , history snapshot every history_n nmonths , relative to current run start time + [yearly] , history snapshot every year , relative to current run start time + [end] , history snapshot at end + - 99990101 0 + never - - char - output_date_nml - setup - - 99990101 0 - - - - char - output_date_nml - setup - - 0 - - - - char - output_date_nml - setup + + integer + time + ww3_inparm + + sets history file frequency + - 99990101 0 + 1 diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml new file mode 100644 index 0000000..d95914f --- /dev/null +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -0,0 +1,30 @@ + + + + + + + diff --git a/cime_config/testdefs/testlist_ww3.xml b/cime_config/testdefs/testlist_ww3.xml index 95bdbb1..49dac36 100644 --- a/cime_config/testdefs/testlist_ww3.xml +++ b/cime_config/testdefs/testlist_ww3.xml @@ -1,5 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15,7 +94,7 @@ - + diff --git a/cime_config/testdefs/testmods_dirs/ww3/wav_24h_avg/user_nl_cpl b/cime_config/testdefs/testmods_dirs/ww3/wav_24h_avg/user_nl_cpl new file mode 100644 index 0000000..f19259a --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/ww3/wav_24h_avg/user_nl_cpl @@ -0,0 +1 @@ +histaux_wav2med_file1_ntperfile = 1 \ No newline at end of file diff --git a/cime_config/user_nl_ww3 b/cime_config/user_nl_ww3 index 57f8111..da3f612 100644 --- a/cime_config/user_nl_ww3 +++ b/cime_config/user_nl_ww3 @@ -11,22 +11,21 @@ ! ! input_percent_forcing_percent_water_levels=> input%forcing%water_levels ! input_percent_forcing_percent_currents => input%forcing%currents -! input_percent_forcing_percent_winds => input%forcing%winds +! input_percent_forcing_percent_winds => input%forcing%winds ! input_percent_forcing_percent_ice_conc => input%forcing%ice_conc ! input_percent_forcing_percent_ice_param1 => input%forcing%ice_param1 +! input_percent_forcing_percent_ice_param1 => input%forcing%ice_param2 +! input_percent_forcing_percent_ice_param1 => input%forcing%ice_param3 +! input_percent_forcing_percent_ice_param1 => input%forcing%ice_param4 ! input_percent_forcing_percent_ice_param5 => input%forcing%ice_param5 +! input_percent_forcing_percent_ice_param5 => input%forcing%atm_momentum +! input_percent_forcing_percent_ice_param5 => input%forcing%air_density +! input_percent_forcing_percent_ice_param5 => input%forcing%mud_momentum +! +! input_percent_assim_percent_mean => input%assim%mean +! input_percent_assim_percent_spec1d => input%assim%spec1d +! input_percent_assim_percent_spec2d => input%assim%spec2d ! ! type_percent_field_percent_list => type%field%list ! type_percent_point_percent_file => type%point%file -! -! date_percent_field_percent_outffile => date%field%outffile -! date_percent_field_percent_start => date%field%start -! date_percent_field_percent_stride => date%field%stride -! date_percent_field_percent_stop => date%field%stop -! date_percent_restart_percent_start => date%restart%start -! date_percent_restart_percent_stride => date%restart%stride -! date_percent_restart_percent_stop => date%restart%stop -! date_percent_restart2_percent_start => date%restart2%start -! date_percent_restart2_percent_strid => date%restart2%stride -! date_percent_restart2_percent_stop => date%restart2%stop !----------------------------------------------------------------------------------