Releases: CohenBerkeleyLab/AutoWRFChem-Base
Quality-of-life improvements
This release makes some error messages clearer during input preparation.
Portability enhancement for AutoWRFChem
Overview
The two primary new features are:
- The ability to convert GEOS-Chem binary punch output input netCDF files that MOZBC can read, and
- The ability to specify an alternate MPI execution command to run WRF.
Specific changes:
- New program:
Tools/gc2moz/python/gc2moz.py
can be run to convert GEOS-Chem ND49 diagnostic binary punch output into netCDF files that MOZBC can read. - During the prepinpt step, MOZBC will look at the attributes of the netCDF file being read. If it has the global attribute "title" equal to "GEOS-Chem", it will look for the MOZBC input file with "-GC" appended before ".inp"
- When running WRF-Chem, the option
--alt-mpi-cmd
will cause it to execute WRF from within the WRFV3/run directory with the exact command given by the environmental variableAWC_MPICMD
. - During configuration, a check that
WRFIO_NCD_LARGE_FILE_SUPPORT
is set to 1 has been added. If the--override
option is used, then it will be set alongside the other variables.
AutoWRFChem-Base v1.1.1
Overview
This release enhances the functionality of the AutoWRFChem package based on experience using it for longer runs. It also includes some additional error checking functions to try to better verify the inputs to the preparation system.
Specific changes
Changes relevant to users
- RUNME setup script renamed to Runme so that it looks different from the directories
- Added smart handling of FDDA run time, so that you can automatically set the namelist to use FDDA for the entire run and it will update if the run time changes.
- FDDA is turned off for all but the final run of real.exe since it only needs to be done once and adds processing time.
- Adjusts available options in the WPS namelist based on the map projection chosen. When checking for NEI compatibility, it ensures that all the options expected by NEI are present.
- No longer separate options to load a domain or whole namelists. Instead, there is a single NAMELISTS folder, and you can load one or the other template files and an existing namelist. If there's any conflicts between the WRF and WPS namelists, the WPS namelist overrides the WRF one. Thus you can use a different WPS domain with an existing WRF namelist with the options you want.
- The path to the raw meteorology data is enforced not to have spaces, as this messes up the call to linkgrib
- If running with start and end dates in different years, the most representative year is chosen for scaling the emissions:
- If the start and end year are one year apart, the year that makes up the majority of the run is chosen
- If more than one year apart, the year at the midpoint of the run is chosen (these two are probably effectively equivalent now that I'm writing this)
- A list of expected raw met files (for NARR only at the moment) can be generated and used to make sure that all the expected met data is available.
- The chosen MOZART file for initial and boundary conditions is checked to make sure it covers the time period and domain of the run (with a 10 degree buffer around the domain edges)
- The wrfinput and wrfbdy files are checked to make sure that key met and chem variables are non-zero. If running met-only mode, this should only check met variables.
- The precheck for input preparation gives positive feedback as tests are passed
- Copies rsl.error.0000 to PREPLOGS as convert_hhz.log for each of the convert emiss runs (implicitly assumes WRF compiled in parallel)
- Added ability to split up the WPS work into multiple jobs that are automatically submitted (currently only configured to work with SLURM submissions). This effectively parallelizes the WPS work, useful for long runs that run into trouble with job time limits, or just take a long time to do serially.
- Restart capability made more intelligent:
- Will only select restart files in the time period specified by the namelist
- Allows you to specify the --allow-no-files option when calling "autowrfchem_main run rst"; this will try to find a restart file in the run's time period, but if it can't, will just start from the beginning.
- Added a --run-for option to for running WRF that will limit the run to a given time period from the starting date without forgetting the total run time (it uses the temporary namelist modification feature of autowrf_namelist.py). Intended for use with the "rst" option, so that you can specify, e.g. "run 40 days from the last restart file". It should not go past the permanent end date.
- This is intended to help users break a long run up into smaller chunks by calling autowrfchem_main run rst --run-for=xx each time.
- If you automate resubmitting jobs with this option, you will need to write your own logic to check if the last expected output file was created and stop submitting jobs.
Additional tools
- met2input script calls real.exe for every met file linked in the run directory to create a wrfinput file; this utilizes the interpolation routines written into real.exe to fully interpolate the meterological variables to the WRF grid for comparison against later model output.
- pyncdf.py is a very hacky alternative to the far superior netCDF4 Python package. Some elements of this repo use it as a fall back if you don't have netCDF4 installed (since it can be tricky). It calls ncdump and parses the output, unfortunately, this becomes untenable VERY quickly with large files.
Changes relevant to developers
- Options for meteorologies are now defined in CONFIG/metlist.txt; if you want to add a met type, add the options to that file.
- Along with this, some of the type list reading code was refactored to be shared between chem opts and met opts.
- All standard print-to-screen calls in the namelist classes in autowrf_classlib.py use the new module function msg_print, which allows printing to be turned off globally by setting DEBUG_LEVEL to 0; this avoids problems when using these classes in autowrf_namelist_main.py and trying to print a specific result to the shell to store in a shell variable.
- CONFIG/chemlist.txt now needs to specify options using the namelist:section:option syntax (e.g. wrf:chem:chem_opt = 2)
- Python tool datecompare.py added to allow date comparison without relying on the regular shell command "date" which has GNU and BSD versions with different syntax.
- How the exit code is computed for prepinpt changed to be clearer and more expandable, hopefully
AutoWRFChem-Base beta release
This release contains a beta version of the AutoWRFChem-Base code. The primary functionality of automating input preparation and the execution of WRF-Chem is present, some of the additional safety checks (such as ensuring that sufficient boundary condition data is available) have not been implemented in this version.
Auto WRF-Chem Base version 1.0.0
Functioning first version of Auto WRF-Chem base code. Automates the use of WRF-Chem with NEI anthropgenic emissions, MEGAN biogenic emissions, and MOZART boundary and initial conditions.
Primary use is via the "autowrfchem_main" script which drives all others. There are four main steps to this program:
-
config (configure) - includes WRF and WPS configuration, along with choice of environmental variables, some settings necessary for the automation code, and namelists. Namelists can be set independently of the other elements. Control of namelists is managed by a Python program contained in this repository.
-
compile - automatically compiles all necessary components in the proper sequence with the chosen environmental variables.
-
prepinpt (prepare input) - automatically prepares all meteorology and emissions data and places it in WRFV3/run. This includes the execution of MOZBC.
-
run - runs WRF after some quick checks to ensure all inputs expected are present.