m2lines / CAM-ML

Community Atmosphere Model
0 stars 0 forks source link

Convert variables from moist to dry #15

Open jatkinson1000 opened 1 week ago

jatkinson1000 commented 1 week ago

@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 commented 1 week ago

@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 commented 1 week ago

@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.