FOAM Diagnostic Plots How-To These instructions cover how to use the FOAM version of the NCAR AMWG Diagnostic package This package can do model-obs comparsions for atmosphere data only and model-model comparisons for all FOAM components. There are two parts to using this package. First is to post-process your data into the necessary files. The second is to edit the main script which produces all the plots. Back to User Resources
Preparing Data for Model - Observation Comparisons (ATM ONLY)These instructions assume you have already postprocessed the PCCM3 output into netcdf files each containing 12 months of data (Jan-Dec). You need to prepare several files. The first is a monthly ensemble file. The file should have 12 times corresponding to Jan-Dec where each time is an ensemble mean. If you have have 30 files each with 12 monhts of data, you can make a 30 year
ensemble with the command: NOTE: The string "mone" followed by the beginning and ending years of the average "4575" must be in the output filename as shown. The second file contains 5 time records: 4 seasonal averages and one annual in the same file. This can also be made with the NCO utilities. We'll start with an example for making a winter season average.
NOTE: these files must have the "_0x_climo" string. NOTE: another way to make these is to use ncks to pull off each month from the case.mone4575.nc 2. Create a DJF ensemble.
3. Do 1 and 2 for MAM (march, april, may), JJA, and SON.
4. The Annual average can be made many ways. One is to use the seasonal averages you just made: ncra djfe.nc mame.nc jja.nc son.nc anna.nc 5. Cat them all together:
ncrcat djfe.nc mame.nc
jjae.nc sone.nc anne.nc case.seae4575.nc
6. Change the names of three files. Summary: You
will need the following files in one directory:
Preparing the Data for Model - Model ComparisonsThese instructions assume you have already postprocessed the FOAM output (atmosphere coupler and ocean) into netcdf files each containing 12 months of data (Jan-Dec) For each model (atm, ocn, cpl) you wish to make figures for, you need to prepare two files. The first is a monthly ensemble file. The file should have 12 times corresponding to Jan-Dec where each time is an ensemble mean. If you have have 30 files each with 12 monhts of data, you can make a 30 year
ensemble with the command: NOTE: The string "mone" followed by the beginning and ending years of the average "4575" must be in the output filename as shown. The second file contains 5 time records: 4 seasonal averages and one annual in the same file. This can also be made with the NCO utilities.
1. We'll start with an example for making a winter season average.
First, make an ensemble for each month of Dec, Jan and Feb
ncea -F -d time,12 -n 100,5,1 ha.case.00045.nc
ha.dece.nc
ncea -F -d time,1 -n 100,5,1 ha.case.00045.nc
ha.jane.nc
ncea -F -d time,2 -n 100,5,1 ha.case.00045.nc
ha.febe.nc
2. Now create a DJF ensemble.
ncea ha.dece.nc ha.jane.nc ha.febe.nc ha.djfe.nc
3. Do 1 and 2 for MAM (march, april, may), JJA, and SON.
4. The Annual average can be made many ways. One is to use the seasonal averages you just made:
ncra ha.djfe.nc ha.mame.nc ha.jja.nc ha.son.nc ha.anna.nc
5. Now cat them all together with.
ncrcat ha.djfe.nc ha.mame.nc ha.jjae.nc ha.sone.nc
ha.anne.nc ha.case.seae4575.nc
For the atmosphere model, you'll need 4 additional files. Each file is an
average of one month. You will need Jan, Apr, Jul and October averages. These
are for SET 12, the vertical profile plots. Take the individual monthly
ensembles you made above and rename them: Summary: if you want to run all diagnostics (atm, cpl and ocn) you
will need the following files in one directory (assuming 30 years starting at
year 45):
Editing and Running the main scriptThe USER option in the script is for comparing FOAM output. It allows you to compare the atmosphere, coupler, and ocean data to that of another FOAM run. The OBS option will only compare atmosphere data to observational data. In order to do this comparison, you will need to download the observational data found at the NCAR AMWG Diagnostic package homepage. 1. Open for editing the file diag_code/code/diag030429.csh. 2. Edit the below items to match whatever type of comparison you would like to do:
3. Run the shell script. Ignore the warning messages that scroll by, but fatal errors are another story. It may take about a half hour to run on a fast machine. 4. When the script stops, go into the WKDIR to collect the results. You will see a bunch of postscript files and a tar file which contains a ready-to-go website with html and jpgs (or gifs) converted from the postscript files. To view the results, untar the file and point your browswer to the main *.htm file called "sets.htm". Some things to note .... -SET_12 allows you to select station locations. If any of these are changed, the base html file 'diag_code/html/model1-model2_a/set12/ha_set12_2.htm' will also need to be modified. Currently, the web pages used to view the plots are not created "on the fly" to reflect user choices. These pages are hard coded. Therefore, in order to view additional stations, they will be needed to be added to the web page template. -Even if you only select one set of data (atm ocn or cpl) the main web page has links for all plots. There just won't be any figures for the ones you did not processes. The web pages are hardcoded, only the figures they point to change. -There are many other options the user can change within the program. The table above just shows you the options to get it running. For example, the user can change if they'd like the *.ps files to be converted to *.jpg or *.gif. -Not every option has been tried with this FOAM version of the script. Corrections/Suggestions: [email protected] |