csiro-coasts / emsarray

xarray extension that supports EMS model formats
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

Support sediment layers in Shoc datasets #130

Open mx-moth opened 2 months ago

mx-moth commented 2 months ago

The ShocSimple and ShocStandard conventions have sediment depth coordinates zcsed and z_centre_sed. These should be added to get_all_depth_names().

mx-moth commented 1 week ago

This is going to be more complicated than I thought. Sediment coordinates are both location and time dependent, which is something that emsarray currently does not handle. Adding these variables to the depth coordinate set would cause issues with the emsarray.operations.depth module, possibly more.

The relevant portions from a ncdump of a SHOC simple and SHOC all file follow:

        double zc_sedim(time, k_sed, j, i) ;
                zc_sedim:units = "m" ;
                zc_sedim:positive = "up" ;
                zc_sedim:long_name = "Z coordinate of sediment centre" ;
        double zcsed(k_sed) ;
                zcsed:units = "m" ;
                zcsed:positive = "up" ;
                zcsed:long_name = "Z coordinate, sediment" ;
                zcsed:axis = "Z" ;
                zcsed:coordinate_type = "Z" ;
        double z_grid_sed(record, k_grid_sed, j_centre, i_centre) ;
                z_grid_sed:units = "metre" ;
                z_grid_sed:long_name = "Z coordinate at sediment layer faces" ;
                z_grid_sed:coordinate_type = "Z" ;
        double z_centre_sed(record, k_centre_sed, j_centre, i_centre) ;
                z_centre_sed:units = "metre" ;
                z_centre_sed:long_name = "Z coordinate at sediment layer centres" ;
                z_centre_sed:coordinate_type = "Z" ;