Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
noresm:runmodel:advancednoresm2 [2014-01-28 14:06:47] alfk |
noresm:runmodel:advancednoresm2 [2022-05-31 09:29:32] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Advanced configuration of NorESM2 ===== | + | ====== Advanced configuration of NorESM2 |
| - | === Creating a new compset | + | **NOTE THAT THE COMPSETS MENTIONED IN THIS EXAMPLE ARE NO LONGER MAINTAINED! THE GENERAL EXPLANATION AND IDEAS ARE STILL VALID! |
| + | ** | ||
| + | ===== Creating a new compset | ||
| - | In this example we use the CESM1.2 compset FAMIPC5 (AMIP run with CAM5) as basis. | + | The essential file to edit is |
| - | If starting from fresh, include the new CAM5-Oslo on a new directory; | + | < |
| + | ~/ | ||
| + | </ | ||
| - | == ~/ | + | This examples shows how to simply add a to the " |
| - | then add the new CAM5-Oslo capability by editing the following files: | + | Under "<!-- F compsets -->", |
| - | == ~/noresm/models/ | + | < |
| + | <COMPSET sname=" | ||
| + | </file> | ||
| - | Under "GetOptions(" | + | The "CAM5%OSLO" |
| - | " | + | < |
| + | < | ||
| + | </ | ||
| - | At the end of the section starting with "The default physics package is cam5...", add | + | The compset needs a description, |
| + | < | ||
| + | <desc compset="_CAM5%OSLO">cam 5 physcs and oslo aerosols</ | ||
| + | </ | ||
| - | #cam-oslo configuration | + | We could also define a specific use-case (namelist) for our compset. This would need a line like: |
| - | my $cam_oslo=' | + | < |
| - | my $cam_oslo_nadv = 0; | + | < |
| - | # Check cam-oslo option | + | </ |
| - | if (defined $opts{' | + | |
| - | $cam_oslo=$opts{' | + | |
| - | } | + | |
| - | if($cam_oslo != ' | + | |
| - | die "only valid cam_oslo configuration is currently ' | + | |
| - | } | + | |
| - | if($cam_oslo eq ' | + | |
| - | $cam_oslo_nadv =23; | + | |
| - | } | + | |
| - | At the end of the section starting with "User source directories", | + | This would only work if the file my_namelist.xml exists as |
| + | < | ||
| + | noresm/ | ||
| + | </ | ||
| - | #if cam_oslo is defined its source goes before the usr_sources | ||
| - | if ($cam_oslo ne ' | ||
| - | my @usr_src_dirs = split ',', | ||
| - | unshift(@usr_src_dirs, | ||
| - | my $usr_src_dirs_string = join(",", | ||
| - | $cfg_ref-> | ||
| - | } | ||
| - | At the end of the section starting with " | + | ===== Setting up a case with the new compset and building |
| - | + | ||
| - | # | + | |
| - | if ($cam_oslo_nadv > 0){ | + | |
| - | $nadv += $cam_oslo_nadv; | + | |
| - | if($print >=2 ){ print " | + | |
| - | } | + | |
| - | At the end of the section starting with "For the CPP tokens" | + | It should now be possible to create a new case directory, which we here name FAMIPOSLOtst |
| + | and configure with 1 degree horizontal atmospheric resolution; | ||
| - | if ($cam_oslo eq ' | + | < |
| - | | + | ./ |
| - | } | + | </ |
| - | The two chosen cppdefs options make sure that all code under "# | + | and finally set up and compile the model: |
| - | so that both the CAM5-Oslo aerosol life cycle and its direct and indirect effects on climate are taken into account. | + | < |
| + | cd ../ | ||
| + | </ | ||
| - | == ~/noresm/models/ | + | < |
| + | ./cesm_setup | ||
| + | </file> | ||
| - | Under "<config_definition>", add | + | <file> |
| + | ./ | ||
| + | </file> | ||
| - | <entry id=" | + | ===== Why does it work to change config_compsets.xml ? ===== |
| - | Options for building cam-oslo | + | |
| - | </ | + | |
| + | In NorESM there are 3 new config-options for CAM: | ||
| + | * -cam-oslo aerlife (turns on transport of oslo tracers) | ||
| + | * -cam-oslo dirind | ||
| + | * -cam-oslo warmclouds (also turns on interaction with warm clouds) | ||
| - | == ~/noresm/scripts/ccsm_utils/Case.template/config_compsets.xml == | + | They change number of tracers and turn on different preprocessor flags in in a perl script called " |
| + | < | ||
| + | models/atm/cam/bld/configure | ||
| + | </file> | ||
| - | Under "<!-- F compsets -->", add | + | To understand the implementation do: |
| + | <file> | ||
| + | svn diff -r 202 models/ | ||
| + | </file> | ||
| - | <COMPSET sname=" | + | The new oslo-options also need to be defined, see |
| + | <file> | ||
| + | models/ | ||
| + | </file> | ||
| + | To see how these new options were added, do: | ||
| + | < | ||
| + | svn diff -r 202 models/ | ||
| + | </ | ||
| - | === Setting up a case with the new compset and building the model === | ||
| - | It should now be possible to create a new case directory, which we here name FAMIPOSLOtst | + | ===== Configure nudging ===== |
| - | and configure with 1 degree horizontal atmospheric resolution; | + | |
| - | ./ | + | ==== Create the met-data ==== |
| - | and finally set up and compile | + | First run the model to produce 6 hourly data. The following namelists are needed: |
| - | cd ../cases/FAMIPOSLOtst | + | < |
| - | ./cesm_setup | + | user_nl_cam |
| - | ./FAMIPOSLOtst.build | + | & |
| + | mfilt = 1, 4, | ||
| + | nhtfrq | ||
| + | avgflag_pertape =' | ||
| + | fincl2 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | user_nl_clm | ||
| + | & | ||
| + | hist_mfilt | ||
| + | hist_nhtfrq | ||
| + | hist_avgflag_pertape | ||
| + | hist_fincl2 | ||
| + | </ | ||
| + | |||
| + | ==== Use the met-data in another run ==== | ||
| + | |||
| + | First create a compset which has the configure-option " | ||
| + | |||
| + | Then use this compset to create a case. You need the following user-input (for example in your user_nl_cam) | ||
| + | |||
| + | < | ||
| + | & | ||
| + | met_data_file=' | ||
| + | met_filenames_list = '/ | ||
| + | </file> | ||
| + | |||
| + | This info can be added directly in a use_case which you associate with the compset created (see e.g. 2000_cam5_oslonudge.xml) | ||
| + | |||
| + | where met_data_file is the first met-data file to read, and met_filenames_list is a list of the following met-data. The first lines of the file should look something like this (guess what the rest of the file should look like? 8-o: ) | ||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | This file can be created at the place where you put the metdata with this command: | ||
| + | < | ||
| + | alfgr@hexagon-4:/ | ||
| + | </ | ||
| + | |||
| + | ==== Namelist options ==== | ||
| + | When looking at aerosol indirect effects, it's recommended to nudge only U, V and PS: | ||
| + | < | ||
| + | & | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Choose relaxation time (hours). Use the same time as dt in met_data_file: | ||
| + | < | ||
| + | & | ||
| + | | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Nudge to ERA-interim reanalysis ==== | ||
| + | Link to ERA-interim metdata instead of model produced metdata. Remember to choose the files corresponding to your resolution (examples below are for f09_f09 and 32 levels in the vertical): | ||
| + | < | ||
| + | & | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | Add also the ERA-topography (no matter which fields you are nudging): | ||
| + | < | ||
| + | & | ||
| + | | ||
| + | </ | ||