Add Spectral Nudging Option and Fix Nudging Behavior When Files Are Missing#1402
Add Spectral Nudging Option and Fix Nudging Behavior When Files Are Missing#1402patcal wants to merge 1 commit intoESCOMP:cam_developmentfrom
Conversation
fvitt
left a comment
There was a problem hiding this comment.
Some initial questions and comments. Do you have a test case for spectral nudging that you can point me to? I can implement a regression test case.
|
|
||
| logical :: Nudge_SpectralFilter =.false. | ||
| integer :: Nudge_SpectralNtrunc = -1 | ||
| integer :: Nudge_SpectralNbasis = -1 |
There was a problem hiding this comment.
I am not seeing where Nudge_SpectralNbasis gets sets. Is it always -1?
| write(iulog,*) 'NUDGING: WARNING - analyses file NOT FOUND. You can switch nudging ' | ||
| write(iulog,*) 'NUDGING: OFF to coast thru a known gap in your files ' | ||
| write(iulog,*) 'NUDGING: by commenting out the following endrun command.' | ||
| endif | ||
| call endrun('nudging_timestep_init:: ERROR Missing Nudging File') |
There was a problem hiding this comment.
Should a namelist switch to turn on / off the abort behavior? I agree that aborting the run should be the default behavior.
| !======================================================================= | ||
|
|
||
| !======================================================================= | ||
| ! legacy spherepack routines |
There was a problem hiding this comment.
As far as I can tell, these spherepack routines are duplicates of the spherepack routines in zonal_mean_mod.F90. If so, the spherepack routines in zonal_mean_mod should be removed and zonal_mean_mod should use the routines here.
|
|
||
|
|
||
| !======================================================================= | ||
| subroutine Invert_Matrix(I_Mat,Nbas,O_InvMat) |
There was a problem hiding this comment.
This looks like a duplicate of Invert_Matrix in zonal_mean_mod
|
|
||
| ! Type definitions | ||
| !------------------- | ||
| type SphericalHarmonic_t |
There was a problem hiding this comment.
Could the existing ZonalMean class be replaced by "special" use of this SphericalHarmonic class (m=0)?
This pull request addresses issues #1393 and #1273
For Issue #1273 an error exit with a message is invoked if a missing nudging file is encountered.
For Issue #1393 a module for computing spherical harmonics on the physics grid is implemented. The nudging module has additional functionality that uses this module to optionally filter nudging tendencies to scales larger then a specified truncation scale.
This functionality is controlled by 2 additional variables in the &nudging_nl namelist.
Nudge_SpectralFilter- LOGICAL Option to apply spherical harminic filtering to
the model state and target data so that nudging
tendencies are only applied to scales larger than
the specified truncation.
Nudge_SpectralNtrunc - INT The number of meridional spherical harmonic modes used
for spectral filtering. The nominal horizontal scale of
the filtering can be estimated as: