Skip to content
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 fstats customized for screen-level Q and T with "land only" option #246

Merged
merged 13 commits into from
May 3, 2022

Conversation

saraqzhang
Copy link
Contributor

a standalone set of code, script, and rc file are added to GEOS_Util/post/ for forecast stats customized for 2-meter moisture and temperature verification. It is tested in the cases of self-verification and ecmwf-verification, and with "land only" option.

	modified:   CMakeLists.txt
	new file:   g5fcst_statsNx.pl
	new file:   statsNx.F90
	new file:   statsNx.rc
	modified:   GEOS_Util/post/CMakeLists.txt
@saraqzhang saraqzhang added enhancement New feature or request Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs labels Feb 23, 2022
@saraqzhang saraqzhang self-assigned this Feb 23, 2022
@saraqzhang
Copy link
Contributor Author

@lltakacs @gmao-jstassi Larry and Joe, the modifications/additions ( for screen level variables and land only option) are not put into fstats.F90, g5fcst_stats.pl and stats.rc, instead in the customized fstatsNx.F90, g5fcst_statsNx.pl and statsNx.rc. Comparison of *stats vs. *statsNx files will show the modifications. could you review them and give comments and suggestions. We have tested and used this addition for fcst verifications in land-atmos coupled DAS experiments.

@saraqzhang
Copy link
Contributor Author

Larry and Joe reviewed the draft PR , and sent via email comments and suggestions:

for fstatsNx.F90
" (1) The variable “landonly” is only explicitly initialized if “-land” is present. You should probably set a default value explicitly to .false.
(2) There are several comments and print-outs that are different from the ones in the Develop version of GIT. I think you might just have started from an older version. Never-the-less, it would be best to merge your updates once again to what is in Develop." -Larry

for g5fcst_statsNx.pl
"I did a xxdiff between the scripts, and I saw that a couple dozen lines have been added or modified. I didn't see anything that looked like a problem. Ideally, you should get someone else to run the code to see it does what they think it should do.
If I get a chance later, after you get your script into the repository, I will take a look and try to merge the two scripts." - Joe

@gmao-rreichle
Copy link
Contributor

@saraqzhang, re. you last commit:

merge statsNx.F90 to stats.F90

If stats.F90 can now do everything that stats.F90 and statsNx.F90 were doing when you first created the PR, then we should "git remove" statsNx.F90 from the branch before merging the PR.

	modified:   GEOS_Util/post/g5fcst_stats.pl
Comment on lines 3 to 5
# name - g5fcst_stats.pl
# with options of land only and 2d Nx with screen level variables only
# purpose - script to submit jobs to calculate screen level forecast statistics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help text here seems wrong. Should it be something like:

# name - g5fcst_stats.pl 
# purpose - script to submit jobs to calculate forecast statistics
#           options: land-only stats and stats for screen-level variables (2d Nx)

Comment on lines 400 to 401
#print ("nxonly option: $nxonly\n");
#print ("landonly option: $nxonly\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines should probably be deleted. (The commented-out "landonly" print statement isn't right anyway.)

@saraqzhang
Copy link
Contributor Author

the modification/addition for new options "land only" and "Nx only" are merged into the stats script and code. The "customized" version of the codes are removed.

Comment on lines 32 to 33
ecbuild_add_executable (TARGET stats.x SOURCES stats.F90)
ecbuild_add_executable (TARGET statsNx.x SOURCES statsNx.F90)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you also need to remove "statsNx" here and below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMakelists is just updated . we still keep statsNx.rc .

@saraqzhang saraqzhang marked this pull request as ready for review April 19, 2022 18:13
@saraqzhang saraqzhang requested review from a team as code owners April 19, 2022 18:13
@saraqzhang saraqzhang added 0 diff The changes in this pull request have verified to be zero-diff with the target branch. and removed Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs labels Apr 19, 2022
@sdrabenh
Copy link
Collaborator

sdrabenh commented May 2, 2022

@saraqzhang would you mind updating the changelog for this PR so all CI tests will pass? Thanks

# name - g5fcst_stats.pl
# purpose - script to submit jobs to calculate forecast statistics
# name - g5fcst_stats.pl
# purpose - script to submit jobs to calculate screen level forecast statistics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The edit in this comment doesn't seem to be correct. Isn't this the merged script that does the regular atm stats and now also screen-level?

Comment on lines 2565 to 2568
Td = q(i,j)-273.15 ! to C
pp = sp(i,j)/100. ! to mb
ee= 6.112*exp((17.67*Td)/(Td + 243.5))
q(i,j) = (0.622 * ee)/(pp - (0.378 * ee))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could some or all of this conversion be done using MAPL functions? If so, we should probably use them. If there aren't MAPL functions, it may still be possible to use MAPL constants instead of hard-wired numbers for some of the numbers.

Comment on lines 1 to 3
##sqz NOTE : this file has a copy
## in /discover/nobackup/qzhang/git_check/GEOSadas/install/etc/
## the run actually use that one instead of the one here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete these three comment lines before merging?

@saraqzhang saraqzhang requested a review from a team as a code owner May 3, 2022 01:23
@saraqzhang
Copy link
Contributor Author

this code is compiled/built with MAPL v2.8.0 used in adas, where MAPL Const only have MAPL_TICE, not MAPL_CELSIUS_TO_KELVIN.

@gmao-rreichle
Copy link
Contributor

this code is compiled/built with MAPL v2.8.0

Ouch, that's old. Oh well. I guess for the purpose of computing fstats it doesn't really matter whether 273.15 or 273.16 is used.

@sdrabenh
Copy link
Collaborator

sdrabenh commented May 3, 2022

@gmao-rreichle @saraqzhang do you feel this PR is resolved and ready for merging?

@gmao-rreichle
Copy link
Contributor

@gmao-rreichle @saraqzhang do you feel this PR is resolved and ready for merging?

I'm happy with the changes.

Copy link
Member

@mathomp4 mathomp4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for CMake

@sdrabenh sdrabenh merged commit fcec98b into main May 3, 2022
@sdrabenh sdrabenh deleted the feature/saraqzhang/fstats2mQT branch May 3, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants