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
Currently, the perturbIC function can only accept a restart dump file (UM Dump File) as input, and perturb its theta field (STASH itemcode = 4).
Although this meets the most likely use case, the function could be easily extended to:
work with any type of fields file (Ancil files or Output Fieldsfiles too), perturbing by default its theta field. If the field is not present, an error would get raised.
accept a STASH itemcode as command line argument, to choose a different field to perturb (for example if user wants to perturb the surface temperature (STASH itemcode = 24) something like --stash-to-perturb 24 could be passed as an argument)
if the input fields file contains only one single field, automatically perturb that field (even if is not THETA and the --stash-to-perturb has not been passed.
This additions would cover some edge use cases of perturbIC, extending its functionality without degrading its current performance.
The text was updated successfully, but these errors were encountered:
Question here for mule and other output currently I am using Mule.dumpfile to open and work with the file. The ouput fieldsfiles and ancil files would need Mule.fieldfile? Or can they all be opened by dumpfile?
The ouput fieldsfiles and ancil files would need Mule.fieldfile? Or can they all be opened by dumpfile?
Output fieldsfiles would need mule.FieldsFile and ancillary files would need mule.AncilFile.
In general, mule has different type of files it can work with, and there are a few more than the ones mentioned here.
It would probably make sense to use the convenient method mule.load_umfile which will allow you to attempt to load a file when you aren’t sure of the type (or more likely - where you are writing a script which can accept any type of UM file).
The method will return whichever type appears to be correct.
You can find details here.
Then, if we need to restrict the file types for any reason (for example if part of the logic is valid only for ancillary files - mule.AncilFile), we can put conditions that test that the opened file correspond to that specific type.
For example, to test if an opened file is an ancillary file we could do:
Currently, the
perturbIC
function can only accept a restart dump file (UM Dump File) as input, and perturb its theta field (STASH itemcode = 4).Although this meets the most likely use case, the function could be easily extended to:
--stash-to-perturb 24
could be passed as an argument)--stash-to-perturb
has not been passed.This additions would cover some edge use cases of
perturbIC
, extending its functionality without degrading its current performance.The text was updated successfully, but these errors were encountered: