Changes between Version 79 and Version 80 of Projects/NEMOVAR/Notes


Ignore:
Timestamp:
04/08/15 09:50:04 (4 years ago)
Author:
cthomas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Projects/NEMOVAR/Notes

    v79 v80  
    1212The setup of the suite is described in [#Suitesetup Suite setup] and its operation is described in [#Suiteoperation Suite operation].  
    1313More detail on the NEMO/NEMOVAR operation can be found in the [#NEMONEMOVAR NEMO/NEMOVAR] section. 
    14  
     14Finally, tips for running different configurations are in the [#Examplesuiteusage Example suite usage] section.  
    1515 
    1616 
     
    345345 
    346346 
    347 === nemo_cice === 
    348  
    349 There are two parts to this: nemo_cice_obsoper and nemo_cice_iau.  
    350 They inherit some common features which are described below.  
    351  
    352  
    353 ==== suite.rc ==== 
    354  
    355 Common variables in `suite.rc`: 
    356 {{{ 
    357             ROSE_TASK_APP = nemo_cice 
    358             CYCLE_LENGTH = {{CYCLE_LENGTH}} #'P1D' 
    359             CICE_NPROC    = $NEMO_NPROC 
    360  
    361             INDIR_EXEC=$EXEC_DIR 
    362             INDIR_ANCILLARY=$ANCILLARY_DIR 
    363             INDIR_FLUXES=$FLUX_DIR 
    364             INDIR_BACKGROUND_RESTARTS=$BACKGROUND_DIR 
    365 }}} 
    366  
    367  
    368 ==== App ==== 
    369  
    370 app/nemo_cice - pulled in from SVN 
    371  
    372 Some extracts from `rose-app.conf`: 
    373 {{{ 
    374 [command] 
    375 default=run_nemo_cice 
    376  
    377 [env] 
    378 EXEC_UTIL=/projects/jomp/danlea/NEMO/NEMO/bin 
    379 EXEC_NEMOVAR=/projects/jomp/danlea/NEMO/NEMOVAR/bin 
    380  
    381 [namelist:namrun] 
    382 cn_exp='orca025l75' 
    383 cn_ocerst_in='restart' 
    384 cn_ocerst_out='analysis_restart' 
    385 ln_clobber=.true. 
    386 ln_dimgnnn=.false. 
    387 ln_mskland=.false. 
    388 ln_rstart=.true. 
    389 nn_chunksz=0 
    390 nn_date0=20100715 
    391 nn_istate=0 
    392 nn_it000=1 
    393 nn_itend=72 
    394 nn_leapy=1 
    395 nn_no=0 
    396 nn_rstctl=0 
    397 nn_stock=600 
    398 nn_stocklist=0 
    399 nn_write=300 
    400 }}} 
    401  
    402  
    403 Contents of `app-interface.conf`: 
    404 {{{ 
    405 [default] 
    406 INDIR_EXEC= 
    407 INDIR_ANCILLARY=svn://fcm3/NEMO_svn/UKMO/branches/dev/chughes/r11231_standalone_apps/config/Rose/interface_types/nemo_cice_nemovar_ancillary.txt@11454 
    408 INDIR_FLUXES=svn://fcm3/NEMO_svn/UKMO/branches/dev/chughes/r11231_standalone_apps/config/Rose/interface_types/sbc_core_forcing.txt@11454 
    409 INDIR_BACKGROUND_RESTARTS=svn://fcm3/NEMO_svn/UKMO/branches/dev/chughes/r11231_standalone_apps/config/Rose/interface_types/nemo_cice_restarts.txt@11454 
    410  
    411 [obsoper] 
    412 INDIR_OBSERVATIONS= 
    413 INDIR_ALTBIAS=svn://fcm3/NEMO_svn/UKMO/branches/dev/chughes/r11231_standalone_apps/config/Rose/interface_types/altbias.txt@11458 
    414 OUTDIR_INNOVATIONS= 
    415 OUTDIR_ASSIM_BACKGROUND= 
    416  
    417 [iau] 
    418 INDIR_INCREMENTS= 
    419 OUTDIR_ANALYSIS_RESTARTS=svn://fcm3/NEMO_svn/UKMO/branches/dev/chughes/r11231_standalone_apps/config/Rose/interface_types/nemo_cice_restarts.txt@11454 
    420 }}} 
    421  
    422  
    423 ==== run_nemo_cice ==== 
    424  
    425 The script that steers the job is called `run_nemo_cice`.  
    426 It has different sections for nemo_cice_obsoper and nemo_cice_iau.  
    427  
    428 The common part governs some setup and the running of the model.  
    429 Extracts from the common part are: 
    430 {{{ 
    431 # MODE - ['standalone', 'obsoper', 'iau'] 
    432 # CYCLE_LENGTH - ISO8601 duration specifying the length of this cycle 
    433 # RUNID - identifying string 
    434 # INDIR_EXEC - path to executable 
    435 # INDIR_FLUXES - directory containing fluxes 
    436 # INDIR_ANCILLARY - directory containing ancillary files 
    437 # INDIR_BACKGROUND_RESTARTS - directory containing background restarts 
    438 # OUTDIR_ANALYSIS_RESTARTS - directory in which we put analysis restarts 
    439 # NEMO_IPROC - NEMO processors east-west 
    440 # NEMO_JPROC - NEMO processors north-south 
    441 # NEMO_NPROC - total number of NEMO processors 
    442 # CICE_COL - number of columns for CICE 
    443 # CICE_ROW - number of rows for CICE 
    444  
    445 NEMO_NL=namelist 
    446 CICE_NL=ice_in 
    447  
    448 # Link in common inputs 
    449 mkdir -p $CYLC_TASK_WORK_DIR/fluxes 
    450 ln -sf $INDIR_FLUXES/* $CYLC_TASK_WORK_DIR/fluxes 
    451 ln -sf $INDIR_ANCILLARY/* $CYLC_TASK_WORK_DIR 
    452 ln -sf $INDIR_BACKGROUND_RESTARTS/* $CYLC_TASK_WORK_DIR 
    453  
    454 # Re-link the coordinate and geothermal heating files per processor 
    455 i=0 
    456 while [[ $i -lt $NEMO_NPROC ]]; do 
    457     ln -sf coordinates.nc coordinates_$(printf "%04d" $i).nc 
    458     ln -sf geothermal_heating.nc geothermal_heating_$(printf "%04d" $i).nc 
    459     let i=i+1 
    460 done 
    461  
    462 # Modify main NEMO namelist 
    463 update_namelist $NEMO_NL cn_exp "'${RUNID}o'" 
    464 update_namelist $NEMO_NL ln_rstart .true. 
    465 update_namelist $NEMO_NL nn_rstctl 0 
    466 update_namelist $NEMO_NL nn_it000 1 
    467 update_namelist $NEMO_NL nn_itend ${TIME_STEPS_PER_CYCLE} 
    468 update_namelist $NEMO_NL nn_date0 "$(rose date -c -f %Y%m%d)" 
    469 update_namelist $NEMO_NL nn_leapy ${NEMO_LEAP_YEAR_FLAG} 
    470 update_namelist $NEMO_NL jpni ${NEMO_IPROC} 
    471 update_namelist $NEMO_NL jpnj ${NEMO_JPROC} 
    472 update_namelist $NEMO_NL jpnij ${NEMO_NPROC} 
    473 update_namelist $NEMO_NL nitiaufin ${TIME_STEPS_PER_DAY} 
    474  
    475 # Modify main CICE namelist 
    476 update_namelist $CICE_NL days_per_year ${DAYS_IN_YEAR} 
    477 update_namelist $CICE_NL history_file "'${RUNID}i.${CICE_HISTFREQ_N}${CICE_HISTFREQ}'" #CT - could remove? 
    478 update_namelist $CICE_NL ice_ic "'cice_restart.dat'" 
    479 update_namelist $CICE_NL incond_file "'${RUNID}i_ic'" 
    480 update_namelist $CICE_NL istep0 ${TIME_STEPS_TO_START} 
    481 update_namelist $CICE_NL npt ${TIME_STEPS_PER_CYCLE} 
    482 update_namelist $CICE_NL restart .true. 
    483 update_namelist $CICE_NL restart_file "'cice_restart.dat'" 
    484 update_namelist $CICE_NL use_leap_years ${CICE_LEAP_YEAR_FLAG} 
    485 update_namelist $CICE_NL year_init $(rose date -c -f %Y) 
    486  
    487 echo ${INDIR_EXEC}/nemo.exe:${NEMO_NPROC} > Ocean.conf 
    488 rose mpi-launch -f Ocean.conf 
    489 NEMO_RC=$? 
    490 }}} 
    491  
    492  
    493 === nemo_cice_obsoper === 
    494  
    495 ==== Prerequisites ==== 
    496  
    497 nemo_cice_obsoper depends on `fcm_make_nemo`, `fixed_ancillary`, `fixed_restarts`, `daily_fluxes`, `DAILY_OBSERVATIONS`.  
    498 During the cycling it also depends on the nemo_cice_iau stage.  
    499  
    500 ==== suite.rc ==== 
    501  
    502 In `suite.rc`, all of the nemo_cice variables listed above are inherited. In addition the following environment variables are defined: 
    503 {{{ 
    504             ROSE_APP_OPT_CONF_KEYS = "obsoper" 
    505             INDIR_ALTBIAS=$ALTBIAS_DIR 
    506             INDIR_OBSERVATIONS=$OBSERVATIONS_DIR 
    507             OUTDIR_INNOVATIONS=$INNOVATIONS_DIR 
    508             OUTDIR_ASSIM_BACKGROUND=$ASSIM_BACKGROUND_DIR 
    509 }}} 
    510  
    511 From the rose documentation on `ROSE_APP_OPT_CONF_KEYS`:  
    512 Each KEY in this space delimited list switches on an optional configuration in an application. The configurations are applied in first-to-last order. 
    513  
    514 ==== App ==== 
    515  
    516 Extracts from `opt/rose-app-obsoper.conf`: 
    517 {{{ 
    518 [env] 
    519 MODE=obsoper 
    520 }}} 
    521  
    522  
    523  
    524 ==== run_nemo_cice ==== 
    525  
    526 Parts of `run_nemo_cice` that are specific to the obsoper stage.  
    527  
    528 Before the model has run: 
    529 {{{ 
    530     echo 'obsoper linking' 
    531     # Altimeter bias 
    532     ln -sf $INDIR_ALTBIAS/* $CYLC_TASK_WORK_DIR 
    533     # Observations 
    534     ln -sf $INDIR_OBSERVATIONS/* $CYLC_TASK_WORK_DIR 
    535  
    536     function handle_observations { 
    537         # Usage: handle_observations prefix namelist_file_list namelist_flags... 
    538         PREFIX="$1"; shift; 
    539         NL_FILE_LIST="$1"; shift; 
    540  
    541         # Gather the list of observation files 
    542         FILES="" 
    543         for file in "${PREFIX}"_0*.nc ; do 
    544             FILES="${FILES} '${file}'" 
    545         done 
    546  
    547         # If we find any observations 
    548         if [ ! -z "${FILES}" ] ; then 
    549             echo "Found ${PREFIX} observations ${FILES}" 
    550  
    551             # Write the list of files into the namelist 
    552             echo "Updating ${NL_FILE_LIST} with ${FILES}" 
    553             update_namelist $NEMO_NL "${NL_FILE_LIST}" "${FILES}" 
    554  
    555             # Set all the specified namelist flags (the remainder of the arguments) to true 
    556             for FLAG in "${@}" ; do 
    557                 update_namelist $NEMO_NL ${FLAG} ".true." 
    558             done 
    559         fi 
    560     } 
    561  
    562     handle_observations seaice seaicefbfiles ln_seaicefb ln_seaice 
    563     handle_observations sla slafbfiles ln_slafb ln_sla 
    564     handle_observations sst sstfbfiles ln_sstfb ln_sst 
    565 }}} 
    566  
    567 After the model has run: 
    568 {{{ 
    569         echo copying innovations 
    570         # copy innovations into the right place 
    571         mkdir -p $OUTDIR_INNOVATIONS 
    572         # rebuild the innovations into the output directory 
    573         cd ${CYLC_TASK_WORK_DIR} 
    574         for OBSFILE in sstfb slafb seaicefb; do 
    575             echo rebuilding and copying ${OBSFILE} 
    576             ${EXEC_NEMOVAR}/fbcomb.exe ${OUTDIR_INNOVATIONS}/${OBSFILE}_01.nc ./${OBSFILE}*fdbk_*.nc 
    577         done 
    578         cd - 
    579         # copy 'assim background' file into the right place 
    580         echo copying assim background 
    581         mkdir -p $OUTDIR_ASSIM_BACKGROUND 
    582         ln -sf ${CYLC_TASK_WORK_DIR}/assim_background_state_Jb*.nc ${OUTDIR_ASSIM_BACKGROUND} 
    583 }}} 
    584  
    585  
    586  
    587 ==== Outputs ==== 
    588  
    589 Once nemo_cice_obsoper succeeds, nemovar runs.  
    590  
    591  
    592  
    593  
    594  
    595 == Example runs ==  
     347=== Stage 1: Obsoper === 
     348 
     349The governing script is `run_nemo_cice`.  
     350 
     351 
     352 
     353=== Stage 2: NEMOVAR === 
     354 
     355 
     356=== Stage 3: IAU === 
     357 
     358 
     359 
     360 
     361 
     362 
     363 
     364== Example suite usage ==  
    596365 
    597366 
     
    606375 
    607376 
    608  
    609 === Different start date and run length === 
     377=== Different start date, run length and input data === 
    610378 
    611379From the [wiki:Projects/NEMOVAR/Instructions Instructions] page: 
     
    615383 
    616384 
    617 === Adding other files === 
    618  
    619 e.g. different profiles or altimetry information 
    620385 
    621386