Difference between revisions of "Restarting an Atmos-Ocean Integration"

From UKCA
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Restarting an Atmosphere Ocean Integration ==
 
== Restarting an Atmosphere Ocean Integration ==
   
UKCA is running in the QESM-AO configuration, which includes the NEMO ocean and CICE sea-ice models, using the ORCA2 grid. While restarting an atmospheric-only model has been described [[UKCA_Release_Jobs#Running_a_Perpetual_Year | elsewhere on this site]], restarting both NEMO and CICE add extra complications. The following description is for MONSooN, although the equivalent steps would need to be done on HECToR also.
+
UKCA is running in the QESM-AO configuration, which includes the NEMO ocean and CICE sea-ice models, using the ORCA2 grid. While restarting an atmospheric-only model has been described [[UKCA_Release_Jobs#Running_a_Perpetual_Year | elsewhere on this site]], restarting both NEMO and CICE add extra complications.
 
'''NOTE:''' These instructions are designed to describe how to restart an already running QESM-AO job (as a new job).
 
   
 
=== 1. Pick your restart date ===
 
=== 1. Pick your restart date ===
Line 15: Line 13:
 
=== 2. UM restart ===
 
=== 2. UM restart ===
   
* Copy your selected UM dump (e.g. <code>xfxfha.dac5510</code>) above to another directory. You may already have a <code>STARTDUMPS</code> directory defined in the UMUI, and may wish to copy it there.
+
* Copy your selected UM dump (e.g. <code>xfxfha.dac5610</code>) above to another directory. You may already have a <code>STARTDUMPS</code> directory defined in the UMUI, and may wish to copy it there.
* Go to '''Start dump''': <br/> Model Selection -> Atmosphere -> Ancillary and input data files -> Start Dump <br/> ''If you '''do not''' wish to reconfigure (e.g. to add in tracers etc.) you will need to alter the directory path and name of file to point to the start-dump you are interested in. You must then turn '''off''' the radio button '''Using the reconfiguation''' and make sure that the '''start-date''' (listed at the top of this panel) matches that in the dump file.''
+
* Go to '''Start dump''': <br/> Model Selection -> Atmosphere -> Ancillary and input data files -> Start Dump <br/> and update the value for the file name of the initial dump. <br/> ''If you '''do not''' wish to reconfigure (e.g. to add in tracers etc.) you will need to alter the directory path and name of file to point to the start-dump you are interested in. You must then turn '''off''' the radio button '''Using the reconfiguation''' and make sure that the '''start-date''' (which can be found in the UM dump by examining it with xconv) matches that in the dump file.''
   
 
=== 3. NEMO restart ===
 
=== 3. NEMO restart ===
   
* To create the NEMO restart file, you will need to use the <code>rebuild_nemo</code>, which on MONSooN can be found in <code>/home/msmizi/scripts/rebuild/</code>
+
* To create the NEMO restart file, you will need to use the <code>rebuild_nemo</code>, which on MONSooN can be found in <code>/home/msmizi/scripts/rebuild/</code> and in <code>/home/n02/n02/annette/bin/</code> on HECToR.
 
* To run this, type: <br/> <code>rebuild_nemo JOBIDo_YYYYMMDD_restart NUMPROCS</code> <br/> e.g. <code>rebuild_nemo xfxfho_22850530_restart 3</code>
 
* To run this, type: <br/> <code>rebuild_nemo JOBIDo_YYYYMMDD_restart NUMPROCS</code> <br/> e.g. <code>rebuild_nemo xfxfho_22850530_restart 3</code>
 
* This will (in this case) create the file <code>xfxfho_22850530_restart.nc</code>. You can then copy this file to another directory, e.g. <code>STARTDUMPS</code>.
 
* This will (in this case) create the file <code>xfxfho_22850530_restart.nc</code>. You can then copy this file to another directory, e.g. <code>STARTDUMPS</code>.
  +
** Now update the NEMO start-dump in the UMUI: <br/> Model Selection -> NEMO -> Scientific Parameters and Sections -> Links to NEMO model <br/> and then update the value in the 'NEMO start dump' field.
   
 
=== 4. CICE restart ===
 
=== 4. CICE restart ===
Line 28: Line 27:
 
Making a CICE restart file is more involved!
 
Making a CICE restart file is more involved!
   
* You will need to modify the CICE header, otherwise errors will occur in the naming of CICE monthly mean files. To do this, use the <code>modify_CICE_header</code> script, which can be found in <code>/home/aospre/bin/</code>
+
* You will need to modify the CICE header, otherwise errors will occur in the naming of CICE monthly mean files. To do this, use the <code>modify_CICE_header</code> script, which can be found in <code>/home/aospre/bin/</code> on MONSooN or <code>/home/n02/n02/annette/bin/</code> on HECToR.
 
* This script will read-in an existing CICE restart file, and output a new file (which should not exist before the script is run). To run this, type: <br/> <code>modify_CICE_header</code>
 
* This script will read-in an existing CICE restart file, and output a new file (which should not exist before the script is run). To run this, type: <br/> <code>modify_CICE_header</code>
 
*# Enter the input file name, e.g. <code>xfxfhi.restart.2285-06-01-00000</code>
 
*# Enter the input file name, e.g. <code>xfxfhi.restart.2285-06-01-00000</code>
Line 37: Line 36:
 
*# Set the value of '''<code>time_forc</code>''' to '''0'''
 
*# Set the value of '''<code>time_forc</code>''' to '''0'''
 
* The new file should now be written to e.g. <code>xfxfhi.restart.2285-06-01-00000_reset</code>. You can then copy this file to another directory, e.g. <code>STARTDUMPS</code>.
 
* The new file should now be written to e.g. <code>xfxfhi.restart.2285-06-01-00000_reset</code>. You can then copy this file to another directory, e.g. <code>STARTDUMPS</code>.
  +
** Now update the CICE start-dump in the UMUI: <br/> Model Selection -> CICE -> Scientific Parameters and Sections -> Links to CICE model <br/> and then update the value in the 'CICE start dump' field.
  +
  +
==== Big-Endian or Little-Endian? ====
  +
  +
While HECToR is little-endian, MONSooN is big-endian. While the UM and NEMO files work on both platforms, the CICE re-start files need to be byte-swaped. To do this, use the script '''<code>bindump_swap</code>''' which is available on HECToR in <code>/home/n02/n02/annette/bin/</code>. Run this program, which will then ask for the following:
  +
  +
* The name of the binary file that you want to convert
  +
* The name of the output file that you want to create
  +
* The ORCA grid - either '1' or '2'
  +
* The endianness of the source file - either 'b' (e.g. IBM) or 'l' (e.g. HECToR)
  +
* The value of <code>oceanmixed_ice</code> - either 't' or 'f' (this should be the same as the value in the CICE namelist used for the job (see [[Restarting_an_Atmos-Ocean_Integration#Namelist_changes | below]]))
  +
  +
==== Output to netCDF ====
  +
  +
It is also possible to output the CICE restart as a netCDF file so that it can be viewed or plotted. To do this, use the script '''<code>bindump_to_nc</code>''' which is available on HECToR in <code>/home/n02/n02/annette/bin/</code> and on MONSooN in <code>/home/aospre/bin/</code>. The value of '''<code>oceanmixed_ice</code>''' should be set to that in the CICE namelist used for the job (see [[Restarting_an_Atmos-Ocean_Integration#Namelist_changes | below]]).
   
 
=== 5. Namelist changes ===
 
=== 5. Namelist changes ===

Latest revision as of 09:48, 22 February 2013

Restarting an Atmosphere Ocean Integration

UKCA is running in the QESM-AO configuration, which includes the NEMO ocean and CICE sea-ice models, using the ORCA2 grid. While restarting an atmospheric-only model has been described elsewhere on this site, restarting both NEMO and CICE add extra complications.

1. Pick your restart date

You will need to check the date in your UM dump, and select the NEMO and CICE dumps accordingly, e.g.:

  • UM dump is xfxfha.dac5610, model date is 2285/06/01:00 / 44820.000000 - i.e. midnight on the first day of the month.
  • The corresponding NEMO restart files are in fact xfxfho_22850530_restart_0000.nc, xfxfho_22850530_restart_0001.nc, and xfxfho_22850530_restart_0002.nc, when running the ocean over 3 processors - i.e. NEMO dumps are midnight on the 30th (last day) of the month.
  • The corresponding CICE restart file is xfxfhi.restart.2285-06-01-00000 - i.e. midnight on the first day of the month, the same as the UM.

2. UM restart

  • Copy your selected UM dump (e.g. xfxfha.dac5610) above to another directory. You may already have a STARTDUMPS directory defined in the UMUI, and may wish to copy it there.
  • Go to Start dump:
    Model Selection -> Atmosphere -> Ancillary and input data files -> Start Dump
    and update the value for the file name of the initial dump.
    If you do not wish to reconfigure (e.g. to add in tracers etc.) you will need to alter the directory path and name of file to point to the start-dump you are interested in. You must then turn off the radio button Using the reconfiguation and make sure that the start-date (which can be found in the UM dump by examining it with xconv) matches that in the dump file.

3. NEMO restart

  • To create the NEMO restart file, you will need to use the rebuild_nemo, which on MONSooN can be found in /home/msmizi/scripts/rebuild/ and in /home/n02/n02/annette/bin/ on HECToR.
  • To run this, type:
    rebuild_nemo JOBIDo_YYYYMMDD_restart NUMPROCS
    e.g. rebuild_nemo xfxfho_22850530_restart 3
  • This will (in this case) create the file xfxfho_22850530_restart.nc. You can then copy this file to another directory, e.g. STARTDUMPS.
    • Now update the NEMO start-dump in the UMUI:
      Model Selection -> NEMO -> Scientific Parameters and Sections -> Links to NEMO model
      and then update the value in the 'NEMO start dump' field.

4. CICE restart

Making a CICE restart file is more involved!

  • You will need to modify the CICE header, otherwise errors will occur in the naming of CICE monthly mean files. To do this, use the modify_CICE_header script, which can be found in /home/aospre/bin/ on MONSooN or /home/n02/n02/annette/bin/ on HECToR.
  • This script will read-in an existing CICE restart file, and output a new file (which should not exist before the script is run). To run this, type:
    modify_CICE_header
    1. Enter the input file name, e.g. xfxfhi.restart.2285-06-01-00000
    2. Enter the output file name, e.g. xfxfhi.restart.2285-06-01-00000_reset
    3. Enter the grid used - for QESM this will be ORCA2
    4. Change the value of istep0 to 0
    5. Change the value of time to the number in seconds since the start of the year. For a 1st June start this will be 5 months, 30 days per month, 24 hours per day, 60 minutes per hour, and 60 seconds per minute, so 5*30*24*60*60=12960000, so enter, e.g. 12960000
    6. Set the value of time_forc to 0
  • The new file should now be written to e.g. xfxfhi.restart.2285-06-01-00000_reset. You can then copy this file to another directory, e.g. STARTDUMPS.
    • Now update the CICE start-dump in the UMUI:
      Model Selection -> CICE -> Scientific Parameters and Sections -> Links to CICE model
      and then update the value in the 'CICE start dump' field.

Big-Endian or Little-Endian?

While HECToR is little-endian, MONSooN is big-endian. While the UM and NEMO files work on both platforms, the CICE re-start files need to be byte-swaped. To do this, use the script bindump_swap which is available on HECToR in /home/n02/n02/annette/bin/. Run this program, which will then ask for the following:

  • The name of the binary file that you want to convert
  • The name of the output file that you want to create
  • The ORCA grid - either '1' or '2'
  • The endianness of the source file - either 'b' (e.g. IBM) or 'l' (e.g. HECToR)
  • The value of oceanmixed_ice - either 't' or 'f' (this should be the same as the value in the CICE namelist used for the job (see below))

Output to netCDF

It is also possible to output the CICE restart as a netCDF file so that it can be viewed or plotted. To do this, use the script bindump_to_nc which is available on HECToR in /home/n02/n02/annette/bin/ and on MONSooN in /home/aospre/bin/. The value of oceanmixed_ice should be set to that in the CICE namelist used for the job (see below).

5. Namelist changes

  • You should not need to change the NEMO namelist (e.g. namelist_xfxfh_1m), although you may need to change the CICE namelist if you are restarting in a different month to the original job.
  • The variable that needs to be changed is istep0. This is set to the number of timesteps since the start of the year (as opposed to the number of seconds above).
  • You may wish to copy the existing CICE namelist (e.g. ice_in_xfxfh_1m_CheM_sep) to a new file prior to editing.
  • There are 15 timesteps per day (dt=5760.0 seconds), and in this example, we want 5*30*15=2250. So here the value of istep0 is set to e.g. 2250.

Useful Links