Computational Science Community Wiki

Differences between revisions 30 and 31
Revision 30 as of 2017-08-11 16:16:31
Size: 5894
Editor: DouglasLowe
Comment:
Revision 31 as of 2017-08-11 16:17:19
Size: 5895
Editor: DouglasLowe
Comment:
Deletions are marked like this. Additions are marked like this.
Line 46: Line 46:
 *Information on how to access the MOZBC script can be found at: http://www.acom.ucar.edu/wrf-chem/  *Information on how to access the MOZBC script can be found at: http://www2.acom.ucar.edu/wrf-chem/

Running real.exe, Creating the Initial and Boundary Conditions and Making the Emission files.

Running real.exe

  • real.exe sets up the model domain using the settings in the namelist.input file. The met files created after running metgrid.exe must be linked into the working directory before real can be run. Running real creates the files:

    • wrfbdy_d<domain> - domain shape.

      wrfinput_d<domain> - input file for the period of the model run.

  • When running real.exe the start and end times in namelist.input must be for the whole period that you are intending to run wrfchem for. These dates can be changed later when running wrf.exe to account for using restart files.
  • After first running real, the wrfbdy and wrfinput files will have been created as for running WRF, i.e. they will only contain meteorological variables. When running WRF-Chem, these files need to be edited so as to contain realistic initial chemical concentrations and boundary conditions.

  • Real must be run again if the size or shape of the domain is changed or if the the model is modified, requiring a new compilation of WRF-Chem. However, the same wrfbdy and wrfinput files can be used for runs with different physical or chemical options. This makes sensitivity testing simpler and quicker.

Adding chemical and aerosol concentrations to initial and boundary conditions

!!! WARNING: in the default version of WRF-Chem, MOSAIC does not read in the boundary conditions for aerosol. Instead, it uses predefined mixing ratios, based on a campaign from Texas in 2004. To use initial and boundary conditions from the wrfinput and wrfbdy files, go to chem/modul_mosaic_initmixrats and set the CASENAME to 4 (line #17):

!CPP directives to control ic/bc conditions...
!(The directive in module_input_chem_data also needs to be set.)
!  CASENAME = 0   Uses Texas August 2004 case values and profiles
!             1   Uses same concentrations as TX, but uses different
!                 profiles depending on the species. (NEAQS2004 case)
!             2   Mexico City
!             3   Mexico City for Testbed, to be consistent with MADE/SORGAM too
!             4   bc,ic values from wrfinput and wrfbdy files
#define CASENAME 4

(n.b. this has been done in the local Manchester development version of WRF-chem).

MOZART-4 Boundary and Initial Conditions

The domain initial chemical concentrations and boundary conditions are taken from the output from MOZART-4 global model.

!!! It is recommended to use global data, for boundary conditions, rather than over a selected region, due to problems mapping onto the domain of interest when using a reduced domain. !!!

  • When the data is ready the user will receive an email with the link where the data can be downloaded from.
  • In order to extract this data onto a prescribed model domain, one has to use the MOZBC boundary script.
  • Information on how to access the MOZBC script can be found at: http://www2.acom.ucar.edu/wrf-chem/

  • To compile the script on HECToR you will need to change your environment thus:
    • NETCDF_DIR='/opt/cray/netcdf/4.2.0/pgi/119'
      module load pgi
  • To run, modify the .inp (e.g. CBMZ-MOSAIC_8bins.inp) file:

&control

do_bc     = .true.   ! set to .ture. to set boundary conditions
do_ic     = .true.    ! set to true to set initial conditions
domain    = 1        ! number of domain
dir_moz = './<path_to_mozart_data>/'
dir_wrf = './<path_to_wrfchem_working_directory>/ 
fn_moz  = 'h0001.nc' ! Name of mozart data
  • Recommended to use the naming convention x####.nc for mozart files. mozbc will automatically search though similarly named files to find correct time and date.
  • To run:

./mozbc < CBMZ-MOSAIC_8bins.inp 2>&1 | tee out_bc_cbmz_mos8bin.txt 

  • !!! Make sure map MOZART variables sensibly to variables carried in chemical scheme. The example scripts for CBMZ from the MOZART website do not map all species in the gas-phase. See example mapping scripts at bottom of page for mappings for CBMZ and CRIMECH !!!

MACC Boundary and Initial Conditions

Updating soil moisture fields

  • Over Brazil, new higher resolution grad data fields were aquired for soil moisture. to use:
    • edit make.sh and set the netcdf libraries to correct place ./make.sh (make sure netcdf libraries are correct first)
    • Set the geo_em and wrfinput filespaths in swapsm.90. make ni(1) and nj(2) equal to dimentions of domain -1
    • Check the gra data is in the current working directory and is named correctly in swapsm.90 (e.g. GL_SM.GPNR.2012070100.gra)
    • ./make.sh
    • ./swapsm
  • This should overwrite the SMOIS fields in the wrfinput file. This must be run each time real is run to correct the wrfinput files

============================================================== ============================================================== ==============================================================

MOZBC scripts

Scripts for applying MOZART global data to WRF boundary and input files can be downloaded from...

To compile the code on ARCHER use these settings:

module swap PrgEnv-cray PrgEnv-intel
module load netcdf

Modify the "make_mozbc" file to use "ifort" compiler on Linux systems (line 6). Then run make_mozbc

Example mapping scripts for MOZART and MACC data for CBMZ and CRIMECH

  • To be added soon.