Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Question about CAM_chem and the AMWG Diagnostics Package_v140804

hannay

Cecile Hannay
AMWG Liaison
Staff member
 From user:
I am trying to evaluate the CAM-Chem (in CESM v1.2.2) performance with the O3 observations using the AMWG package (v140804). I have several questions about this package:1)      If have four years’ CAM-Chem outputs, should I calculate the four years’ monthly mean, and name them as “YYYY-01.nc”, “YYYY-02.nc”…and then provide the path in the “diag140804.csh”? Also when I try to run the C shell, it kept giving me the error messages and asked me to provide the file “YYYY-ANN.nc”, “YYYY-DJF.nc”. Should I provide these files too?2)      After preparing these files (If it was what I assumed), I do successfully run the C shell, but I only get the plots for “CSET1, CSET4, CSET7”, but not the plots for “Ozone Climatology Comparison profiles inCSET3”, “Vertical Profile Profiles Comparisons to NOAA Aircraft observations and to Emmons Aircraft Climatology in CSET5, CSET6”. Do you know why happens here?3)      For my simulations, I use the anthropogenic emissions in 2010 but with five years’ meteorology from 2008-2012. So I also want to know what the years of observations are included for the plots in CSET3, CSET4, CSET5, CSET6 and CSET7?
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
I am going to answer (1).I will ask teh person who is developping the CAM-chem diag to answer (2) and (3)If you have 4 years of the data, you don't need to rename them: “YYYY-01.nc”, “YYYY-02.nc”, ...You need to set the casename, specify the path and specify that you want to compute the climo and which years you want to use to compute the climo.For instance, say you ran the case f.e13.0001 for 4 years and your data are in /glade/scratch/archive/f.e13.0001/atm/hist,you need to set:set test_casename = f.e13.0001set test_path_history = /glade/scratch/hannay/archive/$test_casename/atm/hist/set test_compute_climo = 0 # (0=ON,1=OFF)set test_first_yr = 2 # first year (must be >= 1)set test_nyrs = 3 # number of yrs (must be >= 1)
 

tilmes

Member
For running the chemical diagnostics in the current version a couple of changes have to be made to some programs and some files have to be downloaded.1. The diagnostics sets are make for model-to-model comparisons, but cset3 and cset6 should also work for comparisons to data.2. For CSET5: in your code directory change in profiles_aircraft_noaa.ncl:dir_in = "/glade/p/acd/tilmes/amwg/amwg_diag_20131004_work/obs_data/aircraft" to dir_in = "$OBS_DATA/cam-chem/"; copy the following tar file to your OBS_DATA/cam-chem directory and detar: ftp://acd.ucar.edu/user/tilmes/AMWG/noaa.tar3. For cset5 and cset6 this should work fine, you have to make sure that  setenv OBS_DATA   is set to where your observational data are located. If that does not help, please send me your error message.The climatoogies used in the chemistry diagnostic set are described here:Tilmes, S., Lamarque, J.-F., Emmons, L. K., Kinnison, D. E., Ma, P.-L., Liu, X., Ghan, S., Bardeen, C., Arnold, S., Deeter, M., Vitt, F., Ryerson, T., Elkins, J. W., Moore, F., and Spackman, R.: Description and evaluation of tropospheric chemistry and aerosols in the Community Earth System Model (CESM1.2), Geosci. Model Dev. Discuss., 7, 8875-8940, doi:10.5194/gmdd-7-8875-2014, 2014.
 
 
Hi Tilmes,Thanks for clarifying my problems. Yes, by reading your GMD paper and Lamaque's 2012 ACP paper, I do have a better knowledge of the climatology datasets used in the package. However, I still have one problem not solved even Hannay replied me in the first comment. I changed my code exactly as what Hannay suggested, but I keep getting this error message: CHECKING FOR TEST CLIMO FILES ERROR: /nas02/depts/ese/chaq/yuqiangz/global_latitudinal_EmisChange/amwg_diagnostics/zyq_FGEOS_C4MOZ_L40CN2_2010.cam.h0.2010/zyq_FGEOS_C4MOZ_L40CN2_2010.cam.h0.2010_01_climo.nc NOT FOUND My setting are:set test_casename  = zyq_FGEOS_C4MOZ_L40CN2_2010.cam.h0.2010set test_filetype = monthly_historyset test_compute_climo = 0set test_first_yr = 2009 set test_nyrs     = 4
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
If you have 4 years of data, you can compute the climos only for 3 years. Or you need to run 2 more months. set test_first_yr = 2009 set test_nyrs     = 3
 
Hi Simone, I still can't get the CSET3 plots. The error messages in my log files are: CSET 3 Chemistry COMPARISON TO OZONESONDESANNANNCONVERTING SET2 PS FILES TO pngforeach: No match. Copyright (C) 1995-2013 - All Rights Reserved University Corporation for Atmospheric Research NCAR Command Language Version 6.1.2 The use of this software is governed by a License Agreement. See http://www.ncl.ucar.edu/ for more details.(0)     O3 and Z3 needed for this set to continue(0)     not calculated[1]  + Exit 1                         ... I checked that "Z3" means the "Geopotential height above sea level". What should I use to substitue this variable if I didn't save into *cam*h0* in the first place.  
 
Hi Hannay,Yes, I am able to compute the climo now, but stucked at not be able to get the CSET4, CSET5 and CSET6. I found out that there is no Z3 saved in my monthly history file. Is this variable time-variant? If only the surface Geo-potential height is needed, I can read this variable from other files. If not, I may need advice on how to get it. Otherwise, I have to rerun all my simulations.  Thanks for your advice. 
 

tilmes

Member
You can calcuate Z3 (which is dependent on lon, lat, lev, and time) from pressure (press): Z3 = 7.*alog(1000./press), press can be calcuated on model levels:   press = (hyam*P0 + hybm*PS) / 100. 
 
When I use this script to evalute the CAM-Chem with observations, all the scripts are running good, except for the one "profiles_aircraft_noaa.ncl". It kept giving me this error when reading the "O3TexAQS2000.nc file":"(0)     /nas02/depts/ese/chaq/yuqiangz/global_latitudinal_EmisChange/amwg_diagnostics/obs_data/cam-chem/O3TexAQS2000.ncfatal:Could not coerce values for operation^Mfatal:["Execute.c":8126]:Execute: Error occurred at or near line 224I searched online, and it suggested to be memory issue. But even I set the "unlimited" method, it still didn't work. And, this "O3TexAQS2000.nc" is so small, I don't know why it gives the memory issue. Maybe it's some other problem? I also tried to turn off the plot of "cset_1", "cset_2", "cset_3", "cset_4", "cset_7" off, and only kept the NOAA aircraft comparison and the Emmons aircraft comparions. Still the same error message.  Any suggestions? Thanks! 
 

tilmes

Member
Hi Yuqiang, please follow the corrections as listed in Comment #3 on March 23, 2015 - 12:18pm of the same topic on the bulliten board, Simone
 
Hi Simone, Yes, I have them in the script: ;  dir_in = "/glade/p/acd/tilmes/amwg/amwg_diag_20131004_work/obs_data/aircraft/"    dir_in = "/nas02/depts/ese/chaq/yuqiangz/global_latitudinal_EmisChange/amwg_diagnostics/obs_data/cam-chem/"    ;zyq, 3/23/15, change from glad to OBS_DATABut it didn't work. 
 
Yes, that's for sure. When I type "ls -lrt ..", it gives  -rw-r--r-- 1 yuqiangz graduate 1032 Jun 29 13:31 /nas02/depts/ese/chaq/yuqiangz/global_latitudinal_EmisChange/amwg_diagnostics/obs_data/cam-chem/O3TexAQS2000.nc I even try to move all the NOAA data files into different directores, as I think the path may be too long for NCL, but it turns out I am wrong. No one works, no matter the whole has a longer or shorter name.  Thanks! 
 
When I read the data using "ncdump O3TexAQS2000.nc", I found there are some missing data inside the file:"data: prof_mean = 63.85174, 74.5633, 69.19257, 63.12961, 59.86285, 63.49919, 77.07361, 80.52937, _, _ ; prof_med = 54.186, 71.501, 68.392, 62.587, 59.738, 61.788, 77.364, 77.812,  _, _ ;" This happens to all the other six NOAA aircraft files. Not sure whether this blank data are causing my scripts to crash, but I really have no idea why it fails. The files are only 4.0kb, should not be casued by the memory issue. Line 225 is the command to read the netcdf file by addfile "rin1 = addfile(dir_in+variablen(v)+aircraft(re1(re))+".nc","r")" "(0)     $OBS_DATA/cam-chem/O3TexAQS2000.ncfatal:Could not coerce values for operationfatal:["Execute.c":8126]:Execute: Error occurred at or near line 225"  
 
Top