Changes between Version 64 and Version 65 of ticket/0927_Energy_diag
- Timestamp:
- 2012-06-29T17:57:32+02:00 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ticket/0927_Energy_diag
v64 v65 12 12 ''' 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]] 13 13 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]] 15 15 16 16 ''' 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]] … … 24 24 see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3316 revision 3316] 25 25 26 ''' trdmod_oce''' module and ''' namtrd namelist'''[[BR]]26 ''' trdmod_oce''' module and ''' namtrd namelist''' [[BR]] 27 27 28 28 logical 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. … … 40 40 Add 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]] 41 41 42 ''' trdtra'''module[[BR]]42 ''' trdtra''' module[[BR]] 43 43 44 44 Add a systematic mask of the trend.[[BR]] Change the comments to better describe the purpose of this module. Its purpose is: [[BR]] 45 45 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]] 49 49 50 50 change 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]] 51 51 52 ''' dynnxt'''module[[BR]]52 ''' dynnxt''' module[[BR]] 53 53 54 54 add 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]] 55 55 56 ''' dynvor, trdvor and trdmod_oce'''modules[[BR]]56 ''' dynvor, trdvor and trdmod_oce''' modules[[BR]] 57 57 58 58 suppress 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]] 59 59 60 ''' trdmod'''module[[BR]]60 ''' trdmod''' module[[BR]] 61 61 62 62 1- 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]] 63 63 64 ''' trdicp'''module[[BR]]64 ''' trdicp''' module[[BR]] 65 65 66 66 add 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]] 67 67 68 ''' iodef.xml'''file[[BR]]68 ''' iodef.xml''' file[[BR]] 69 69 70 70 add all the trends nick name : '''==>>> CAUTION only in the ORCA2_LIM directory''' [[BR]] [[BR]] … … 73 73 ''' Step II : simplification of the structure ''' 74 74 75 ''' trdicp and trdicp_oce'''modules[[BR]]75 ''' trdicp and trdicp_oce''' modules[[BR]] 76 76 77 77 see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3317 revision 3317] … … 79 79 1- 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]] 80 80 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]] 82 82 83 83 see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3318 revision 3318] … … 94 94 ''' Step III : addition of 3D KE diagnostics ''' 95 95 96 ''' trdken'''module[[BR]]96 ''' trdken''' module[[BR]] 97 97 98 98 see [https://forge.ipsl.jussieu.fr/nemo/log/branches/2012/dev_r3309_LOCEAN12_Ediag/NEMOGCM/NEMO/OPA_SRC?rev=3325 revision 3325] … … 109 109 ''' Step IV : addition of 3D PE diagnostics ''' 110 110 111 ''' trdpen'''module[[BR]]111 ''' trdpen''' module[[BR]] 112 112 113 113 see [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 … … 125 125 [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] '''Pending issues''' : 126 126 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]] ''' 130 130 131 131 problems to be solved: vvl case for tracer sad trends ; flux form case for had (keg) and zad momentum trends[[BR]] … … 135 135 create the momentum diag over the ML 136 136 137 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 ''''' ''''''137 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 138 139 139 '''Changes done by Fabien R.''' … … 143 143 * Added 4D variable alpbet: alpbet(:,:,:,jp_tem) is the thermal expansion coef, and alpbet(:,:,:,jp_sal) the haline one. 144 144 * rhd and rhop are kept for backward compatibility, but they are meant to become obsolete[[BR]](especially rhop which could be easily removed, with minor changes in zdfkpp, zdfmxl and zdfric) 145 * TODO: rn2b might become obsolete (only one rnb variable might be enough). 146 * TODO: check restartibility 145 147 146 148 In step.F90: … … 149 151 * TODO: Diagnostic of BFR should be improved! 150 152 151 * TODO: add eos_alpbet calls to set alpha and beta expansion coeffs at the right moments. 153 * added eos calls to set alpha and beta expansion coeffs before bn2 computation. 154 * Consider removing calls to bn2, and compute it only where needed: 155 * rn2b needed to call ldf_slp 156 * also: asmtrj, step_c1d, ldfeiv, zdfddm, zdfevd, zdfgls, zdfkpp, zdfric, zdftke, zdftmx 152 157 * Also, remove obsolete calls to eos when necessary. 158 * TODO: consider removing calls to eos to get rhop. 153 159 154 160 In trdtra.F90: … … 175 181 * What is the test: "pressure gradient u2 = - 1/rau0 u.dz(rhop)" ? Identity is not verified in my configuration! 176 182 * Wind stress is always zero (although not in the 3d diag provided in trddyn.F90) 177 * TODO: Once trddyn and trdtra are ready, use them for trdglo computations...178 183 * In glo_dyn_wri, missing zcof to compute density flux at w-point?! 179 184 * Conversion is calculated as -g*div(rho*U)/rho0 !! (missing z) 185 * TODO: Once trddyn and trdtra are ready, use them for trdglo computations... 180 186 181 187 In trd_oce.F90 … … 222 228 In eosbn2.F90 223 229 224 * Add Vallis equation of state (Vallis 2006, p34-35): most simple form of EOS which accounts for thermobaricity, cabelling and compressibility.[[BR]]Generalization of linear equation of state, so T-linear and TS-linear cases have been removed. Vallis EOS: nn_eos=1. 225 * STRANGE: nn_eos=0 case is a modified version of the Jackett and McDougall (1995) EOS!! Numerically close though... 226 * Add original [wiki:McDougall Jackett and McDougall] (1995) EOS (nn_eos=-1) 230 * Vallis equation of state added (Vallis 2006, p34-35): simple EOS which accounts for thermobaricity, cabelling and compressibility.[[BR]]Generalization of linear equation of state, so T-linear and TS-linear cases have been removed. [[BR]]Vallis EOS: nn_eos=1. 231 * Add original [wiki:McDougall Jackett and McDougall] (1995) EOS (nn_eos=-1)[[BR]]nn_eos=0 case is a modified version of the Jackett and McDougall (1995) EOS!! Numerically close though... 227 232 * eos_alpbet modified, which now provides alpha and beta (as a 4d variable) instead of alpha/beta and beta0=0 or 1.[[BR]]ldf_slp_grif in ldfslp.F90 modified accordingly (only place eos_alpbet was used).[[BR]]Now, there is no problem if beta=0, because its inverse is never used. 228 233 * bn2 modified: 229 234 * use an exact formulation based on each eos 230 * eos_bn2_alpbet: call first eos_alpbet to compute alpha and beta coefficients, then interpolating alpha/beta on w-points and finally calculating pn2. 231 * eos_bn2: alpha and beta coefficients are directly given in arguments, then interpolated to compute bn2. 232 * eos_pen added to compute PE anomaly, and equivalents os alpha and beta for the PE state variable (called alphaPE and betaPE).[[BR]]function is called at each time step trdpen.F90 (PE diagnostic).[[BR]]PE anomaly is defined as: (PE - rau0*gz)/(rau0*gz). For a linear case, PE anomaly is equal to density anomaly (nice isn't it?)[[BR]]When z=0, PE anomaly is defined asymptotically, converging toward the density anomaly value.[[BR]]Waiting for a new EOS from Trevor McDougall that would allow a more efficient computation of each terms. 233 * 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... 234 * TODO: remove references to rhop, then remove eos_insitu_pot which calculates it. 235 * bn2(ts,pn2): call first eos_alpbet to compute alpha and beta coefficients, then interpolating alpha/beta on w-points and finally calculating pn2. 236 * bn2(ts,alpbet,pn2): alpha and beta coefficients are directly given in arguments, then interpolated to compute pn2. 237 * Consider removing bn2 from eosbn2.F90 238 * TODO: Modify trabbl.F90 to use alpbet 239 * TODO: Modify tranpc.F90 to use alpbet 240 * TODO: Modify zdfkpp.F90 to use alpbet 241 * eos has now a unified interface: 242 * eos(ts,rhd) gives density anomaly (3D field) 243 * eos(ts,rhd,rhop) should become obsolete (density anomaly + sigma0) 244 * eos(ts,dep,rhop) density anomaly at one zt(pdep) (2D) 245 * eos(ts,alpbet) providing alpha and beta (4D field jpi,jpj,jpk,jpts) 246 * eos(ts,rhd,alpbet) density+alpha/beta (3D + 4D fields) 247 * eos_pen added to compute PE anomaly, and equivalents of alpha and beta for the PE state variable (called alpha_pe and beta_pe, given in alpbet_pe).[[BR]]function is called at each time step trdpen.F90 (PE diagnostic).[[BR]]PE anomaly is defined as: (PE - rau0*gz)/(rau0*gz). For a linear case, PE anomaly is equal to density anomaly (nice isn't it?)[[BR]]When z=0, PE anomaly is defined asymptotically, converging toward the density anomaly value (in the code, if z<0 --> z=1).[[BR]]TODO: Waiting for a new EOS from Trevor McDougall that would allow a more efficient computation of each terms. 235 248 236 249 In trdtra.F90 … … 264 277 * In Chap_STP, modification on Asselin description 265 278 279 General comments: 280 281 * implement e3t = dk(gdept), and e3w=dk(gdpew). 282 * N2 calculation could be speed up by precalculating ratios: (zw[k]-zt[k])/e3w[k] and (zt[k-1]-zw[k])/e3z[k] 283 * put KE and PE directly in diawri? 284 * Energetics of Brown and Campana effect? 285 * Modify HPG to use alpha/beta + partial step formulation on fixed z-levels 286 266 287 ---- 267 288 Testing