Regridding Restarts for Fortuna 2.5: Difference between revisions
(8 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
== The Easiest Way: Using Restarts from Earlier Versions of Fortuna == | == The Easiest Way: Using Restarts from Earlier Versions of Fortuna == | ||
Restart files from Fortuna 2.4 may be used for Fortuna 2.5 with the exception of <code>solar_internal_rst</code>, which must be bootstrapped. Currently, this can be accomplished simply | Restart files from Fortuna 2.4 may be used for Fortuna 2.5 with the exception of <code>solar_internal_rst</code>, which must be bootstrapped. Currently, this can be accomplished simply by deleting that restart file and running the model for a day -- the full set of restarts will be created before the model returns. Restarts from Fortuna 2.3 or Fortuna 2.2 can be used by bootstrapping <code>solar_internal_rst</code> and <code>irrad_internal_rst</code>. The above assumes that the restarts have the same resolution, otherwise regridding is necessary. Restarts from versions earlier than Fortuna 2.2 must be regridded to use with Fortuna 2.5. | ||
== The Next Easiest Way: Using the <code>regrid</code> Script == | == The Next Easiest Way: Using the <code>regrid</code> Script == | ||
Line 47: | Line 47: | ||
For sources other than MERRA, you will have to specify the location of a regrid resource file that contains the model version, resolution and location of the source restarts, and the resolution of the output restarts. A sample regrid resource file is <code>regrid.rc</code> in the same directory as the <code>regrid</code> script. Note that <code>regrid</code> only works for creating restarts for its model tag, and does not work at all for making restarts for tags before Fortuna 2.5. Restarts for earlier model tags have to be created "manually". | For sources other than MERRA, you will have to specify the location of a regrid resource file that contains the model version, resolution and location of the source restarts, and the resolution of the output restarts. A sample regrid resource file is <code>regrid.rc</code> in the same directory as the <code>regrid</code> script. Note that <code>regrid</code> only works for creating restarts for its model tag, and does not work at all for making restarts for tags before Fortuna 2.5. Restarts for earlier model tags have to be created "manually". | ||
== Renaming Restart Files == | |||
At this point you will have restart files with a fair bit of cruft in the filenames. As described above, they will have to be renamed for the model to recognize them. There are a number of scripts with different techniques for completing this tedious chore; here is one example: | |||
<pre> | |||
#!/usr/bin/env python | |||
import re | |||
import os | |||
# Open file for reading | |||
dirlist = os.listdir(".") | |||
for file in dirlist: | |||
if( re.search(".*rst.*",file) ): | |||
print file | |||
# the concept is to match ??????.something_rst.??????? OR something_rst.???????? | |||
# and extract "something_rst" | |||
newfile = re.sub(r'(^.+\.|^)([a-z_]+rst)\..+$',r'\2',file) | |||
print newfile | |||
if cmp(newfile,file): | |||
os.symlink(file,newfile) | |||
</pre> | |||
It will grab anything in the current working directory resembling the common forms of restart filename generated by the regridding scripts and other utilities and create symbolic links to them in the same directory with the superfluous parts of the filenames stripped. In an experiment directory the links will be overwritten by the model with "fresh" restart files at the end of a run segment. Alternatively, you can easily copy the restart files with <code>cp *rst</code> | |||
Line 96: | Line 124: | ||
Restarts are in subdirectories according to their respective year and month. The are in the form (as an example) <code>d5_merra_jan79.catch_internal_rst.19910128_21z.bin</code>, which you would otherwise know as <code>catch_internal_rst</code> (with the appropriate <code>cap_restart</code>). Be aware that a <code>cp</code> from <code>/archive</code> may appear to hang initially -- sometimes for hours -- while the appropriate tape is queued for mounting. Alternatively, run <code>dmget</code> on the files before copying them: this will retrieve the files and have them ready for copying once the command returns. | Restarts are in subdirectories according to their respective year and month. The are in the form (as an example) <code>d5_merra_jan79.catch_internal_rst.19910128_21z.bin</code>, which you would otherwise know as <code>catch_internal_rst</code> (with the appropriate <code>cap_restart</code>). Be aware that a <code>cp</code> from <code>/archive</code> may appear to hang initially -- sometimes for hours -- while the appropriate tape is queued for mounting. Alternatively, run <code>dmget</code> on the files before copying them: this will retrieve the files and have them ready for copying once the command returns. | ||
==Regridding Upper-Air Related Restarts== | ==Regridding Restarts Manually== | ||
If you need restarts for a model tag before Fortuna 2.5, you will have to regrid them manually. This section shows you how. | |||
===Regridding Upper-Air Related Restarts=== | |||
Within your build, go to the directory: | Within your build, go to the directory: | ||
Line 161: | Line 193: | ||
Note that even if you have no restarts that fall under the <code>-other</code> option, you still have to include that option (with nothing after it) in the command. | Note that even if you have no restarts that fall under the <code>-other</code> option, you still have to include that option (with nothing after it) in the command. | ||
==Regridding Land-Surface Related Restarts== | ===Regridding Land-Surface Related Restarts=== | ||
Within your build, go to: | Within your build, go to: | ||
Line 216: | Line 248: | ||
Depending on which tile file you are regridding to, there are two procedures: | Depending on which tile file you are regridding to, there are two procedures: | ||
===== | =====Target tile file is from OLD set (model tags <code>Fortuna-1_4</code> and earlier)===== | ||
Since your target tile file is OLD (and not consistent with the new | Since your target tile file is OLD (and not consistent with the new | ||
<code>mosaic_veg_typs_fracs</code> data), you have to remove the | <code>mosaic_veg_typs_fracs</code> data), you have to remove the | ||
Line 238: | Line 270: | ||
/discover/nobackup/ltakacs/bcs/Fortuna-1_4/540x361/lai_green_clim_540x361_DC.data</code> | /discover/nobackup/ltakacs/bcs/Fortuna-1_4/540x361/lai_green_clim_540x361_DC.data</code> | ||
===== | ===== Target tile file is from NEW set (model tags <code>Fortuna-1_5</code> and later)===== | ||
In this case, the target tile files are consistent with the <code>mosaic_veg_typs_fracs</code> dataset which resides in the <code>InData</code> directory. | In this case, the target tile files are consistent with the <code>mosaic_veg_typs_fracs</code> dataset which resides in the <code>InData</code> directory. | ||
Therefore you do not have link in the old <code>nirdf.dat</code>, <code>visdf.dat</code>, and | Therefore you do not have link in the old <code>nirdf.dat</code>, <code>visdf.dat</code>, and | ||
<code>lai_grn_clim</code> datasets. For Fortuna 2.2 you do have to copy or link the <code>clsm</code> directory in directory with the appropriately-dimensioned tile files. | <code>lai_grn_clim</code> datasets. For Fortuna 2.2 you do have to copy or link the <code>clsm</code> directory in directory with the appropriately-dimensioned tile files. | ||
== Bootstrapping for a Complete Set of Restarts == | == Bootstrapping for a Complete Set of Restarts == |