wiki:Documentation/UserGuide/VerifyClimate

Version 8 (modified by luyssaert, 9 years ago) (diff)

--

Once you have run LMDZOR, the first question to ask yourself is: does the climate I'm getting make sense? There does not seem to be any straightforward way to answer this question, so this page is going to give ideas on how to procede.

Tip 1) Run a spinup of ORCHIDEE offline to get reasonable biomass and soil water pools, which seems to be fairly important if you are using the 11-layer hydrology. The only way to do this that I know of is to regrid the driver files to the resolution you are interested in (such files now exist for the CRU dataset for 128x118) and use those to run offline for 50 years or so. Then you can use the resulting restart files to start the LMDZOR calculation. This is not a trivial step! You also need to make sure that the land mask you are using matches what is found in LMDZOR. The way we came up with to do this, was to run a one day simulation of LMDZOR without a restart and look at the resulting history files. There are variables inside the histday*nc files called CONTFRACOR and CONTFRACATM, which contain the fraction of each gridcell which have land. We made sure that all these pixels had climate variables in our regridded forcing files, even if it meant copying the forcing data from nearby pixels.

Tip 2) It takes at least 10 simulation years to get a good idea of the climate. It also takes some time to equilibrate the climate after starting from a restart, so it seems that you can plan on a simulation of at least 15 years: 5 years to equilibrate, and 10 years over which to calculate the average climate.

Once you have the simulation, you need to do the averaging, find data to compare to, and create graphs. The tool ATLAS does exactly this. I wasn't able to find much documentation on it, though.

(in French, only a few small mentions)

http://forge.ipsl.jussieu.fr/libigcm/wiki/DocUtilisateur

http://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=8&ved=0CE4QFjAH&url=http%3A%2F%2Fwww-lsceinca.cea.fr%2FFORMATION_DOC%2FCours-modipsl-dec2010.pdf&ei=3j_GU93vN9HY0QXNh4CgCA&usg=AFQjCNFmxn8UfbgnT2jKt1ZGopvgH6d09g&bvm=bv.71126742,d.d2k&cad=rja

(in French, updated in 2007)

http://dods.ipsl.jussieu.fr/fast/

(in French, a summary of what ATLAS is)

http://wiki.ipsl.jussieu.fr/IGCMG/Outils/ferret/Atlas

It appears that the post-treatment proceeds in two steps:

  • step 1 is to combine the raw data into files containing all the years you want to average over (given by SeasonalFrequency? in the config.card). Step 2 is to compare these files (located in ./JOBNAME/ATM/Analyse/SE/ in the IGCM directory tree. What comes before JOBNAME depends on what you put in the config.card and what system you are running on) to a set of reference data.
  • Step 2 then compares this data to the reference simulation or observations, depending on what you are trying to do.

As an example, let's say I have two simulations that I want to compare. /ccc/store/cont003/dsm/p529grat/IGCM_OUT/LMDZOR/PROD/amip/MCOUP/ATM/Analyse/SE/MCOUP_SE_1980_1981_1M_histmth.nc /ccc/store/cont003/dsm/p529grat/IGCM_OUT/LMDZOR/PROD/amip/TNV32/ATM/Analyse/SE/TNV32_SE_1980_1981_1M_histmth.nc

Notice that both of these runs have already been processed by the seasonal frequency script, and therefore the monthly simulation data has been combined into a single files covering two years (the length of SeasonalFrequency in config.card).

If you have loaded all the ipsl paths on, for example, Curie, you should be able to find all the ferret scripts (*.jnl) and ATLAS configuration files (*.cfg) in the $FER_ATLAS directory.

ls $FER_ATLAS/

We are interested in comparing two simulations, which according to the webpage above, means we need a diag2 ATLAS script. If you open the LMDZ*diag2.cfg files with a text editor, you can look at all the variables they compare and decide if you want to run all of them, or just one. We create an empty directory somewhere to hold the output, and go to that directory.

mkdir ATLAS
cd ATLAS

Let's copy one of the ATLAS scripts here and modify it a bit.

cp $FER_ATLAS/atlas_p_LMDZ3.3_diag2_a.cfg test.cfg
ref=/ccc/store/cont003/dsm/p529grat/IGCM_OUT/LMDZOR/PROD/amip/TNV32/ATM/Analyse/SE/TNV32_SE_1980_1981_1M_histmth.nc
sed -e "s%your_reference_file=.*%your_reference_file=${ref}%" $FER_ATLAS/atlas_p_LMDZ3.3_diag2_a.cfg > atlas_p_LMDZ3.3_diag2_a.cfg

Now my 'reference' simulation is TNV32. If you decide that you want to run multiple .cfg scripts, you will have to run the "sed" line for each script you want to use.

atlas -o atlas_model_vs_model atlas_p_LMDZ3.3_diag2_*.cfg /ccc/store/cont003/dsm/p529grat/IGCM_OUT/LMDZOR/PROD/amip/MCOUP/ATM/Analyse/SE/MCOUP_SE_1980_1981_1M_histmth.nc

This command should be run in the same directory where I just created the modified .cfg files. With the "atlas_p_LMDZ3.3_diag2_*.cfg", it will run all the .cfg files that it finds matching that expression. The last argument is the name of the file I want to compare to my "reference" simulation, which I declared above.

The output of this command is a series of folders all grouped into "atlas_model_vs_model/". In there you have pdf and html summaries of all the variables, plus individual directories for each variable if you just want to look at one of them.

Zooming

Sometimes you are only interested in a certain region of the world. This is certainly the case when you are using a zoomed grid to run the simulation. Is there a way to get ATLAS to only print out the results over a single region?

The answer is yes. There is a script, 2variables1diffandzonal_map_zoomed_new.jnl, which calculates both the maps and the zonal differences for two variables over just a particular region. In the .cfg files, the script 2variables1diffandzonal_map.jnl is currently used. The first step is to change 2variables1diffandzonal_map.jnl to 2variables1diffandzonal_map_zoomed_new.jnl in every line. So, for example, if before there was

echo $input | ferretloop - $paper -r $your_reference_file -i "Precip (mm/day)" -s $frequency -o precip 2variables1diffandzonal_map.jnl '"Precip (mm/day)" inputfile (precip[l=sloop]*86400) referencefile (precip[l=sloop]*86400) /pal=precip/lev=(-INF)(0.5)(1,6,1)(8,14,2)(20)(INF) /pal=pal_01/lev=(-INF)(-5)(-2,2,1)(-0.5)(-0.2)(0.2)(0.5)(5)(INF) /hlim=0:10 /hlim=-3:3'

afterwards there should be

echo $input | ferretloop - $paper -r $your_reference_file -i "Precip (mm/day)" -s $frequency -o precip 2variables1diffandzonal_map_zoomed_new.jnl '"Precip (mm/day)" inputfile (precip[l=sloop]*86400) referencefile (precip[l=sloop]*86400) /pal=precip/lev=(-INF)(0.5)(1,6,1)(8,14,2)(20)(INF) /pal=pal_01/lev=(-INF)(-5)(-2,2,1)(-0.5)(-0.2)(0.2)(0.5)(5)(INF) /hlim=0:10 /hlim=-3:3'

The command

sed -i.bak -e "s%2variables1diffandzonal_map.jnl%2variables1diffandzonal_map_zoomed_new.jnl%" atlas_p_LMDZ3.3_diag2_a.cfg

will do that in one step, copying the file first to something.bak and the overwriting the existing file.

The new script also takes two additional arguments. The first is the ferret command used to create the map (either "shade" or "fill"), and the second is the region of the zoom. So if we want to look at Europe, we can use a line like the following:

echo $input | ferretloop - $paper -r $your_reference_file -i "Precip (mm/day)" -s $frequency -o precip 2variables1diffandzonal_map_zoomed_new.jnl '"Precip (mm/day)" inputfile (precip[l=sloop]*86400) referencefile (precip[l=sloop]*86400) /pal=precip/lev=(-INF)(0.5)(1,6,1)(8,14,2)(20)(INF) /pal=pal_01/lev=(-INF)(-5)(-2,2,1)(-0.5)(-0.2)(0.2)(0.5)(5)(INF) /hlim=0:10 /hlim=-3:3 shade [X=-20E:40E,Y=30N:75N]'

If you then run ATLAS as above with this .cfg, you should get the maps and zonal differences only over Europe for the two simulations.

NOTE: Do not use 20W; use -20E instead to mean 20 degrees west longitude. While it is true that 20W is the same as -20E, Ferret seems to have trouble with some of the commands if you use 20W, and the maps come out strange. I assume the same is true for 20S and -20N.

Reference Data

The script which I've found works best for reference data are atlas_p_LMDZ4_diag1_a.cfg and atlas_p_LMDZ4_diag1_e.cfg, since they include comparing the temperature at 2 m (t2m) against CRU. You can use these scripts in exactly the same way as the scripts above, except that you do not need to change your_reference_file; the reference file is always the observational data. It seems that these scripts already include 2variables1diffandzonal_map_zoomed_new.jnl, so if you want to zoom you can skip that step. You will still have to add the two arguments about shade and the zoom region, though.