Shell script to grab formatted variables to copy and paste into config yaml file #141
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
I agree we don't want to include in the ADF. But Justin's script is useful until we have another way to do that. In the long term, we could have a flag requesting the ADF to plot all the variables in the h0. But until this is ready, Justin's script is useful. At the last two hackathons, we talked about creating a new repo for the scripts/Jupyter Notebooks provided by the community. This is where this kind of scripts could live. Same for the ADF asset browser from Dan. @nusbaume was going to create a new repo that we could start push some scripts/notebooks. We need to decide on a name. Any suggestions? I am thinking maybe: |
Beta Was this translation helpful? Give feedback.
-
Adding variables to the config yaml files seems like it could be daunting if many variables are needed and especially if the set of variables change from run to run.
I have built a shell script to automatically grab all float variables (float for now, can adjust later) from one of the h0 netCDF files associated with a run. The script creates a text file that has formatted variables with spaces and
-
to match how they are in the yaml file.Once the script runs, one could open the text file, copy the contents and just paste into the config yaml file under the variables section.
The script is located here:
/glade/work/richling/ADF/ADF/ncdump_float_var.sh
And the only argument needed to run with the script is location to dataset that has the h0 files, example:
ncpath=/glade/scratch/hannay/archive/f.c6_3_41.FWscHIST.ne30_L58_macmic6.001/atm/hist/
./ncdump_float_var.sh $ncpath
Sample output text file located here:
/glade/work/richling/ADF/ADF/f.c6_3_41.FWscHIST.ne30_L58_macmic6.001.cam.h0.1989-12_var_list.txt
I'd be happy to integrate this to the project, but wanted a discussion about if this would be desirable (do you use a better method when populating your yaml files?), if the script works for everybody's configuration, where should the script live if it is accepted, or any other thoughts, comments, or concerns.
Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions