NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
197 stars 145 forks source link

mpas model_mod needs to support interpolating values for w #523

Open nancycollins opened 1 year ago

nancycollins commented 1 year ago

Use case

The mpas_atm model_mod has supported having W (vertical wind velocity) in the state vector, but there is no code to support interpolating the W value at a location. To support the radar radial velocity forward operator, the model_mod needs to return an interpolated value for U, V and W winds.

Is your feature request related to a problem?

We cannot assimilate radar radial velocity obs unless the model_mod can return a value for the velocity of the W (vertical) wind field.

Describe your preferred solution

Add code to the mpas_atm model_mod to support this.

The code currently returns an failure code if you try to interpolate W at a location. This check needs to be removed.

The code currently distinguishes between data located at the cell center vs the cell edges. U and V unreconstructed winds are on the cell edges and all other variables are at the cell centers in the horizontal. All values are assumed to be at the midpoint of the cell in the vertical. W is a different case because it is located at the cell center in the horizontal but on the cell faces in the vertical. The single variable in the progvar needs to be able to distinguish between horizontal and vertical locations.

hkershaw-brown commented 3 weeks ago

@hkershaw-brown todo upack QTY_VERTICAL_VELOCITY from this pull request https://github.com/NCAR/DART/pull/522

hkershaw-brown commented 3 weeks ago

the 'regular' case for interpolation just needs to be able to cope with variables on

float w(Time, nCells, nVertLevelsP1) ;
                w:units = "m s^{-1}" ;
                w:long_name = "Vertical velocity at vertical cell faces" ;

float qv(Time, nCells, nVertLevels) ;      
        qv:units = "kg kg^{-1}" ;
        qv:long_name = "Water vapor mixing ratio" ;

float u(Time, nEdges, nVertLevels) ;
                u:units = "m s^{-1}" ;
                u:long_name = "Horizontal normal velocity at edges" ;

In restart file, z coordinate

float zgrid(nCells, nVertLevelsP1) ;
        zgrid:units = "m MSL" ;
        zgrid:long_name = "Geometric height of layer interfaces" ;

zgrid called zGridFace in DART: https://github.com/NCAR/DART/blob/e2188646b97573f198c66f7ea63482ebc34afa11/models/mpas_atm/model_mod.f90#L3326

zgridCenter calculated in dart from zgrid (aka zgridFace, aka zGridFull in this pull request):

https://github.com/NCAR/DART/blob/e2188646b97573f198c66f7ea63482ebc34afa11/models/mpas_atm/model_mod.f90#L664-L669

zgridEdge calculated in dart from zgrid (aka zgridFace):

https://github.com/NCAR/DART/blob/e2188646b97573f198c66f7ea63482ebc34afa11/models/mpas_atm/model_mod.f90#L671-L691