-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for cpl.hi files #46
Comments
@klindsay28 we would need to add that to the list of streams to look for - which can be found in the following lines I can go ahead and submit a PR for this. The process would be to fork this repository, and add another dictionary entry in the following format: So the main questions to answer are:
Taking a look the dataset, it looks like it is missing the |
Also, I noticed that |
@mgrover1 I'll try to hit all of the questions in one go:
It's the flux coupler -- components don't pass fluxes directly to each other, instead they are passed to the coupler which then passes them on to the correct component (the coupler is also responsible for mapping from one grid to another if necessary).
From the time stamps, it looks like it is being written every 1800 seconds:
This isn't an optimal way to determine the frequency, as it's possible to put multiple time slices in a single file (e.g. the
I'll let @klindsay28 verify, but I would assume so. A common reason to look at high-frequency output with coupler history files turned on is to ensure the mapping is done right and that the component models are receiving the fluxes correctly (if things look okay on the source grid in the coupler history file but not the destination grid then something happened in the mapping process; if it looks okay on the destination grid but not in the component that received the flux then something happened when unpacking). That's easiest to diagnose with instantaneous output. Also, I think the
It means POP is writing output every time step. It's not common in production runs, but it's pretty typical when trying to track down a bug. I don't think |
Thanks @mnlevy1981. @mgrover1, the entries in
What is In this experiment I'm looking at, the The same question applies to |
@klindsay28 the frequency information is used for CESM1 output - in CESM2, the frequency information is written in the attributes in the file. In your case, the frequency information is extracted from all those streams you listed
|
@mgrover1 it might be clearer if you renamed |
Here's my understanding. Please correct me if I'm off. If files have the In the For me to proceed, I need edit What do you think of adding an optional dict argument to |
@klindsay28 that process is correct - I submitted a PR changing the API such that you can input a yaml file into the parser such that you can easily add additional streams/individually change the Thanks for taking the time to test this out - this feedback is helpful! |
@klindsay28 the recent PR #50 fixes this problem! We added an update to the documentation, with the new method of adding new streams being the following: from ecgtools import Builder
from ecgtools.parsers.cesm import parse_cesm_history
# Create a dictionary with stream information
new_streams = {'cpl.hi': {'component': 'coupler', 'frequency': 'instantaneous'}}
CASE = "SMS_Vmct_Ln6.f19_g17.1850_CAM60_CLM50%BGC-CROP_CICE_POP2%ECO_MOSART_SGLC_WW3_BGC%BPRP.cheyenne_intel.validate_beta03"
USER = "klindsay"
DIR = f"/glade/scratch/{USER}/{CASE}/hist"
# Setup your builder
b = Builder(
# Directory with the output
f"/glade/scratch/{USER}/{CASE}/hist",
# Depth of 1 since all of the history files are in a flat directory
depth=1,
# Use the parse_cesm_history parsing function
)
# Build the catalog and include which parser, along with the kwarg which allows you enter the new/updated streams
b = b.build(parse_cesm_history,
parsing_func_kwargs={'user_streams_dict':new_streams}) |
I'm inspecting high-frequency output from a CESM experiment that @mvertens ran.
There is output every timestep from different components of CESM.
I decided to try
ecgtools
andintake-esm
to get multi-file Datasets for each component.I'm gettng tripped up on
cpl.hi
files.The experiment was run without short-term archiving. So I soft-linked the history files to another directory, and ran
Builder
on that directory. (This was to avoid dealing with non-history files in the run directory.)The directory where I soft-linked the history files is
/glade/scratch/klindsay/SMS_Vmct_Ln6.f19_g17.1850_CAM60_CLM50%BGC-CROP_CICE_POP2%ECO_MOSART_SGLC_WW3_BGC%BPRP.cheyenne_intel.validate_beta03/hist
The command I'm using for
Builder
isI'm getting invalid assets for the
cpl.hi
files. An example traceback for thecpl.hi
files isWhat needs to be done to get support for these files into
ecgtools
? I'm guessing that it's easy for someone that understands the code inecgtools
, but I don't fall into that category.The text was updated successfully, but these errors were encountered: