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 uprstr inp #15

Merged
merged 3 commits into from
Oct 7, 2020
Merged

Fb uprstr inp #15

merged 3 commits into from
Oct 7, 2020

Conversation

ukmo-ansaulter
Copy link

Updates to input read and output logs for ww3_uprstr

See NOAA repo issue: NOAA-EMC#255

Updated regtest ww3_ta1 ww3_uprstr.inp files

Bugfix for UPD0F case

Make ww3_uprstr write out .inp values

Bugfix ww3_uprstr format statements

Additional bugfix to ww3_uprstr write to output file

Bugfix to UPD2/3_CAP regtest files
Bugfixes for nml in ww3_uprstr

Bugfix w3nmluprstrmd.ftn

Further bugfix for w3nmluprstrmd.ftn

Another bugfix for ww3_uprstr

Add missing ENDIF statement in ww3_uprstr.ftn

Adding namelist option to selected ww3_ta1 regtests

Updated comments for ww3_uprstr and nml program
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-ansaulter : Looks ok - I've just got a few comments.

model/ftn/ww3_uprstr.ftn Show resolved Hide resolved
Comment on lines +898 to +899
!/SMC IXW = IY
!/SMC IYW = IX
Copy link
Member

Choose a reason for hiding this comment

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

And the same here.

Copy link
Author

Choose a reason for hiding this comment

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

See previous reply - a comment has been added

regtests/bin/matrix.base Show resolved Hide resolved
! open namelist log file
NDSN = 3
OPEN (NDSN, file=TRIM(INFILE)//'.log', form='formatted', iostat=IERR)
IF (IERR.NE.0) THEN

Choose a reason for hiding this comment

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

Does this indent before 'If' need to be removed? (Unlikely to make any difference to code, but just an aesthetic change.)

Copy link
Author

Choose a reason for hiding this comment

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

Agreed and done!

Copy link

@UKMO-lsampson UKMO-lsampson left a comment

Choose a reason for hiding this comment

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

Everything looks good, just some comments similar to Chris', and making sure the reason for changes is understood.

model/ftn/ww3_uprstr.ftn Show resolved Hide resolved
regtests/bin/matrix.base Show resolved Hide resolved
$ Name of the file with the SWH analysis from the DA system $
$ suffix .grbtxt for text out of grib2 file. $
$
1.333
Copy link

@UKMO-lsampson UKMO-lsampson Oct 6, 2020

Choose a reason for hiding this comment

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

The PRCNTG_CAP value has changed, I assume this is to be inline with the new limit "should not be less than 1.0". Why has a limit been introduced?

Copy link
Author

Choose a reason for hiding this comment

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

That's correct. PRCNTG_CAP is used to set an upper limit as 1.0*PRCNTG_CAP and lower limit as 1.0/PRCNTG_CAP in the subroutine CHECK_PRCNTG in ww3_uprstr.ftn

Using this method, setting PRCNTG_CAP less than 1 would give us the opposite behaviour to what is desired (i.e. max < 1, min > 1). This condition was described in a previous revision, but only just spotted that these regtests hadn't been correctly updated

Copy link
Author

Choose a reason for hiding this comment

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

Have now added a warning statement if the value of PRCNTG_CAP passed to CHECK_PRCNTG is less than 1

Choose a reason for hiding this comment

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

I hadn't noticed that it was also used for the lower limit, and it makes sense that it would give the opposite behaviour to what is wanted. All seems good to me.

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.

glad to see namelist feature in uprstr program 👍

@ukmo-ansaulter
Copy link
Author

@ukmo-ccbunney I've pushed up the new commit with review corrections now :-)

@ukmo-ccbunney ukmo-ccbunney merged commit 35e6831 into staging_oct20 Oct 7, 2020
ukmo-ccbunney pushed a commit that referenced this pull request Oct 28, 2020
Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file
ukmo-ccbunney added a commit that referenced this pull request Nov 5, 2020
* Fb oasis t+0 (#13)

In the original code a coupling lag had to be used, coupling took place at the last time step but not at the first, and the coupling fields had to be written in an oasis restart file. With this ticket, the program can run in a different way by not using a coupling lag, coupling taking place at the first time step but not the last, and the coupling fields are written in the wave restart file - no extra oasis restart file needed.

* Fb uprstr inp (#15)

Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file

* Bf unconforming where in coupling routines (#17)

* Fix non-conforming WHERE statements in coupled routines
* Stop comparing history lines in OASIS rmp files

* Changes for efficient SMC grid coupling (#16)

* Changes for efficient SMC grid coupling
* Ensure consistency between SMC coupled test nml and inp files

Co-authored-by: Juan Manuel Castillo Sanchez <48921434+ukmo-juan-castillo@users.noreply.github.com>
Co-authored-by: Andy Saulter <48921142+ukmo-ansaulter@users.noreply.github.com>
@ukmo-ccbunney ukmo-ccbunney deleted the fb_uprstr_inp branch February 24, 2021 12:34
ukmo-ccbunney added a commit that referenced this pull request May 19, 2021
This PR adds new fields that can be sent (mean wave number, mean wave period, total ocean wind stress) and received (air density, wind stress) to/from other models via OASIS coupling, which will also be available in the model output. The fields that can be received via coupling can also be read from an external file, and using a homogeneous ice fraction is now activated when using '.inp' input files, as it was already possible to do it using '.nml' input files. In order to add this functionality it was necessary to modify the format of the ww3_shel.inp and ww3_multi.inp files, so that new flags controlling if these fields are used can be read. Furthermore, the format of the ww3_outf.inp file must be modified to accommodate the new output fields available.

If no air density is read from file or via coupling, the default constant value is used. The infrastructure to read and use the wind stress is already in place, but the actual use of wind stress to drive the model is not implemented yet and it will be the aim of issue NOAA-EMC#337

* Fb oasis t+0 (#13)

In the original code a coupling lag had to be used, coupling took place at the last time step but not at the first, and the coupling fields had to be written in an oasis restart file. With this ticket, the program can run in a different way by not using a coupling lag, coupling taking place at the first time step but not the last, and the coupling fields are written in the wave restart file - no extra oasis restart file needed.

* Fb uprstr inp (#15)

Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file

* First set of changes, still testing

* Some fixes

* Further changes mainly fixing vector boundaries

* Main changes

* Most changes already present, only need to write in output and restart

* Further changes - activate coupling

* Bug fixes to make the code compile

* Further changes to run regtests

* Minor fixes for output, manual, and switches

* Small fix to comments in model input

* Remove some lines that had to be removed but were overlooked

* Substitute ATTX and ATXX switches by WNTX and WNXX; add comments
regarding last modification date

* Change in file missed in latest commit

* Minor changes fixing version change

* Small fixes after reviewer's comments and to fix regtest

* Changes to pass regtests

* Addition of a new regtest and small fixes to ww3_prnc

* Time-interpolate air density when read from file

* Ensure that units are consistent

* Restore long name in metadata for new fieds, and update code version for
input files needed in regtest

* Update last modification date; corrections for new output field: WNMEAN
has now index (2,19) instead of (2,18)

* Fixes from Jessica Meixner; update date of last change in restart file

* Small fix to the format of the example input file ww3_multi.inp

* Some fixes after merging with latest version of develop

* Correct one version number

* Fix the header of the table printed in log.ww3, should not cause changes
in the output

* Minor fix in the ww3_shel.inp file of one of the regtests

* Update ww3_shel.inp

* Some fixes and improvements that were proposed during the review process

* Added comment to the new regtests implemented in ww3_tp2.15

Co-authored-by: Andy Saulter <48921142+ukmo-ansaulter@users.noreply.github.com>
Co-authored-by: ukmo-chris.bunney <christopher.bunney@metoffice.gov.uk>
Co-authored-by: Ali.Abdolali <37336972+aliabdolali@users.noreply.github.com>
Co-authored-by: aliabdolali <ali.abdolali@noaa.gov>
Co-authored-by: Chris Bunney <48915820+ukmo-ccbunney@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants