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

Have extra information from RRTMG available in the history files

nuvolet

Toni Viudez
Member
Greetings,

I found that in /components/cam/src/physics/rrtmg/radconstants.F90 are the wavenumbers for the bands used in the SW:

Code:
   real(r8),parameter :: sw_wavenum_low(nbndsw) = & ! in cm^-1
   ! real(r8),parameter :: sw_wavenum_low = & ! in cm^-1
     (/2600._r8, 3250._r8, 4000._r8, 4650._r8, 5150._r8, 6150._r8, 7700._r8, &
       8050._r8,12850._r8,16000._r8,22650._r8,29000._r8,38000._r8,  820._r8/)

   real(r8),parameter :: sw_wavenum_high(nbndsw) = & ! in cm^-1
   ! real(r8),parameter :: sw_wavenum_high = & ! in cm^-1   
     (/3250._r8, 4000._r8, 4650._r8, 5150._r8, 6150._r8, 7700._r8, 8050._r8, &
      12850._r8,16000._r8,22650._r8,29000._r8,38000._r8,50000._r8, 2600._r8/)


And for the LW:

Code:
real(r8), parameter :: wavenumber1_longwave(nlwbands) = &! Longwave spectral band limits (cm-1)
    (/   10._r8,  350._r8, 500._r8,   630._r8,  700._r8,  820._r8,  980._r8, 1080._r8, &
       1180._r8, 1390._r8, 1480._r8, 1800._r8, 2080._r8, 2250._r8, 2390._r8, 2600._r8 /)

real(r8), parameter :: wavenumber2_longwave(nlwbands) = &! Longwave spectral band limits (cm-1)
    (/  350._r8,  500._r8,  630._r8,  700._r8,  820._r8,  980._r8, 1080._r8, 1180._r8, &
       1390._r8, 1480._r8, 1800._r8, 2080._r8, 2250._r8, 2390._r8, 2600._r8, 3250._r8 /)

I am looking for what could be better way to make this information available in the history files as we have latitude, longitude or time.

First I thought to try but unsuccessfully using the addfld function:

Code:
  call addfld ('sw_wavenum_low', 'A', 'cm^-1', &
      'Shortwave Wavenumber low bands in RRTMG', flag_xyfill=.true.,fill_value=-999.0_r8)

   call addfld ('sw_wavenum_high', 'A', 'cm^-1', &
      'Shortwave Wavenumber high bands in RRTMG', flag_xyfill=.true.,fill_value=-999.0_r8)

I add those lines in the aer_rad_props.F90 because I am also making the aerosol radiative properties for each wavenumber available in the history files from that module.

Additionally, it looks like most of the functions used for the history files (addfld, add_default, outfld, etc) are in ~/cam/src/control/cam_history.F90. If I would any change here to add those new metadata information (SW and LW bands used in RRTMG) I do not know how to send those new modification in the ~/cime/scripts/$casename/SourceMods/.
In this path there are multiple folders such as: src.clm, src.cice, src.docn, src.mosart, src.siac, src.share, src.drv and src.cam. In which one should I point these changes.
I hope it makes sense my concern about how to had this new information I the history files
Any suggestion where should I start?.

Thanks in advance
 
Top