Regridding for the new Landice Component: Difference between revisions
Initial add up to regrid |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
--[[User:Mathomp4|Matt Thompson]] 06:30, 28 December 2012 (PST) | --[[User:Mathomp4|Matt Thompson]] 06:30, 28 December 2012 (PST) | ||
== | == Obtain a Landice internal restart that works at 21z == | ||
Larry Takacs sent this email about the new | Larry Takacs sent this email about the new Landice: | ||
<nowiki>All, | <nowiki>All, | ||
Line 26: | Line 26: | ||
Larry</nowiki> | Larry</nowiki> | ||
These restarts are at 00z, but for simplicity's sake, I prefer 21z as that works with Larry's HISTORY.rc from gcm_setup easily. | These restarts are at 00z, but for simplicity's sake, I prefer 21z as that works with Larry's <tt>HISTORY.rc</tt> from <tt>gcm_setup</tt> easily. | ||
=== Get 00z restarts === | === Get 00z restarts === | ||
Line 71: | Line 71: | ||
=== Rename 21z restarts === | === Rename 21z restarts === | ||
We are going to use Joe Stassi's regrid.pl script to do our regridding from MERRA and for regridding our | We are going to use Joe Stassi's <tt>regrid.pl</tt> script to do our regridding from MERRA and for regridding our Landice restart. So, we need to get the restart in the correct format. | ||
$ cd $NOBACKUP/Restarts-G20/c90-Full-newlandice | $ cd $NOBACKUP/Restarts-G20/c90-Full-newlandice | ||
Line 109: | Line 109: | ||
turb_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180 | turb_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180 | ||
turb_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180 | turb_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180 | ||
== Regrid from MERRA == | |||
The next step is to use Joe Stassi's <tt>regrid.pl</tt> script to create some restarts at 21z on 1990-NOV-28. We'll first run two sets of runs at 144x91 and c48 to get a command to use for automated generation. | |||
=== Run regrid.pl for 144x91 === | |||
$ cd $ESMADIR/Linux/bin | |||
$ ./regrid.pl | |||
<nowiki>Regrid from MERRA restarts (y/n)? [n] y | |||
Enter ymd (yyyymmdd): 19901128 | |||
Enter hour (hh): 21 | |||
---------------- | |||
Atmosphere Grids | |||
---------------- | |||
Lat/Lon Grids Cubed-Sphere Grids | |||
------------- ------------------ | |||
b = 2 deg C48 C360 C1000 | |||
c = 1 deg C90 C500 C1440 | |||
d = 1/2 deg C180 C720 C2880 | |||
e = 1/4 deg | |||
Getting INPUT atmosphere grid resolution from fvcore file ... Done | |||
INPUT atmosphere grid: D | |||
Enter OUTPUT atmosphere grid: b | |||
Ocean Grids | |||
----------- | |||
c = 360x180 (Reynolds) | |||
f = 2880x1440 (OSTIA) | |||
INPUT ocean grid: c | |||
Enter OUTPUT ocean grid: [c] | |||
GCM BCS tags | |||
------------ | |||
Fortuna-1_4 | |||
Fortuna-1_5 | |||
Fortuna-2_0 | |||
Fortuna-2_1 | |||
Ganymed-1_0 | |||
Ganymed-1_0_m1 | |||
Ganymed-1_0_m2 | |||
Ganymed-1_0_M | |||
Ganymed-1_0_D | |||
Enter OUTPUT GCM BCS tag: [Ganymed-1_0_M] | |||
Regrid upperair restarts (y/n)? [y] | |||
Regrid surface restarts (y/n)? [y] | |||
Enter OUTPUT directory for new restarts: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91 | |||
Enter Experiment ID for OUTPUT restarts [b_d5_merra_jan89] | |||
Write rst.lcv restart (y/n)? [y] n | |||
Append tag/grid label to names of final restarts (y/n)? [n] | |||
=============== | |||
REGRID RESTARTS | |||
=============== | |||
ESMABIN: /gpfsm/dswdev/mathomp4/Models/Ganymed-2_0_UNSTABLE/GEOSagcm/Linux/bin | |||
ESMATAG: Ganymed-2_0_UNSTABLE | |||
logfile: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91/b_d5_merra_jan89.19901128_21z.log | |||
upper-air: yes | |||
surface: yes | |||
bkg/satb: no | |||
rst.lcv: no | |||
namelabel: no | |||
# inputs | |||
#------- | |||
. expid: d5_merra_jan89 | |||
. date: 19901128 | |||
. hour: 21 | |||
. atmos grid: 540x361 (D) | |||
. ocean grid: 360x180 (c) | |||
. GCM tag: Fortuna-1_4 | |||
. rstdir: /archive/g_proj5/production/GEOSdas-2_1_4/d5_merra_jan89/rs/Y1990/M11 | |||
# intermediate-1 (surface only) | |||
#--------------- | |||
. expid: b_d5_merra_jan89-mid1 | |||
. date: 19901128 | |||
. hour: 21 | |||
. atmos grid: 576x361 (d) | |||
. ocean grid: 360x180 (c) | |||
. GCM tag: Fortuna-2_1 | |||
. rescale: no | |||
. outdir: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91 | |||
. workdir: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91/19901128_7086 | |||
# intermediate-2 (surface only) | |||
#--------------- | |||
. expid: b_d5_merra_jan89-mid2 | |||
. date: 19901128 | |||
. hour: 21 | |||
. atmos grid: 576x361 (d) | |||
. ocean grid: 360x180 (c) | |||
. GCM tag: Ganymed-1_0_m1 | |||
. rescale: yes | |||
. outdir: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91 | |||
. workdir: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91/19901128_7086 | |||
# outputs | |||
#-------- | |||
. expid: b_d5_merra_jan89 | |||
. date: 19901128 | |||
. hour: 21 | |||
. atmos grid: 144x91 (b) | |||
. ocean grid: 360x180 (c) | |||
. GCM tag: Ganymed-1_0_M | |||
. rescale: no | |||
. outdir: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91 | |||
. workdir: /gpfsm/dnb31/mathomp4/Restarts-G20/144x91/19901128_7086 | |||
=============== | |||
Continue (y/n)? [y] | |||
...<snip></nowiki> | |||
When this succeeds you'll have a file, <tt>b_d5_merra_jan89.19901128_21z.CMD</tt>, which details how the regrid.pl ran: | |||
$ cat b_d5_merra_jan89.19901128_21z.CMD | |||
#!/usr/local/bin/csh | |||
#=============================================================================== | |||
# The following command was used to create the b_d5_merra_jan89.19901128_21z restarts | |||
#=============================================================================== | |||
set ESMABIN = /gpfsm/dswdev/mathomp4/Models/Ganymed-2_0_UNSTABLE/GEOSagcm/Linux/bin | |||
$ESMABIN/regrid.pl -ymd 19901128 -hr 21 -grout b -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/144x91 -nobkg -nolbl -nolcv \ | |||
-tagout Ganymed-1_0_M -newid b_d5_merra_jan89 -rs 3 -oceanout c | |||
'''Note:''' The above last command is actually on one line, but I've split it for display's sake. | |||
=== Run regrid.pl for c48 === | |||
Do a similar run for c48 and get out this command: | |||
$ cat C48_d5_merra_jan89.19901128_21z.CMD | |||
#!/usr/local/bin/csh | |||
#=============================================================================== | |||
# The following command was used to create the C48_d5_merra_jan89.19901128_21z restarts | |||
#=============================================================================== | |||
set ESMABIN = /gpfsm/dswdev/mathomp4/Models/Ganymed-2_0_UNSTABLE/GEOSagcm/Linux/bin | |||
$ESMABIN/regrid.pl -ymd 19901128 -hr 21 -grout C48 -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/c48 -nobkg -nolbl -nolcv \ | |||
-tagout Ganymed-1_0_M -newid C48_d5_merra_jan89 -rs 3 -oceanout c | |||
=== Regrid all the other resolutions === | |||
We now have commands we can use to regrid to other resolutions. Create a simple script to do so: | |||
<nowiki>#!/usr/local/bin/csh | |||
set ESMABIN = /gpfsm/dswdev/mathomp4/Models/Ganymed-2_0_UNSTABLE/GEOSagcm/Linux/bin | |||
# 144x91 | |||
# ------ | |||
echo y | $ESMABIN/regrid.pl -merra -ymd 19901128 -hr 21 -grout b -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/144x91 \ | |||
-nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid b_d5_merra_jan89 -rs 3 -oceanout c | |||
# 288x181 | |||
# ------- | |||
echo y | $ESMABIN/regrid.pl -merra -ymd 19901128 -hr 21 -grout c -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/288x181 \ | |||
-nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid c_d5_merra_jan89 -rs 3 -oceanout c | |||
# C48 | |||
# --- | |||
echo y | $ESMABIN/regrid.pl -merra -ymd 19901128 -hr 21 -grout C48 -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/c48 \ | |||
-nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid C48_d5_merra_jan89 -rs 3 -oceanout c | |||
# C90 | |||
# --- | |||
echo y | $ESMABIN/regrid.pl -merra -ymd 19901128 -hr 21 -grout C90 -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/c90 \ | |||
-nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid C90_d5_merra_jan89 -rs 3 -oceanout c</nowiki> | |||
with other similar commands for other resolutions. | |||
== Regrid the good Landice restarts == | |||
Now we need to work at getting a good Landice restart. Again we'll use Joe's script. | |||
This time a run leads to a run-line like: | |||
<nowiki>echo y | $ESMABIN/regrid.pl -ymd 19901128 -hr 21 -grout b -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/144x91-newlandice \ | |||
-d /gpfsm/dnb31/mathomp4/Restarts-G20/c90-Full-newlandice -tagin Ganymed-1_0_M -oceanin c \ | |||
-nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid b_newlandice -rs 2 -oceanout c</nowiki> | |||
This line only does surface restarts (<tt>-rs 2</tt>). | |||
== Rename restarts for GCM == | |||
This isn't very automated yet, but I first use this script to rename the restarts as made above: | |||
<nowiki>$ ls | |||
C48_d5_merra_jan89.19901128_21z.CMD C48_d5_merra_jan89.landice_internal_rst.19901128_21z.bin | |||
C48_d5_merra_jan89.19901128_21z.log C48_d5_merra_jan89.moist_internal_rst.19901128_21z.bin | |||
C48_d5_merra_jan89.agcm_import_rst.19901128_21z.bin C48_d5_merra_jan89.pchem_internal_rst.19901128_21z.bin | |||
C48_d5_merra_jan89.catch_internal_rst.19901128_21z.bin C48_d5_merra_jan89.saltwater_internal_rst.19901128_21z.bin | |||
C48_d5_merra_jan89.fvcore_internal_rst.19901128_21z.bin regrid.C48_d5_merra_jan89.19901128_21z.48x288.j | |||
C48_d5_merra_jan89.lake_internal_rst.19901128_21z.bin regrid.o1536224 | |||
$ restart_name_clean | |||
Changing C48_d5_merra_jan89.agcm_import_rst.19901128_21z.bin to agcm_import_rst... | |||
Changing C48_d5_merra_jan89.catch_internal_rst.19901128_21z.bin to catch_internal_rst... | |||
Changing C48_d5_merra_jan89.fvcore_internal_rst.19901128_21z.bin to fvcore_internal_rst... | |||
Changing C48_d5_merra_jan89.lake_internal_rst.19901128_21z.bin to lake_internal_rst... | |||
Changing C48_d5_merra_jan89.landice_internal_rst.19901128_21z.bin to landice_internal_rst... | |||
Changing C48_d5_merra_jan89.moist_internal_rst.19901128_21z.bin to moist_internal_rst... | |||
Changing C48_d5_merra_jan89.pchem_internal_rst.19901128_21z.bin to pchem_internal_rst... | |||
Changing C48_d5_merra_jan89.saltwater_internal_rst.19901128_21z.bin to saltwater_internal_rst... | |||
No cap_restart found. Copying from lower directory... | |||
Removing regrid.o*... | |||
Removing agcm_import_rst... | |||
Removing *.CMD | |||
Removing *.log | |||
Removing *.j | |||
$ ls | |||
cap_restart* fvcore_internal_rst landice_internal_rst pchem_internal_rst | |||
catch_internal_rst lake_internal_rst moist_internal_rst saltwater_internal_rst</nowiki> | |||
where <tt>cap_restart</tt> is just "<tt>19901128 210000</tt>" and <tt>restart_name_clean</tt> is: | |||
<nowiki>#!/bin/bash | |||
if test -n "$(find . -maxdepth 1 -name '*_rst*bin' -print -quit)" | |||
then | |||
for file in *_rst*bin | |||
do | |||
origfile=$file | |||
file=${file%.*.*bin} | |||
file=${file#*.} | |||
echo "Changing $origfile to $file..." | |||
mv $origfile $file | |||
done | |||
fi | |||
if [ ! -e cap_restart ] | |||
then | |||
echo "No cap_restart found. Copying from lower directory..." | |||
if [ -e ../cap_restart ] | |||
then | |||
cp ../cap_restart . | |||
else | |||
echo "No cap_restart found below. Exiting!" | |||
exit 10 | |||
fi | |||
fi | |||
if [ -e regrid.rc ] | |||
then | |||
echo "Removing regrid.rc..." | |||
/bin/rm regrid.rc | |||
fi | |||
if [ -e regrid.o* ] | |||
then | |||
echo "Removing regrid.o*..." | |||
/bin/rm regrid.o* | |||
fi | |||
if [ -e agcm_import_rst ] | |||
then | |||
echo "Removing agcm_import_rst..." | |||
/bin/rm agcm_import_rst | |||
fi | |||
if [ -e *.CMD ] | |||
then | |||
echo "Removing *.CMD" | |||
/bin/rm *.CMD | |||
fi | |||
if [ -e *.log ] | |||
then | |||
echo "Removing *.log" | |||
/bin/rm *.log | |||
fi | |||
if [ -e *.j ] | |||
then | |||
echo "Removing *.j" | |||
/bin/rm *.j | |||
fi</nowiki> | |||
Do the same thing in the <tt>newlandice</tt> directories as well. | |||
== Move the new Landice restart == | |||
Well, this is simple, just move, say <tt>c48-newlandice/landice_internal_rst</tt> to <tt>c48</tt>. |