Skip to content

Warn users when projection is inappropriate for GWD_OPT=1#208

Closed
davegill wants to merge 7 commits intowrf-model:masterfrom
davegill:GWD_OPT_BULLETS
Closed

Warn users when projection is inappropriate for GWD_OPT=1#208
davegill wants to merge 7 commits intowrf-model:masterfrom
davegill:GWD_OPT_BULLETS

Conversation

@davegill
Copy link
Contributor

@davegill davegill commented Mar 24, 2017

TYPE: new feature

KEYWORDS: gwd_opt, projection

SOURCE: internal

DESCRIPTION OF CHANGES:

Assume that the user is trying to use gravity wave drag (GWD), gwd_opt=1 in the ARW model. For domain 1, if the projection has a large rotation angle anywhere within the domain ("rotation" is directly from the sina variable in the WRF input and output, and "large" means greater than a default value of 22.5 degrees), notify the user and stop. The original GWD data has information at 45 degree angles. Therefore anything larger than a 22.5 degree projection rotation (usually only violated in parts of the domain) means that the wind components are using the wrong topographic directional information.

For the determined user, the namelist variable max_rot_angle_gwd = 100 (really, anything greater than 90) will always permit GWD to be used, regardless of the projection.

How to estimate that the domain will or will not work within the 22.5 degree restriction:

  1. Only be concerned with d01
  2. If the pole is in the domain AND this is not a global projection - the domain will not work
  3. Look at the SINALPHA field from metgrid (SINA field from wrfinput). SIN(22.5) = 0.38. If the SINALPHA or SINA fields have values greater than 0.38, the WRF model will gracefully stop
  4. A regular lat/lon or a Mercator projection will always work

LIST OF MODIFIED FILES:

M dyn_em/start_em.F

TESTS CONDUCTED:

  • Reggie 3.07, passed
  • Test GSD RAP domain - it does not allow gwd_opt=1
Max projection rotation angle for domain 1 = 90.00
This projection may not be appropriate for using the gravity wave drag option.
In namelist.input make one of the two following changes:
 1) gwd_opt = 0
 2) max_rot_angle_gwd > 90.00
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:     196
--- ERROR: gwd_opt does not work with this domain
-------------------------------------------

For a domain above the pole, to use gwd_opt=1 NO MATTER WHAT:

&dynamics
 gwd_opt                             = 1
 max_rot_angle_gwd                   = 100
/

TYPE: new feature

KEYWORDS: gwd_opt, projection

SOURCE: internal

DESCRIPTION OF CHANGES:
In the WRF model for domain 1, if the projection has a large sinalpha (where it is larger than a default value), notify the user and stop.

LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list)
M       dyn_em/start_em.F

TESTS CONDUCTED:
- [ ] Reggie 3.07, checked means that is has been run
@davegill
Copy link
Contributor Author

swap the degrees for the sin of the variable that is max allowed

@davegill
Copy link
Contributor Author

ask Jimy for a reasonable value

@dudhia
Copy link
Collaborator

dudhia commented Mar 24, 2017 via email

Set value to 22.5 degrees as max (half of 45 degrees), original data at 45 degree directions
END DO
END DO
#if ( defined(DM_PARALLEL) && ! defined(STUBMPI) )
max_sa = wrf_dm_max_real ( max_sa )
Copy link
Contributor

Choose a reason for hiding this comment

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

max_sa? Do you mean max_rot_angle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jamiebresch
My test was serial, so I never saw this compiler oops
Thanks

@davegill
Copy link
Contributor Author

I ran this branch 4 times through the WTF v3.07. Each time it failed serial PGI for all of ARW. No compiler errors. I merged it to the repo top, and it passed. I am proposing the merged version #213

@davegill davegill closed this Mar 26, 2017
davegill added a commit that referenced this pull request Mar 31, 2017
TYPE: new feature

KEYWORDS: gwd_opt, projection

SOURCE: internal

DESCRIPTION OF CHANGES:

This PR supersedes PR #208, which was closed.

Assume that the user is trying to use gravity wave drag (GWD), gwd_opt=1, in the ARW model. For domain 1, if the projection has a large rotation angle anywhere within the domain ("rotation" is directly from the sina variable in the WRF input and output, and "large" means greater than a default value of 22.5o), notify the user and stop. The original GWD data has information at four directions, each separated by 45o angles. Therefore anything larger than a 22.5o projection rotation (usually only violated in parts of the domain) means that the wind components are using the wrong topographic directional information.

For the determined user, the namelist variable max_rot_angle_gwd = 100 (really, anything greater than 90o) will always permit GWD to be used, regardless of the projection.

How to estimate that the domain will or will not work within the 22.5o restriction:

Only be concerned with d01
If the pole is in the domain AND this is not a global projection - the domain will not work
Look at the SINALPHA field from metgrid (SINA field from wrfinput). SIN(22.5o) = 0.38. If the SINALPHA (or SINA) field has values greater than 0.38, the WRF model will gracefully stop. Internal to the code, if the projection angle > 22.5o, the model stops.
A regular lat/lon or a Mercator projection will always work
LIST OF MODIFIED FILES:

M dyn_em/start_em.F
M Registry/Registry.EM_COMMON

TESTS CONDUCTED:

 Reggie 3.07, passed
 Test GSD RAP domain - it does not allow gwd_opt=1
Max projection rotation angle for domain 1 = 90.00
This projection may not be appropriate for using the gravity wave drag option.
In namelist.input make one of the two following changes:
 1) gwd_opt = 0
 2) max_rot_angle_gwd > 90.00
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:     196
--- ERROR: gwd_opt does not work with this domain
-------------------------------------------
For a domain above the pole, to use gwd_opt=1 NO MATTER WHAT:

&dynamics
 gwd_opt                             = 1
 max_rot_angle_gwd                   = 100
/
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.

3 participants