PORT

Overview

PORT is a Parallel Offline Radiative Transfer software tool.  

It is distributed as part of CESM.  It diagnoses radiative forcing as described in a GMD paper, PORT, a CESM tool for diagnosing radiative forcing.  

It is available as part of cesm1_2.  The discussion below is in the context of this release.

PORT is not supported in cesm version 1.2.2  due to some complications related to MAM (aerosol) optics.

It has worked in CESM release versions 1.0, 1.1, and 1.2

It currently works with the CAMRT (cam4) (and has been updated to work with the RRTMG (cam5)) radiation packages.  

If you have a version of CESM1_2 or later, you can run PORT.  Verification that everything is working is listed below.

This wiki is not necessarily up to date with CESM code standards.  Suggestions for improvement are welcome.

We look forward to hearing how this works or does not.  There are no guarantees or waranties.

Configuration options

  • To specify that the CESM/CAM driver should invoke only the offline radiation driver, instead of all of CAM
    •   -offline_drv rad
  • To specify the radiation package
    • -rad camrt  (-rad rrtmg only works partially at this point)
  • If you are using CESM scripts, you will need to specify stub surface models.

Namelist options

  • iradsw = 1, iradlw =1, iradae = 1  require all aspects of radiation to be computed every step
  • ndens = 1 produces double precision samples of the atmospheric state, so that the PORT analysis can be validated to roundoff (or bit-for-bit)
  • nhtfrq = 73 is found to be a good balance of sampling frequency, data size, and accuracy
  • avgflag_pertape = "I" is necessary, since radiative transfer through (for example) average cloud fractions can be misleading.
  • rad_driver_output = .true. samples the model state, heating rates, and fluxes necessary for offline diagnosis of forcing
  • offline_driver_fileslist = '/path/text_file_of_samples' is a file containing a list of files that are samples to be used in offline analysis
  • offline_driver_do_fdh = .true.  Allow temperatures above the tropopause to equilibrate under the assumption of fixed dynamical heating

Diagnostic outputs

  • FSNR is the shortwave (up) net flux at the tropopause
  • FLNR is the long wave (down) net flux at the tropopause
  • rad_qrs is the shortwave heating 
  • rad_qrl is the longwave heating

Example of computing forcing due to doubling CO2

  1. Sample the base state of a validated model for more than 16 months
    1. Configure with -rad camrt -phys cam4
    2. Add to the name list:
      1. iradsw = 1
      2. iradlw = 1
      3. iradae = 1
      4. ndens=1,1
      5. nhtfrq = 0,73
      6. mfilt = 1,1
      7. avgflag_pertape = 'A','I'
      8. rad_data_output = .true.
    3. Run for more than 16 months
    4. Create a file (/path/samples.inputs, as an example) that contains a list of the "h1" files (original.h1.file[n].nc) produced by this run.
  2. Validate PORT
    1. Configure CESM/CAM to compile the offline driver
      1. Configure with -offline_drv rad -rad camrt -phys cam4
    2. Add to the name list:
      1. iradsw = 1
      2. iradlw = 1
      3. iradae = 1
      4. ndens=1,1
      5. nhtfrq = 0,73
      6. mfilt = 1,1
      7. avgflag_pertape = 'A','I'
      8. rad_data_output = .true.
      9. offline_driver_fileslist = '/path/samples.inputs'
      10. offline_driver_do_fdh = .true.
    3. Validate
      1. The difference between the fluxes, FLNT,FLNR,FLNS,FSNT,FSNR,FSNS from the sampling step (1) and the validation step (2) should be the zero, however under some conditions there can be roundoff-level errors.
  3. Compute forcing due to a change in composition (CO2, as an example)
    1. Modify the composition specified by the sample files:
      1. (In this example) for each file listed in /path/samples.inputs, ncap -s"rad_CO2=2*rad_CO2" original.h1.file[n].nc 2xCO2.file[n].nc
      2. create a new file (/path/2xCO2samples.inputs) that lists each of the modified files (2xCO2.file[n].nc)
    2. Configure CESM/CAM to compile the offline driver
      1. Configure with -offline_drv rad -rad camrt -phys cam4
    3. Add to the name list:
      1. iradsw = 1
      2. iradlw = 1
      3. iradae = 1
      4. ndens=1,1
      5. nhtfrq = 0,73
      6. mfilt = 1,1
      7. avgflag_pertape = 'A','I'
      8. rad_data_output = .true.
      9. offline_driver_fileslist = '/path/2xCO2samples.inputs'
      10. offline_driver_do_fdh = .true.
    4. Forcing is the difference between 
      1. the net flux at the tropopause (FLNR-FSNR) from the last 12 months of the sample files  AND
      2. the net flux at the tropopause (FLNR-FSNR) from the last 12 months of the 2xCO2sample files

FAQ's:

  • Do I have to run with CAMRT (i.e., cam4 radiation)?
    • RRTMG works, but FDH is not implemented and MAM aerosols do not work
  • Do I have to run with iradsw,iradlw,iradae = 1?
    • No, but to validate that PORT is operating, it is necessary
  • Do I need to run with ndens = 1?
    • No, but to validate that PORT is operating, it is necessary.  And for RRTMG, validation is all but impossible without ndens=1
  • Can I use a different sampling, say nhtfrq =61?
    • Of course, but other samplings may not divide the year evenly, nor sample solar zenith angle, or other problems
    • We found that sampling every 73'rd time step was a good balance for dtime = 1800 and a 2-degree horizontal resolution for our purposes
    • Other sampling schemes have been effective also
    • For highly variable concentrations or correlations, every 73rd time step may not be a good choice
  • What does offline_driver_do_fdh = .false. do?
    • I computes "instantaneous" radiative forcing by differencing FLNT-FSNT between runs
  • Can I test the radiative effect of a change in optics for tropospheric sulfate?
    • Change the optics file in the "rad_climate" namelist to point to your new optics
      • i.e., N:sulf:/path_to_file/your_favorite_optics_file.nc
    • Run step 3 above, (with or without offline_driver_do_fdh)
    • Difference fluxes or rad_QRS or rad_QRL to diagnose the radiative effect of your new optics.
  • How do I give credit for the use of this code?
  • Where is the older version of PORT?
  • No labels