Changes between Version 60 and Version 61 of ticket/0927_Energy_diag


Ignore:
Timestamp:
2012-06-25T13:43:11+02:00 (9 years ago)
Author:
fabien.roquet
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ticket/0927_Energy_diag

    v60 v61  
    1212'''     Motivation: '''    output 3D trends of tracers, momentum, kinetic energy and potential energy.[[BR]] '''     Status :''' the extraction of trends terms exists, but not the 3D output of the trends   [[BR]] '''     Main tasks :'''         [[BR]] 
    1313 
    14   (1) implement the 3D output of tracers and momentum trends using iom_put [[BR]]                                   (2) compute and output the 3D trends of PE and KE [[BR]]                                        (3) validatation + documentation  [[BR]] 
     14  (1) implement the 3D output of tracers and momentum trends using iom_put [[BR]]                                    (2) compute and output the 3D trends of PE and KE [[BR]]                                         (3) validatation + documentation  [[BR]] 
    1515 
    1616'''     Science Reviewer:''' NOCS guy?     [[BR]]     '''     System Reviewer:'''  NOCS guy?     [[BR]]    '''     Deadline:'''   spring 2012   [[BR]] '''     Priority:'''      high    [[BR]] '''     Depends on:'''    gurvan disponibilities   [[BR]] '''     Principal Investigator : '''      Gurvan Madec and Fabien Roquet (gurvan.madec@locean-ipsl.upmc.fr)  [[BR]] [[BR]] 
     
    2424see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3316 revision 3316] 
    2525 
    26   '''                                   trdmod_oce'''                                    module and '''                                   namtrd namelist'''                                    [[BR]] 
     26  '''                                    trdmod_oce'''                                     module and '''                                    namtrd namelist'''                                     [[BR]] 
    2727 
    2828logical flags added in namlist namtrd which now controls what is done with the trends. [[BR]] All the types of treatment of a given trend are available at the same time. The memory requirement will only increase due to the time averaged arrays defined in IOM. 
     
    4040Add these new logical in the namelist. '''==>>> CAUTION only in the ORCA2_LIM directory''' [[BR]] NB: here is the new name set in revision number 3318[[BR]] 
    4141 
    42   '''                                   trdtra'''                                    module[[BR]] 
     42  '''                                    trdtra'''                                     module[[BR]] 
    4343 
    4444Add a systematic mask of the trend.[[BR]] Change the comments to better describe the purpose of this module. Its purpose is: [[BR]] 
    4545 
    46   'TRA' case:  to regroup T & S trends and send them to trd_mod, with, in case of advection, transform the incoming advective fluxes into advctive trend (U.grad[T])[[BR]]                                   'TRC' case:  send trend to ted_mod_trc, with,  in case of advection,  transform the incoming advective fluxes into advective trend [[BR]]                                   all cases  : mask the trend    ('''                                   ===>>>   PROBABLY add in the module a lbc_lnk so that the trend is defined everywhere'''                                   ) 
    47  
    48   '''                                   dynadv_cen2 and _ubs'''                                    modules[[BR]] 
     46  'TRA' case:  to regroup T & S trends and send them to trd_mod, with, in case of advection, transform the incoming advective fluxes into advctive trend (U.grad[T])[[BR]]                                    'TRC' case:  send trend to ted_mod_trc, with,  in case of advection,  transform the incoming advective fluxes into advective trend [[BR]]                                    all cases  : mask the trend    ('''                                    ===>>>   PROBABLY add in the module a lbc_lnk so that the trend is defined everywhere'''                                    ) 
     47 
     48  '''                                    dynadv_cen2 and _ubs'''                                     modules[[BR]] 
    4949 
    5050change jpdyn_trd_had  into jpdyn_trd_keg. Now in flux form _keg corresponds to the horizontal advection trends and _rvo to the metric terms[[BR]] [[BR]] 
    5151 
    52   '''                                   dynnxt'''                                    module[[BR]] 
     52  '''                                    dynnxt'''                                     module[[BR]] 
    5353 
    5454add the output using sum of the total dyn trend (except asselin time filter) ("utrd_tot", "vtrd_tot") and of the asselin time filter trend ("utrd_atf", "vtrd_atf") but with a shift by one time step[[BR]] [[BR]] 
    5555 
    56   '''                                   dynvor, trdvor and trdmod_oce'''                                    modules[[BR]] 
     56  '''                                    dynvor, trdvor and trdmod_oce'''                                     modules[[BR]] 
    5757 
    5858suppress the call to trd_mod in the jpdyn_trd_dat case (computation of beta.V) add add the calculation of beta.V term in 'trdvor' in jpvor_pvo case. And obviously suppress jpdyn_trd_dat from trdmod_oce [[BR]] Also suppress the jpdyn_trd_had case  horizontal advection for the dynamics is 'keg' + 'vor'  ; in case of flux form,  'had' is put in 'keg' and the metric terms is put in 'vor' [[BR]] there is now only 10 trends on the dynamics instead of 12[[BR]] [[BR]] 
    5959 
    60   '''                                   trdmod'''                                    module[[BR]] 
     60  '''                                    trdmod'''                                     module[[BR]] 
    6161 
    62621- introduce the new logical namelist parameters[[BR]] 2- introduce new subroutines : '''trd_budget''' : computation of the domain averaged T,T^2^, PE, KE trends formerly computes in trd_mod routine)[[BR]] ''' trd_3Diom''': output of the 3D trends using IOM [[BR]] [[BR]] 
    6363 
    64   '''                                   trdicp'''                                    module[[BR]] 
     64  '''                                    trdicp'''                                     module[[BR]] 
    6565 
    6666add in trd_twr routine the computation of the vertical diffusive trend on T & S in case of iso-neutral diffusion (ln_traldf_iso=T). These trends ("ttrd_zdfp", "strd_zdfp")  name zdfp for "PURE" vertical diffusion trends are output so that by difference with "zdf" trends we can access to the vertical contribution of the iso-neutral operator [[BR]] [[BR]] 
    6767 
    68   '''                                   iodef.xml'''                                    file[[BR]] 
     68  '''                                    iodef.xml'''                                     file[[BR]] 
    6969 
    7070add all the trends nick name : '''==>>> CAUTION only in the ORCA2_LIM directory''' [[BR]] [[BR]] 
     
    7373''' Step II : simplification of the structure ''' 
    7474 
    75   '''                                   trdicp and trdicp_oce'''                                    modules[[BR]] 
     75  '''                                    trdicp and trdicp_oce'''                                     modules[[BR]] 
    7676 
    7777see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3317 revision 3317] 
     
    79791- suppress trdicp_oce module (put required variables in trdmod_oce parameters)[[BR]] 2- use the jptra_trd_...  instead of jpicp_...  3- move trd_budget subroutine from trdmod to trdicp.F90. Suppress trd_icp routine (i.e. trd_2d, trd_3d) as the work is now simply done in trd_budget.[[BR]] 4- rescan all dyn/tra trend indices. add jptra_trd_zdfp for "PURE Kz dissusive trend when ln_traldf_iso=T (see also changes in tranxt where a call to trd_tra is done just before the swap, so that PURE Kz trends can be diagnosed in tra_trd. See also xml file).  5- jptra_trd_nsr and jptra_trd_cdt are 3D trends as their incorporate both surface forcing AND runoff, the later being possibly spread in depth ('''==>>> probably to be changed''')[[BR]] 6- suppress the key_trddyn key trdtra  from trdicp[[BR]] 
    8080 
    81   '''                                   trdtra - trddyn - trdmod - trdvor'''                                    modules : impact on '''                                   TRA'''                                   , '''                                   DYN'''                                   , '''                                   TRD'''                                    and almost all '''                                   TOP_SRC'''                                    modules[[BR]] 
     81  '''                                    trdtra - trddyn - trdmod - trdvor'''                                     modules : impact on '''                                    TRA'''                                    , '''                                    DYN'''                                    , '''                                    TRD'''                                     and almost all '''                                    TOP_SRC'''                                     modules[[BR]] 
    8282 
    8383see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3318 revision 3318] 
     
    9494''' Step III : addition of 3D KE diagnostics ''' 
    9595 
    96   '''                                   trdken'''                                    module[[BR]] 
     96  '''                                    trdken'''                                     module[[BR]] 
    9797 
    9898see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3325 revision 3325] 
     
    109109''' Step IV : addition of 3D PE diagnostics ''' 
    110110 
    111   '''                                   trdpen'''                                    module[[BR]] 
     111  '''                                    trdpen'''                                     module[[BR]] 
    112112 
    113113see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3326 revision 3326] and [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3327 revision 3327] 0- correct a bug in trdtra and trdken 
     
    125125[[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] '''Pending issues''' : 
    126126 
    127   atmospheric pressure gradient trend not taken into account (see dynspg.F90  '''                                   To be done !!!!'''                                   [[BR]]                                  ''' 
    128  
    129   kpp non-local trend put in zdf trends !!!  this will not work ! a additional trend term should be add '''                                   To be done !!!!'''                                   [[BR]]                                  ''' 
     127  atmospheric pressure gradient trend not taken into account (see dynspg.F90  '''                                    To be done !!!!'''                                    [[BR]]                                   ''' 
     128 
     129  kpp non-local trend put in zdf trends !!!  this will not work ! a additional trend term should be add '''                                    To be done !!!!'''                                    [[BR]]                                   ''' 
    130130 
    131131  problems to be solved: vvl case for tracer sad trends ; flux form case for had (keg) and zad momentum trends[[BR]] 
     
    136136 
    137137  reshape trdtra so that T and S are treated separately in all ted routine (including mld diag...) create umask_i and vmask_i (2D) fields that mirror task_i field but for the velocity points 
     138   
     139   
    138140 
    139141'''Changes done by Fabien R.''' 
     
    169171 
    170172 * Treatment of bfr has been clarified: if bfr is implicit (ln_bfrimp=.TRUE.), the bottom friction term remain 0, as bottom friction is implicitly included in the vertical diffusion term. 
    171  
    172173 * Correction of outputs of dynamic trends and hke. 
    173  
    174174 * What is the test: "pressure gradient u2 = - 1/rau0 u.dz(rhop)" ? Identity is not verified in my configuration! 
    175  
    176175 * Wind stress is always zero (although not in the 3d diag provided in trddyn.F90) 
    177  
    178176 * TODO: Once trddyn and trdtra are ready, use them for trdglo computations... 
    179  
    180177 * In glo_dyn_wri, missing zcof to compute density flux at w-point?! 
    181  
    182178 * Conversion is calculated as -g*div(rho*U)/rho0 !! Not sure what the link with -rho*g*w... 
    183179 
     
    201197}}} 
    202198 * where jpdyn_tau and jpdyn_bfri are diagnostics of surface and bottom stress, respectively. 
    203  
    204199 * jpdyn_ken has been added for the calculation of KE in dynnxt.F90 (done just before the swap) 
    205200 
     
    207202 
    208203 * l110: DO ji = 2, jpj should be DO ji = 2, jpi 
    209  
    210204 * Same in l133, l152 and l178. 
    211  
    212205 * In l183, replaced "ketrd_bfr" by "ketrd_bfri" to avoid confusion with "ketrd_bfr". 
    213  
    214  * Important: contribution from atf is calculated with un and vn, after they have been updated. 
    215  
    216 A small error is made: the contribution of ATF term at time t is recorded with trends taken at t-1. 
    217  
     206 * Important: contribution from atf is calculated with un and vn, after they have been updated.[[BR]]A small error is made: the contribution of ATF term at time t is recorded with trends taken at t-1. 
    218207 * In trd_ken_init, the 3 variables fse3x_n were replaced by their constant value fse3x for the non-vvl case. 
    219  
    220208 * Definition of KE (kinetic_energy in xml) at time t+1/2: KE(t+1/2)=rau0*u(t)*u(t+1)/2, calculated during dynnxt.F90, using ktrd=jpdyn_ken. 
    221  
    222209 * l. 109: multiplication by rau0 of zke to obtain KE trends in W/m3, and KE in J/m3. 
    223  
    224210 * remove r1_2_rau0 variable, which is no more used. 
    225  
    226211 * Add subroutine ken_conv_P2K to compute conversion rate. 
    227212 
     
    229214 
    230215 * Add a diagnostic of the explicit and implicit (due to filter) contributions to SPG. 
    231  
    232216 * sshimp: diagnostic of the ssh modification due to filter. 
    233217 
    234218In dynnxt.F90 
    235219 
    236  * rn_atfp=0.1 in the GYRE configuration, but in the Documentation 6.9, rn_atfp (not nn_atfp!!) is said to be typically equal to 0.001. Is it normal? 
    237  
    238220 * computation of z1_2dt must be put before the IF( ln_dyn_trd ) block (l. 194 and 195) 
    239  
    240221 * Add call to ken_conv_P2K (+USE trdken) and save conv rate in ketrd_convP2K (l. 200) 
    241222 
     
    243224 
    244225 * Add Vallis equation of state (Vallis 2006, p34-35): most simple form of EOS which accounts for thermobaricity, cabelling and compressibility. 
    245  
    246226 * STRANGE: nn_eos=0 case is a modified version of the Jackett and McDougall (1995) EOS!! Numerically close though... 
    247  
    248227 * Add original  [wiki:McDougall Jackett and McDougall] (1995) EOS (nn_eos=-1) 
    249  
    250228 * Buoyancy frequency calculation: exact formulation. 
    251  
    252229 * Same for alpha and beta 
    253  
    254230 * eos_alpha_beta added, which provides alpha and beta 
    255  
    256  * compute_pen added to provide PE anomaly, and its partial derivatives with respect to T and S, needed in PE diagnostic (trdpen). 
    257  
    258 PE anomaly is the anomaly of PE: (PE - rau0*gz)/(rau0*gz). For a linear case, PE anomaly is equal to density anomaly (nice isn't it?) 
    259  
    260 Done for linear case, and Vallis case. 
    261  
    262 Not ready yet for realistic cases... (discussion with Trevor is needed!) 
    263  
    264 When z=0, PE anomaly is always defined asymptotically, converging toward the density anomaly value. 
    265  
     231 * compute_pen added to provide PE anomaly, and its partial derivatives with respect to T and S, needed in PE diagnostic (trdpen).[[BR]]PE anomaly is the anomaly of PE: (PE - rau0*gz)/(rau0*gz). For a linear case, PE anomaly is equal to density anomaly (nice isn't it?)[[BR]]Done for linear case, and Vallis case.[[BR]]Not ready yet for realistic cases... (discussion with Trevor is needed!)[[BR]]When z=0, PE anomaly is always defined asymptotically, converging toward the density anomaly value. 
    266232 * TODO: add global arrays for alpha and beta, computed at the same time than bn2? Indeed, they are used in several places, and are needed to compute bn2 in any case... 
    267  
    268233 * BUG: I don't understand why, but the linear case 1 is very slow, contrary to the others. Could it be coming from eos_alpbet? 
    269234 
    270  *  
    271  
    272235In trdtra.F90 
    273236 
     
    277240 
    278241 * replace petrd_ldf by petrd_zdf in l. 102 
    279  
    280242 * renamed petrd_for as petrd_nsr for consistency with trd_oce (l. 107) 
    281  
    282243 * remove lines on petrd_sad in CASE jptra_atf in trd_pen: petrd_sad cannot be called 2 times. Furthermore, contribution of asselin filter on ssh must be diagnosed in ssh_nxt, not in tra_nxt!! 
    283  
    284244 * Remove '( nn_eos == 0 .OR. nn_eos == 3 ) .AND. ' in the condition to call pen_ddt_dds in trd_pen (l. 79). These two coefficients are updates at each timestep whatever the eos (very quick anyway for the linear case!) 
    285  
    286245 * Add 'CALL iom_put( "potential_energy", zpe )' in trd_pen, just after the call to pen_ddt_dds. 
    287  
    288246 * Replace ptrdx by ptrdy and remove multiplication by fsde3w to compute pe trends in trd_pen (l. 88-89) 
    289247 
     
    297255 
    298256 * In Annex A, 
    299  
    300  * change label name Apdx_A_grad_p in Apdx_A_grad_p2 l. 418 and 430. 
    301  
    302  * sign error for vertical advection in Eq. A.18 (tracer equation) 
    303  
     257   * change label name Apdx_A_grad_p in Apdx_A_grad_p2 l. 418 and 430. 
     258   * sign error for vertical advection in Eq. A.18 (tracer equation) 
    304259 * In Annex C, sign errors corrected in discretization of HPG (p. 293) 
    305  
    306260 * In Chap_TRA, 
    307  
    308  * update part 5.8 on equation of state to include reference to Vallis2006+JM95 true formulation 
    309  
     261   * update part 5.8 on equation of state to include reference to Vallis2006+JM95 true formulation 
    310262 * In Chap_DYN, correction of title 6.1.2, and references 
    311263