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

Convert variables from moist to dry #15

Open
jatkinson1000 opened this issue Jun 19, 2024 · 2 comments · Fixed by #20
Open

Convert variables from moist to dry #15

jatkinson1000 opened this issue Jun 19, 2024 · 2 comments · Fixed by #20

Comments

@jatkinson1000
Copy link
Member

@paogorman comments:

My understanding is that CAM moisture variables for physics parameterizations are ‘moist mixing ratios’ or ‘specific humidities’ rather than dry mixing ratios. In other words they are per unit mass dry air + wv. (It seems like the mass of cloud is not included in the denominator). This is apparently chosen when variables are set up for a particular run, so it would be good to confirm that is what we are using in our CAM runs.

I previously thought this didn’t matter much because SAM is anelastic, but SAM does assume a form for the saturation q which is consistent with q in SAM being a dry mixing ratio. So we will be biased if we don’t convert.

Here is code to add to nn_interface_CAM:
From CAM to SAM:

     ! convert to dry mixing ratios for SAM
     ! assumes CAM variables are moist mixing ratios i.e. per unit dry mass of dry air + water vapor
      rv = qv(i,k)/(1-qv(i,k)) ! rv a dry mixing ratio
      rc = qc(i,k)*(1+rv)   ! rc a dry mixing ratio
      ri = qi(i,k)*(1+rv)   ! ri a dry mixing ratio
      q(i,k) = rv + rc + ri  ! q now a dry mixing ratio

And from SAM to CAM:

    ! convert from SAM dry mixing ratios to CAM moist mixing ratios (specific humidity)
    qi = qi/(1+qv)   ! qi now per unit mass dry air + wv
    qc = qc/(1+qv)   ! qc now per unit mass dry air + wv
    qv = qv/(1+qv)   ! qv now per unit mass dry air + wv (i.e. specific humidity)
@jatkinson1000
Copy link
Member Author

jatkinson1000 commented Jun 19, 2024

@judithberner Can you confirm for us what 'choice' with regards to moist or dry is made for our test cases and any likely uses in the future?

Can you also point us to where this is defined in the run setup so that we can be clear in the documentation how this should be run?

@jatkinson1000
Copy link
Member Author

jatkinson1000 commented Jun 19, 2024

@paogorman says to go ahead and implement this.
All documentaiton suggest that moist mixing ratios are used.

Check the PBUF definitions to see what we have.

@jatkinson1000 jatkinson1000 linked a pull request Aug 13, 2024 that will close this issue
@jatkinson1000 jatkinson1000 reopened this Sep 13, 2024
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 a pull request may close this issue.

1 participant