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

Fb 360 calendar #8

Merged
merged 15 commits into from
Jul 16, 2020
Merged

Fb 360 calendar #8

merged 15 commits into from
Jul 16, 2020

Conversation

ukmo-juan-castillo
Copy link

Ready to be reviewed, se ticket 209:

NOAA-EMC#209

@ukmo-ccbunney
Copy link
Member

Will also add @mickaelaccensi for external review (collaborator status pending)

Copy link

@ukmo-ansaulter ukmo-ansaulter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Juan,

I've added some comments in ww3_grid.ftn

Also, for your consideration:

  • A CAL360 option needs to be included in the ww3_grid.nml template file (I couldn't see this, only the .inp version)?
  • I'm unsure if the ww3_ts1 regtest, which is for source terms(?), is the best place to put this calendar test, or whether a dedicated new test would be better. @ukmo-ccbunney can you comment?

Cheers
Andy

model/ftn/ww3_grid.ftn Outdated Show resolved Hide resolved
model/ftn/ww3_grid.ftn Outdated Show resolved Hide resolved
@ukmo-juan-castillo
Copy link
Author

As a possible improvement, I would propose substituting the MISC namelist parameters CAL360 and NOLEAP by another one called CALENDAR, which only possible values would be 'standard' (default value), '360_day', or '365_day'.

The changes to the code needed for this implementation are straightforward. I checked that no changes in the regtest namelists will be needed.

Finally, there is no regtest available for the 365-day calendar, and it will possibly be a good idea adding it.

Waiting for your comments before taking any action.

@mickaelaccensi
Copy link
Collaborator

As a possible improvement, I would propose substituting the MISC namelist parameters CAL360 and NOLEAP by another one called CALENDAR, which only possible values would be 'standard' (default value), '360_day', or '365_day'.

The changes to the code needed for this implementation are straightforward. I checked that no changes in the regtest namelists will be needed.

Finally, there is no regtest available for the 365-day calendar, and it will possibly be a good idea adding it.

Waiting for your comments before taking any action.

I fully agree with your idea. It will be much more clear to have a dedicated namelist instead of putting everything in MISC. also a dedicated regtest is a great idea

parameters by CALTYPE; add regtest for 365_day calendat (although the
location of this test is still to be decided)
Copy link
Member

@ukmo-ccbunney ukmo-ccbunney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if the ww3_ts1 regtest, which is for source terms(?), is the best place to put this calendar test, or whether a dedicated new test would be better. @ukmo-ccbunney can you comment?

I wonder if a new single grid cell regtest would be more appropriate, rather than adding to ww3_ts1?

It only needs to test the dates are correct, so maybe we could utilise the "dry run" mode to turn off all source term integration and propagation?

Copy link
Member

@ukmo-ccbunney ukmo-ccbunney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHARACTER(LEN=10), PARAMETER, PRIVATE :: VERGRD = '2020-04-15'

As you have modified the format of the moddef.ww3 file, this version tag will need updating.

@ukmo-juan-castillo
Copy link
Author

The change requested regarding the version of mod_def has been addressed, and as requested new ww3_tc1 regtests have been created to test the new calendars.

Waiting for new revision.

Copy link
Member

@ukmo-ccbunney ukmo-ccbunney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ukmo-juan-castillo I think we should be able to put the 360day and 365_day calendar tests into a single input directory in ww3_tc1. You can then differentiate between them by using the -g flag in run_test. What do you think?

EDIT: Equally, using the -i flag works as well, but the -g allows us to avoid duplicating a few files. Admittedly, there is not a lot of saving.

@ukmo-ccbunney ukmo-ccbunney added the enhancement New feature or request label Jul 14, 2020
@ukmo-juan-castillo
Copy link
Author

The problem is that, as far as I understand, the -g flag allows you to specify the ww3_grid.inp file, but there is no flag for a different ww3_shel.inp file (and ww3_ounf.inp), which is needed because the dates of the run are different.

@ukmo-ccbunney
Copy link
Member

The problem is that, as far as I understand, the -g flag allows you to specify the ww3_grid.inp file, but there is no flag for a different ww3_shel.inp file (and ww3_ounf.inp), which is needed because the dates of the run are different.

Ah - OK, I understand the issue now.
In that case, I wonder if we should be very explicit about the naming convention and rename input to input_CAL365?

input could have been the test for the "default" calendar, but I assume that you consider testing the default option pointless, as all the other regtests will use the default anyhow?

@ukmo-juan-castillo
Copy link
Author

This should be the definitive version, where the regtests have been simplified so that the tests for all the possible calendars are contained in one single input directory. The results of the tests are as expected.

Copy link
Collaborator

@mickaelaccensi mickaelaccensi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this nice work and clean up! I approve

Copy link

@ukmo-ansaulter ukmo-ansaulter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks Juan

Copy link
Member

@ukmo-ccbunney ukmo-ccbunney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks Juan.

@ukmo-ccbunney
Copy link
Member

@ukmo-juan-castillo - one last task before I can merge:
Please can change the target branch from develop to staging.
Thanks.

@ukmo-juan-castillo ukmo-juan-castillo changed the base branch from develop to staging July 16, 2020 10:51
@ukmo-ccbunney ukmo-ccbunney merged commit 303b3a9 into staging Jul 16, 2020
ukmo-ccbunney pushed a commit that referenced this pull request Jul 22, 2020
Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket NOAA-EMC#209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.
@ukmo-juan-castillo ukmo-juan-castillo deleted the fb_360_calendar branch August 3, 2020 08:20
ukmo-ccbunney added a commit that referenced this pull request Aug 18, 2020
* Added boundary checks to the SMC grid input files for ww3_grid,
to ensure they comply with the limits of the nameslist.

* Fb 360 calendar (#8)

Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket NOAA-EMC#209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.

* RTD support for ww3_boun[dc] (#10)

* Updated ww3_bound and ww3_bounc to handle model grids formulated on a rotated pole.
* Manual and nml/inp files to updated clarify that ww3_bound/ww3_bounc only accept input spectra formulated on a standard pole grid.

* Fb coupling time (#9)

Updates to allow a coupling time step that is different from the model time step. 
* Includes new regtest (in ww3_tp2.14) for non-default oasis time step.
* ww3_tp2.14 regtest added to matrix.base.

* bug fix for ukmet development

Co-authored-by: lewis.sampson <[email protected]>
Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]>
Co-authored-by: Chris Bunney <[email protected]>
aliabdolali added a commit to NOAA-EMC/WW3 that referenced this pull request Oct 20, 2020
* Added boundary checks to the SMC grid input files for ww3_grid,
to ensure they comply with the limits of the nameslist.

* Fb 360 calendar (#8)

Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket #209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.

* RTD support for ww3_boun[dc] (#10)

* Updated ww3_bound and ww3_bounc to handle model grids formulated on a rotated pole.
* Manual and nml/inp files to updated clarify that ww3_bound/ww3_bounc only accept input spectra formulated on a standard pole grid.

* Fb coupling time (#9)

Updates to allow a coupling time step that is different from the model time step. 
* Includes new regtest (in ww3_tp2.14) for non-default oasis time step.
* ww3_tp2.14 regtest added to matrix.base.

* bug fix for ukmet development

* see issue #245

this is a bug introduced with the last PR from UKMO
ukmo-waves#8: 360 day climate calendar

in ww3_trnc.ftn
END CASE
should be replaced by
END SELECT

Co-authored-by: lewis.sampson <[email protected]>
Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]>
Co-authored-by: Chris Bunney <[email protected]>
ukmo-ccbunney added a commit that referenced this pull request Jan 15, 2021
* Added boundary checks to the SMC grid input files for ww3_grid,
to ensure they comply with the limits of the nameslist.

* Fb 360 calendar (#8)

Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket NOAA-EMC#209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.

* RTD support for ww3_boun[dc] (#10)

* Updated ww3_bound and ww3_bounc to handle model grids formulated on a rotated pole.
* Manual and nml/inp files to updated clarify that ww3_bound/ww3_bounc only accept input spectra formulated on a standard pole grid.

* Fb coupling time (#9)

Updates to allow a coupling time step that is different from the model time step. 
* Includes new regtest (in ww3_tp2.14) for non-default oasis time step.
* ww3_tp2.14 regtest added to matrix.base.

* bug fix for ukmet development

* Updating develop with a change to allow code build using non-standard NetCDF libraries using alphabetical characters in their version name.

Co-authored-by: lewis.sampson <[email protected]>
Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]>
Co-authored-by: Chris Bunney <[email protected]>
Co-authored-by: Ali Abdolali <[email protected]>
ukmo-ccbunney added a commit that referenced this pull request Apr 1, 2021
* Added boundary checks to the SMC grid input files for ww3_grid,
to ensure they comply with the limits of the nameslist.

* Fb 360 calendar (#8)

Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket NOAA-EMC#209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.

* RTD support for ww3_boun[dc] (#10)

* Updated ww3_bound and ww3_bounc to handle model grids formulated on a rotated pole.
* Manual and nml/inp files to updated clarify that ww3_bound/ww3_bounc only accept input spectra formulated on a standard pole grid.

* Fb coupling time (#9)

Updates to allow a coupling time step that is different from the model time step. 
* Includes new regtest (in ww3_tp2.14) for non-default oasis time step.
* ww3_tp2.14 regtest added to matrix.base.

* bug fix for ukmet development

* Periodicity fix for global unstructured grids

 - Corrects calculation of element areas and edge lengths across the
   dateline in w3triamd.ftn

 - Fixes calculation to determine whether a point is inside an element
   that spans the dateline in w3triamd.ftn

 - Corrects calculation of element centers and corners across dateline
   in wmscrpmd.ftn

 - Write out SCRIP file in netCDF format at the end of ww3_grid
   (for creating offline remaping files). This required adding netCDF support
   to ww3_grid

 - Also includes minor fix for the /O7a switch in w3iopomd.ftn

* modify the model/ftn/w3triamd.ftn and model/ftn/wmscrpmd.ftn and change from global grids from min(longitude)=-180, max(longitude)=180 to \delta(longitude)=360 degrees and added the regression test ww3_tp2.21

* bug fix for ww3_grid make without SCRIP switch

* Fix for corner node periodicity in wmscrpmd.ftn

* PDLIB/yowpdlibmain.ftn: fix to handle global meshes

* bug fix for SCRIPNC switch

* update info for ww3_tp2.21 for domain decomposition and PDLIB option

* fix for mww3_04 link with SCRIP and SCRIPNC switch

* add inputs to tar file, update model/bin/ww3_from_ftp.sh and remove inputs from ww3_tp2.21

* reduce the duration of ww3_tp2.21 for the sake of regtest time

* small editorial fixes

* fixes for SCRIPNC switch

* change date for ww3_ounf and ww3_ounp for ww3_tp2.21

* edit w3_make

Co-authored-by: lewis.sampson <[email protected]>
Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]>
Co-authored-by: Chris Bunney <[email protected]>
Co-authored-by: Ali Abdolali <[email protected]>
Co-authored-by: Steven Brus <[email protected]>
Co-authored-by: Steven Brus <[email protected]>
Co-authored-by: Lorenzo Mentaschi <[email protected]>
ukmo-ccbunney added a commit that referenced this pull request Apr 1, 2021
* Added boundary checks to the SMC grid input files for ww3_grid,
to ensure they comply with the limits of the nameslist.

* Fb 360 calendar (#8)

Changes to add support to 360-day and 365-day (no leap year) calendar - see ticket NOAA-EMC#209
  * Additional CALTYPE namelist parameter in MISC section
  * New ww3_tc1 regtest.

* RTD support for ww3_boun[dc] (#10)

* Updated ww3_bound and ww3_bounc to handle model grids formulated on a rotated pole.
* Manual and nml/inp files to updated clarify that ww3_bound/ww3_bounc only accept input spectra formulated on a standard pole grid.

* Fb coupling time (#9)

Updates to allow a coupling time step that is different from the model time step. 
* Includes new regtest (in ww3_tp2.14) for non-default oasis time step.
* ww3_tp2.14 regtest added to matrix.base.

* bug fix for ukmet development

* add the matrix subsetter

* clean-up

* clean up

* add another script which separate serial and parallel jobs and divide them

* modify the script to remove ../model? after test completion.

* bug fixes and adding ww3_tp2.17 to list_heavy

* add if statement to remove matrix? and model?

* Update matrix_divider_p.sh

* Merge remote-tracking branch 'upstream/develop' into fb_matrix_divider

* Merge remote-tracking branch 'upstream/develop' into fb_matrix_divider

* put if check for ../model? inside matrix? loop

* fix the bug for sed for model?

* final fix for extra model? removal

* add 2.21 to the list_heavy

Co-authored-by: lewis.sampson <[email protected]>
Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]>
Co-authored-by: Chris Bunney <[email protected]>
Co-authored-by: Ali Abdolali <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants