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

Vectors #199

Merged
merged 7 commits into from
Oct 9, 2018
Merged

Vectors #199

merged 7 commits into from
Oct 9, 2018

Conversation

duvivier
Copy link
Contributor

@duvivier duvivier commented Oct 7, 2018

Adding output variables for vector speed/direction quantities (ice, atm, ocn). I've verified by looking at history file output that these are done correctly. Addresses Issue #58

  • Developer(s): Alice DuVivier

  • Please suggest code Pull Request reviewers in the column at right.

  • Are the code changes bit for bit, different at roundoff level, or more substantial? bfb

  • Please include the link to test results or paste the summary block from the bottom of the testing output below.
    All tests pass. Test results: https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_bran_forks (branch "vectors")

  • Does this PR create or have dependencies on Icepack or any other models? N

  • Is the documentation being updated with this PR? N
    If not, does the documentation need to be updated separately at a later time? N

Note: "Documentation" includes information on the wiki and .rst files in doc/source/,
which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/.

  • Other Relevant Details:

dabail10
dabail10 previously approved these changes Oct 8, 2018
Copy link
Contributor

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@apcraig apcraig left a comment

Choose a reason for hiding this comment

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

Please review at line 975 of ice_history.F90. I can't tell if this is going to revert a change from Friday or if it's just picking up the change from Friday.

@@ -972,7 +997,7 @@ subroutine init_hist (dt)
"none", c1, c0, &
ns1, f_aisnap)

call define_hist_field(n_trsig,"trsig","N/m^2",tstr2D, tcstr, &
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct? This looks like it's reverting a PR from last week?

Copy link
Contributor

Choose a reason for hiding this comment

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

N/m is correct. This should be okay, although it was already corrected previously.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it was part of Dave's PR #198 but I'd changed it here as well. Since this is identical to the current master I'm not sure why it's showing up as changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I still haven't figured out what git is doing when it shows PR diffs. Sometimes, it seems like it's comparing to master, other times it seems like it's comparing to the branch base. I still find it confusing.

@@ -84,7 +84,8 @@ module ice_constants
p027 = p055*p5, &
eps04 = 1.0e-4_dbl_kind, &
eps13 = 1.0e-13_dbl_kind, &
eps16 = 1.0e-16_dbl_kind
eps16 = 1.0e-16_dbl_kind, &
pi = 3.14159265358979323846_dbl_kind
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not in love with hardwiring pi here. It's already hardwired into icepack. What we really need is for pi to be computed at initialization or set by something like cesm shr_const depending on the situation. Both icepack and cice could use the upgrade. For now, we can leave it this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, I was surprised it wasn't in here to be honest. I'll add this as an issue. Maybe I can get to it before the release.

Copy link
Contributor

Choose a reason for hiding this comment

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

Where the variables exist in icepack, we have tried to use those in CICE. Both pi and rad_to_deg are available via queries to icepack. That is probably the right way to do it. Where you need rad_to_deg, query it in that subroutine from icepack and get rid of both pi and rad_to_deg definitions in cice. I guess I am going to suggest that change at this point, should have said that earlier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I agree. I would rather do this the right way now. So I should definitely fix it. However, I have an additional question/clarification.

It looks like pi is set in columnphysics/icepack_parameters.F90. Why not in /configuration/driver/icedrv_constants.F90? It looks like we set numerical constants in both places, though the constants don't overlap. But I guess I don't understand why we don't just set them in one place. Am I being dense?

Copy link
Contributor

Choose a reason for hiding this comment

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

You're certainly not being dense! The idea with the constants being in two places in Icepack was to delineate the ones that are essential for the Icepack physics (for groups wanting to port it into their own sea ice models) from the ones that are only needed for the driver, e.g. for the forcing. There might be some that are in the wrong place, and if you spot any, make an issue to fix them. Thanks!

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

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

Why is the atmo vector direction given as 'coming from' while ocean and sea ice directions are 'going to'? Shouldn't they all be the same? Is this specified in the CMIP6 guidance? Winds are always 'from', but I'm not sure if there's a standard for ocn/ice.

@duvivier
Copy link
Contributor Author

duvivier commented Oct 8, 2018

@eclare108213 The CMIP6 documentation has guidance for speed and vector components, but does not include direction (for wind or sea ice). I added the "coming from" and "going to" for the atmosphere and ice/ocean meta data directions because the conventions are opposite, which has often confused me.

So for wind direction a value of 180deg means it's from the south (http://glossary.ametsoc.org/wiki/Wind_direction). But for an ocean current or sea ice if you said the current/ice direction was 180deg it means it's going to the south. Since both direction fields will be in the same history file I want to make sure it's clear to users they use the different conventions.

Copy link
Contributor

@apcraig apcraig left a comment

Choose a reason for hiding this comment

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

Thanks for the update to rad_to_deg. Looks good.

@duvivier
Copy link
Contributor Author

duvivier commented Oct 8, 2018

@apcraig Great. I'm double checking the tests now. Assuming they all pass I'll go ahead and merge later tonight. Let me know if there are any concerns with merges tonight (like last week's).

@duvivier
Copy link
Contributor Author

duvivier commented Oct 9, 2018

Second set of tests passed: https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_bran_forks (development branch 'vectors')

I've gone through the history files too to verify everything is working properly.

@duvivier duvivier merged commit 4f2adf3 into CICE-Consortium:master Oct 9, 2018
@duvivier duvivier deleted the vectors branch October 9, 2018 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants