You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivated by discussion in #507 we need to refactor our OutputWriter. Something like this should be possible
# initialise output writer generally but not variable specific
output =OutputWriter(spectral_grid, schedule =Schedule(every =Hour(6)), output_Grid =...)
# add some variables that should be output with some variable-specific optionsadd!(output, StreamfunctionOutput(spectral_grid), keepbits=15, compression_level =2)
# also adds default variables to output, u, v, vor, ...
model =PrimitiveWetModel(;spectral_grid, output)
# remove or add other variables to outputremove!(output, DivergenceOutput)
add!(output, ConvectivePrecipitationOutput(spectral_grid))
so that we have for every variable that should be outputted something like
struct TemperatureOutput{NF} <:AbstractOutputVariable
NF::DataType= Float32
dimensions = [true, true, true, true] # x, y, z, t
long_name::String="Temperature"
units::String="degC"...endoutput!(::OutputWriter, ::StreamfunctionOutput, ::PrognosticVariables, ::DiagnosticVariables, ::ModelSetup)
# define here how to take variables from progn, diagn and put them into# the nc file in output# some variables need unscaling, temperature needs -273.15 for K->˚C# pressure needs a exp, precipitation needs unit adjustment etc...end
which would allow users to define their own output variables with any possible processing
The text was updated successfully, but these errors were encountered:
Motivated by discussion in #507 we need to refactor our
OutputWriter
. Something like this should be possibleso that we have for every variable that should be outputted something like
which would allow users to define their own output variables with any possible processing
The text was updated successfully, but these errors were encountered: