Giter Site home page Giter Site logo

error in BG currents about gemini3d HOT 3 CLOSED

gemini3d avatar gemini3d commented on May 9, 2024
error in BG currents

from gemini3d.

Comments (3)

mattzett avatar mattzett commented on May 9, 2024

There is actually more to the problem than this... e594245 produces correct output for current densities but the current commit does not... The is likely related to the refactor of potential source terms... 06bb283 also checks out as being correct... af12f88 appears to have a problem... c034ba5 also has a problem... f7962da appears to give correct results... 9d3707e is incorrect... b6bad22 is also incorrect which makes it the first commit giving clearly wrong results.

from gemini3d.

mattzett avatar mattzett commented on May 9, 2024

The source of this problem appears to be the neutral_update subroutine, though it's not clear why that is causing issues... The problem may be the typo in setting the background values for winds

subroutine neutral_update(nn,Tn,vn1,vn2,vn3)

! adds stored base and perturbation neutral atmospheric parameters (these are module-scope parameters so not needed as input)

real(wp), dimension(:,:,:,:), intent(out) :: nn
real(wp), dimension(:,:,:), intent(out) :: Tn
real(wp), dimension(:,:,:), intent(out) :: vn1,vn2,vn3


!> background neutral parameters
nn=nnmsis
Tn=Tnmsis
vn1=vn1base
vn2=vn2base
vn2=vn3base     ! typo...

!!> perturbations, if used
if (allocated(zn)) then
  nn(:,:,:,1)=nn(:,:,:,1)+dnOinow
  nn(:,:,:,2)=nn(:,:,:,2)+dnN2inow
  nn(:,:,:,3)=nn(:,:,:,3)+dnO2inow
  nn(:,:,:,1)=max(nn(:,:,:,1),1._wp)
  nn(:,:,:,2)=max(nn(:,:,:,2),1._wp)
  nn(:,:,:,3)=max(nn(:,:,:,3),1._wp)

  Tn=Tn+dTninow
  Tn=max(Tn,50._wp)

  vn1=vn1+dvn1inow
  vn2=vn2+dvn2inow
  vn3=vn3+dvn3inow
end if

end subroutine neutral_update

from gemini3d.

mattzett avatar mattzett commented on May 9, 2024

67a6f99 appears to resolve the issue...

from gemini3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.