lutraconsulting / MDAL

Mesh Data Abstraction Library
http://www.mdal.xyz/
MIT License
160 stars 50 forks source link

[UGRID] Detect polar vectors from standard name #254

Closed PeterPetrik closed 4 years ago

PeterPetrik commented 4 years ago

similar to long_name, use substring _from/to_direction

https://github.com/lutraconsulting/MDAL/blob/9c5b479f8915bf0ff239276a220196118d306771/mdal/frmts/mdal_ugrid.cpp#L550

PeterPetrik commented 4 years ago
! CF:  The direction is a bearing in the usual geographical sense, measured positive clockwise from due north.

So, when standard name contains _from_direction, then it is the angle from due north the negated velocity vector.

simplebox_from_direction_clm.nc, which is a copy of simplebox_clm.nc, with only the standard name changed into sea_water_velocity_from_direction. For testing only: that direction is now opposite to the original flow.