-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add MEGAN2 BVOC emission process #111
base: develop
Are you sure you want to change the base?
Conversation
…TChem into feature/catchem_begins
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.
Just a few initial comments so far.
@lwcugb could you address the compiler warnings associated with your changes? Let me know if you have questions.
@zmoon Do you mean the warning below? I am not sure how it happens. Could you help me get rid of it? CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. |
Not that one, we can address that later, it's not related to your PR. I was talking about the warnings from the compiler: For example with gfortran-11
|
Oh ok. It seems to have some unused variables. I can clean them. But I guess we should keep the unused 'chemstate' and 'diagstate' for future use? |
If it's something you are reasonably sure may be used in the future, you can comment the declaration out instead of fully removing it (but still remove it from arguments if necessary to resolve the warning). And if you have "equality comparison for real" warning, you can use the |
53ad0f7
to
12d57c6
Compare
12d57c6
to
1bda156
Compare
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.
Thanks for addressing the warnings!
@bbakernoaa The historical accumulation function is added with the new commit and saved to DiagState. I think it is better to be saved to restart files if we have that functionality created in the future. The time step is needed to add the historical effect. I am using the MetState TSTEP for now and not sure if a TSTEP is also necessary for EmisState. Another thing I noticed is the temperature historical effect is deactivated by Silva but the historical PAR is still used. |
@lwcugb I think it will but remember that CATChem is a column model and that the interface will pass that to the host model to be written out. It is also something that could be read in through the host model as well. TSTEP would be the correct variable. We could add an option flag to turn the effects on or off. Do you think that would be beneficial? |
Silva's paper suggests that the emissions are only slightly lower. Maybe his other edits make up for the historical temperature or the impact itself is small in the default algorithm (historical PAR may be more important?). So I guess it may not benefit a lot if we keep Silva's method. |
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.
I've made some comments regarding the config. Some of the other processes have similar issues, but we don't need to worry about that in this PR.
src/core/config_mod.F90
Outdated
IF ( RC /= CC_SUCCESS ) THEN | ||
errMsg = TRIM( key ) // 'Not Found, Setting Default to 390.0' | ||
ENDIF | ||
! write(*,*) v_real |
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.
! write(*,*) v_real |
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.
Done!
v_real = MISSING_REAL | ||
CALL QFYAML_Add_Get( ConfigInput, TRIM( key ), v_real, "", RC ) | ||
IF ( RC /= CC_SUCCESS ) THEN | ||
errMsg = TRIM( key ) // 'Not Found, Setting Default to 390.0' |
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.
This message is never printed
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.
Add CC_Error subroutine below the errMsg.
src/core/config_mod.F90
Outdated
CALL QFYAML_Add_Get( ConfigInput, TRIM( key ), v_int, "", RC ) | ||
IF ( RC /= CC_SUCCESS ) THEN | ||
errMsg = TRIM( key ) // 'Not Found, Setting Default to 1' | ||
RETURN |
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.
RETURN |
Otherwise the code below won't run
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.
Done!
v_int = MISSING_INT | ||
CALL QFYAML_Add_Get( ConfigInput, TRIM( key ), v_int, "", RC ) | ||
IF ( RC /= CC_SUCCESS ) THEN | ||
errMsg = TRIM( key ) // 'Not Found, Setting Default to 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.
This message is never printed
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.
Add CC_Error subroutine below the errMsg.
…TChem into feature/catchem_begins
This pull request adds the MEGAN2.1 BVOC emission scheme based on its implementation in HEMCO.