forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 81
+Add RHO_OCEAN_SAL #1172
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
Open
Hallberg-NOAA
wants to merge
1
commit into
NOAA-GFDL:dev/gfdl
Choose a base branch
from
Hallberg-NOAA:add_RHO_OCEAN_SAL
base: dev/gfdl
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+Add RHO_OCEAN_SAL #1172
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,6 +199,8 @@ subroutine SAL_init(h, tv, G, GV, US, param_file, CS, restart_CS) | |
| character(len=40) :: mdl = "MOM_self_attr_load" ! This module's name. | ||
| integer :: lmax ! Total modes of the real spherical harmonics [nondim] | ||
| real :: rhoE ! The average density of Earth [R ~> kg m-3]. | ||
| real :: rho_ocean_SAL ! The mean ocean density used for calculating the | ||
| ! self-attraction and loading [R ~> kg m-3] | ||
| character(len=20) :: bpa_config ! String for reference bottom pressure config option | ||
| real :: tmp(G%isd:G%ied, G%jsd:G%jed) ! Temporary field storing mass returned by find_col_mass | ||
| ! [R Z ~> kg m-2] | ||
|
|
@@ -305,8 +307,14 @@ subroutine SAL_init(h, tv, G, GV, US, param_file, CS, restart_CS) | |
| default=0, do_not_log=(.not. CS%use_sal_sht)) | ||
| call get_param(param_file, mdl, "RHO_SOLID_EARTH", rhoE, & | ||
| "The mean solid earth density. This is used for calculating the "// & | ||
| "self-attraction and loading term.", units="kg m-3", & | ||
| default=5517.0, scale=US%kg_m3_to_R, do_not_log=(.not. CS%use_sal_sht)) | ||
| "self-attraction and loading term.", & | ||
| units="kg m-3", default=5517.0, scale=US%kg_m3_to_R, & | ||
| do_not_log=(.not. CS%use_sal_sht)) | ||
| call get_param(param_file, mdl, "RHO_OCEAN_SAL", rho_ocean_SAL, & | ||
| "The mean ocean density used for calculating the self-attraction and loading.", & | ||
| units="kg m-3", default=US%R_to_kg_m3*GV%Rho0, scale=US%kg_m3_to_R, & | ||
| do_not_log=.not.(CS%use_sal_sht.or.CS%use_bpa)) | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an extra blank line. |
||
|
|
||
| ! Set scaling coefficients for scalar approximation | ||
| if (CS%use_sal_scalar .or. CS%use_tidal_sal_prev) then | ||
|
|
@@ -316,7 +324,7 @@ subroutine SAL_init(h, tv, G, GV, US, param_file, CS, restart_CS) | |
| CS%eta_prop = sal_scalar_value | ||
| endif | ||
| if (CS%use_bpa) then | ||
| CS%linear_scaling = CS%eta_prop / (GV%Rho0 * GV%g_Earth) | ||
| CS%linear_scaling = CS%eta_prop / (rho_ocean_SAL * GV%g_Earth) | ||
| else | ||
| CS%linear_scaling = CS%eta_prop | ||
| endif | ||
|
|
@@ -331,7 +339,7 @@ subroutine SAL_init(h, tv, G, GV, US, param_file, CS, restart_CS) | |
| allocate(CS%Snm_Im(lmax), source=0.0) | ||
|
|
||
| allocate(CS%Love_scaling(lmax), source=0.0) | ||
| call calc_love_scaling(GV%Rho0, rhoE, GV%g_Earth, CS) | ||
| call calc_love_scaling(rho_ocean_SAL, rhoE, GV%g_Earth, CS) | ||
|
|
||
| allocate(CS%sht) | ||
| call spherical_harmonics_init(G, param_file, CS%sht) | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?