Changes between Version 7 and Version 8 of schwarz


Ignore:
Timestamp:
07/12/19 15:16:20 (2 years ago)
Author:
snguyen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • schwarz

    v7 v8  
    6464Compiling LMDZ should be ok. 
    6565 
    66 As for NEMO you will need to update a configuration file: `` 
     66As for NEMO you will need to update a configuration file: `gcm.def_96x95_AP` 
    6767 
    6868Edit `COMP/lmdz.car` and put this line in `ParametersFiles`: 
     
    7272to get the proper gcm.def file. 
    7373 
    74 In 
     74In `PARAM` make a copy of `gcm.def_96x95_AP` to `gcm.def_96x95_AP_SWZ` and add the following lines at the end: 
     75{{{ 
     76## Schwarz coupling parameters from config.card 
     77## number of schwarz iterations 
     78mswr= 001 
     79## write output at schwarz iteration number ksout 
     80ksout= 001 
     81## first all physics iteration 
     82kall= 001 
     83## frequency of coupling in seconds 
     84ncplfrq= 86400 
     85}}} 
     86 
     87As a test, run the model with `mswr=1`, `ksout=1`, `kall=1` and `ncplfrq=<frequency of coupling of initial code>`. 
     88 
     89It should give you the same resultst with both Schwarz modifications in NEMO and LMDZ than with the initial code. 
     90 
     91== Additional modifications for better integration of config files and Schwarz iterations == 
     92 
     93Now that everything is fine you can make these changes to `config.card`, `namelist_ORCA2_cfg` and `gcm.def_96x95_AP_SWZ`. 
     94 
     95In `config.card` add these lines to the `[UserChoices]` section: 
     96{{{ 
     97##D-- Schwarz iterations parameters - 
     98## number of schwarz iterations 
     99mswr= 010 
     100### write output at schwarz iteration number ksout 
     101ksout= 010 
     102### first all physics iteration 
     103kall= 001 
     104### frequency of coupling in seconds (maybe it could be read from oasis.card) 
     105ncplfrq= 3600 
     106}}} 
     107 
     108The goal is to make these parameters global for NEMO and LMDZ. 
     109 
     110In `namelist_ORCA2_cfg` replace the values by `_AUTOBLOCKER_`: 
     111{{{ 
     112   mswr        =  _AUTOBLOCKER_   !  number of scwharz iterations 
     113   ksout       =  _AUTOBLOCKER_   !  Schwarz iteration for output 
     114   kall        =  _AUTOBLOCKER_   !  first iteration with all physics 
     115   ncplfrq     =  _AUTOBLOCKER_   !  coupling frequency in seconds 
     116}}} 
     117 
     118In `gcm.def_96x95_AP_SWZ` do the same: 
     119{{{ 
     120## Schwarz coupling parameters from config.card 
     121## number of schwarz iterations 
     122mswr= _AUTOBLOCKER_ 
     123## write output at schwarz iteration number ksout 
     124ksout= _AUTOBLOCKER_ 
     125## first all physics iteration 
     126kall= _AUTOBLOCKER_ 
     127## frequency of coupling in seconds 
     128ncplfrq= _AUTOBLOCKER_ 
     129}}} 
     130 
     131Now we will modify the NEMO and LMDZ driver files to set the values in both files with `config.card` values. 
     132 
     133In `DRIVER/opa9.card` add these lines for Schwarz in the Update function: 
     134{{{ 
     135    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_leapy     ${OPA_NLEAPY} 
     136    # Schwarz parameters from config.card 
     137    IGCM_comp_modifyNamelist blocker    namelist_cfg mswr         ${config_UserChoices_mswr} 
     138    IGCM_comp_modifyNamelist blocker    namelist_cfg ksout        ${config_UserChoices_ksout} 
     139    IGCM_comp_modifyNamelist blocker    namelist_cfg kall         ${config_UserChoices_kall} 
     140    IGCM_comp_modifyNamelist blocker    namelist_cfg ncplfrq      ${config_UserChoices_ncplfrq} 
     141}}} 
     142 
     143In `DRIVERlmdz.card` add these lines in the Update function: 
     144{{{ 
     145    # guide.def : Activate nudging if ok_guide=y set in lmdz.card 
     146    if [ ! X${lmdz_UserChoices_ok_guide} = X ] ; then 
     147    IGCM_comp_modifyDefFile nonblocker guide.def ok_guide  ${lmdz_UserChoices_ok_guide} 
     148    else 
     149    IGCM_comp_modifyDefFile nonblocker guide.def ok_guide n 
     150    fi 
     151 
     152    # gcm.def : set schwarz parameters from config.card 
     153    IGCM_comp_modifyNamelist blocker gcm.def mswr         ${config_UserChoices_mswr} 
     154    IGCM_comp_modifyNamelist blocker gcm.def ksout        ${config_UserChoices_ksout} 
     155    IGCM_comp_modifyNamelist blocker gcm.def kall         ${config_UserChoices_kall} 
     156    IGCM_comp_modifyNamelist blocker gcm.def ncplfrq      ${config_UserChoices_ncplfrq} 
     157}}}