E3SM-Project / E3SM

Energy Exascale Earth System Model source code. NOTE: use "maint" branches for your work. Head of master is not validated.
https://docs.e3sm.org/E3SM
Other
336 stars 338 forks source link

output of omega in cam #3299

Closed oksanaguba closed 1 month ago

oksanaguba commented 4 years ago

https://github.com/E3SM-Project/E3SM/blob/c59c811106329786577ce1a5e05349ec4271f2d0/components/cam/src/dynamics/se/stepon.F90#L469

here omega is is multiplied by pressure, but in theta dycore it does not need to, because %derived%omega_p is just omega. should this be fixed?

whannah1 commented 4 years ago

@oksanaguba , good point. So in the theta dycor the "omega_p" variable is still used, but the data put into it is not "omega/p" but rather just "omega"?

oksanaguba commented 4 years ago

yes. that is why in dp_coupling it is not multiplied either:

!for theta there is no need to multiply omega_p by p
#ifndef MODEL_THETA_L
    !$omp parallel do private (lchnk, ncols, ilyr, icol)
    do lchnk = begchunk,endchunk
      ncols = get_ncols_p(lchnk)
      do ilyr = 1,pver
        do icol = 1,ncols
          if (.not.single_column) then
            phys_state(lchnk)%omega(icol,ilyr) = phys_state(lchnk)%omega(icol,ilyr) &
                                                *phys_state(lchnk)%pmid(icol,ilyr)
          end if
        end do ! icol
      end do ! ilyr
    end do ! lchnk
#endif
whannah1 commented 4 years ago

ok, I can throw an ifdef into that part of stepon.F90 and make a PR.

oksanaguba commented 4 years ago

no rush, you can stick it into some other pr (i assume omega is not in output so all would be bfb?)

whannah1 commented 4 years ago

yea, it's not standard output so it shouldn't make any tests fail. I'm not planning any PRs for E3SM right now so I might as well do a tiny PR.