-
Notifications
You must be signed in to change notification settings - Fork 181
WACCMX-MAGE 2-way coupling #1649
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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
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 |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ module dpie_coupling | |
| use perf_mod, only: t_startf, t_stopf | ||
| use amie_module, only: getamie | ||
| use ltr_module, only: getltr | ||
| use mage_module, only: mage_advance | ||
| use edyn_solve, only: phihm | ||
| use edyn_params, only: dtr, rtd | ||
| use aurora_params, only: prescribed_period ! turns on overwrite of energy fields in aurora phys | ||
|
|
@@ -119,7 +120,7 @@ subroutine d_pie_init( edyn_active_in, oplus_xport_in, oplus_nsplit_in, crit_col | |
| end subroutine d_pie_init | ||
|
|
||
| !----------------------------------------------------------------------- | ||
| subroutine d_pie_epotent( highlat_potential_model, crit_out, cols, cole, efx_phys, kev_phys, amie_in, ltr_in ) | ||
| subroutine d_pie_epotent( highlat_potential_model, crit_out, cols, cole, efx_phys, kev_phys, amie_in, ltr_in, mage_in ) | ||
| use edyn_solve, only: pfrac ! NH fraction of potential (nmlonp1,nmlat0) | ||
| use time_manager, only: get_curr_date | ||
| use heelis, only: heelis_model | ||
|
|
@@ -142,6 +143,7 @@ subroutine d_pie_epotent( highlat_potential_model, crit_out, cols, cole, efx_phy | |
| integer, optional, intent(in) :: cols, cole | ||
| logical, optional,intent(in) :: amie_in | ||
| logical, optional,intent(in) :: ltr_in | ||
| logical, optional,intent(in) :: mage_in | ||
|
|
||
| ! Prescribed energy flux | ||
| real(r8), optional, intent(out) :: efx_phys(:) | ||
|
|
@@ -151,7 +153,7 @@ subroutine d_pie_epotent( highlat_potential_model, crit_out, cols, cole, efx_phy | |
| ! | ||
| ! local vars | ||
| ! | ||
| logical :: amie_inputs, ltr_inputs | ||
| logical :: amie_inputs, ltr_inputs, mage_inputs | ||
|
|
||
| real(r8) :: secs ! time of day in seconds | ||
| integer :: iyear,imo,iday,tod ! tod is time-of-day in seconds | ||
|
|
@@ -202,10 +204,12 @@ subroutine d_pie_epotent( highlat_potential_model, crit_out, cols, cole, efx_phy | |
|
|
||
| amie_inputs=.false. | ||
| ltr_inputs=.false. | ||
| if (present(amie_in)) amie_inputs=amie_in | ||
| if (present(ltr_in)) ltr_inputs= ltr_in | ||
| mage_inputs=.false. | ||
| if (present(amie_in)) amie_inputs = amie_in | ||
| if (present(ltr_in)) ltr_inputs = ltr_in | ||
| if (present(mage_in)) mage_inputs = mage_in | ||
|
|
||
| prescribed_inputs: if (amie_inputs .or. ltr_inputs) then | ||
| prescribed_inputs: if (amie_inputs .or. ltr_inputs .or. mage_inputs) then | ||
|
|
||
| if (.not. (present(kev_phys).and.present(efx_phys)) ) then | ||
| call endrun('d_pie_epotent: kev_phys and efx_phys must be present') | ||
|
|
@@ -224,6 +228,14 @@ subroutine d_pie_epotent( highlat_potential_model, crit_out, cols, cole, efx_phy | |
| write(iulog,"('After Calling getamie >>> iamie = ', i2)") iamie | ||
| end if | ||
| prescribed_period = iamie == 1 | ||
| else if (mage_inputs) then | ||
|
Collaborator
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. This logic indicates that only one of amie_inputs or mage_inputs is used. Should there be a check during namelist setting to exit with an error if both are set to true? |
||
| if (masterproc) then | ||
| write(iulog,*) 'Calling mage_advance >>> ' | ||
| end if | ||
|
|
||
| call mage_advance( iyear, imo, iday, tod, & | ||
| prescr_phihm, prescr_efxm, prescr_kevm ) | ||
| prescribed_period = .TRUE. | ||
| else | ||
| if (masterproc) then | ||
| write(iulog,*) 'Calling getltr >>> ' | ||
|
|
||
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
Oops, something went wrong.
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.
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.
Is MAGE a welknown acronym, or should the namelist description give a little more information?