Regridding for the new Landice Component: Difference between revisions

From GEOS-5
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision 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)


== Step 1: Obtain a LANDICE internal restart that works at 21z ==
== Obtain a Landice internal restart that works at 21z ==


Larry Takacs sent this email about the new LANDICE:
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 LANDICE restart. So, we need to get the restart in the correct format.
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 110: Line 110:
  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


== Step 2: Regrid from MERRA ==
== Regrid from MERRA ==


The next step is to use Joe Stassi's regrid.pl 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.
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 ===
=== Run regrid.pl for 144x91 ===
Line 231: Line 231:
...<snip></nowiki>
...<snip></nowiki>


When this succeeds you'll have a file, b_d5_merra_jan89.19901128_21z.CMD, which details how the regrid.pl ran:
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  
  $ cat b_d5_merra_jan89.19901128_21z.CMD  
  #!/usr/local/bin/csh
  #!/usr/local/bin/csh
Line 259: Line 259:


We now have commands we can use to regrid to other resolutions. Create a simple script to do so:
We now have commands we can use to regrid to other resolutions. Create a simple script to do so:
  <nowiki>$ cat regrid.latlon.csh
  <nowiki>#!/usr/local/bin/csh
#!/usr/local/bin/csh


set ESMABIN = /gpfsm/dswdev/mathomp4/Models/Ganymed-2_0_UNSTABLE/GEOSagcm/Linux/bin
set ESMABIN = /gpfsm/dswdev/mathomp4/Models/Ganymed-2_0_UNSTABLE/GEOSagcm/Linux/bin
Line 276: Line 275:
                             -nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid c_d5_merra_jan89 -rs 3 -oceanout c
                             -nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid c_d5_merra_jan89 -rs 3 -oceanout c


# 576x361
# C48
# -------
# ---


echo y | $ESMABIN/regrid.pl -merra -ymd 19901128 -hr 21 -grout d -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/576x361 \
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 d_d5_merra_jan89 -rs 3 -oceanout c
                             -nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid C48_d5_merra_jan89 -rs 3 -oceanout c


# 1152x721
# C90
# --------
# ---


echo y | $ESMABIN/regrid.pl -merra -ymd 19901128 -hr 21 -grout e -outdir /gpfsm/dnb31/mathomp4/Restarts-G20/1152x721 \
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 e_d5_merra_jan89 -rs 3 -oceanout c</nowiki>
                             -nobkg -nolbl -nolcv -tagout Ganymed-1_0_M -newid C90_d5_merra_jan89 -rs 3 -oceanout c</nowiki>


and something similarly ugly for the cubed-sphere.
with other similar commands for other resolutions.


== Step 3: Regrid the good Landice restarts ==
== Regrid the good Landice restarts ==


Now we need to work at getting a good LANDICE restart. Again we'll use Joe's script.
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:
This time a run leads to a run-line like:
Line 299: Line 298:
                             -d /gpfsm/dnb31/mathomp4/Restarts-G20/c90-Full-newlandice -tagin Ganymed-1_0_M -oceanin c \  
                             -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>
                             -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>.

Latest revision as of 10:31, 28 December 2012

This page will lay out how I am creating my new Ganymed-2_0_UNSTABLE restarts for the new Landice component

--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 Landice:

All,

I have just pushed my Ganymed-2_0_UNSTABLE tag to include the new 
LANDICE component from Bin.
Please be aware that this component requires new restarts.

Our current strategy will be to combine regridded restarts from other 
sources (MERRA, Ops, etc) with the regridded Landice_internal_rst from 
my AMIP experiment:

/archive/u/ltakacs/GEOS5.0/G10_ICE/restarts

If you need a quick test, you can use restarts from my cubed-sphere C90 
test:

/discover/nobackup/ltakacs/test_ice

Atanas, I still have to merge and test the new FMS.
Larry

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.

Get 00z restarts

In the directory:

/archive/u/ltakacs/GEOS5.0/G10_ICE/restarts

Larry has restarts generated from an AMIP run. These restarts are based at 00z. I selected 1990-NOV-28:

$ cd /archive/u/ltakacs/GEOS5.0/G10_ICE/restarts/Y1990/
$ dmget restarts.e19901128_00z.tar
$ cp restarts.e19901128_00z.tar $NOBACKUP/Restarts-G20/FromLarry-c90-00z/

Rename 00z restarts

$ cd $NOBACKUP/Restarts-G20/FromLarry-c90-00z/
$ tar xf restarts.e19901128_00z.tar
$ ls
G10_ICE.catch_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.fvcore_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.irrad_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.lake_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.landice_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.moist_import_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.moist_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.pchem_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.saltwater_import_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.saltwater_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.solar_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.surf_import_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.turb_import_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
G10_ICE.turb_internal_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
restarts.e19901128_00z.tar*
$ rename G10_ICE. '' *rst*
$ rename _rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180 _rst *_rst.e19901128_00z.Ganymed-1_0.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
$ ls
catch_internal_rst   lake_internal_rst     moist_internal_rst           saltwater_import_rst    surf_import_rst
fvcore_internal_rst  landice_internal_rst  pchem_internal_rst           saltwater_internal_rst  turb_import_rst
irrad_internal_rst   moist_import_rst      restarts.e19901128_00z.tar*  solar_internal_rst      turb_internal_rst

Generate 21z restarts

The next step is to run the model for 21 hours and get a set of restarts from that. This is simple.

Rename 21z restarts

We are going to use Joe Stassi's regrid.pl 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
$ cp $NOBACKUP/stockG20U-landice-21hour-c90/restarts/restarts.e19901128_21z.tar .
$ tar xf restarts.e19901128_21z.tar
$ ls
restarts.e19901128_21z.tar
stockG20U-landice-21hour-c90.catch_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.fvcore_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.irrad_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.lake_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.landice_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.moist_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.moist_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.pchem_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.saltwater_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.saltwater_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.solar_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.surf_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.turb_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
stockG20U-landice-21hour-c90.turb_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
$ rename stockG20U-landice-21hour-c90. '' *rst*
$ ls
catch_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
fvcore_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
irrad_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
lake_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
landice_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
moist_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
moist_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
pchem_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
restarts.e19901128_21z.tar
saltwater_import_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
saltwater_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
solar_internal_rst.e19901128_21z.Ganymed-1_0_p2.Ganymed-1_0_M_CF0090x6C_DE0360xPE0180
surf_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

Regrid from MERRA

The next step is to use Joe Stassi's regrid.pl 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
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>

When this succeeds you'll have a file, b_d5_merra_jan89.19901128_21z.CMD, 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:

#!/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

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:

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

This line only does surface restarts (-rs 2).

Rename restarts for GCM

This isn't very automated yet, but I first use this script to rename the restarts as made above:

$ 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

where cap_restart is just "19901128 210000" and restart_name_clean is:

#!/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

Do the same thing in the newlandice directories as well.

Move the new Landice restart

Well, this is simple, just move, say c48-newlandice/landice_internal_rst to c48.