Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Format of AOD data for use with RRTMG and aer_opt = 2

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

juliaandrys

New member
Hi there,

I am trying to run a regional climate simulation using wrf with NorESM data and I would like to incorporate aerosol data in the simulation. I understand that using by aer_opt = 2, with RRTMG I should be able to provide the aod5502d data to wrf using a netcdf-wrf supported file via auxiliary input stream 15.

I have created the necessary files however, wrf returns the following error:

NetCDF error: NetCDF: Attribute not found
NetCDF error in ext_ncd_get_dom_ti.code CHAR, line 83 Element TITLE
Error trying to read metadata
File name that is causing troubles = wrfaerinp_d01
You can try 1) ensure that the input file was created with WRF v4 pre-processors, or
2) use force_use_old_data=T in the time_control record of the namelist.input file
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE: <stdin> LINE: 332
---- ERROR: The input file appears to be from a pre-v4 version of WRF initialization routines
-------------------------------------------

While I can incorporate the necessary elements into the metadata or apply the "force_use_old_data" namelist option, I wanted to ensure that I was on the right track with the way I am supplying this data to wrf before I tried these.

Should the auxiliary input stream 15 be used by real.exe? Is there a compilation step that I am missing to incorporate this data? Any additional information or advice you can provide on how I get wrf to read this data would be appreciated.

The relevant namelist options and metadata from my aux input file are below.

Thanks!

&time_control
auxinput15_inname = "wrfaerinp_d<domain>"
auxinput15_interval = 1440, 1440,
io_form_auxinput15 = 2,

&physics
mp_physics = 8, 8,
ra_lw_physics = 4, 4,
ra_sw_physics = 4, 4,
radt = 10, 10,
aer_opt = 2,
aer_aod550_opt = 2, 2
aer_angexp_opt = 3, 3
aer_ssa_opt = 3, 3
aer_asy_opt = 3, 3
aer_type = 1

netcdf wrfaerinp_d01 {
dimensions:
Time = UNLIMITED ; // (6 currently)
DateStrLen = 19 ;
west_east = 539 ;
south_north = 362 ;
variables:
float AOD5502D(Time, west_east, south_north) ;
AOD5502D:history = "2020-12-18T21:24:28Z altered by CMOR: Treated scalar dimension: \'wavelength\'. 2020-12-18T21:24:33Z altered by CMOR: Converted type from \'d\' to \'f\'." ;
AOD5502D:cell_measures = "area: areacella" ;
AOD5502D:cell_methods = "area: time: mean" ;
AOD5502D:eek:riginal_name = "DOD550" ;
AOD5502D:comment = "AOD from the ambient aerosols (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute \'wavelength: 550nm\'" ;
AOD5502D:missing_value = 1.e+20f ;
AOD5502D:_FillValue = 1.e+20f ;
AOD5502D:coordinates = "XLAT XLONG" ;
AOD5502D:units = "1" ;
AOD5502D:long_name = "Ambient Aerosol Optical Thickness at 550nm" ;
AOD5502D:standard_name = "atmosphere_optical_thickness_due_to_ambient_aerosol_particles" ;
char Times(Time, DateStrLen) ;

// global attributes:
:CDI = "Climate Data Interface version 1.9.10 (https://mpimet.mpg.de/cdi)" ;
 
Hi,

The namelist options look fine and I don't think REAL program has anything to do with aod5502d. It is probably just a data issue. I wonder whether you include XLAT/XLONG information in your wrfaerinp datafile? Also, Which version of WRF are you running?
 
I think there is a problem regarding the name of your input file "wrfaerinp_d<domain>"". Please try to rename your file name as "wrfaerinp_d.<domain>.<date>"" and try. This is an example of a file name that I use to run "CAMS_aerosols.d02.2019-04-10_18:00:00" then in the name list you need to that CAMS_aerosols.d02<domain>.<date> and it should be the exact date. Let me know the outcome
 
Hi there,

Thanks for the responses to this. In the end I managed to get wrf to read the aerosol data by exactly mirroring the file format and variable attributes in the wrflowinp data files (see below). In particular, the "Field Type = 104" variable attribute seemed to be key to the data being successfully read. I did also have to set "force_use_old_data = .True." These tests were using WRF4.1

ncdump -h wrfaerinp_d01_1950-01-01.nc
netcdf wrfaerinp_d01_1950-01-01 {
dimensions:
Time = UNLIMITED ; // (7 currently)
DateStrLen = 19 ;
south_north = 337 ;
west_east = 513 ;
variables:
char Times(Time, DateStrLen) ;
double AOD5502D(Time, south_north, west_east) ;
AOD5502D:coordinates = "XLONG XLAT" ;
AOD5502D:stagger = " " ;
AOD5502D:MemoryOrder = "XY" ;
AOD5502D:units = "no_units" ;
AOD5502D:long_name = "aod from NorESM" ;
AOD5502D:FieldType = 104 ;
float XLAT(south_north, west_east) ;
XLAT:FieldType = 104 ;
XLAT:MemoryOrder = "XY " ;
XLAT:description = "LATITUDE, SOUTH IS NEGATIVE" ;
XLAT:units = "degree_north" ;
XLAT:stagger = "" ;
XLAT:coordinates = "XLONG XLAT" ;
float XLONG(south_north, west_east) ;
XLONG:FieldType = 104 ;
XLONG:MemoryOrder = "XY " ;
XLONG:description = "LONGITUDE, WEST IS NEGATIVE" ;
XLONG:units = "degree_east" ;
XLONG:stagger = "" ;
XLONG:coordinates = "XLONG XLAT" ;
float Time(Time) ;
Time:long_name = "synthesized time coordinate from Times(time)" ;
Time:units = "hours since 1950-01-01 00:00:00" ;
Time:_CoordinateAxisType = "Time" ;
Time:calendar = "noleap" ;

// global attributes:
:Title = "Aerosol Properties" ;
}
 
Top