[[PageOutline]] Last edited [[Timestamp]] '''Author''' : Simona Flavoni '''ticket''' : #1692 '''Branch''' : [https://forge.ipsl.jussieu.fr/nemo/browser/branches/2016/dev_r6409_SIMPLIF_2_usrdef 2016/dev_r6409_SIMPLIF_2_usrdef] '''WP2016 Action''' : SIMPLIF-2 ---- [[BR]]'''REMARK: ''' 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..) Notes of development of simplification-2 strategy = Modification from revision '''6593''' to next one (revision '''6595''') = ''' '''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]]''' = Modification from revision '''6595''' to next one (revision '''6596''') = ''' '''These changes doesn’t change de GYRE results (in both ln_read_cfg = T and F)[[BR]] 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 '''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??) '''NEMO//OPA_SRC/DOM/domngb.F90[[BR]] '''remove the shorter calculation for jphgr_msh = 2 or 3 '''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]] * 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]] * 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:''' 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[[BR]] ''' and replace all test of 0 to 6 by the corresponding np_….'''[[BR]][[BR]]URGENT '''(to be done before release): modification of '''dom_cfg''' '''[[BR]]DOM ZGR analyses[[BR]][[BR]]'''dom_zgr 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 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]] ! ----------------------------------- 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