Regridding Restarts for Fortuna 2.5: Difference between revisions
(23 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
'''Back to [[GEOS-5 Documentation for Fortuna 2.5]]''' | '''Back to [[GEOS-5 Documentation for Fortuna 2.5]]''' | ||
== 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 == | ||
Restarts can be easily created from MERRA data using the <code>regrid</code> script in <code>src/GMAO_Shared/GEOS_Util/post</code>. The same script can regrid restarts generated by different versions of Fortuna to the Fortuna 2.5 at any resolution. | |||
MERRA restarts | |||
Running <code>regrid</code> (after running <code>source g5_modules</code>) without arguments tells the story: | |||
<pre> | |||
GEOS_Util/post> regrid | |||
Usage -- To regrid MERRA restarts: | |||
---------------------------------- | |||
regrid -nymd YYYYMMDD | |||
-im IM | |||
-jm JM | |||
-out DIRECTORY | |||
where: YYYYMMDD is the desired Date from the MERRA Re-Analysis | |||
IM is the desired Zonal Dimension for ReGridding | |||
JM is the desired Meridional Dimension for ReGridding | |||
DIRECTORY is the full pathname of the desired OUTPUT location | |||
( Note: A regrid.rc file will be automatically generated ) | |||
Usage -- To regrid Non-MERRA restarts: | |||
-------------------------------------- | |||
regrid -rc REGRIDRC | |||
-out DIRECTORY | |||
where: REGRIDRC is the full pathname of a user-defined regrid.rc file | |||
DIRECTORY is the full pathname of the desired OUTPUT location | |||
GEOS_Util/post> | |||
</pre> | |||
So the following will create restarts in 0.25 degree resolution from MERRA on the first day of 1990 and put them in <code>/discover/nobackup/aeichman/regrid</code> | |||
regrid -nymd 19900101 -im 1152 -jm 721 -out /discover/nobackup/aeichman/regrid | |||
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> | |||
/ | |||
== Required Restarts == | == Required Restarts == | ||
Line 38: | Line 97: | ||
*<code>pchem_internal_rst</code> | *<code>pchem_internal_rst</code> | ||
*<code>gocart_internal_rst</code> | *<code>gocart_internal_rst</code> | ||
*<code>turb_internal_rst</code> | *<code>turb_internal_rst</code> | ||
*<code>saltwater_import_rst</code> | *<code>saltwater_import_rst</code> | ||
Line 48: | Line 106: | ||
*<code>agcm_import_rst</code> | *<code>agcm_import_rst</code> | ||
The | The restarts <code>irrad_internal_rst</code> and <code>solar_internal_rst</code> should ''not'' be regridded from earlier versions to Fortuna 2.5, as it must be bootstrapped. | ||
Note: if the grid dimensions are the same SOME restarts from earlier model versions may be used , while other may not. | Note: if the grid dimensions are the same SOME restarts from earlier model versions may be used , while other may not. | ||
Line 55: | Line 113: | ||
* All other restarts from earlier versions should be boot-strapped. | * All other restarts from earlier versions should be boot-strapped. | ||
==Regridding Upper-Air Related Restarts== | == Where to Find MERRA Restarts == | ||
If you lack a set of restarts for the appropriate date for an older version of Fortuna, you can derive yours from MERRA. | |||
MERRA restarts are available on the NCCS discover cluster under the following directories: | |||
/archive/g_proj5/production/GEOSdas-2_1_4/d5_merra_jan79/rs/ | |||
/archive/g_proj5/production/GEOSdas-2_1_4/d5_merra_jan89/rs/ | |||
/archive/g_proj5/production/GEOSdas-2_1_4/d5_merra_jan98/rs/ | |||
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 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 120: | 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 148: | Line 221: | ||
Your regridded restarts will be produced in the <code>OutData</code> directory. | Your regridded restarts will be produced in the <code>OutData</code> directory. | ||
===Old and New Tile Files=== | ====Old and New Tile Files==== | ||
There are two possible scenarios for regridding land-surface related | There are two possible scenarios for regridding land-surface related | ||
Line 175: | 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 197: | 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 == |