-
Notifications
You must be signed in to change notification settings - Fork 194
[PULL REQUEST] Add co2 run #582
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
Changes from 13 commits
7515c06
e6e2ebd
83d328c
cd488b8
8086fe4
a9f305e
2f675c7
f358e6a
3502d06
a62f440
32c723f
81a3a0e
5891c0a
b1076ea
d298d16
4c0a282
48919c2
e34e0eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -423,10 +423,25 @@ SUBROUTINE HCOI_GC_Init( Input_Opt, State_Chm, State_Grid, & | |
| ! Set misc. parameter | ||
| !======================================================================= | ||
|
|
||
| #ifdef ADJOINT | ||
| if ( Input_Opt%amIRoot ) WRITE(*,*) 'Setting isAdjoint to ', Input_Opt%is_adjoint | ||
| HcoState%isAdjoint = Input_opt%is_adjoint | ||
| ! if ( .not. HcoState%isAdjoint ) THEN | ||
| #endif | ||
| ! Emission, chemistry and dynamics timestep in seconds | ||
| HcoState%TS_EMIS = GET_TS_EMIS() | ||
| HcoState%TS_CHEM = GET_TS_CHEM() | ||
| HcoState%TS_DYN = GET_TS_DYN() | ||
| ! #ifdef ADJOINT | ||
| ! else | ||
| ! ! Emission, chemistry and dynamics timestep in seconds | ||
| ! HcoState%TS_EMIS = -GET_TS_EMIS() | ||
| ! HcoState%TS_CHEM = -GET_TS_CHEM() | ||
| ! HcoState%TS_DYN = -GET_TS_DYN() | ||
| ! ! Look into whether we want to change the sign in the body of GET_TS_*() | ||
| ! endif | ||
| ! #endif | ||
|
|
||
|
Contributor
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. Keep this even though it is commented out? |
||
|
|
||
| ! Is this an ESMF simulation or not? | ||
| ! The ESMF flag must be set before calling HCO_Init because the | ||
|
|
@@ -1180,6 +1195,7 @@ SUBROUTINE HCOI_GC_WriteDiagn( Input_Opt, Restart, RC ) | |
|
|
||
| USE Time_Mod, ONLY : Get_Year, Get_Month, Get_Day, GET_DAY_OF_YEAR | ||
| USE Time_Mod, ONLY : GET_HOUR, GET_MINUTE, GET_SECOND | ||
| USE MAPL_CommsMod, ONLY : MAPL_AM_I_ROOT | ||
|
Contributor
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 will need to be in a MAPL ifdef so that GC-Classic does not execute it |
||
| ! | ||
| ! !INPUT/OUTPUT PARAMETERS: | ||
| ! | ||
|
|
@@ -1252,7 +1268,7 @@ SUBROUTINE HCOI_GC_WriteDiagn( Input_Opt, Restart, RC ) | |
| ! Write diagnostics | ||
| !----------------------------------------------------------------------- | ||
| CALL HcoDiagn_Write( HcoState, RESTART, HMRC ) | ||
|
|
||
| IF ( Mapl_am_i_root() ) WRITE(*,*) "Back from HcoDiagn_Write, RC = ", HMRC | ||
| ! Trap potential errors | ||
| IF ( HMRC /= HCO_SUCCESS ) THEN | ||
| RC = HMRC | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5600,6 +5600,19 @@ SUBROUTINE CHECK_TIME_STEPS( Input_Opt, State_Grid, RC) | |
| TS_DYN = Input_Opt%TS_DYN | ||
| TS_RAD = Input_Opt%TS_RAD | ||
|
|
||
| ! If we're doing the reverse integration | ||
| ! multiply all the timesteps by -1 here | ||
| if (TS_DYN < 0) THEN | ||
| ! TS_DYN and TS_CHEM should always be set to something valid...? | ||
| TS_DYN = TS_DYN * -1 | ||
| TS_CHEM = TS_CHEM * -1 | ||
| if (LTURB .or. LCONV) TS_CONV = TS_CONV * -1 | ||
| if (LEMIS .or. LDRYD) TS_EMIS = TS_EMIS * -1 | ||
| ! I'm not sure which flag determins radiation on/off? | ||
| if (LCHEM) TS_RAD = TS_RAD * -1 | ||
| endif | ||
|
|
||
|
|
||
|
Contributor
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. For GC-Classic to build and run I needed to change this section to this:
Contributor
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. Otherwise this looks good to go. If you could just push the update I will go ahead and merge. Thanks for your work on this! |
||
| ! NUNIT is time step in minutes for unit conversion | ||
| TS_UNIT = -1 | ||
|
|
||
|
|
||
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.
Do you need this commented out?
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.
Ah, yes. I commented this out because if I don't, I get:
when I run cmake
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.
@LiamBindle has helped me fix this so it's uncommented plus the lines that include the library to avoid the error