Urban-M4 / snakemake-wrf

Random notes, scripts, et cetera
Apache License 2.0
2 stars 1 forks source link

Add multiple setups for wrf-runner #10

Closed ClaireDons closed 5 months ago

ClaireDons commented 5 months ago

Added support for different namelists and setups to wrf-runner:

Currently the GEOGRID.TBL.ARW_WUR has hardcoded paths to the WUR specific variables, it would be nice to change this to rel_path in the future.

Peter9192 commented 5 months ago

Just now I was wondering: is it useful to have multiple namelists, or are the differences small enough to have one "template" namelist, and adjust a few settings in the workflow? Just like I did initially for the geogrid/metgrid table settings, using f90nml:

https://github.com/Urban-M4/misc/blob/924b7848fc2ac7d0ce8c3a592ecac17516de1612/wrf-runner/wrf_runner.sh#L46

Just to dissect this line:

f90nml \                                            # use this tool from the command line
  -g geogrid \                                      # from the geogrid group/section
  -v opt_geogrid_tbl_path="'$WPS_HOME/geogrid/'" \  # set the variable "opt_geogrid_table_path" to "some/other/path"
  namelist.wps \                                    # starting from namelist.wps as input file
  patched_nml                                       # and writing the modified namelist to a new file called "patched_nml"
ClaireDons commented 5 months ago

Just now I was wondering: is it useful to have multiple namelists, or are the differences small enough to have one "template" namelist, and adjust a few settings in the workflow? Just like I did initially for the geogrid/metgrid table settings, using f90nml:

https://github.com/Urban-M4/misc/blob/924b7848fc2ac7d0ce8c3a592ecac17516de1612/wrf-runner/wrf_runner.sh#L46

Just to dissect this line:

f90nml \                                            # use this tool from the command line
  -g geogrid \                                      # from the geogrid group/section
  -v opt_geogrid_tbl_path="'$WPS_HOME/geogrid/'" \  # set the variable "opt_geogrid_table_path" to "some/other/path"
  namelist.wps \                                    # starting from namelist.wps as input file
  patched_nml                                       # and writing the modified namelist to a new file called "patched_nml"

I was thinking the same thing, I think only a couple of lines change. I also think that the all of the geogrid tables are quite similar. I can have a look!