New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ticket/1775_TOP_Offline_vvl (diff) – NEMO

Changes between Version 2 and Version 3 of ticket/1775_TOP_Offline_vvl


Ignore:
Timestamp:
2016-09-21T11:24:41+02:00 (8 years ago)
Author:
cetlod
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ticket/1775_TOP_Offline_vvl

    v2 v3  
    1 = [[PageOutline]] Last edited [[Timestamp]] 
     1= [[PageOutline]] Last edited [[Timestamp]] = 
     2'''Author''' : Christian Ethé 
    23 
    3 '''Author''' : Simona Flavoni 
     4'''ticket''' : [ticket:1692 #]1788 
    45 
    5 '''ticket''' : #1692 
     6'''Branch''' : [https://forge.ipsl.jussieu.fr/nemo/browser/branches/2016/dev_r6409_SIMPLIF_2_usrdef 2016/dev_r6]665_TOP_Offline_vvl 
    67 
    7 '''Branch''' : [https://forge.ipsl.jussieu.fr/nemo/browser/branches/2016/dev_r6409_SIMPLIF_2_usrdef 2016/dev_r6409_SIMPLIF_2_usrdef] 
     8'''WP2016 Action''' :  
    89 
    9 '''WP2016 Action''' : SIMPLIF-2 
     10= Purpose : = 
     11Run passive tracers offline with linear free surface 
    1012 
    11 ---- 
    12 [[BR]]'''REMARK:''' 
     13= Method : = 
     14Compute ssh evolution and vertical scale factors at each time step using dynamical fields previously stored on files 
    1315 
    14 look at this old page (2014) : https://forge.ipsl.jussieu.fr/nemo/wiki/2014WP/2014_SystemSimplification_hard_coding to see '''what is STILL missing''' (for example diafwb, closea, etc..) 
     16= Hypothesis : = 
     17 *  zstar coordinate only 
     18 * No advective bbl 
     19 *  '''in a first step : no time interpolation ====> at least 5 days-mean fields are needed''' 
    1520 
    16 Notes of development of simplification-2 strategy 
    1721 
    18  = 
    19 = Modification from revision '''6593''' to next one (revision '''6595''') = 
    20 = These changes doesn’t change de GYRE results (in both ln_read_cfg = T and F)'''[[BR]]'''[[BR]][[BR]]'''domwri.F90''' and '''par_oce.F90'''[[BR]]Add jpkglo in par_oce[[BR]]Add jpiglo, jpjglo and jpkglo in mesh_mask file[[BR]][[BR]]'''domhgr.F90''', '''usrdef.F90''', and '''nemogcm.F90 '''[[BR]]create usr_def_nam to read the namusr_def which allows to specify the global domain sizes (jpiglo,jpjglo,jpkglo) [[BR]]change nn_bench into ln_bench read in namusr_def. ln_bench is now a variable known only by usrdef.F90 module. Remove nbench and nn_bench everywhere else (namelist_ref, nemogcm.F90, sbcana, in_out_manager.F90)[[BR]]nemo_init : add read of jpiglo, jpjglo and jpkglo or their setting in usr_def_nam'''[[BR]][[BR]]domhgr.F90''', and''' usrdef.F90[[BR]]'''add all hgr arrays in argument of hgr_read and usr_def_hgr [[BR]]remove kbench and k_cfg from usr_def_hgr arguments (same argueent in [[BR]]both hgr_read and usr_def_hgr)[[BR]]domhgr: - remove useless local variable declaration[[BR]]- add control print for iff and ie1e2u_v cases'''[[BR]][[BR]][[BR]]sbcana.F90 '''and''' namsbc_ana '''removed from the code'''[[BR]]'''ln_ana replaced by ln_usr in namsbc[[BR]]jp_ana replaced by jp_usr in sbcmod.F90[[BR]]remove sbcana.F90 from the code'''[[BR]][[BR]]usrdef_sbc.F90 [[BR]]'''remove the use of ln_bench by constraining the use of key_mpp_rep[[BR]]CAUTION : this changes the results of the reference GYRE which is without[[BR]]this key ===>>> update the reference run used to compare the results, with [[BR]]a new run with the key_mpp_rep[[BR]]'''[[BR]][[BR]]Namelist of all configuration + namelist_ref :[[BR]]'''- namelist_ref /namsbc : ln_blk_core = .true. ===>>> = .false.[[BR]]and thus add ln_blk_core = .true. in all ORCA configuration namelist_cfg[[BR]]Change ln_ana into ln_usr and thus also change all GYRE configuration[[BR]]'''[[BR]]''' 
    2122 
    22  = 
    23 = Modification from revision '''6595''' to next one (revision '''6596''') = 
    24 = These changes doesn’t change de GYRE results (in both ln_read_cfg = T and F)[[BR]] 
     23{{{ 
     24ssh(n+dt) = ssh(n) + dt * ( div2D(DT) - emp(DT) ) where div2D is the vertically integrated divergence transport and DT is the frequency of dynamical fields 
     25}}} 
     26=  = 
     27= Dynamics : = 
     28 * e3t, e3u, e3v, e3w  : vertical scale factor 
     29 * U, V, W : effective transport ( e1*e2*e3 * u where u is velocity including eiv, mle etc ...) 
     30 * hdiv * e3t :  horizontal divergence 
     31 * emp 
     32 * 3D runoffs 
     33 * Kz 
     34 * T,S, qsr, mld 
    2535 
    26 Revision 6596 includes step.I and II that follow.[[BR]]'''[[BR]][[BR]]Idea : simplification of the namelist resulting from modification in hgr[[BR]][[BR]][[BR]]Step I : '''remove from namelist : jphgr_msh , [[BR]]ppglam0, ppgphi0 [[BR]]ppe1_deg, ppe2_deg, ppe1_m, ppe2_m[[BR]][[BR]]This requires the following changes:'''[[BR]][[BR]]'''LIM2 and LIM3 needs the Coriolis parameter at T-points[[BR]]==>> Introduce in dom_oce both Coriolis at T- and F-point : '''ff_t and ff_f,''' resp.[[BR]]This implies changes in all routines of both OPA and LIM_(2/3) that were using[[BR]]either ff or fcor.[[BR]]NB: the change of name for Coriolis parameter is quite useful. Indeed, with the [[BR]]old name (ff) it was impossible to find where coriolis was used as ‘ff’ appears in [[BR]]too many comments (nearly all modules !)[[BR]]NB: changes also include a small bug correction in ldftra.F90'''[[BR]][[BR]]'''Add in hgr_read and usr_def_hgr the read / calculation of ff_t, coriolis at [[BR]]T-point, and use it in LIM (nomore fcor calculation in limmsh(_2)[[BR]]==>> modification in dom_oce.F90, domhgr, hgr_read, usr_def_hgr, [[BR]]limmsh_2.F90 , and limmsh.F90 + others…[[BR]]including dyncor_c1d.F90'''[[BR]][[BR]]NEMO//OFF_SRC/domrea.F90 [[BR]]'''simply remove jphgr_msh from this routine and from the associated namelist 
     36The time evolution of ssh and scale factor are then computed as : 
    2737 
    28 '''NEMO//OPA_SRC/CRS/crsini.F90[[BR]]'''remove jphgr_msh from this routine. A deeper check is needed, since I don’t [[BR]]think we need a coriolis coarsened (perhaps yes to compute div coeff??) 
     38{{{ 
    2939 
    30 '''NEMO//OPA_SRC/DOM/domngb.F90[[BR]]'''remove the shorter calculation for jphgr_msh = 2 or 3 
     40ssh_a = ssh_n - dt * ( div2D(DT) - emp(DT) ) where div2D is the vertically integrated divergence transport and DT is the frequency of dynamical fields 
     41e3t_a = e3t_0 * [ 1 + ssh_a / ht_0] 
    3142 
    32 '''NEMO//OPA_SRC/DOM/domzgr.F90[[BR]]'''remove the definition of a bump of topography in EEL case [[BR]]This should be implemented using usrdef.F90, therefore no more in the [[BR]]reference code'''[[BR]][[BR]]====>>>> '''run identical with both ln_read_cfg = T and F (with '''key_mpp_rep''' !)[[BR]]'''[[BR]]Not done : case C1D ==>>> '''the interface will have to be completely changed using the new user-defined interface…. (change to be done in domc1d.F90)[[BR]]'''[[BR]][[BR]]Step II : '''remove from namelist: jpiglo, jpjglo, jpk,[[BR]]jpidta, jpjdta, jpkdta[[BR]]remove from the code jpizoom, jpjzoom'''[[BR]][[BR]]removed from the namelist, not from the code at this stage as :[[BR]]'''jp.dta = jp.glo is set in nemo_init[[BR]]==>> namcfg changed, as well as nemogcm.F90'''[[BR]][[BR]]'''replace '''jpizoom by 1''' (idem for '''jpjzoom''') everywhere.[[BR]]==>> a lot of modules involved'''[[BR]][[BR]]domzgr.F90''', remove zgr_bat_zoom routine and its CALL'''[[BR]][[BR]]'''remove loom and lzoom_e,w,n,s everywhere'''[[BR]][[BR]]====>>>> '''run identical with both ln_read_cfg = T and F (with '''key_mpp_rep '''!)'''[[BR]][[BR]]Not done : case C1D ==>>> '''the interface will have to be completely changed using the new user-defined interface…. (change to be done in domc1d.F90)'''[[BR]][[BR]]Not done : DOC update… ===>>> '''this should be started after the definition of zgr interface '''[[BR]][[BR]][[BR]][[BR]]Step III :''' create '''domain_cfg.nc''' file '''[[BR]][[BR]]'''Modification from revision '''6596''' to next one (revision '''6624''')[[BR]]====>>>> run identical with both ln_read_cfg = T and F (with '''key_mpp_rep '''!)'''[[BR]][[BR]]'''- create '''cfg_wri''' (put in '''domain.F90)''' that will be used in old version to create the configuration input file (I name it domain_cfg.nc) [[BR]]This file is created if nn_msh = -1. When ln_read_cfg=T we now read domain_cfg.nc file (no more mesh_mask file)[[BR]] 
    3343 
    34  * add in this file all the information I think useful for a configuration[[BR]]in particular addition of '''jperio''' (read in dom_ or set usr_def )[[BR]]and also equivalent of''' ln_zco, lnzps, ln_sco, ln_isfcav'''[[BR]] 
     44}}} 
     45To be consistent with dynamics, we apply a leap-frog  scheme with asselin time-filter on ssh, when swapping the array 
    3546 
    36  * add in '''domzgr.F90''' a routine zgr_read to read the information [[BR]]'''===>>> CAUTION''' zgr_read has not been tested, and in not called[[BR]]- move jperio from par_oce to dom_oce (i.e. same place as nperio)'''[[BR]][[BR]]'''minor: '''[[BR]]'''- remove domstp.F90 together with atfp1 which is not used anymore[[BR]]- move “ocean domain parameters” print from phycst to domain.F90[[BR]]- remove jperio and cp_cfz from namelist (namcfg) (NB: cp_cfz remove from the whole code)[[BR]]'''[[BR]][[BR]]Ideas for future ( NOT strictly linked to SIMPLIF-2) :[[BR]][[BR]]1:''' 
     47{{{ 
    3748 
    38 change nn_timing in ln_timing ==> it implies to change all :[[BR]]IF( nn_timing == 1 ) …[[BR]]en[[BR]]IF( ln_timing ) …[[BR]]'''[[BR]]2:[[BR]]'''remove key_netcdf4 key as this is done in xIOS ??? not sure (see Andrew: => Andrew says we keep it!!)[[BR]]'''[[BR]][[BR]]domvvl.F90 :[[BR]]'''- first change the name, sshdom ??? or other thing[[BR]]- second, separate (z/zps/s)* cases from z-tilde case[[BR]]- third, revisite z-tilde case in the light of depth being the sum of scale factors[[BR]]and vise versa ! this will notably change the interpolation of e3w from e3t'''[[BR]][[BR]]jperio : [[BR]]'''- change the jperio into nperio_glo, move it from par_ to dom_oce (like nperio)[[BR]]- define np_ parameters associated with jperio choice :'''[[BR]]'''jperio= 0, closed '''np_closed[[BR]]'''jperio= 1, cyclic east-west '''np_ew_cyclic or np_EWc[[BR]]'''jperio= 2, equatorial symmetric '''np_eq_symmetric or np_Eqs[[BR]]'''jperio= 3, north fold with T-point pivot '''np_Tnfd[[BR]]'''jperio= 4, cyclic east-west and north fold with T-point pivot '''np_ewc_Tnfd or np_EWc_Tnfd[[BR]]'''jperio= 5, north fold with F-point pivot''' np_Fnfd[[BR]]'''jperio= 6, cyclic east-west and north fold with F-point pivot''' np_ewc_Fnfd or np_EWc_Fnfd''' 
     49ssh_b = ssh_n + atfp * ( ssh_b -é * ssh_n + ssh_a  )  
     50ssh_n = ssh_a 
    3951 
    40 and replace all test of 0 to 6 by the corresponding np_….'''[[BR]][[BR]]URGENT '''(to be done before release): modification of '''dom_cfg''' 
    4152 
    42 '''[[BR]]DOM ZGR analyses[[BR]][[BR]]'''dom_zgr 
     53}}} 
     54=  = 
     55= Initial state : = 
    4356 
    44   CALL '''zgr_z''' ! Reference z-coordinate system (always called)[[BR]]CALL '''zgr_bat''' ! Bathymetry fields (levels and meters)[[BR]]IF( lk_c1d ) CALL lbc_lnk( bathy , 'T', 1._wp ) ! 1D config.: same bathy value over the 3x3 domain 
    4557 
    46 IF( ln_zco ) CALL zgr_zco ! z-coordinate[[BR]]IF( ln_zps ) CALL zgr_zps ! Partial step z-coordinate[[BR]]IF( ln_sco ) CALL zgr_sco ! s-coordinate or hybrid z-s coordinate[[BR]]! [[BR]]! final adjustment of mbathy & check [[BR]]! ----------------------------------- 
     58Ideally, the initial state of sea surface height ssh_0 comes from the restart of the last year of the simulation which produced the dynamics used.[[BR]]For example if one uses the dynamics from 1948 to 2009, the initial ssh comes from the restart of year 1947 
    4759 
    48 IF( lzoom ) CALL zgr_bat_zoom ! correct mbathy in case of zoom subdomain[[BR]]IF( .NOT.lk_c1d ) CALL zgr_bat_ctl ! check bathymetry (mbathy) and suppress isolated ocean points[[BR]]CALL zgr_bot_level ! deepest ocean level for t-, u- and v-points[[BR]]CALL zgr_top_level ! shallowest ocean level for T-, U-, V- points[[BR]][[BR]]——————[[BR]][[BR]]'''zgr_z'''[[BR]]gdept_1d, gdepw_1d[[BR]]e3t_1d , e3w_1d [[BR]]'''nlb10 [[BR]]nla10'''[[BR]][[BR]]'''>>>> : change nlb10 and nla10 from scalar field => to 2D field '''for s-coordinates[[BR]](if NOT the mixed layer is not really what we think to compute)[[BR]]idea: is good to open a ticket (so all people can see and fix it)[[BR]][[BR]]'''zgr_bat'''[[BR]]mbathy[[BR]]bathy >>>> = gdepw_1d(jpk) (flat bottom)[[BR]][[BR]]risfdep[[BR]]misfdep[[BR]][[BR]]'''zgr_zco >>>> from _1d values'''[[BR]]gdept_0 gdepw_0 '''gde3w_0(:,:,jk) '''[[BR]]e3t_0 (:,:,jk) e3u_0 (:,:,jk) e3v_0 (:,:,jk) e3f_0 (:,:,jk)[[BR]]e3w_0 (:,:,jk) e3uw_0 (:,:,jk) e3vw_0 (:,:,jk) [[BR]][[BR]]'''zgr_zps >>>> Idem zgr_zco'''[[BR]]gdept_0 gdepw_0 gde3w_0(:,:,jk) [[BR]]e3t_0 (:,:,jk) e3u_0 (:,:,jk) e3v_0 (:,:,jk) e3f_0 (:,:,jk)[[BR]]e3w_0 (:,:,jk) e3uw_0 (:,:,jk) e3vw_0 (:,:,jk) [[BR]][[BR]]'''zgr_isf'''[[BR]]risfdep[[BR]]misfdep[[BR]]mbathy[[BR]]bathy[[BR]][[BR]][[BR]]'''zgr_sco >>>> Idem zgr_zco'''[[BR]]gdept_0 gdepw_0 gde3w_0(:,:,jk) [[BR]]e3t_0 (:,:,jk) e3u_0 (:,:,jk) e3v_0 (:,:,jk) e3f_0 (:,:,jk)[[BR]]e3w_0 (:,:,jk) e3uw_0 (:,:,jk) e3vw_0 (:,:,jk) [[BR]][[BR]]'''URGENT:''' (urgent because dim_cfg changed)[[BR]]REMOVE gde3w and compte all e3T, e3w, e3uW, e3vw like:[[BR]]the sum of (delta) gdepT, gdepW, gdepUW, gdepVW [[BR]][[BR]]? but: are we sure that we want to remove all these ?[[BR]]? they can be useful for graphic use?[[BR]]? or we can output e3t,… optionally [[BR]][[BR]]'''=> simplification associated for dom_cfg because e3 output will be useless.'''[[BR]][[BR]][[BR]]zgr_bot_level[[BR]]mbkt, mbku, mbkv >>>> vertical indices of the deeptest ocean level[[BR]]mbku(ji,jj) = MIN( mbkt(ji+1,jj ) , mbkt(ji,jj) )[[BR]]mbkv(ji,jj) = MIN( mbkt(ji ,jj+1) , mbkt(ji,jj) )[[BR]][[BR]][[BR]][[BR]]zgr_top_level[[BR]]mikt, miku, mikv >>>> vertical indices of the shallowest ocean level 
     60= Simulations : = 
     61===  * Climatological run :  at each annual loop, restart from the ssh of the ocean restart file 
     62 * Interannual run      :  restart from ssh saved in passive tracers restart file. But when doing repeated cycle, restart from the 1st year of ocean restart file at the beginning of each cycle 
    4963 
    50  = 
     64 ===