Differences
This shows you the differences between two versions of the page.
noresm:modeldiagnostics [2019-08-09 07:46:23] yanchun.he@nersc.no |
noresm:modeldiagnostics [2022-05-31 09:29:32] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Model Diagnostic Tools====== | ||
- | This page links to tools used for the NorESM model evaluation. | ||
- | |||
- | ===== NorESM Diagnostic Packages ===== | ||
- | |||
- | Output from the latest NCAR diagnostic pages can be found on nird here: | ||
- | |||
- | via the web: | ||
- | http:// | ||
- | |||
- | via the filesystem on nird here: | ||
- | / | ||
- | |||
- | |||
- | |||
- | The diagnostics packages are currently available on NIRD. Each package can be run/ | ||
- | |||
- | < | ||
- | ------------------------------------------------- | ||
- | Program: | ||
- | / | ||
- | Version: 6.0 | ||
- | ------------------------------------------------- | ||
- | Short description: | ||
- | A wrapper script for NorESM diagnostic packages. | ||
- | |||
- | Basic usage: | ||
- | diag_run -m [model] -c [test case name] -s [test case start yr] -e [test case end yr] # Run model-obs diagnostics | ||
- | diag_run -m [model] -c [test case name] -s [test case start yr] -e [test case end yr] -c2 [cntl case name] -s2 [cntl case start yr] -e2 [cntl case end yr] # Run model1-model2 diagnostics | ||
- | nohup / | ||
- | |||
- | Command-line options: | ||
- | -m, --model=MODEL | ||
- | Valid arguments: | ||
- | cam : atmospheric package (AMWG) | ||
- | clm : land package (LMWG) | ||
- | cice : sea-ice package | ||
- | micom : ocean package | ||
- | hamocc : biogeochemistry package | ||
- | all : configure all available packages. | ||
- | -c, -c1, --case=CASE1, | ||
- | -s, -s1, --start_yr=SYR1, | ||
- | -e, -e1, --end_yr=EYR1, | ||
- | -c2, --case2=CASE2 | ||
- | -s2, --start_yr2=SYR2 | ||
- | -e2, --end_yr2=EYR2 | ||
- | -i, -i1, --input-dir=DIR, | ||
- | Default is --input-dir=/ | ||
- | -i2, --input-dir2=DIR | ||
- | Default is --input-dir=/ | ||
- | -o, --output-dir=DIR | ||
- | Default is --output-dir=/ | ||
- | -p, --passive-mode | ||
- | -t, --type=TYPE | ||
- | Default is to run both. Note that the time series are computed over the entire simulation. | ||
- | -w, --web-dir=DIR | ||
- | Default is --web-dir=/ | ||
- | --no-atm | ||
- | |||
- | Examples: | ||
- | diag_run -m all -c N1850_f19_tn11_exp1 -s 21 -e 50 # model-obs diagnostics of case=N1850_f19_tn11_exp1 (climatology between yrs 21 and 50) for all model components. | ||
- | diag_run -m cam -c N1850_f19_tn11_exp1 -s 21 -e 50 -w / | ||
- | diag_run -m micom -c N1850_f19_tn11_exp1 -t time_series # model-obs time-series diagnostics in MICOM for all years represented in the model output directory (/ | ||
- | diag_run -m cice -c N1850_f19_tn11_exp1 -s 21 -e 50 -p # configure (but do not run) model-obs diagnostics for CICE. | ||
- | diag_run -m clm -c N1850_f19_tn11_exp1 -s 21 -e 50 -i / | ||
- | diag_run -m micom -c N1850_f19_tn11_exp1 -s 21 -e 50 -t climo # model-obs climatology diagnostics (no time series) for MICOM: | ||
- | diag_run -m cam -o /my/dir # install CAM diagnostics in /my/dir with minimal configuration. | ||
- | diag_run -m micom, | ||
- | diag_run -m clm -c N1850_f19_tn11_clmexp1 -s 71 -e 100 --no-atm # model-obs time-series diagnostics for an offline (uncoupled) CLM simulation. | ||
- | diag_run -m hamocc -c N1850OC_f19_tn11_exp1 -s 31 -e 100 -t time_series # model-obs time-series diagnostics in HAMOCC between yrs 31 and 100. | ||
- | </ | ||
- | A comprehensive technical summary of diag_run (pdf): {{ : | ||
- | |||
- | Report any problems, comments or suggestions to Yanchun He: [[mailto: | ||
- | |||
- | === Recent updates === | ||
- | * 08.08.19. Note: NS2345K is recovered now, please use the normal / | ||
- | * 08.08.19. Update to v6.0: add support to TS-derived mlts, global averages: tempga, | ||
- | * 29.08.18. Update to v5.1: update NCO/NCL versions to support efficient process of compressed netcdf-4 files. | ||
- | * 29.06.18. Update to v5.0: new fields to HAMOCC and MICOM diagnostics; | ||
- | * 20.04.18. Update to v4.3: added new fields to HAMOCC diagnostics. | ||
- | * 19.04.18. Update to v4.2: included ability to do time-series diagnostics between two user-specified years. | ||
- | * 18.04.18. Update to v4.1: improved climatology and time-series calculations in CLM, and introduction of the --no-atm option to enable diagnostics for offline CLM simulations. | ||
- | * 09.04.18. Update to v4.0: included the HAMOCC diagnostics package. | ||
- | * 23.02.18. Update to v3.1: added monthly MLD, seasonal SST/SSS and annual meridional heat/ | ||
- | * 17.01.18. Update to v3.0: the first version of MICOM diagnostics has been included. | ||
- | * 28.11.17. Update to v2.0: included a set of time series plots in CAM diagnostics, | ||
- | |||
- | ===Using diag_run with cron=== | ||
- | If you want to use diag_run with crontab, you first need to load $HOME/ | ||
- | < | ||
- | # | ||
- | # Min Hour Day Month Weekday Command(s) | ||
- | # | ||
- | 50 09 23 11 * . $HOME/ | ||
- | / | ||
- | </ | ||
- | |||
- | |||
- | === Other tips === | ||
- | It is useful to add diag_run as an alias in $HOME/ | ||
- | < | ||
- | alias diag_run='/ | ||
- | </ | ||
- | |||
- | |||
- | === NorESM diagnostics on GitHub === | ||
- | The NorESM diagnostics packages and diag_run are included in the Git version control repository: | ||
- | [[https:// | ||
- | ====== Aerosol and Chemistry, Clouds and Forcing Diagnostics ====== | ||
- | |||
- | |||
- | In both the default CAM5-aerosol packages (MAM3,MAM7) and the Oslo-aerosol packages, the budget terms can be taken out using a variable in the namelist : | ||
- | |||
- | ===Configuring a run with more aerosol diagnostics in (NorESM2) === | ||
- | |||
- | < | ||
- | & | ||
- | history_aerosol = .true. | ||
- | / | ||
- | </ | ||
- | |||
- | Two more diagnostics are useful: | ||
- | * Enable estimates multiple calls to radiation which are necessary for effective radiative forcing estimates | ||
- | * Enable diagnostics for AEROCOM | ||
- | |||
- | |||
- | To enable this, take the file cam/ | ||
- | |||
- | Change both preprocessor definitions to true | ||
- | |||
- | < | ||
- | #define AEROCOM | ||
- | #define AEROFFL | ||
- | </ | ||
- | |||
- | The AEROCOM-token turns on diagnostics needed for AEROCOM | ||
- | The AEROFFL-token tells the model to do additional radiation-diagnostics for aerosol indirect effect | ||
- | |||
- | ===== Tracer Budget terms ===== | ||
- | |||
- | ===Fields produced in monthly average files when running with budgets activated=== | ||
- | |||
- | Running with budgets activated will produce the following terms in the monthly output files: | ||
- | |||
- | ^ Output variable name ^ Meaning | ||
- | | SF{Tracer} | ||
- | | GS_{Tracer} | ||
- | | AQ_{Tracer} | ||
- | | {Tracer}_Mixnuc1 | ||
- | | {Tracer}_DDF | ||
- | | {Tracer}_SFWET | ||
- | | {Tracer}_condtend | ||
- | | {Tracer}_coagTend | ||
- | | DF_{Tracer} | ||
- | | WD_A_{Tracer} | ||
- | | {Tracer}_CLXF | ||
- | | {Tracer}_clcoagTend | ||
- | |||
- | Note: Since 3D-emissions and and gas washout rates are included in the term GS_{Tracer} in the mozart chemistry solver, the individual terms can be found like this (example for SO2): | ||
- | < | ||
- | ncap2 -O -s GS_ONLY_SO2=GS_SO2-WD_A_SO2-SO2_CLXF infile.nc outfile.nc | ||
- | </ | ||
- | |||
- | More info on SO2 budgets (see / | ||
- | |||
- | GS_SO2 contains the SO2 budget terms for all that goes on in the chemistry-routine, | ||
- | 1) Gas phase chemistry, 2) Wet deposition, and 3) 3D-emissions.\\ | ||
- | Gas phase chemistry is both production from DMS (GS_DMS) and loss through OH (GL_OH) \\ | ||
- | For calculations of net loss, e.g. used to calculate SO2 life-times, we're interested in the \\ | ||
- | loss through OH from the chemistry-term (GL_OH).\\ | ||
- | GS_SO2 = GL_OH + SO2_CLXF - WD_A_SO2 - GS_DMS*64/ | ||
- | or \\ | ||
- | GL_OH = GS_SO2 - SO2_CLXF + WD_A_SO2 + GS_DMS*64/ | ||
- | |||
- | Estimating chemical loss w.r.t. S (instead of SO2 or DMS), for comparison with CAM4-Oslo numbers:\\ | ||
- | net chemial loss gas phase = (GS_SO2/ | ||
- | net chemical loss = net chemial loss gas phase + AQ_SO2/ | ||
- | |||
- | Finally, total net loss (used to calculate life-time = -load/(net loss), where load = cb_SO2/ | ||
- | net loss = \\ | ||
- | - WD_A_SO2/ | ||
- | - DF_SO2/ | ||
- | + AQ_SO2/ | ||
- | + (GS_SO2 - SO2_CLXF + WD_A_SO2)/ | ||
- | |||
- | ===Looking at the aerosol budgets (CAM-Oslo only) === | ||
- | |||
- | * Go to the directory models/ | ||
- | * Change the filename to use in the file budgets.ncl (" | ||
- | * Run the script budgets.sh to create a pdf-file (output.pdf) | ||
- | |||
- | |||
- | ===== NCL Model Version Comparison package (Alf K) ====== | ||
- | |||
- | ===Making ncl plots of often used aerosol and cloud fields, including ERFs, for two model versions (CAM-Oslo only) === | ||
- | |||
- | * Make a local copy (on Linux) of the directory models/ | ||
- | * Assuming that you have produced output data from 4 simulations: | ||
- | * In ModIvsModII.csh (note: read the header info): | ||
- | * - edit model info for the first model (shown to the left in the plots): modelI = CAM4-Oslo or modelI = CAM5-Oslo ? | ||
- | * - provide paths and partial file names of the model data (PD and PI) for Model I (CAM4-Oslo or CAM5-Oslo) and Model II (must be CAM5-Oslo) | ||
- | * - choose desired plot format (plotf=ps, eps, pdf or png) | ||
- | * Run the script: ./ | ||
- | * Furthermore, | ||
- | * - download htm template files from ftp:// | ||
- | * - edit general model info (only) in ModIvsModII.htm, | ||
- | * - copy all png (plots) and htm files to the desired output (common) directory | ||
- | * - open ModIvsModII.htm in your browser: hyper-links to all other htm files, including plots, are found here | ||
- | * Example: ftp:// | ||
- | |||
- | ===== Cloud water mass and number analysis (budgets) ====== | ||
- | |||
- | |||
- | ===Configuring a run with more cloud diagnostics in NorESM2 === | ||
- | |||
- | To switch on extra output for cloud diagnostics (mass and number tendencies for liquid water and mass) change the following namelist variable: | ||
- | |||
- | < | ||
- | & | ||
- | history_budget = .true. | ||
- | / | ||
- | </ | ||
- | |||
- | A python script for plotting the mass and number budgets for the cloud microphysics can be found under: | ||
- | |||
- | models/ | ||
- | |||
- | in the same branch. Copy the script to your local computer or lustre and edit the script to read the correct input file(s) (instructions inside the script). Run the script by typing: | ||
- | |||
- | < | ||
- | python scriptname.py | ||
- | </ | ||
- | |||
- | in your terminal. | ||
- | |||
- | ===== Automatic AEROCOM analysis ===== | ||
- | |||
- | To prepare output so that it is processed automatically by the aerocom tools, use the script located at **models/ | ||
- | [[http:// | ||
- | |||
- | The script requires < | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | in the required format | ||
- | **NorESM-CAM5_svn{RevisionNumber}_YYMMDD{initials}_Freetext**. \\ | ||
- | |||
- | Example: | ||
- | " | ||
- | Initials AG: Alf Grini, AK: Alf Kirkevåg, DO: Dirk Olivie... | ||
- | |||
- | Where the date YYMMDD corresponds to the time when the AeroCom data preparation script has been executed. | ||
- | |||
- | The script creates files named like | ||
- | |||
- | “aerocom3_< | ||
- | |||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | |||
- | Note that VerticalCoordinateType is dependent on the variable!! It is not a question about " | ||
- | |||
- | The script copies files on norstore into | ||
- | **/ | ||
- | |||
- | ====== ESMval CIS JASMIN platform and tools ====== | ||
- | |||
- | ESMVALtool | ||
- | http:// | ||
- | |||
- | cis tools | ||
- | http:// | ||
- | |||
- | JASMIN | ||
- | http:// | ||
- | |||
- | ====== Post analysis and workup of CAM diagnostics output tables ====== | ||
- | |||
- | A tool for post analysis of (multiple) CAM diagnostics ASCII tables can be found in | ||
- | the following repository: | ||
- | |||
- | GitHub https:// | ||
- | |||
- | To get started, please follow the instructions in repository README (displayed in repository). Currently, the main | ||
- | analysis tool is a jupyter IPython notebook called | ||
- | |||
- | // | ||
- | |||
- | which includes more detailed instructions about setup and options. | ||
- | |||
- | Use the notebook | ||
- | |||
- | https:// | ||
- | |||
- | to download local copies of result tables using a list of URL's. | ||
- | |||
- | |||
- | **Short summary: | ||
- | The notebook reads multiple diagnostics files (runs) into one long table and creates heatmap plots | ||
- | of //Bias, RMSE and RMSE relative error// for a subset of variables (rows -> y-axis of heatmap) | ||
- | vs. the individual runs (columns -> xaxis). | ||
- | |||
- | **NOTE:** In the current version, you need to download all tables that you are interested in as csv or | ||
- | ascii into one directory, that is specified in the header of the notebook. | ||
- | |||
- | Variable groups can be defined in this config file: | ||
- | |||
- | https:// | ||
- | |||
- | **NOTE:** If you add groups to this file in your local copy of the repository, please consider sending | ||
- | the updated to [[mailto: | ||
- | remains up to date. | ||
- | |||
- | **Troubleshooting** | ||
- | |||
- | If you run into problems, please raise an issue in the repository or contact [[mailto: |