Changeset 8979 for branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM
- Timestamp:
- 2017-12-11T17:45:55+01:00 (6 years ago)
- Location:
- branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM
- Files:
-
- 2 deleted
- 121 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7715 r8979 44 44 !----------------------------------------------------------------------- 45 45 &namcrs ! Grid coarsening for dynamics output and/or 46 46 ! ! passive tracer coarsened online simulations 47 47 !----------------------------------------------------------------------- 48 48 / … … 51 51 !----------------------------------------------------------------------- 52 52 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 53 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing 53 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing 54 54 cn_dir = './' ! root directory for the location of the runoff files 55 55 ln_tsd_init = .false. ! Initialisation of ocean T & S with T &S input data (T) or not (F) … … 87 87 &namsbc_ssr ! surface boundary condition : sea surface restoring 88 88 !----------------------------------------------------------------------- 89 nn_sssr = 0 ! add a damping term in the surface freshwater flux (=2)90 rn_deds = -27.7 ! magnitude of the damping on salinity [mm/day]91 ln_sssr_bnd = .false. ! flag to bound erp term (associated with nn_sssr=2)92 89 / 93 90 !----------------------------------------------------------------------- … … 204 201 !----------------------------------------------------------------------- 205 202 ln_dynvor_ene = .true. ! enstrophy conserving scheme 203 ln_dynvor_ens = .false. ! energy conserving scheme 204 ln_dynvor_mix = .false. ! mixed scheme 205 ln_dynvor_een = .false. ! energy & enstrophy scheme 206 nn_een_e3f = 1 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 206 207 / 207 208 !----------------------------------------------------------------------- … … 239 240 rn_ahm_b = 0. ! background eddy viscosity for ldf_iso [m2/s] 240 241 rn_bhm_0 = 0. ! horizontal bilaplacian eddy viscosity [m4/s] 241 !242 ! Caution in 20 and 30 cases the coefficient have to be given for a 1 degree grid (~111km)243 /244 rn_ahm_0_lap = 100000. ! horizontal laplacian eddy viscosity [m2/s]245 242 / 246 243 !----------------------------------------------------------------------- -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7715 r8979 31 31 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 32 32 ln_write_cfg= .false. ! (=T) create the domain configuration file 33 33 ! 34 34 / 35 35 !----------------------------------------------------------------------- … … 60 60 !----------------------------------------------------------------------- 61 61 nn_fsbc = 1 ! frequency of surface boundary condition computation 62 !! (also = the frequency of sea-ice model call)62 ! (also = the frequency of sea-ice model call) 63 63 ln_usr = .true. ! user defined formulation (T => check usrdef_sbc) 64 64 ln_blk = .false. ! Bulk formulation (T => fill namsbc_blk ) … … 240 240 rn_ahm_b = 0. ! background eddy viscosity for ldf_iso [m2/s] 241 241 rn_bhm_0 = 0. ! horizontal bilaplacian eddy viscosity [m4/s] 242 !243 ! Caution in 20 and 30 cases the coefficient have to be given for a 1 degree grid (~111km)244 /245 rn_ahm_0_lap = 100000. ! horizontal laplacian eddy viscosity [m2/s]246 242 / 247 243 !----------------------------------------------------------------------- -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_pisces_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/1_namelist_cfg
r7942 r8979 18 18 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 19 19 cn_domcfg = "AGRIF_AGULHAS_domain_cfg" ! domain configuration filename 20 /21 !-----------------------------------------------------------------------22 &namzgr ! vertical coordinate23 !-----------------------------------------------------------------------24 ln_zps = .true. ! z-coordinate - partial steps25 20 / 26 21 !----------------------------------------------------------------------- -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/file_def_nemo.xml
r7948 r8979 95 95 <field field_ref="avt" name="difvho" /> 96 96 <field field_ref="w_masstr" name="vovematr" /> 97 98 99 100 101 102 103 97 <!-- variables available with key_zdftmx_new --> 98 <field field_ref="av_wave" name="av_wave" /> 99 <field field_ref="bn2" name="bn2" /> 100 <field field_ref="bflx_tmx" name="bflx_tmx" /> 101 <field field_ref="pcmap_tmx" name="pcmap_tmx" /> 102 <field field_ref="emix_tmx" name="emix_tmx" /> 103 <field field_ref="av_ratio" name="av_ratio" /> 104 104 </file> 105 105 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7933 r8979 17 17 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 18 18 cn_domcfg = "ORCA_R2_zps_domcfg" ! domain configuration filename 19 /20 !-----------------------------------------------------------------------21 &namzgr ! vertical coordinate22 !-----------------------------------------------------------------------23 ln_zps = .true. ! z-coordinate - partial steps24 19 / 25 20 !----------------------------------------------------------------------- -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_ice_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_pisces_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_pisces_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_OFF_TRC/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_OFF_TRC/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_OFF_TRC/EXP00/namelist_trc_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_SAS_LIM3/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/ORCA2_SAS_LIM3/EXP00/namelist_ice_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml
r7968 r8979 20 20 <field_group id="grid_T" grid_ref="grid_T_2D" > 21 21 <field id="e3t" long_name="T-cell thickness" standard_name="cell_thickness" unit="m" grid_ref="grid_T_3D"/> 22 <field id="e3t_surf" long_name="T-cell thickness" field_ref="e3t" standard_name="cell_thickness" unit="m" grid_ref="grid_T_SFC"/> 22 23 <field id="e3t_0" long_name="Initial T-cell thickness" standard_name="ref_cell_thickness" unit="m" grid_ref="grid_T_3D"/> 23 24 … … 562 563 --> 563 564 564 <field_group id="trendT" grid_ref="grid_T_3D"> 565 <!-- variables available with ln_tra_trd --> 565 <!-- variables available with ln_tra_trd --> 566 <!-- Asselin trends calculated on odd time steps--> 567 <field_group id="trendT_odd" grid_ref="grid_T_3D"> 568 <field id="ttrd_atf" long_name="temperature-trend: asselin time filter" unit="degree_C/s" /> 569 <field id="strd_atf" long_name="salinity -trend: asselin time filter" unit="0.001/s" /> 570 <!-- Thickness weighted versions: --> 571 <field id="ttrd_atf_e3t" unit="degC/s * m" > ttrd_atf * e3t </field> 572 <field id="strd_atf_e3t" unit="1e-3/s * m" > strd_atf * e3t </field> 573 <!-- OMIP layer-integrated trends --> 574 <field id="ttrd_atf_li" long_name="layer integrated heat-trend: asselin time filter " unit="W/m^2" > ttrd_atf_e3t * 1026.0 * 3991.86795711963 </field> 575 <field id="strd_atf_li" long_name="layer integrated salt -trend: asselin time filter " unit="kg/(m^2 s)" > strd_atf_e3t * 1026.0 * 0.001 </field> 576 </field_group> 577 578 <!-- Other trends calculated on even time steps--> 579 <field_group id="trendT_even" grid_ref="grid_T_3D"> 566 580 <field id="ttrd_xad" long_name="temperature-trend: i-advection" unit="degC/s" /> 567 581 <field id="strd_xad" long_name="salinity -trend: i-advection" unit="1e-3/s" /> … … 596 610 <field id="ttrd_npc" long_name="temperature-trend: non-penetrative conv." unit="degC/s" /> 597 611 <field id="strd_npc" long_name="salinity -trend: non-penetrative conv." unit="1e-3/s" /> 598 <field id="ttrd_qns" long_name="temperature-trend: non-solar flux + runoff" unit="degC/s" />599 <field id="strd_cdt" long_name="salinity -trend: C/D term + runoff" unit="degC/s" />612 <field id="ttrd_qns" long_name="temperature-trend: non-solar flux + runoff" unit="degC/s" grid_ref="grid_T_2D" /> 613 <field id="strd_cdt" long_name="salinity -trend: C/D term + runoff" unit="degC/s" grid_ref="grid_T_2D" /> 600 614 <field id="ttrd_qsr" long_name="temperature-trend: solar penetr. heating" unit="degC/s" /> 601 615 <field id="ttrd_bbc" long_name="temperature-trend: geothermal heating" unit="degC/s" /> 602 <field id="ttrd_atf" long_name="temperature-trend: asselin time filter" unit="degC/s" />603 <field id="strd_atf" long_name="salinity -trend: asselin time filter" unit="1e-3/s" />604 <field id="ttrd_tot" long_name="temperature-trend: total model trend" unit="degC/s" />605 <field id="strd_tot" long_name="salinity -trend: total model trend" unit="1e-3/s" />606 616 607 617 <!-- Thickness weighted versions: --> … … 640 650 <field id="ttrd_qsr_e3t" unit="degC/s * m" > ttrd_qsr * e3t </field> 641 651 <field id="ttrd_bbc_e3t" unit="degC/s * m" > ttrd_bbc * e3t </field> 642 <field id="ttrd_atf_e3t" unit="degC/s * m" > ttrd_atf * e3t </field> 643 <field id="strd_atf_e3t" unit="1e-3/s * m" > strd_atf * e3t </field> 652 653 <!-- OMIP layer-integrated trends --> 654 <field id="ttrd_totad_li" long_name="layer integrated heat-trend : total advection" unit="W/m^2" > ttrd_totad_e3t * 1026.0 * 3991.86795711963 </field> 655 <field id="strd_totad_li" long_name="layer integrated salt -trend : total advection" unit="kg/(m^2 s)" > strd_totad_e3t * 1026.0 * 0.001 </field> 656 <field id="ttrd_evd_li" long_name="layer integrated heat-trend : EVD convection" unit="W/m^2" > ttrd_evd_e3t * 1026.0 * 3991.86795711963 </field> 657 <field id="strd_evd_li" long_name="layer integrated salt -trend : EVD convection" unit="kg/(m^2 s)" > strd_evd_e3t * 1026.0 * 0.001 </field> 658 <field id="ttrd_iso_li" long_name="layer integrated heat-trend : isopycnal diffusion" unit="W/m^2" > ttrd_iso_e3t * 1026.0 * 3991.86795711963 </field> 659 <field id="strd_iso_li" long_name="layer integrated salt -trend : isopycnal diffusion" unit="kg/(m^2 s)" > strd_iso_e3t * 1026.0 * 0.001 </field> 660 <field id="ttrd_zdfp_li" long_name="layer integrated heat-trend : pure vert. diffusion" unit="W/m^2" > ttrd_zdfp_e3t * 1026.0 * 3991.86795711963 </field> 661 <field id="strd_zdfp_li" long_name="layer integrated salt -trend : pure vert. diffusion" unit="kg/(m^2 s)" > strd_zdfp_e3t * 1026.0 * 0.001 </field> 662 <field id="ttrd_qns_li" long_name="layer integrated heat-trend : non-solar flux + runoff" unit="W/m^2" grid_ref="grid_T_2D"> ttrd_qns_e3t * 1026.0 * 3991.86795711963 </field> 663 <field id="ttrd_qsr_li" long_name="layer integrated heat-trend : solar flux" unit="W/m^2" grid_ref="grid_T_3D"> ttrd_qsr_e3t * 1026.0 * 3991.86795711963 </field> 664 <field id="ttrd_bbl_li" long_name="layer integrated heat-trend: bottom boundary layer " unit="W/m^2" > ttrd_bbl_e3t * 1026.0 * 3991.86795711963 </field> 665 <field id="strd_bbl_li" long_name="layer integrated salt -trend: bottom boundary layer " unit="kg/(m^2 s)" > strd_bbl_e3t * 1026.0 * 0.001 </field> 666 <field id="ttrd_evd_li" long_name="layer integrated heat -trend: evd convection " unit="W/m^2" >ttrd_evd_e3t * 1026.0 * 3991.86795711963 </field> 667 <field id="strd_evd_li" long_name="layer integrated salt -trend: evd convection " unit="kg/(m^2 s)" > strd_evd_e3t * 1026.0 * 0.001 </field> 668 669 </field_group> 670 671 <!-- Total trends calculated every time step--> 672 <field_group id="trendT" grid_ref="grid_T_3D"> 673 <field id="ttrd_tot" long_name="temperature-trend: total model trend" unit="degC/s" /> 674 <field id="strd_tot" long_name="salinity -trend: total model trend" unit="1e-3/s" /> 675 <!-- Thickness weighted versions: --> 644 676 <field id="ttrd_tot_e3t" unit="degC/s * m" > ttrd_tot * e3t </field> 645 677 <field id="strd_tot_e3t" unit="1e-3/s * m" > strd_tot * e3t </field> 646 647 678 <!-- OMIP layer-integrated total trends --> 679 <field id="ttrd_tot_li" long_name="layer integrated heat-trend: total model trend :" unit="W/m^2" > ttrd_tot_e3t * 1026.0 * 3991.86795711963 </field> 680 <field id="strd_tot_li" long_name="layer integrated salt -trend: total model trend :" unit="kg/(m^2 s)" > strd_tot_e3t * 1026.0 * 0.001 </field> 681 682 <!-- **** these trends have not been apportioned to all/even/odd ts yet **** --> 648 683 <!-- variables available with ln_KE_trd --> 649 684 <field id="ketrd_hpg" long_name="ke-trend: hydrostatic pressure gradient" unit="W/s^3" /> … … 736 771 --> 737 772 773 <field_group id="TRD" > 774 <field field_ref="ttrd_totad_li" name="opottempadvect" /> 775 <field field_ref="ttrd_iso_li" name="opottemppmdiff" /> 776 <field field_ref="ttrd_zdfp_li" name="opottempdiff" /> 777 <field field_ref="ttrd_evd_li" name="opottempevd" /> 778 <field field_ref="strd_evd_li" name="osaltevd" /> 779 <field field_ref="ttrd_qns_li" name="opottempqns" /> 780 <field field_ref="ttrd_qsr_li" name="rsdoabsorb" operation="accumulate" /> 781 <field field_ref="strd_totad_li" name="osaltadvect" /> 782 <field field_ref="strd_iso_li" name="osaltpmdiff" /> 783 <field field_ref="strd_zdfp_li" name="osaltdiff" /> 784 </field_group> 785 738 786 <field_group id="mooring" > 739 787 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/namelist_pisces_ref
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/namelist_ref
- Property svn:mime-type set to text/x-fortran
r7974 r8979 59 59 !!====================================================================== 60 60 !! namcfg parameters of the configuration 61 !! namzgr vertical coordinate (default: NO selection)62 61 !! namdom space and time domain (bathymetry, mesh, timestep) 63 62 !! namwad Wetting and drying (default F) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/namelist_top_ref
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/SHARED/namelist_trc_ref
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_flux_cen2_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_eenH_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_een_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_ene_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_ens_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_flux_cen2_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_eenH_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_een_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_ene_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_ens_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_sco_FCT2_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT2_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT4_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT4_vect_een_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7822 r8979 26 26 &namdom ! space and time domain (bathymetry, mesh, timestep) 27 27 !----------------------------------------------------------------------- 28 ln_linssh = . false. ! =T linear free surface ==>> model level are fixed in time28 ln_linssh = .true. ! =T linear free surface ==>> model level are fixed in time 29 29 ! 30 30 nn_msh = 1 ! create (>0) a mesh file or not (=0) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_ice_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/TEST_CASES/WAD/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/CONFIG/makenemo
r7756 r8979 63 63 # :: 64 64 # 65 # $ ./makenemo -m ifort_osx - j3 -n ORCA2_LIM 65 # $ ./makenemo -m ifort_osx - j3 -n ORCA2_LIM3_PISCES 66 66 # 67 67 # … … 221 221 *) 222 222 echo " \"$1\" BAD OPTION" 223 exit 223 exit 2 224 224 ;; 225 225 … … 267 267 #- 268 268 #- Choose a default configuration if needed --- 269 #- ORCA2_LIM or last one used ---269 #- ORCA2_LIM3_PISCES or last one used --- 270 270 . ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit 271 271 272 272 if [ ${#NEW_CONF} -eq 0 ] ; then 273 273 if [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 274 echo "You are installing a new default (ORCA2_LIM ) configuration"274 echo "You are installing a new default (ORCA2_LIM3_PISCES) configuration" 275 275 ind=0 276 276 . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC YES … … 280 280 . ${COMPIL_DIR}/Fread_dir.sh NST_SRC YES 281 281 . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC NO 282 REF_CONF=ORCA2_LIM 282 . ${COMPIL_DIR}/Fread_dir.sh SAO_SRC NO 283 . ${COMPIL_DIR}/Fread_dir.sh SAS_SRC NO 284 REF_CONF=ORCA2_LIM3_PISCES 283 285 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 284 echo "You are installing a new configuration based on ORCA2_LIM "286 echo "You are installing a new configuration based on ORCA2_LIM3_PISCES" 285 287 TAB=( ${NEM_SUBDIR} ) 286 REF_CONF=ORCA2_LIM 288 REF_CONF=ORCA2_LIM3_PISCES 287 289 elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -gt 0 ]; then 288 290 echo "You are installing a new configuration based on ${REF_CONF}" … … 320 322 #- Clean links and librairies --- 321 323 #- Creating the good links, at first on OPA_SRC --- 322 . ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${TAB[*]} || exit 323 324 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 324 . ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${TAB[*]} || exit 3 325 326 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 3 325 327 326 328 # build the complete list of the cpp keys of this configuration … … 360 362 #- At this stage cpp keys have been updated. we can check the arch file 361 363 #- When used for the first time, choose a compiler --- 362 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm cpp.fcm ${CMP_NAM} || exit 364 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm cpp.fcm ${CMP_NAM} || exit 3 363 365 364 366 #- At this stage the configuration has beeen chosen … … 368 370 #- We look after agrif 369 371 grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE=1 && export USEBLD=${USEBLD/xag/} 370 . ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 372 . ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 3 371 373 372 374 #- … … 383 385 if [ ${#x_c} -eq 0 ]; then 384 386 if [ "$AGRIFUSE" == 1 ]; then 385 fcm build --ignore-lock -j 1 ${COMPIL_DIR}/bld_preproagr.cfg ||{ cd - ; exit ;}387 fcm build --ignore-lock -j 1 ${COMPIL_DIR}/bld_preproagr.cfg ||{ cd - ; exit 1 ;} 386 388 echo "" 387 389 echo "---------------------------------" … … 391 393 fi 392 394 fi 393 fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd -395 fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD ||{ cd - ; exit 1 ;} 394 396 [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ${CONFIG_DIR}/${NEW_CONF}/EXP00/opa 395 397 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
r7813 r8979 205 205 IF( .NOT. ln_limdO ) qlead(:,:) = 0._wp 206 206 ! In case we bypass growing/melting from top and bottom: we suppose ice is impermeable => ocean is isolated from atmosphere 207 IF( .NOT. ln_limdH ) hfx_in(:,:) = pfrld(:,:) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:) 208 IF( .NOT. ln_limdH ) fhtur (:,:) = 0._wp ; fhld (:,:) = 0._wp 207 IF( .NOT. ln_limdH ) THEN 208 hfx_in(:,:) = pfrld(:,:) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:) 209 fhtur (:,:) = 0._wp 210 fhld (:,:) = 0._wp 211 ENDIF 209 212 210 213 ! --------------------------------------------------------------------- -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r8758 r8979 565 565 566 566 ! Find the factors of n. 567 IF( kn == 1 ) GOTO 20 568 569 ! nu holds the unfactorised part of the number. 570 ! knfax holds the number of factors found. 571 ! l points to the allowed factor list. 572 ! ifac holds the current factor. 573 574 inu = kn 575 knfax = 0 576 577 DO jl = ntest, 1, -1 578 ! 579 ifac = ilfax(jl) 580 IF( ifac > inu ) CYCLE 581 582 ! Test whether the factor will divide. 583 584 IF( MOD(inu,ifac) == 0 ) THEN 567 IF( kn .NE. 1 ) THEN 568 569 ! nu holds the unfactorised part of the number. 570 ! knfax holds the number of factors found. 571 ! l points to the allowed factor list. 572 ! ifac holds the current factor. 573 574 inu = kn 575 knfax = 0 576 577 DO jl = ntest, 1, -1 585 578 ! 586 knfax = knfax + 1 ! Add the factor to the list 587 IF( knfax > kmaxfax ) THEN 588 kerr = 6 589 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 590 return 579 ifac = ilfax(jl) 580 IF( ifac > inu ) CYCLE 581 582 ! Test whether the factor will divide. 583 584 IF( MOD(inu,ifac) == 0 ) THEN 585 ! 586 knfax = knfax + 1 ! Add the factor to the list 587 IF( knfax > kmaxfax ) THEN 588 kerr = 6 589 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 590 return 591 ENDIF 592 kfax(knfax) = ifac 593 ! Store the other factor that goes with this one 594 knfax = knfax + 1 595 kfax(knfax) = inu / ifac 596 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 591 597 ENDIF 592 kfax(knfax) = ifac 593 ! Store the other factor that goes with this one 594 knfax = knfax + 1 595 kfax(knfax) = inu / ifac 596 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 597 ENDIF 598 ! 599 END DO 600 601 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 598 ! 599 END DO 600 601 ENDIF 602 602 ! 603 603 END SUBROUTINE factorise -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r8030 r8979 768 768 ENDIF 769 769 ! 770 #if defined key_asminc 771 ELSE IF( kt == nitiaufin_r+1 ) THEN 772 ! 773 ssh_iau(:,:) = 0._wp 774 ! 775 #endif 770 776 ENDIF 771 777 ! !----------------------------------------- -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r7861 r8979 266 266 IF( ln_full_vel_array(ib_bdy) ) THEN 267 267 CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), map=nbmap_ptr(jstart:jend), & 268 & kit=jit, kt_offset=time_offset , jpk_bdy=nb_jpk_bdy, fvl=ln_full_vel_array(ib_bdy) ) 268 & kit=jit, kt_offset=time_offset , jpk_bdy=nb_jpk_bdy, & 269 & fvl=ln_full_vel_array(ib_bdy) ) 269 270 ELSE 270 271 CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), map=nbmap_ptr(jstart:jend), & … … 335 336 jend = jstart + dta%nread(1) - 1 336 337 CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), & 337 & map=nbmap_ptr(jstart:jend), kt_offset=time_offset, jpk_bdy=nb_jpk_bdy, fvl=ln_full_vel_array(ib_bdy) ) 338 & map=nbmap_ptr(jstart:jend), kt_offset=time_offset, jpk_bdy=nb_jpk_bdy, & 339 & fvl=ln_full_vel_array(ib_bdy) ) 338 340 ENDIF 339 341 ! If full velocities in boundary data then split into barotropic and baroclinic data -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90
r7753 r8979 316 316 #endif 317 317 cnt_25h = 1 318 IF (lwp) WRITE(numout,*) 'dia_wri_tide : After 25hr mean write, reset sum to current value and cnt_25h to one for overlapping average',cnt_25h 318 IF (lwp) WRITE(numout,*) 'dia_wri_tide : & 319 & After 25hr mean write, reset sum to current value and cnt_25h to one for overlapping average',cnt_25h 319 320 320 321 ENDIF ! cnt_25h .EQ. 25 .AND. MOD( kt, i_steps * 24) == 0 .AND. kt .NE. nn_it000 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90
r7753 r8979 151 151 WRITE(numout,*) 'dia_cfl : Maximum Courant number information for the run:' 152 152 WRITE(numout,*) '~~~~~~~~~~~~' 153 WRITE(numout,FMT='(12x,a12,7x,f6.4,5x,a16,i4,1x,i4,1x,i4,a1)') 'Run Max Cu', cu_max, 'at (i, j, k) = (', cu_loc(1), cu_loc(2), cu_loc(3), ')' 153 WRITE(numout,FMT='(12x,a12,7x,f6.4,5x,a16,i4,1x,i4,1x,i4,a1)') 'Run Max Cu', cu_max, 'at (i, j, k) = & 154 & (', cu_loc(1), cu_loc(2), cu_loc(3), ')' 154 155 WRITE(numout,FMT='(12x,a8,11x,f7.1)') ' => dt/C', dt*(1.0/cu_max) 155 WRITE(numout,FMT='(12x,a12,7x,f6.4,5x,a16,i4,1x,i4,1x,i4,a1)') 'Run Max Cv', cv_max, 'at (i, j, k) = (', cv_loc(1), cv_loc(2), cv_loc(3), ')' 156 WRITE(numout,FMT='(12x,a12,7x,f6.4,5x,a16,i4,1x,i4,1x,i4,a1)') 'Run Max Cv', cv_max, 'at (i, j, k) = & 157 & (', cv_loc(1), cv_loc(2), cv_loc(3), ')' 156 158 WRITE(numout,FMT='(12x,a8,11x,f7.1)') ' => dt/C', dt*(1.0/cv_max) 157 WRITE(numout,FMT='(12x,a12,7x,f6.4,5x,a16,i4,1x,i4,1x,i4,a1)') 'Run Max Cw', cw_max, 'at (i, j, k) = (', cw_loc(1), cw_loc(2), cw_loc(3), ')' 159 WRITE(numout,FMT='(12x,a12,7x,f6.4,5x,a16,i4,1x,i4,1x,i4,a1)') 'Run Max Cw', cw_max, 'at (i, j, k) = & 160 & (', cw_loc(1), cw_loc(2), cw_loc(3), ')' 158 161 WRITE(numout,FMT='(12x,a8,11x,f7.1)') ' => dt/C', dt*(1.0/cw_max) 159 162 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r7753 r8979 282 282 ! 283 283 IF ( iom_use("eken") ) THEN 284 rke(:,:,j k) = 0._wp ! kinetic energy284 rke(:,:,jpk) = 0._wp ! kinetic energy 285 285 DO jk = 1, jpkm1 286 286 DO jj = 2, jpjm1 287 287 DO ji = fs_2, fs_jpim1 ! vector opt. 288 zztmp = 1._wp / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk))289 zztmpx = 0.5 * ( un(ji-1,jj,jk) * un(ji-1,jj,jk) * e 2u(ji-1,jj) * e3u_n(ji-1,jj,jk) &290 & + un(ji ,jj,jk) * un(ji ,jj,jk) * e 2u(ji ,jj) * e3u_n(ji ,jj,jk) ) &288 zztmp = r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) 289 zztmpx = 0.5 * ( un(ji-1,jj,jk) * un(ji-1,jj,jk) * e1e2u(ji-1,jj) * e3u_n(ji-1,jj,jk) & 290 & + un(ji ,jj,jk) * un(ji ,jj,jk) * e1e2u(ji ,jj) * e3u_n(ji ,jj,jk) ) & 291 291 & * zztmp 292 292 ! 293 zztmpy = 0.5 * ( vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1 v(ji,jj-1) * e3v_n(ji,jj-1,jk) &294 & + vn(ji,jj ,jk) * vn(ji,jj ,jk) * e1 v(ji,jj ) * e3v_n(ji,jj ,jk) ) &293 zztmpy = 0.5 * ( vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1e2v(ji,jj-1) * e3v_n(ji,jj-1,jk) & 294 & + vn(ji,jj ,jk) * vn(ji,jj ,jk) * e1e2v(ji,jj ) * e3v_n(ji,jj ,jk) ) & 295 295 & * zztmp 296 296 ! -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r7646 r8979 134 134 135 135 ! control print 136 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8,a,i8,a,i8)')' =======>> 1/2 time step before the start of the run DATE Y/M/D = ', & 136 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8,a,i8,a,i8)') & 137 & ' =======>> 1/2 time step before the start of the run DATE Y/M/D = ', & 137 138 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day, ' nsec_week:', nsec_week, ' & 138 139 & nsec_month:', nsec_month , ' nsec_year:' , nsec_year -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90
r7646 r8979 219 219 DO ji=1,jpi 220 220 IF (tmask(ji,jj,1) == 0._wp .OR. ptmask_b(ji,jj,1) == 0._wp) THEN 221 e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + sshn(ji,jj) / ( ht_0(ji,jj) + 1._wp - ssmask(ji,jj) ) * tmask(ji,jj,jk) ) 221 e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + sshn(ji,jj) / & 222 & ( ht_0(ji,jj) + 1._wp - ssmask(ji,jj) ) * tmask(ji,jj,jk) ) 222 223 ENDIF 223 224 END DO … … 390 391 DO jj = 1,jpj 391 392 DO ji = 1,jpi 392 IF (zwmaskn(ji,jj,jk) * zwmaskb(ji,jj,jk) == 1._wp .AND. (tmask(ji,jj,1)==0._wp .OR. ptmask_b(ji,jj,1)==0._wp) ) THEN 393 IF (zwmaskn(ji,jj,jk) * zwmaskb(ji,jj,jk) == 1._wp .AND. & 394 & (tmask(ji,jj,1)==0._wp .OR. ptmask_b(ji,jj,1)==0._wp) ) THEN 393 395 !compute weight 394 396 zdzp1 = MAX(0._wp,gdepw_n(ji,jj,jk+1) - pdepw_b(ji,jj,jk+1)) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/ICB/icbtrj.F90
r8080 r8979 80 80 81 81 ! define trajectory output name 82 IF( lk_mpp ) THEN ; WRITE(cl_filename,'("trajectory_icebergs_",A,"-",A,"_",I4.4,".nc")') TRIM(ADJUSTL(cldate_ini)), TRIM(ADJUSTL(cldate_end)), narea-1 83 ELSE ; WRITE(cl_filename,'("trajectory_icebergs_",A,"-",A ,".nc")') TRIM(ADJUSTL(cldate_ini)), TRIM(ADJUSTL(cldate_end)) 82 IF( lk_mpp ) THEN ; WRITE(cl_filename,'("trajectory_icebergs_",A,"-",A,"_",I4.4,".nc")') & 83 & TRIM(ADJUSTL(cldate_ini)), TRIM(ADJUSTL(cldate_end)), narea-1 84 ELSE ; WRITE(cl_filename,'("trajectory_icebergs_",A,"-",A ,".nc")') & 85 & TRIM(ADJUSTL(cldate_ini)), TRIM(ADJUSTL(cldate_end)) 84 86 ENDIF 85 87 IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, icb_trj_init: creating ',TRIM(cl_filename) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r7768 r8979 774 774 istart(idmspc+1) = itime 775 775 776 IF( PRESENT(kstart) .AND. .NOT. ll_depth_spec ) THEN ; istart(1:idmspc) = kstart(1:idmspc) ; icnt(1:idmspc) = kcount(1:idmspc) 776 IF( PRESENT(kstart) .AND. .NOT. ll_depth_spec ) THEN 777 istart(1:idmspc) = kstart(1:idmspc) ; icnt(1:idmspc) = kcount(1:idmspc) 777 778 ELSE 778 IF( idom == jpdom_unknown ) THEN ; icnt(1:idmspc) = idimsz(1:idmspc) 779 IF(idom == jpdom_unknown ) THEN 780 icnt(1:idmspc) = idimsz(1:idmspc) 779 781 ELSE 780 782 IF( .NOT. PRESENT(pv_r1d) ) THEN ! not a 1D array … … 1540 1542 ALLOCATE( zlon(ni*nj) ) ; zlon(:) = 0. 1541 1543 1542 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole: Reference latitude (used in plots)1544 CALL dom_ngb( -168.53, 65.03, ix, iy, 'T' ) ! i-line that passes through Bering Strait: Reference latitude (used in plots) 1543 1545 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1544 1546 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) … … 1595 1597 ! frequency of the call of iom_put (attribut: freq_op) 1596 1598 f_op%timestep = 1 ; f_of%timestep = 0 ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 1599 f_op%timestep = 2 ; f_of%timestep = 0 ; CALL iom_set_field_attr('trendT_even' , freq_op=f_op, freq_offset=f_of) 1600 f_op%timestep = 2 ; f_of%timestep = -1 ; CALL iom_set_field_attr('trendT_odd' , freq_op=f_op, freq_offset=f_of) 1597 1601 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC' , freq_op=f_op, freq_offset=f_of) 1598 1602 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op=f_op, freq_offset=f_of) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
r6140 r8979 23 23 PRIVATE 24 24 25 PUBLIC sbc_apr ! routine called in sbcmod 25 PUBLIC sbc_apr ! routine called in sbcmod 26 PUBLIC sbc_apr_init ! routine called in sbcmod 26 27 27 28 ! !!* namsbc_apr namelist (Atmospheric PRessure) * … … 46 47 CONTAINS 47 48 49 SUBROUTINE sbc_apr_init 50 !!--------------------------------------------------------------------- 51 !! *** ROUTINE sbc_apr *** 52 !! 53 !! ** Purpose : read atmospheric pressure fields in netcdf files. 54 !! 55 !! ** Method : - Read namelist namsbc_apr 56 !! - Read Patm fields in netcdf files 57 !! - Compute reference atmospheric pressure 58 !! - Compute inverse barometer ssh 59 !! ** action : apr : atmospheric pressure at kt 60 !! ssh_ib : inverse barometer ssh at kt 61 !!--------------------------------------------------------------------- 62 INTEGER :: ierror ! local integer 63 INTEGER :: ios ! Local integer output status for namelist read 64 !! 65 CHARACTER(len=100) :: cn_dir ! Root directory for location of ssr files 66 TYPE(FLD_N) :: sn_apr ! informations about the fields to be read 67 !! 68 NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc 69 !!---------------------------------------------------------------------- 70 REWIND( numnam_ref ) ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing 71 READ ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901) 72 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in reference namelist', lwp ) 73 74 REWIND( numnam_cfg ) ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing 75 READ ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 ) 76 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist', lwp ) 77 IF(lwm) WRITE ( numond, namsbc_apr ) 78 ! 79 ALLOCATE( sf_apr(1), STAT=ierror ) !* allocate and fill sf_sst (forcing structure) with sn_sst 80 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_apr: unable to allocate sf_apr structure' ) 81 ! 82 CALL fld_fill( sf_apr, (/ sn_apr /), cn_dir, 'sbc_apr', 'Atmospheric pressure ', 'namsbc_apr' ) 83 ALLOCATE( sf_apr(1)%fnow(jpi,jpj,1) ) 84 IF( sn_apr%ln_tint ) ALLOCATE( sf_apr(1)%fdta(jpi,jpj,1,2) ) 85 ALLOCATE( ssh_ib(jpi,jpj) , ssh_ibb(jpi,jpj) ) 86 ALLOCATE( apr (jpi,jpj) ) 87 ! 88 IF( lwp )THEN !* control print 89 WRITE(numout,*) 90 WRITE(numout,*) ' Namelist namsbc_apr : Atmospheric PRessure as extrenal forcing' 91 WRITE(numout,*) ' ref. pressure: global mean Patm (T) or a constant (F) ln_ref_apr = ', ln_ref_apr 92 ENDIF 93 ! 94 IF( ln_ref_apr ) THEN !* Compute whole inner domain mean masked ocean surface 95 tarea = glob_sum( e1e2t(:,:) ) 96 IF(lwp) WRITE(numout,*) ' Variable ref. Patm computed over a ocean surface of ', tarea*1e-6, 'km2' 97 ELSE 98 IF(lwp) WRITE(numout,*) ' Reference Patm used : ', rn_pref, ' N/m2' 99 ENDIF 100 ! 101 r1_grau = 1.e0 / (grav * rau0) !* constant for optimization 102 ! 103 ! !* control check 104 IF ( ln_apr_obc ) THEN 105 IF(lwp) WRITE(numout,*) ' Inverse barometer added to OBC ssh data' 106 ENDIF 107 !jc: stop below should rather be a warning 108 IF( ln_apr_obc .AND. .NOT.ln_apr_dyn ) & 109 CALL ctl_warn( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' ) 110 ! 111 END SUBROUTINE sbc_apr_init 112 48 113 SUBROUTINE sbc_apr( kt ) 49 114 !!--------------------------------------------------------------------- … … 61 126 INTEGER, INTENT(in):: kt ! ocean time step 62 127 ! 63 INTEGER :: ierror ! local integer64 INTEGER :: ios ! Local integer output status for namelist read65 !!66 CHARACTER(len=100) :: cn_dir ! Root directory for location of ssr files67 TYPE(FLD_N) :: sn_apr ! informations about the fields to be read68 !!69 NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc70 128 !!---------------------------------------------------------------------- 71 !72 ! ! -------------------- !73 IF( kt == nit000 ) THEN ! First call kt=nit000 !74 ! ! -------------------- !75 REWIND( numnam_ref ) ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing76 READ ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901)77 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in reference namelist', lwp )78 79 REWIND( numnam_cfg ) ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing80 READ ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 )81 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist', lwp )82 IF(lwm) WRITE ( numond, namsbc_apr )83 !84 ALLOCATE( sf_apr(1), STAT=ierror ) !* allocate and fill sf_sst (forcing structure) with sn_sst85 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_apr: unable to allocate sf_apr structure' )86 !87 CALL fld_fill( sf_apr, (/ sn_apr /), cn_dir, 'sbc_apr', 'Atmospheric pressure ', 'namsbc_apr' )88 ALLOCATE( sf_apr(1)%fnow(jpi,jpj,1) )89 IF( sn_apr%ln_tint ) ALLOCATE( sf_apr(1)%fdta(jpi,jpj,1,2) )90 ALLOCATE( ssh_ib(jpi,jpj) , ssh_ibb(jpi,jpj) )91 ALLOCATE( apr (jpi,jpj) )92 !93 IF(lwp) THEN !* control print94 WRITE(numout,*)95 WRITE(numout,*) ' Namelist namsbc_apr : Atmospheric PRessure as extrenal forcing'96 WRITE(numout,*) ' ref. pressure: global mean Patm (T) or a constant (F) ln_ref_apr = ', ln_ref_apr97 ENDIF98 !99 IF( ln_ref_apr ) THEN !* Compute whole inner domain mean masked ocean surface100 tarea = glob_sum( e1e2t(:,:) )101 IF(lwp) WRITE(numout,*) ' Variable ref. Patm computed over a ocean surface of ', tarea*1e-6, 'km2'102 ELSE103 IF(lwp) WRITE(numout,*) ' Reference Patm used : ', rn_pref, ' N/m2'104 ENDIF105 !106 r1_grau = 1.e0 / (grav * rau0) !* constant for optimization107 !108 ! !* control check109 IF ( ln_apr_obc ) THEN110 IF(lwp) WRITE(numout,*) ' Inverse barometer added to OBC ssh data'111 ENDIF112 !jc: stop below should rather be a warning113 IF( ln_apr_obc .AND. .NOT.ln_apr_dyn ) &114 CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' )115 ENDIF116 129 117 130 ! ! ========================== ! -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk.F90
r7753 r8979 186 186 ! !** initialization of the chosen bulk formulae (+ check) 187 187 ! !* select the bulk chosen in the namelist and check the choice 188 ;ioptio = 0188 ioptio = 0 189 189 IF( ln_NCAR ) THEN ; nblk = np_NCAR ; ioptio = ioptio + 1 ; ENDIF 190 190 IF( ln_COARE_3p0 ) THEN ; nblk = np_COARE_3p0 ; ioptio = ioptio + 1 ; ENDIF … … 219 219 ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) ) 220 220 IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 221 222 IF( slf_i(ifpr)%nfreqh .GT. 0._wp .AND. MOD( 3600._wp * slf_i(ifpr)%nfreqh , REAL(nn_fsbc, wp) * rdt) .NE. 0._wp ) & 223 & CALL ctl_warn( 'sbcmod time step rdt * nn_fsbc is NOT a submultiple of atmospheric forcing frequency' ) 224 221 225 END DO 222 226 ! !- fill the bulk structure with namelist informations -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r7968 r8979 1841 1841 #endif 1842 1842 ! outputs 1843 IF( srcv(jpr_cal)%laction ) CALL iom_put('hflx_cal_cea' , - frcv(jpr_cal)%z3(:,:,1) * lfus ) ! latent heat from calving 1844 IF( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * lfus ) ! latent heat from icebergs melting 1845 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea', sprecip(:,:) * ( zcptsnw(:,:) - Lfus ) ) ! heat flux from snow (cell average) 1846 IF( iom_use('hflx_rain_cea') ) CALL iom_put('hflx_rain_cea',( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) ) ! heat flux from rain (cell average) 1847 IF( iom_use('hflx_evap_cea') ) CALL iom_put('hflx_evap_cea',(frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) & ! heat flux from from evap (cell average) 1843 IF( srcv(jpr_cal)%laction ) CALL iom_put('hflx_cal_cea' , & 1844 & - frcv(jpr_cal)%z3(:,:,1) * lfus) ! latent heat from calving 1845 IF( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * lfus) ! latent heat from icebergs melting 1846 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea', sprecip(:,:) * ( zcptsnw(:,:) - Lfus )) ! heat flux from snow (cell average) 1847 IF( iom_use('hflx_rain_cea') ) CALL iom_put('hflx_rain_cea',( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:)) ! heat flux from rain (cell average) 1848 IF( iom_use('hflx_evap_cea') ) CALL iom_put('hflx_evap_cea',(frcv(jpr_tevp)%z3(:,:,1) & 1849 & - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) & ! heat flux from from evap (cell average) 1848 1850 & ) * zcptn(:,:) * tmask(:,:,1) ) 1849 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea',sprecip(:,:) * (zcptsnw(:,:) - Lfus) * (1._wp - zsnw(:,:)) ) ! heat flux from snow (over ocean) 1850 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea',sprecip(:,:) * (zcptsnw(:,:) - Lfus) * zsnw(:,:) ) ! heat flux from snow (over ice) 1851 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea',sprecip(:,:) & 1852 & * (zcptsnw(:,:) - Lfus) * (1._wp - zsnw(:,:)) ) ! heat flux from snow (over ocean) 1853 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea',sprecip(:,:) * (zcptsnw(:,:) - Lfus) & 1854 & * zsnw(:,:) ) ! heat flux from snow (over ice) 1851 1855 ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. 1852 1856 ! -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r7968 r8979 192 192 zqlatisf3d(ji,jj,jk) = zqlatisf3d(ji,jj,jk) + qisf (ji,jj) * r1_hisf_tbl(ji,jj) * e3t_n(ji,jj,jk) 193 193 END DO 194 zfwfisf3d (ji,jj,jk) = zfwfisf3d (ji,jj,jk) + fwfisf (ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * e3t_n(ji,jj,jk) 195 zqhcisf3d (ji,jj,jk) = zqhcisf3d (ji,jj,jk) + zqhcisf2d(ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * e3t_n(ji,jj,jk) 196 zqlatisf3d(ji,jj,jk) = zqlatisf3d(ji,jj,jk) + qisf (ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * e3t_n(ji,jj,jk) 194 zfwfisf3d (ji,jj,jk) = zfwfisf3d (ji,jj,jk) + fwfisf (ji,jj) * r1_hisf_tbl(ji,jj) & 195 & * ralpha(ji,jj) * e3t_n(ji,jj,jk) 196 zqhcisf3d (ji,jj,jk) = zqhcisf3d (ji,jj,jk) + zqhcisf2d(ji,jj) * r1_hisf_tbl(ji,jj) & 197 & * ralpha(ji,jj) * e3t_n(ji,jj,jk) 198 zqlatisf3d(ji,jj,jk) = zqlatisf3d(ji,jj,jk) + qisf (ji,jj) * r1_hisf_tbl(ji,jj) & 199 & * ralpha(ji,jj) * e3t_n(ji,jj,jk) 197 200 END DO 198 201 END DO -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r7822 r8979 41 41 USE sbcssr ! surface boundary condition: sea surface restoring 42 42 USE sbcrnf ! surface boundary condition: runoffs 43 USE sbcapr ! surface boundary condition: atmo pressure 43 44 USE sbcisf ! surface boundary condition: ice shelf 44 45 USE sbcfwb ! surface boundary condition: freshwater budget … … 332 333 CALL sbc_rnf_init ! Runof initialization 333 334 ! 335 IF( ln_apr_dyn ) CALL sbc_apr_init ! Atmo Pressure Forcing initialization 336 ! 334 337 IF( nn_ice == 3 ) CALL sbc_lim_init ! LIM3 initialization 335 338 ! -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
r7753 r8979 545 545 CALL wrk_dealloc( jpi, jpj, zmbk ) 546 546 547 ! !* sign of grad(H) at u- and v-points548 mgrhu( jpi,:) = 0 ; mgrhu(:,jpj) = 0 ; mgrhv(jpi,:) = 0 ; mgrhv(:,jpj) = 0547 !* sign of grad(H) at u- and v-points; zero if grad(H) = 0 548 mgrhu(:,:) = 0 ; mgrhv(:,:) = 0 549 549 DO jj = 1, jpjm1 550 550 DO ji = 1, jpim1 551 mgrhu(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 552 mgrhv(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 551 IF( gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN 552 mgrhu(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 553 ENDIF 554 ! 555 IF( gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN 556 mgrhv(ji,jj) = INT( SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) ) ) 557 ENDIF 553 558 END DO 554 559 END DO -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r7753 r8979 121 121 IF( l_trdtra ) THEN 122 122 CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 123 ztrdt(:,:,j k) = 0._wp124 ztrds(:,:,j k) = 0._wp123 ztrdt(:,:,jpk) = 0._wp 124 ztrds(:,:,jpk) = 0._wp 125 125 IF( ln_traldf_iso ) THEN ! diagnose the "pure" Kz diffusive trend 126 126 CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt ) … … 128 128 ENDIF 129 129 ! total trend for the non-time-filtered variables. 130 zfact = 1.0 / rdt 130 zfact = 1.0 / rdt 131 ! G Nurser 23 Mar 2017. Recalculate trend as Delta(e3t*T)/e3tn; e3tn cancel from tsn terms 131 132 DO jk = 1, jpkm1 132 ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact133 ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact133 ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem)*e3t_a(:,:,jk) / e3t_n(:,:,jk) - tsn(:,:,jk,jp_tem)) * zfact 134 ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal)*e3t_a(:,:,jk) / e3t_n(:,:,jk) - tsn(:,:,jk,jp_sal)) * zfact 134 135 END DO 135 136 CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt ) 136 137 CALL trd_tra( kt, 'TRA', jp_sal, jptra_tot, ztrds ) 137 ! Store now fields before applying the Asselin filter 138 ! in order to calculate Asselin filter trend later. 139 ztrdt(:,:,:) = tsn(:,:,:,jp_tem) 140 ztrds(:,:,:) = tsn(:,:,:,jp_sal) 138 IF( ln_linssh ) THEN 139 ! Store now fields before applying the Asselin filter 140 ! in order to calculate Asselin filter trend later. 141 ztrdt(:,:,:) = tsn(:,:,:,jp_tem) 142 ztrds(:,:,:) = tsn(:,:,:,jp_sal) 143 ENDIF 141 144 ENDIF 142 145 … … 147 150 END DO 148 151 END DO 152 IF (l_trdtra .AND. .NOT. ln_linssh) THEN ! Zero Asselin filter contribution must be explicitly written out since for vvl 153 ! Asselin filter is output by tra_nxt_vvl that is not called on this time step 154 ztrdt(:,:,:) = 0._wp 155 ztrds(:,:,:) = 0._wp 156 CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 157 CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 158 END IF 149 159 ! 150 160 ELSE ! Leap-Frog + Asselin filter time stepping … … 162 172 ENDIF 163 173 ! 164 IF( l_trdtra ) THEN ! trend of the Asselin filter (tb filtered - tb)/dt 174 IF( l_trdtra .AND. ln_linssh ) THEN ! trend of the Asselin filter (tb filtered - tb)/dt 175 zfact = 1._wp / r2dt 165 176 DO jk = 1, jpkm1 166 zfact = 1._wp / r2dt167 177 ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact 168 178 ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact … … 170 180 CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 171 181 CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 172 CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds )173 182 END IF 183 IF( l_trdtra ) CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) 174 184 ! 175 185 ! ! control print … … 259 269 LOGICAL :: ll_traqsr, ll_rnf, ll_isf ! local logical 260 270 INTEGER :: ji, jj, jk, jn ! dummy loop indices 261 REAL(wp) :: zfact 1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar271 REAL(wp) :: zfact, zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar 262 272 REAL(wp) :: zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d ! - - 273 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrd_atf 263 274 !!---------------------------------------------------------------------- 264 275 ! … … 279 290 ENDIF 280 291 ! 292 IF( ( l_trdtra .and. cdtype == 'TRA' ) .OR. ( l_trdtrc .and. cdtype == 'TRC' ) ) THEN 293 CALL wrk_alloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 294 ztrd_atf(:,:,:,:) = 0.0_wp 295 ENDIF 296 zfact = 1._wp / r2dt 281 297 DO jn = 1, kjpt 282 298 DO jk = 1, jpkm1 … … 331 347 ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn) ! ptn <-- pta 332 348 ! 349 IF( ( l_trdtra .and. cdtype == 'TRA' ) .OR. ( l_trdtrc .and. cdtype == 'TRC' ) ) THEN 350 ztrd_atf(ji,jj,jk,jn) = (ztc_f - ztc_n) * zfact/ze3t_n 351 ENDIF 352 ! 333 353 END DO 334 354 END DO … … 337 357 END DO 338 358 ! 359 IF( l_trdtra .and. cdtype == 'TRA' ) THEN 360 CALL trd_tra( kt, cdtype, jp_tem, jptra_atf, ztrd_atf(:,:,:,jp_tem) ) 361 CALL trd_tra( kt, cdtype, jp_sal, jptra_atf, ztrd_atf(:,:,:,jp_sal) ) 362 CALL wrk_dealloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 363 ENDIF 364 IF( l_trdtrc .and. cdtype == 'TRC' ) THEN 365 DO jn = 1, kjpt 366 CALL trd_tra( kt, cdtype, jn, jptra_atf, ztrd_atf(:,:,:,jn) ) 367 END DO 368 CALL wrk_dealloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 369 ENDIF 370 ! 339 371 END SUBROUTINE tra_nxt_vvl 340 372 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
r7753 r8979 89 89 IF( l_trdtra ) THEN ! save the vertical diffusive trends for further diagnostics 90 90 DO jk = 1, jpkm1 91 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ) - ztrdt(:,:,jk) 92 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ) - ztrds(:,:,jk) 91 ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem)*e3t_a(:,:,jk) - tsb(:,:,jk,jp_tem)*e3t_b(:,:,jk) ) & 92 & / (e3t_n(:,:,jk)*r2dt) ) - ztrdt(:,:,jk) 93 ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal)*e3t_a(:,:,jk) - tsb(:,:,jk,jp_sal)*e3t_b(:,:,jk) ) & 94 & / (e3t_n(:,:,jk)*r2dt) ) - ztrds(:,:,jk) 93 95 END DO 94 96 !!gm this should be moved in trdtra.F90 and done on all trends -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
r7646 r8979 104 104 ztrds(:,:,:) = 0._wp 105 105 CALL trd_tra_mng( trdt, ztrds, ktrd, kt ) 106 CASE( jptra_evd ) ; avt_evd(:,:,:) = ptrd(:,:,:) * tmask(:,:,:) 106 107 CASE DEFAULT ! other trends: masked trends 107 108 trdt(:,:,:) = ptrd(:,:,:) * tmask(:,:,:) ! mask & store … … 311 312 !!gm Rq: mask the trends already masked in trd_tra, but lbc_lnk should probably be added 312 313 ! 314 ! Trends evaluated every time step that could go to the standard T file and can be output every ts into a 1ts file if 1ts output is selected 313 315 SELECT CASE( ktrd ) 314 CASE( jptra_xad ) ; CALL iom_put( "ttrd_xad" , ptrdx ) ! x- horizontal advection 315 CALL iom_put( "strd_xad" , ptrdy ) 316 CASE( jptra_yad ) ; CALL iom_put( "ttrd_yad" , ptrdx ) ! y- horizontal advection 317 CALL iom_put( "strd_yad" , ptrdy ) 318 CASE( jptra_zad ) ; CALL iom_put( "ttrd_zad" , ptrdx ) ! z- vertical advection 319 CALL iom_put( "strd_zad" , ptrdy ) 320 IF( ln_linssh ) THEN ! cst volume : adv flux through z=0 surface 321 CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 322 z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1) 323 z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1) 324 CALL iom_put( "ttrd_sad", z2dx ) 325 CALL iom_put( "strd_sad", z2dy ) 326 CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 327 ENDIF 328 CASE( jptra_totad ) ; CALL iom_put( "ttrd_totad" , ptrdx ) ! total advection 329 CALL iom_put( "strd_totad" , ptrdy ) 330 CASE( jptra_ldf ) ; CALL iom_put( "ttrd_ldf" , ptrdx ) ! lateral diffusion 331 CALL iom_put( "strd_ldf" , ptrdy ) 332 CASE( jptra_zdf ) ; CALL iom_put( "ttrd_zdf" , ptrdx ) ! vertical diffusion (including Kz contribution) 333 CALL iom_put( "strd_zdf" , ptrdy ) 334 CASE( jptra_zdfp ) ; CALL iom_put( "ttrd_zdfp", ptrdx ) ! PURE vertical diffusion (no isoneutral contribution) 335 CALL iom_put( "strd_zdfp", ptrdy ) 336 CASE( jptra_evd ) ; CALL iom_put( "ttrd_evd", ptrdx ) ! EVD trend (convection) 337 CALL iom_put( "strd_evd", ptrdy ) 338 CASE( jptra_dmp ) ; CALL iom_put( "ttrd_dmp" , ptrdx ) ! internal restoring (damping) 339 CALL iom_put( "strd_dmp" , ptrdy ) 340 CASE( jptra_bbl ) ; CALL iom_put( "ttrd_bbl" , ptrdx ) ! bottom boundary layer 341 CALL iom_put( "strd_bbl" , ptrdy ) 342 CASE( jptra_npc ) ; CALL iom_put( "ttrd_npc" , ptrdx ) ! static instability mixing 343 CALL iom_put( "strd_npc" , ptrdy ) 344 CASE( jptra_nsr ) ; CALL iom_put( "ttrd_qns" , ptrdx(:,:,1) ) ! surface forcing + runoff (ln_rnf=T) 345 CALL iom_put( "strd_cdt" , ptrdy(:,:,1) ) ! output as 2D surface fields 346 CASE( jptra_qsr ) ; CALL iom_put( "ttrd_qsr" , ptrdx ) ! penetrative solar radiat. (only on temperature) 347 CASE( jptra_bbc ) ; CALL iom_put( "ttrd_bbc" , ptrdx ) ! geothermal heating (only on temperature) 348 CASE( jptra_atf ) ; CALL iom_put( "ttrd_atf" , ptrdx ) ! asselin time Filter 349 CALL iom_put( "strd_atf" , ptrdy ) 350 CASE( jptra_tot ) ; CALL iom_put( "ttrd_tot" , ptrdx ) ! model total trend 351 CALL iom_put( "strd_tot" , ptrdy ) 316 ! This total trend is done every time step 317 CASE( jptra_tot ) ; CALL iom_put( "ttrd_tot" , ptrdx ) ! model total trend 318 CALL iom_put( "strd_tot" , ptrdy ) 352 319 END SELECT 320 321 ! These trends are done every second time step. When 1ts output is selected must go different (2ts) file from standard T-file 322 IF( MOD( kt, 2 ) == 0 ) THEN 323 SELECT CASE( ktrd ) 324 CASE( jptra_xad ) ; CALL iom_put( "ttrd_xad" , ptrdx ) ! x- horizontal advection 325 CALL iom_put( "strd_xad" , ptrdy ) 326 CASE( jptra_yad ) ; CALL iom_put( "ttrd_yad" , ptrdx ) ! y- horizontal advection 327 CALL iom_put( "strd_yad" , ptrdy ) 328 CASE( jptra_zad ) ; CALL iom_put( "ttrd_zad" , ptrdx ) ! z- vertical advection 329 CALL iom_put( "strd_zad" , ptrdy ) 330 IF( ln_linssh ) THEN ! cst volume : adv flux through z=0 surface 331 CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 332 z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1) 333 z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1) 334 CALL iom_put( "ttrd_sad", z2dx ) 335 CALL iom_put( "strd_sad", z2dy ) 336 CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 337 ENDIF 338 CASE( jptra_totad ) ; CALL iom_put( "ttrd_totad" , ptrdx ) ! total advection 339 CALL iom_put( "strd_totad" , ptrdy ) 340 CASE( jptra_ldf ) ; CALL iom_put( "ttrd_ldf" , ptrdx ) ! lateral diffusion 341 CALL iom_put( "strd_ldf" , ptrdy ) 342 CASE( jptra_zdf ) ; CALL iom_put( "ttrd_zdf" , ptrdx ) ! vertical diffusion (including Kz contribution) 343 CALL iom_put( "strd_zdf" , ptrdy ) 344 CASE( jptra_zdfp ) ; CALL iom_put( "ttrd_zdfp", ptrdx ) ! PURE vertical diffusion (no isoneutral contribution) 345 CALL iom_put( "strd_zdfp", ptrdy ) 346 CASE( jptra_evd ) ; CALL iom_put( "ttrd_evd", ptrdx ) ! EVD trend (convection) 347 CALL iom_put( "strd_evd", ptrdy ) 348 CASE( jptra_dmp ) ; CALL iom_put( "ttrd_dmp" , ptrdx ) ! internal restoring (damping) 349 CALL iom_put( "strd_dmp" , ptrdy ) 350 CASE( jptra_bbl ) ; CALL iom_put( "ttrd_bbl" , ptrdx ) ! bottom boundary layer 351 CALL iom_put( "strd_bbl" , ptrdy ) 352 CASE( jptra_npc ) ; CALL iom_put( "ttrd_npc" , ptrdx ) ! static instability mixing 353 CALL iom_put( "strd_npc" , ptrdy ) 354 CASE( jptra_bbc ) ; CALL iom_put( "ttrd_bbc" , ptrdx ) ! geothermal heating (only on temperature) 355 CASE( jptra_nsr ) ; CALL iom_put( "ttrd_qns" , ptrdx(:,:,1) ) ! surface forcing + runoff (ln_rnf=T) 356 CALL iom_put( "strd_cdt" , ptrdy(:,:,1) ) ! output as 2D surface fields 357 CASE( jptra_qsr ) ; CALL iom_put( "ttrd_qsr" , ptrdx ) ! penetrative solar radiat. (only on temperature) 358 END SELECT 359 ! the Asselin filter trend is also every other time step but needs to be lagged one time step 360 ! Even when 1ts output is selected can go to the same (2ts) file as the trends plotted every even time step. 361 ELSE IF( MOD( kt, 2 ) == 1 ) THEN 362 SELECT CASE( ktrd ) 363 CASE( jptra_atf ) ; CALL iom_put( "ttrd_atf" , ptrdx ) ! asselin time Filter 364 CALL iom_put( "strd_atf" , ptrdy ) 365 END SELECT 366 END IF 353 367 ! 354 368 END SUBROUTINE trd_tra_iom -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
r7753 r8979 384 384 END IF 385 385 ENDIF 386 ! 387 bfrua(:,:) = - bfrcoef2d(:,:) 388 bfrva(:,:) = - bfrcoef2d(:,:) 389 ! 386 390 ! 387 391 CASE DEFAULT -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
r7779 r8979 225 225 226 226 ! ! compute the form function using N2 at each time step 227 zdn2dz (:,:,jpk) = 0.e0 227 228 zempba_3d_1(:,:,jpk) = 0.e0 228 229 zempba_3d_2(:,:,jpk) = 0.e0 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r8758 r8979 207 207 #if defined key_agrif 208 208 IF( .NOT. Agrif_Root() ) THEN 209 210 IF( ln_diaobs ) CALL dia_obs_wri209 CALL Agrif_ParentGrid_To_ChildGrid() 210 IF( ln_diaobs ) CALL dia_obs_wri 211 211 IF( nn_timing == 1 ) CALL timing_finalize 212 212 CALL Agrif_ChildGrid_To_ParentGrid() 213 213 ENDIF 214 214 #endif … … 464 464 ! ! external forcing 465 465 !!gm to be added : creation and call of sbc_apr_init 466 !==> cbr: sbc_apr_init in sbcmod as sbc_rnf_init 466 467 CALL tide_init ! tidal harmonics 467 468 CALL sbc_init ! surface boundary conditions (including sea-ice) … … 763 764 ! 764 765 ! Find the factors of n. 765 IF( kn == 1 ) GOTO 20 766 767 ! nu holds the unfactorised part of the number. 768 ! knfax holds the number of factors found. 769 ! l points to the allowed factor list. 770 ! ifac holds the current factor. 771 ! 772 inu = kn 773 knfax = 0 774 ! 775 DO jl = ntest, 1, -1 766 IF( kn .NE. 1 ) THEN 767 768 ! nu holds the unfactorised part of the number. 769 ! knfax holds the number of factors found. 770 ! l points to the allowed factor list. 771 ! ifac holds the current factor. 776 772 ! 777 ifac = ilfax(jl) 778 IF( ifac > inu ) CYCLE 779 780 ! Test whether the factor will divide. 781 782 IF( MOD(inu,ifac) == 0 ) THEN 773 inu = kn 774 knfax = 0 775 ! 776 DO jl = ntest, 1, -1 783 777 ! 784 knfax = knfax + 1 ! Add the factor to the list 785 IF( knfax > kmaxfax ) THEN 786 kerr = 6 787 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 788 return 778 ifac = ilfax(jl) 779 IF( ifac > inu ) CYCLE 780 781 ! Test whether the factor will divide. 782 783 IF( MOD(inu,ifac) == 0 ) THEN 784 ! 785 knfax = knfax + 1 ! Add the factor to the list 786 IF( knfax > kmaxfax ) THEN 787 kerr = 6 788 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 789 return 790 ENDIF 791 kfax(knfax) = ifac 792 ! Store the other factor that goes with this one 793 knfax = knfax + 1 794 kfax(knfax) = inu / ifac 795 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 789 796 ENDIF 790 kfax(knfax) = ifac 791 ! Store the other factor that goes with this one 792 knfax = knfax + 1 793 kfax(knfax) = inu / ifac 794 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 795 ENDIF 797 ! 798 END DO 796 799 ! 797 END DO 798 ! 799 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 800 ENDIF 800 801 ! 801 802 END SUBROUTINE factorise -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/SAO_SRC/nemogcm.F90
r8758 r8979 530 530 ! 531 531 ! Find the factors of n. 532 IF( kn == 1 ) GOTO 20 533 534 ! nu holds the unfactorised part of the number. 535 ! knfax holds the number of factors found. 536 ! l points to the allowed factor list. 537 ! ifac holds the current factor. 538 ! 539 inu = kn 540 knfax = 0 541 ! 542 DO jl = ntest, 1, -1 543 ! 544 ifac = ilfax(jl) 545 IF( ifac > inu ) CYCLE 546 547 ! Test whether the factor will divide. 548 549 IF( MOD(inu,ifac) == 0 ) THEN 532 IF( kn .NE. 1 ) THEN 533 534 ! nu holds the unfactorised part of the number. 535 ! knfax holds the number of factors found. 536 ! l points to the allowed factor list. 537 ! ifac holds the current factor. 538 ! 539 inu = kn 540 knfax = 0 541 ! 542 DO jl = ntest, 1, -1 550 543 ! 551 knfax = knfax + 1 ! Add the factor to the list 552 IF( knfax > kmaxfax ) THEN 553 kerr = 6 554 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 555 return 544 ifac = ilfax(jl) 545 IF( ifac > inu ) CYCLE 546 547 ! Test whether the factor will divide. 548 549 IF( MOD(inu,ifac) == 0 ) THEN 550 ! 551 knfax = knfax + 1 ! Add the factor to the list 552 IF( knfax > kmaxfax ) THEN 553 kerr = 6 554 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 555 return 556 ENDIF 557 kfax(knfax) = ifac 558 ! Store the other factor that goes with this one 559 knfax = knfax + 1 560 kfax(knfax) = inu / ifac 561 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 556 562 ENDIF 557 kfax(knfax) = ifac 558 ! Store the other factor that goes with this one 559 knfax = knfax + 1 560 kfax(knfax) = inu / ifac 561 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 562 ENDIF 563 ! 564 END DO 565 ! 566 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 563 ! 564 END DO 565 ! 566 ENDIF 567 567 ! 568 568 END SUBROUTINE factorise -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/SAS_SRC/daymod.F90
r7761 r8979 2 2 !!====================================================================== 3 3 !! *** MODULE daymod *** 4 !! Ocean : calendar4 !! Ocean : management of the model calendar 5 5 !!===================================================================== 6 6 !! History : OPA ! 1994-09 (M. Pontaud M. Imbard) Original code 7 7 !! ! 1997-03 (O. Marti) 8 !! ! 1997-05 (G. Madec) 8 !! ! 1997-05 (G. Madec) 9 9 !! ! 1997-08 (M. Imbard) 10 10 !! NEMO 1.0 ! 2003-09 (G. Madec) F90 + nyear, nmonth, nday 11 11 !! ! 2004-01 (A.M. Treguier) new calculation based on adatrj 12 12 !! ! 2006-08 (G. Madec) surface module major update 13 !!---------------------------------------------------------------------- 13 !! ! 2015-11 (D. Lea) Allow non-zero initial time of day 14 !!---------------------------------------------------------------------- 14 15 15 16 !!---------------------------------------------------------------------- 16 17 !! day : calendar 17 !! 18 !! ------------------------------- 19 !! ----------- WARNING ----------- 20 !! 21 !! we suppose that the time step is deviding the number of second of in a day 22 !! ---> MOD( rday, rdt ) == 0 23 !! 24 !! ----------- WARNING ----------- 25 !! ------------------------------- 26 !! 27 !!---------------------------------------------------------------------- 28 USE dom_oce ! ocean space and time domain 29 USE phycst ! physical constants 30 USE in_out_manager ! I/O manager 31 USE iom ! 32 USE ioipsl, ONLY : ymds2ju ! for calendar 33 USE prtctl ! Print control 34 USE restart ! 35 USE timing ! Timing 18 !!---------------------------------------------------------------------- 19 !! ----------- WARNING ----------- 20 !! ------------------------------- 21 !! sbcmod assume that the time step is dividing the number of second of 22 !! in a day, i.e. ===> MOD( rday, rdt ) == 0 23 !! except when user defined forcing is used (see sbcmod.F90) 24 !!---------------------------------------------------------------------- 25 USE dom_oce ! ocean space and time domain 26 USE phycst ! physical constants 27 USE ioipsl , ONLY : ymds2ju ! for calendar 28 USE trc_oce , ONLY : l_offline ! offline flag 29 ! 30 USE in_out_manager ! I/O manager 31 USE prtctl ! Print control 32 USE iom ! 33 USE timing ! Timing 34 USE restart ! restart 36 35 37 36 IMPLICIT NONE … … 40 39 PUBLIC day ! called by step.F90 41 40 PUBLIC day_init ! called by istate.F90 42 43 INTEGER :: nsecd, nsecd05, ndt, ndt05 44 45 !!---------------------------------------------------------------------- 46 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 41 PUBLIC day_mth ! Needed by TAM 42 43 INTEGER, PUBLIC :: nsecd, nsecd05, ndt, ndt05 !: (PUBLIC for TAM) 44 45 !!---------------------------------------------------------------------- 46 !! NEMO/OPA 4.0 , NEMO Consortium (2016) 47 47 !! $Id$ 48 48 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 53 53 !!---------------------------------------------------------------------- 54 54 !! *** ROUTINE day_init *** 55 !! 56 !! ** Purpose : Initialization of the calendar values to their values 1 time step before nit000 55 !! 56 !! ** Purpose : Initialization of the calendar values to their values 1 time step before nit000 57 57 !! because day will be called at the beginning of step 58 58 !! … … 67 67 !! - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth 68 68 !!---------------------------------------------------------------------- 69 INTEGER :: inbday, idweek 70 REAL(wp) :: zjul 69 INTEGER :: inbday, idweek ! local integers 70 REAL(wp) :: zjul ! local scalar 71 71 !!---------------------------------------------------------------------- 72 72 ! … … 76 76 & 'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 77 77 ENDIF 78 ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 79 IF( MOD( rday , rdt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 80 IF( MOD( rday , 2. ) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' ) 81 IF( MOD( rdt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' ) 82 nsecd = NINT(rday ) 83 nsecd05 = NINT(0.5 * rday ) 84 ndt = NINT( rdt ) 85 ndt05 = NINT(0.5 * rdt ) 86 87 ! ==> clem: here we read the ocean restart for the date (only if it exists) 88 ! It is not clean and another solution should be found 89 CALL day_rst( nit000, 'READ' ) 90 ! ==> 91 92 ! set the calendar from ndastp (read in restart file and namelist) 93 78 nsecd = NINT( rday ) 79 nsecd05 = NINT( 0.5 * rday ) 80 ndt = NINT( rdt ) 81 ndt05 = NINT( 0.5 * rdt ) 82 83 IF( .NOT. l_offline ) CALL day_rst( nit000, 'READ' ) 84 85 ! set the calandar from ndastp (read in restart file and namelist) 94 86 nyear = ndastp / 10000 95 87 nmonth = ( ndastp - (nyear * 10000) ) / 100 96 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 97 98 CALL ymds2ju( nyear, nmonth, nday, 0.0, fjulday ) ! we assume that we start run at 00:00 88 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 89 90 nhour = nn_time0 / 100 91 nminute = ( nn_time0 - nhour * 100 ) 92 93 CALL ymds2ju( nyear, nmonth, nday, nhour*3600._wp+nminute*60._wp, fjulday ) 99 94 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < 0.1 / rday ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 100 fjulday = fjulday + 1.! move back to the day at nit000 (and not at nit000 - 1)95 IF( nn_time0*3600 - ndt05 .lt. 0 ) fjulday = fjulday + 1. ! move back to the day at nit000 (and not at nit000 - 1) 101 96 102 97 nsec1jan000 = 0 103 98 CALL day_mth 104 99 105 100 IF ( nday == 0 ) THEN ! for ex if ndastp = ndate0 - 1 106 nmonth = nmonth - 1 101 nmonth = nmonth - 1 107 102 nday = nmonth_len(nmonth) 108 103 ENDIF … … 113 108 IF( nleapy == 1 ) CALL day_mth 114 109 ENDIF 115 110 116 111 ! day since january 1st 117 112 nday_year = nday + SUM( nmonth_len(1:nmonth - 1) ) 118 113 119 !compute number of days between last monday and today 114 !compute number of days between last monday and today 120 115 CALL ymds2ju( 1900, 01, 01, 0.0, zjul ) ! compute julian day value of 01.01.1900 (our reference that was a Monday) 121 inbday = NINT(fjulday - zjul) ! compute nb day between 01.01.1900 and current day 122 idweek = MOD(inbday, 7) ! compute nb day between last monday and current day 116 inbday = FLOOR(fjulday - zjul) ! compute nb day between 01.01.1900 and start of current day 117 idweek = MOD(inbday, 7) ! compute nb day between last monday and current day 118 IF (idweek .lt. 0) idweek=idweek+7 ! Avoid negative values for dates before 01.01.1900 123 119 124 120 ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step 125 nsec_year = nday_year * nsecd - ndt05 ! 1 time step before the middle of the first time step 126 nsec_month = nday * nsecd - ndt05 ! because day will be called at the beginning of step 127 nsec_week = idweek * nsecd - ndt05 128 nsec_day = nsecd - ndt05 121 IF (nhour*3600+nminute*60-ndt05 .gt. 0) THEN 122 ! 1 timestep before current middle of first time step is still the same day 123 nsec_year = (nday_year-1) * nsecd + nhour*3600+nminute*60 - ndt05 124 nsec_month = (nday-1) * nsecd + nhour*3600+nminute*60 - ndt05 125 ELSE 126 ! 1 time step before the middle of the first time step is the previous day 127 nsec_year = nday_year * nsecd + nhour*3600+nminute*60 - ndt05 128 nsec_month = nday * nsecd + nhour*3600+nminute*60 - ndt05 129 ENDIF 130 nsec_week = idweek * nsecd + nhour*3600+nminute*60 - ndt05 131 nsec_day = nhour*3600+nminute*60 - ndt05 132 IF( nsec_day .lt. 0 ) nsec_day = nsec_day + nsecd 133 IF( nsec_week .lt. 0 ) nsec_week = nsec_week + nsecd*7 129 134 130 135 ! control print 131 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8)')' =======>> 1/2 time step before the start of the run DATE Y/M/D = ', & 132 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day, ' nsec_week:', nsec_week 136 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8,a,i8,a,i8)') & 137 & ' =======>> 1/2 time step before the start of the run DATE Y/M/D = ', & 138 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day, ' nsec_week:', nsec_week, ' & 139 & nsec_month:', nsec_month , ' nsec_year:' , nsec_year 133 140 134 141 ! Up to now, calendar parameters are related to the end of previous run (nit000-1) … … 142 149 !!---------------------------------------------------------------------- 143 150 !! *** ROUTINE day_init *** 144 !! 151 !! 145 152 !! ** Purpose : calendar values related to the months 146 153 !! … … 154 161 155 162 ! length of the month of the current year (from nleapy, read in namelist) 156 IF ( nleapy < 2 ) THEN 163 IF ( nleapy < 2 ) THEN 157 164 nmonth_len(:) = (/ 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 /) 158 165 nyear_len(:) = 365 … … 177 184 ! time since Jan 1st 0 1 2 ... 11 12 13 178 185 ! ---------*--|--*--|--*--| ... |--*--|--*--|--*--|-------------------------------------- 179 ! <---> <---> <---> ... <---> <---> <---> 186 ! <---> <---> <---> ... <---> <---> <---> 180 187 ! month number 0 1 2 ... 11 12 13 181 188 ! … … 190 197 nmonth_end(jm) = nmonth_end(jm-1) + nsecd * nmonth_len(jm) 191 198 END DO 192 ! 193 END SUBROUTINE 199 ! 200 END SUBROUTINE 194 201 195 202 … … 197 204 !!---------------------------------------------------------------------- 198 205 !! *** ROUTINE day *** 199 !! 206 !! 200 207 !! ** Purpose : Compute the date with a day iteration IF necessary. 201 208 !! … … 209 216 !! - adatrj : date in days since the beginning of the run 210 217 !! - nsec_year : current time of the year (in second since 00h, jan 1st) 211 !!---------------------------------------------------------------------- 218 !!---------------------------------------------------------------------- 212 219 INTEGER, INTENT(in) :: kt ! ocean time-step indices 213 220 ! … … 220 227 zprec = 0.1 / rday 221 228 ! ! New time-step 222 nsec_year = nsec_year + ndt 223 nsec_month = nsec_month + ndt 229 nsec_year = nsec_year + ndt 230 nsec_month = nsec_month + ndt 224 231 nsec_week = nsec_week + ndt 225 nsec_day = nsec_day + ndt 232 nsec_day = nsec_day + ndt 226 233 adatrj = adatrj + rdt / rday 227 234 fjulday = fjulday + rdt / rday 228 235 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 229 236 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error 230 237 231 238 IF( nsec_day > nsecd ) THEN ! New day 232 239 ! … … 261 268 262 269 IF( nsec_week > 7*nsecd ) nsec_week = ndt05 ! New week 263 270 264 271 IF(ln_ctl) THEN 265 272 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear … … 267 274 ENDIF 268 275 269 ! since we no longer call rst_opn, need to define nitrst here, used by ice restart routine 270 IF( kt == nit000 ) THEN 271 nitrst = nitend 272 lrst_oce = .FALSE. ! init restart ocean (done in rst_opn when not SAS) 273 ENDIF 274 275 IF( MOD( kt - 1, nstock ) == 0 ) THEN 276 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 277 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing 278 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 279 ENDIF 280 276 IF( .NOT. l_offline ) CALL rst_opn( kt ) ! Open the restart file if needed and control lrst_oce 277 IF( lrst_oce ) CALL day_rst( kt, 'WRITE' ) ! write day restart information 278 ! 281 279 IF( nn_timing == 1 ) CALL timing_stop('day') 282 280 ! … … 312 310 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 313 311 ! 314 REAL(wp) :: zkt, zndastp 312 REAL(wp) :: zkt, zndastp, zdayfrac, ksecs, ktime 313 INTEGER :: ihour, iminute 315 314 !!---------------------------------------------------------------------- 316 315 … … 337 336 ! define ndastp and adatrj 338 337 IF ( nrstdt == 2 ) THEN 339 ! read the parameters correspond ting to nit000 - 1 (last time step of previous run)338 ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 340 339 CALL iom_get( numror, 'ndastp', zndastp ) 341 340 ndastp = NINT( zndastp ) 342 341 CALL iom_get( numror, 'adatrj', adatrj ) 342 CALL iom_get( numror, 'ntime', ktime ) 343 nn_time0=INT(ktime) 344 ! calculate start time in hours and minutes 345 zdayfrac=adatrj-INT(adatrj) 346 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj 347 ihour = INT(ksecs/3600) 348 iminute = ksecs/60-ihour*60 349 350 ! Add to nn_time0 351 nhour = nn_time0 / 100 352 nminute = ( nn_time0 - nhour * 100 ) 353 nminute=nminute+iminute 354 355 IF( nminute >= 60 ) THEN 356 nminute=nminute-60 357 nhour=nhour+1 358 ENDIF 359 nhour=nhour+ihour 360 IF( nhour >= 24 ) THEN 361 nhour=nhour-24 362 adatrj=adatrj+1 363 ENDIF 364 nn_time0 = nhour * 100 + nminute 365 adatrj = INT(adatrj) ! adatrj set to integer as nn_time0 updated 343 366 ELSE 344 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 345 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 367 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 368 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 369 nhour = nn_time0 / 100 370 nminute = ( nn_time0 - nhour * 100 ) 371 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 346 372 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 347 373 ! note this is wrong if time step has changed during run 348 374 ENDIF 349 375 ELSE 350 ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 351 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 376 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 377 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 378 nhour = nn_time0 / 100 379 nminute = ( nn_time0 - nhour * 100 ) 380 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 352 381 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 353 382 ENDIF … … 358 387 WRITE(numout,*) ' date ndastp : ', ndastp 359 388 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj 389 WRITE(numout,*) ' nn_time0 : ',nn_time0 360 390 WRITE(numout,*) 361 391 ENDIF … … 373 403 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj ) ! number of elapsed days since 374 404 ! ! the begining of the run [s] 405 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp) ) ! time 375 406 ENDIF 376 407 ! 377 408 END SUBROUTINE day_rst 409 378 410 !!====================================================================== 379 411 END MODULE daymod -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r8758 r8979 25 25 USE usrdef_nam ! user defined configuration 26 26 USE daymod ! calendar 27 USE restart ! open restart file 27 28 USE step ! NEMO time-stepping (stp routine) 28 29 USE cpl_oasis3 ! … … 379 380 IF( ln_ctl ) CALL prt_ctl_init ! Print control 380 381 CALL day_init ! model calendar (using both namelist and restart infos) 382 IF( ln_rstart ) CALL rst_read_open 381 383 382 384 CALL sbc_init ! Forcings : surface module … … 611 613 ! 612 614 ! Find the factors of n. 613 IF( kn == 1 ) GOTO 20 614 615 ! nu holds the unfactorised part of the number. 616 ! knfax holds the number of factors found. 617 ! l points to the allowed factor list. 618 ! ifac holds the current factor. 619 ! 620 inu = kn 621 knfax = 0 622 ! 623 DO jl = ntest, 1, -1 624 ! 625 ifac = ilfax(jl) 626 IF( ifac > inu ) CYCLE 627 628 ! Test whether the factor will divide. 629 630 IF( MOD(inu,ifac) == 0 ) THEN 615 IF( kn .NE. 1 ) THEN 616 617 ! nu holds the unfactorised part of the number. 618 ! knfax holds the number of factors found. 619 ! l points to the allowed factor list. 620 ! ifac holds the current factor. 621 ! 622 inu = kn 623 knfax = 0 624 ! 625 DO jl = ntest, 1, -1 631 626 ! 632 knfax = knfax + 1 ! Add the factor to the list 633 IF( knfax > kmaxfax ) THEN 634 kerr = 6 635 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 636 return 627 ifac = ilfax(jl) 628 IF( ifac > inu ) CYCLE 629 630 ! Test whether the factor will divide. 631 632 IF( MOD(inu,ifac) == 0 ) THEN 633 ! 634 knfax = knfax + 1 ! Add the factor to the list 635 IF( knfax > kmaxfax ) THEN 636 kerr = 6 637 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 638 return 639 ENDIF 640 kfax(knfax) = ifac 641 ! Store the other factor that goes with this one 642 knfax = knfax + 1 643 kfax(knfax) = inu / ifac 644 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 637 645 ENDIF 638 kfax(knfax) = ifac 639 ! Store the other factor that goes with this one 640 knfax = knfax + 1 641 kfax(knfax) = inu / ifac 642 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 643 ENDIF 644 ! 645 END DO 646 ! 647 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 646 ! 647 END DO 648 ! 649 ENDIF 648 650 ! 649 651 END SUBROUTINE factorise -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
r7646 r8979 180 180 ! 181 181 IF( lk_iomput ) THEN 182 jl = 0 182 183 DO jn = jp_cfc0, jp_cfc1 183 CALL iom_put( 'qtr_'//ctrcnm(jn) , qtr_cfc (:,:,jn) ) 184 CALL iom_put( 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) 184 jl = jl + 1 185 CALL iom_put( 'qtr_'//TRIM(ctrcnm(jn)) , qtr_cfc (:,:,jl) ) 186 CALL iom_put( 'qint_'//TRIM(ctrcnm(jn)), qint_cfc(:,:,jl) ) 185 187 ENDDO 186 188 END IF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90
r7753 r8979 207 207 & / ( oxymin + trb(ji,jj,jk,jpoxy) ) ) 208 208 nitrfac(ji,jj,jk) = MIN( 1., nitrfac(ji,jj,jk) ) 209 ! 210 ! denitrification factor computed from NO3 levels 211 nitrfac2(ji,jj,jk) = MAX( 0.e0, ( 1.E-6 - trb(ji,jj,jk,jpno3) ) & 212 & / ( 1.E-6 + trb(ji,jj,jk,jpno3) ) ) 213 nitrfac2(ji,jj,jk) = MIN( 1., nitrfac2(ji,jj,jk) ) 209 214 END DO 210 215 END DO -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
r7753 r8979 95 95 ! no real reason except that it seems to be more stable and may mimic predation 96 96 ! --------------------------------------------------------------- 97 ztortz2 = mzrat2 * 1.e6 * zfact * trb(ji,jj,jk,jpmes) 97 ztortz2 = mzrat2 * 1.e6 * zfact * trb(ji,jj,jk,jpmes) * (1. - nitrfac(ji,jj,jk) ) 98 98 ! 99 99 zcompadi = MAX( ( trb(ji,jj,jk,jpdia) - xthresh2dia ), 0.e0 ) … … 125 125 ! ---------------------------------- 126 126 zgrazffeg = grazflux * xstep * wsbio4(ji,jj,jk) & 127 & * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jpgoc) * trb(ji,jj,jk,jpmes) 127 & * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jpgoc) * trb(ji,jj,jk,jpmes) & 128 & * (1. - nitrfac(ji,jj,jk)) 128 129 zgrazfffg = zgrazffeg * trb(ji,jj,jk,jpbfe) / (trb(ji,jj,jk,jpgoc) + rtrn) 129 130 zgrazffep = grazflux * xstep * wsbio3(ji,jj,jk) & 130 & * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jppoc) * trb(ji,jj,jk,jpmes) 131 & * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jppoc) * trb(ji,jj,jk,jpmes) & 132 & * (1. - nitrfac(ji,jj,jk)) 131 133 zgrazfffp = zgrazffep * trb(ji,jj,jk,jpsfe) / (trb(ji,jj,jk,jppoc) + rtrn) 132 134 ! -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
r7753 r8979 93 93 ! no real reason except that it seems to be more stable and may mimic predation. 94 94 ! --------------------------------------------------------------- 95 ztortz = mzrat * 1.e6 * zfact * trb(ji,jj,jk,jpzoo) 95 ztortz = mzrat * 1.e6 * zfact * trb(ji,jj,jk,jpzoo) * (1. - nitrfac(ji,jj,jk)) 96 96 97 97 zcompadi = MIN( MAX( ( trb(ji,jj,jk,jpdia) - xthreshdia ), 0.e0 ), xsizedia ) … … 105 105 zdenom = zfoodlim / ( xkgraz + zfoodlim ) 106 106 zdenom2 = zdenom / ( zfood + rtrn ) 107 zgraze = grazrat * xstep * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jpzoo) 107 zgraze = grazrat * xstep * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jpzoo) * (1. - nitrfac(ji,jj,jk)) 108 108 109 109 zgrazp = zgraze * xpref2p * zcompaph * zdenom2 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
r7753 r8979 65 65 REAL(wp) :: zsatur, zsatur2, znusil, znusil2, zdep, zdepmin, zfactdep 66 66 REAL(wp) :: zbactfer, zolimit, zonitr, zrfact2 67 REAL(wp) :: zammonic, zoxyrem 67 68 REAL(wp) :: zosil, ztem, zdenitnh4, zolimic, zolimin, zolimip, zdenitrn, zdenitrp 68 69 CHARACTER (len=25) :: charout … … 118 119 ! Ammonification in suboxic waters with denitrification 119 120 ! ------------------------------------------------------- 120 denitr(ji,jj,jk) = MIN( ( trb(ji,jj,jk,jpno3) - rtrn ) / rdenit, & 121 & zremik * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc) ) 121 zammonic = zremik * nitrfac(ji,jj,jk) * trb(ji,jj,jk,jpdoc) 122 denitr(ji,jj,jk) = zammonic * ( 1. - nitrfac2(ji,jj,jk) ) 123 zoxyrem = zammonic * nitrfac2(ji,jj,jk) 122 124 ! 123 125 zolimi (ji,jj,jk) = MAX( 0.e0, zolimi (ji,jj,jk) ) 124 126 denitr (ji,jj,jk) = MAX( 0.e0, denitr (ji,jj,jk) ) 127 zoxyrem = MAX( 0.e0, zoxyrem ) 128 125 129 ! 126 tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) 127 tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) 130 tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyrem 131 tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyrem 128 132 tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) - denitr (ji,jj,jk) * rdenit 129 tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) - zolimi (ji,jj,jk) - denitr(ji,jj,jk) 133 tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) - zolimi (ji,jj,jk) - denitr(ji,jj,jk) - zoxyrem 130 134 tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - zolimi (ji,jj,jk) * o2ut 131 tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) 132 tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * ( zolimi(ji,jj,jk) &135 tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zolimi (ji,jj,jk) + denitr(ji,jj,jk) + zoxyrem 136 tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * ( zolimi(ji,jj,jk) + zoxyrem & 133 137 & + ( rdenit + 1.) * denitr(ji,jj,jk) ) 134 138 END DO -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
r7753 r8979 54 54 REAL(wp) :: zwflux, zfminus, zfplus 55 55 REAL(wp) :: zlim, zfact, zfactcal 56 REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit, z denitt, zolimit56 REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit, zolimit 57 57 REAL(wp) :: zsiloss, zcaloss, zws3, zws4, zwsc, zdep 58 58 REAL(wp) :: zwstpoc, zwstpon, zwstpop … … 319 319 tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + zcaloss * zrivalk * 2.0 320 320 tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zcaloss * zrivalk 321 zsedcal(ji,jj) = (1.0 - zrivalk) * zcaloss / zdep322 zsedsi (ji,jj) = (1.0 - zrivsil) * zsiloss / zdep321 zsedcal(ji,jj) = (1.0 - zrivalk) * zcaloss * e3t_n(ji,jj,ikt) 322 zsedsi (ji,jj) = (1.0 - zrivsil) * zsiloss * e3t_n(ji,jj,ikt) 323 323 END DO 324 324 END DO … … 365 365 366 366 IF( .NOT.lk_sed ) THEN 367 ! The 0.5 factor in zpdenit and zdenitt is to avoid negative NO3 concentration after both denitrification368 ! in the sediments and just abovethe sediments. Not very clever, but simpliest option.367 ! The 0.5 factor in zpdenit is to avoid negative NO3 concentration after 368 ! denitrification in the sediments. Not very clever, but simpliest option. 369 369 DO jj = 1, jpj 370 370 DO ji = 1, jpi … … 378 378 z1pdenit = zwstpoc * zrivno3 - zpdenit 379 379 zolimit = MIN( ( trb(ji,jj,ikt,jpoxy) - rtrn ) / o2ut, z1pdenit * ( 1.- nitrfac(ji,jj,ikt) ) ) 380 zdenitt = MIN( 0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, z1pdenit * nitrfac(ji,jj,ikt) ) 381 tra(ji,jj,ikt,jpdoc) = tra(ji,jj,ikt,jpdoc) + z1pdenit - zolimit - zdenitt 382 tra(ji,jj,ikt,jppo4) = tra(ji,jj,ikt,jppo4) + zpdenit + zolimit + zdenitt 383 tra(ji,jj,ikt,jpnh4) = tra(ji,jj,ikt,jpnh4) + zpdenit + zolimit + zdenitt 384 tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) - rdenit * (zpdenit + zdenitt) 380 tra(ji,jj,ikt,jpdoc) = tra(ji,jj,ikt,jpdoc) + z1pdenit - zolimit 381 tra(ji,jj,ikt,jppo4) = tra(ji,jj,ikt,jppo4) + zpdenit + zolimit 382 tra(ji,jj,ikt,jpnh4) = tra(ji,jj,ikt,jpnh4) + zpdenit + zolimit 383 tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) - rdenit * zpdenit 385 384 tra(ji,jj,ikt,jpoxy) = tra(ji,jj,ikt,jpoxy) - zolimit * o2ut 386 tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * (zpdenit + zdenitt))387 tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit + zdenitt385 tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * zpdenit ) 386 tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit 388 387 sdenit(ji,jj) = rdenit * zpdenit * e3t_n(ji,jj,ikt) 389 zsedc(ji,jj) = (1. - zrivno3) * zwstpoc / zdep388 zsedc(ji,jj) = (1. - zrivno3) * zwstpoc * e3t_n(ji,jj,ikt) 390 389 IF( ln_p5z ) THEN 391 390 zwstpop = trb(ji,jj,ikt,jpgop) * zws4 + trb(ji,jj,ikt,jppop) * zws3 392 391 zwstpon = trb(ji,jj,ikt,jpgon) * zws4 + trb(ji,jj,ikt,jppon) * zws3 393 tra(ji,jj,ikt,jpdon) = tra(ji,jj,ikt,jpdon) + ( z1pdenit - zolimit - zdenitt) * zwstpon / (zwstpoc + rtrn)394 tra(ji,jj,ikt,jpdop) = tra(ji,jj,ikt,jpdop) + ( z1pdenit - zolimit - zdenitt) * zwstpop / (zwstpoc + rtrn)392 tra(ji,jj,ikt,jpdon) = tra(ji,jj,ikt,jpdon) + ( z1pdenit - zolimit ) * zwstpon / (zwstpoc + rtrn) 393 tra(ji,jj,ikt,jpdop) = tra(ji,jj,ikt,jpdop) + ( z1pdenit - zolimit ) * zwstpop / (zwstpoc + rtrn) 395 394 ENDIF 396 395 END DO … … 494 493 IF( lk_iomput ) THEN 495 494 IF( knt == nrdttrc ) THEN 496 zfact = 1.e+3 * rfact2r * rno3! conversion from molC/l/kt to molN/m3/s497 IF( iom_use("Nfix" ) ) CALL iom_put( "Nfix", nitrpot(:,:,:) * nitrfix * zfact * tmask(:,:,:) ) ! nitrogen fixation495 zfact = 1.e+3 * rfact2r ! conversion from molC/l/kt to molN/m3/s 496 IF( iom_use("Nfix" ) ) CALL iom_put( "Nfix", nitrpot(:,:,:) * nitrfix * rno3 * zfact * tmask(:,:,:) ) ! nitrogen fixation 498 497 IF( iom_use("INTNFIX") ) THEN ! nitrogen fixation rate in ocean ( vertically integrated ) 499 498 zwork1(:,:) = 0. 500 499 DO jk = 1, jpkm1 501 zwork1(:,:) = zwork1(:,:) + nitrpot(:,:,jk) * nitrfix * zfact * e3t_n(:,:,jk) * tmask(:,:,jk)500 zwork1(:,:) = zwork1(:,:) + nitrpot(:,:,jk) * nitrfix * rno3 * zfact * e3t_n(:,:,jk) * tmask(:,:,jk) 502 501 ENDDO 503 502 CALL iom_put( "INTNFIX" , zwork1 ) 504 503 ENDIF 505 IF( iom_use("SedCal" ) ) CALL iom_put( "SedCal", zsedcal(:,:) * 1.e+3)506 IF( iom_use("SedSi" ) ) CALL iom_put( "SedSi", zsedsi (:,:) * 1.e+3)507 IF( iom_use("SedC" ) ) CALL iom_put( "SedC", zsedc (:,:) * 1.e+3)508 IF( iom_use("Sdenit" ) ) CALL iom_put( "Sdenit", sdenit (:,:) * 1.e+3* rno3 )504 IF( iom_use("SedCal" ) ) CALL iom_put( "SedCal", zsedcal(:,:) * zfact ) 505 IF( iom_use("SedSi" ) ) CALL iom_put( "SedSi", zsedsi (:,:) * zfact ) 506 IF( iom_use("SedC" ) ) CALL iom_put( "SedC", zsedc (:,:) * zfact ) 507 IF( iom_use("Sdenit" ) ) CALL iom_put( "Sdenit", sdenit (:,:) * zfact * rno3 ) 509 508 ENDIF 510 509 ENDIF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r7753 r8979 431 431 432 432 IF( kt == nittrc000 ) THEN 433 xfact1 = rfact2r * 12. / 1.e15 * ryyss ! conversion molC/kt --> PgC/yr 434 xfact2 = 1.e+3 * rno3 * 14. / 1.e12 * ryyss ! conversion molC/l/s ----> TgN/m3/yr 435 xfact3 = 1.e+3 * rfact2r * rno3 ! conversion molC/l/kt ----> molN/m3/s 433 436 IF( ln_check_mass .AND. lwp) THEN ! Open budget file of NO3, ALK, Si, Fer 434 437 CALL ctl_opn( numco2, 'carbon.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 435 438 CALL ctl_opn( numnut, 'nutrient.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 436 439 CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 437 xfact1 = rfact2r * 12. / 1.e15 * ryyss ! conversion molC/kt --> PgC/yr438 xfact2 = 1.e+3 * rno3 * 14. / 1.e12 * ryyss ! conversion molC/l/s ----> TgN/m3/yr439 xfact3 = 1.e+3 * rfact2r * rno3 ! conversion molC/l/kt ----> molN/m3/s440 440 cltxt='time-step Alkalinity Nitrate Phosphorus Silicate Iron' 441 441 IF( lwp ) WRITE(numnut,*) TRIM(cltxt) … … 517 517 IF( iom_use( "tnfix" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 518 518 znitrpottot = glob_sum ( nitrpot(:,:,:) * nitrfix * cvol(:,:,:) ) 519 CALL iom_put( "tnfix" , znitrpottot * 1.e+3 * rno3 ) ! Global nitrogen fixation molC/l to molN/m3519 CALL iom_put( "tnfix" , znitrpottot * xfact3 ) ! Global nitrogen fixation molC/l to molN/m3 520 520 ENDIF 521 521 ! 522 522 IF( iom_use( "tdenit" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 523 zrdenittot = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 524 CALL iom_put( "tdenit" , zrdenittot * 1.e+3 * rno3 ) ! Total denitrification molC/l to molN/m3 525 ENDIF 526 ! 527 IF( iom_use( "Sdenit" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 528 zsdenittot = glob_sum ( sdenit(:,:) * e1e2t(:,:) ) 529 CALL iom_put( "Sdenit", sdenit(:,:) * xfact3 * tmask(:,:,1) ) ! Nitrate reduction in the sediments 530 ENDIF 531 523 zrdenittot = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) ) 524 zsdenittot = glob_sum ( sdenit(:,:) * e1e2t(:,:) * tmask(:,:,1) ) 525 CALL iom_put( "tdenit" , ( zrdenittot + zsdenittot ) * xfact3 ) ! Total denitrification molC/l to molN/m3 526 ENDIF 527 ! 532 528 IF( ln_check_mass .AND. kt == nitend ) THEN ! Compute the budget of NO3, ALK, Si, Fer 533 529 t_atm_co2_flx = t_atm_co2_flx / glob_sum( e1e2t(:,:) ) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedco3.F90
r5215 r8979 75 75 76 76 DO jk = 1, jpksed 77 10001 CONTINUE 78 IF( itime <= 2 ) THEN 77 DO WHILE( itime <= 2 ) 79 78 lconv = .FALSE. 80 79 IF( itime > 0 ) THEN … … 154 153 ! WRITE(numsed,*) ' with re-initialization of initial PH field ' 155 154 itime = 2 156 GOTO 10001157 155 ELSE 158 156 ! WRITE(numsed,*) ' convergence after iter =', jiter, ' iterations ; res =',zresm … … 165 163 ! & ' after iter =', jiter, ' iterations ; res =',zresm 166 164 ! WRITE(numsed,*) ' ' 167 itime = 0165 itime = 3 168 166 ENDIF 169 167 ELSE … … 172 170 IF ( itime == 1 ) THEN 173 171 WRITE(numsed,*) ' try one more time with more iterations and higher relax. value' 174 GOTO 10001175 172 ELSE IF ( itime == 2 ) THEN 176 173 WRITE(numsed,*) ' try one more time for with more iterations, higher relax. value' … … 181 178 ENDIF 182 179 ENDIF 183 END IF180 ENDDO ! End of WHILE LOOP 184 181 ENDDO 185 182 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
r7646 r8979 97 97 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? 98 98 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? 99 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac2 !: ?? 99 100 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: orem !: ?? 100 101 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? … … 159 160 ! 160 161 !* SMS for the organic matter 161 ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac(jpi,jpj,jpk), &162 & orem (jpi,jpj,jpk),&163 & prodcal(jpi,jpj,jpk) ,xdiss (jpi,jpj,jpk), &162 ALLOCATE( xfracal (jpi,jpj,jpk), orem(jpi,jpj,jpk) , & 163 & nitrfac(jpi,jpj,jpk), nitrfac2(jpi,jpj,jpk) , & 164 & prodcal(jpi,jpj,jpk) , xdiss (jpi,jpj,jpk), & 164 165 & prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk) , & 165 166 & prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk) , STAT=ierr(4) ) -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r7881 r8979 106 106 ENDIF 107 107 ! ! Leap-Frog + Asselin filter time stepping 108 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! Euler time-stepping at first time-step(only swap)108 IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN ! Euler time-stepping (only swap) 109 109 DO jn = 1, jptra 110 110 DO jk = 1, jpkm1 111 111 trn(:,:,jk,jn) = tra(:,:,jk,jn) 112 trb(:,:,jk,jn) = trn(:,:,jk,jn) 112 113 END DO 113 114 END DO -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/trc.F90
r7881 r8979 10 10 USE par_oce 11 11 USE par_trc 12 USE bdy_oce, only: ln_bdy, nb_bdy, OBC_DATA12 USE bdy_oce, only: jp_bdy, ln_bdy, nb_bdy, OBC_DATA 13 13 14 14 IMPLICIT NONE … … 169 169 # endif 170 170 ! 171 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_dflt ! Default OBC condition for all tracers 172 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc ! Choice of boundary condition for tracers 173 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nn_trcdmp_bdy !: =T Tracer damping 171 CHARACTER(len=20), PUBLIC, DIMENSION(jp_bdy) :: cn_trc_dflt ! Default OBC condition for all tracers 172 CHARACTER(len=20), PUBLIC, DIMENSION(jp_bdy) :: cn_trc ! Choice of boundary condition for tracers 173 INTEGER, PUBLIC, DIMENSION(jp_bdy) :: nn_trcdmp_bdy !: =T Tracer damping 174 !$AGRIF_DO_NOT_TREAT 174 175 ! External data structure of BDY for TOP. Available elements: cn_obc, ll_trc, trcnow, dmp 175 176 TYPE(OBC_DATA), PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET :: trcdta_bdy !: bdy external data (local process) 176 ! 177 177 !$AGRIF_END_DO_NOT_TREAT 178 178 !!---------------------------------------------------------------------- 179 179 !! NEMO/TOP 3.3.1 , NEMO Consortium (2010) … … 206 206 ! 207 207 IF ( ln_bdy ) THEN 208 ALLOCATE( cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 209 & trcdta_bdy(jptra,nb_bdy) , & 210 & STAT = ierr(2) ) 208 ALLOCATE( trcdta_bdy(jptra, jp_bdy), STAT = ierr(2) ) 211 209 ENDIF 212 210 ! -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
r7646 r8979 227 227 ik = mbkt(ji,jj) 228 228 IF( ik > 1 ) THEN 229 zl = ( gdept_1d(ik) - gdept_ n(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )229 zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) 230 230 ptrcdta(ji,jj,ik) = (1.-zl) * ptrcdta(ji,jj,ik) + zl * ptrcdta(ji,jj,ik-1) 231 231 ENDIF 232 232 ik = mikt(ji,jj) 233 233 IF( ik > 1 ) THEN 234 zl = ( gdept_ n(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) )234 zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) ) 235 235 ptrcdta(ji,jj,ik) = (1.-zl) * ptrcdta(ji,jj,ik) + zl * ptrcdta(ji,jj,ik+1) 236 236 ENDIF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r7753 r8979 69 69 ! 70 70 CALL trc_ini_sms ! SMS 71 CALL trc_ini_inv ! Inventories72 71 CALL trc_ini_trp ! passive tracers transport 73 72 CALL trc_ice_ini ! Tracers in sea ice … … 78 77 IF( nn_dttrc /= 1 ) & 79 78 CALL trc_sub_ini ! Initialize variables for substepping passive tracers 79 ! 80 CALL trc_ini_inv ! Inventories 80 81 ! 81 82 IF( nn_timing == 1 ) CALL timing_stop('trc_init') -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ALTIX_NAUTILUS_MPT
r3631 r8979 65 65 export INPUT_DIR=DEF_INPUT_DIR 66 66 export CONFIG_DIR=DEF_CONFIG_DIR 67 export TOOLS_DIR=DEF_TOOLS_DIR 67 68 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 68 69 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-IBM_EKMAN_INGV
r5301 r8979 47 47 export INPUT_DIR=DEF_INPUT_DIR 48 48 export CONFIG_DIR=DEF_CONFIG_DIR 49 export TOOLS_DIR=DEF_TOOLS_DIR 49 50 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 50 51 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_CALYPSO
r3294 r8979 43 43 export INPUT_DIR=DEF_INPUT_DIR 44 44 export CONFIG_DIR=DEF_CONFIG_DIR 45 export TOOLS_DIR=DEF_TOOLS_DIR 45 46 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 46 47 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW7_METO
r4285 r8979 48 48 export INPUT_DIR=DEF_INPUT_DIR 49 49 export CONFIG_DIR=DEF_CONFIG_DIR 50 export TOOLS_DIR=DEF_TOOLS_DIR 50 51 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 51 52 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW7_MONSOON
r5029 r8979 47 47 export INPUT_DIR=DEF_INPUT_DIR 48 48 export CONFIG_DIR=DEF_CONFIG_DIR 49 export TOOLS_DIR=DEF_TOOLS_DIR 49 50 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 50 51 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_ADA
r7715 r8979 11 11 # @ total_tasks = NPROCS 12 12 # time 13 # @ wall_clock_limit = 1:30:0013 # @ wall_clock_limit = 00:59:00 14 14 # @ queue 15 15 … … 44 44 export INPUT_DIR=DEF_INPUT_DIR 45 45 export CONFIG_DIR=DEF_CONFIG_DIR 46 export TOOLS_DIR=DEF_TOOLS_DIR 46 47 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 47 48 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_ADA_DEBUG
r7715 r8979 11 11 # @ total_tasks = NPROCS 12 12 # time 13 # @ wall_clock_limit = 1:30:0013 # @ wall_clock_limit = 00:59:00 14 14 # @ queue 15 15 … … 44 44 export INPUT_DIR=DEF_INPUT_DIR 45 45 export CONFIG_DIR=DEF_CONFIG_DIR 46 export TOOLS_DIR=DEF_TOOLS_DIR 46 47 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 47 48 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_ADA_O0
r7715 r8979 11 11 # @ total_tasks = NPROCS 12 12 # time 13 # @ wall_clock_limit = 1:30:0013 # @ wall_clock_limit = 00:59:00 14 14 # @ queue 15 15 … … 45 45 export INPUT_DIR=DEF_INPUT_DIR 46 46 export CONFIG_DIR=DEF_CONFIG_DIR 47 export TOOLS_DIR=DEF_TOOLS_DIR 47 48 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 48 49 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_CURIE
r5407 r8979 45 45 export INPUT_DIR=DEF_INPUT_DIR 46 46 export CONFIG_DIR=DEF_CONFIG_DIR 47 export TOOLS_DIR=DEF_TOOLS_DIR 47 48 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 48 49 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_MOBILIS
r8186 r8979 42 42 export INPUT_DIR=DEF_INPUT_DIR 43 43 export CONFIG_DIR=DEF_CONFIG_DIR 44 export TOOLS_DIR=DEF_TOOLS_DIR 44 45 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 45 46 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC40_METO
r6140 r8979 40 40 export INPUT_DIR=DEF_INPUT_DIR 41 41 export CONFIG_DIR=DEF_CONFIG_DIR 42 export TOOLS_DIR=DEF_TOOLS_DIR 42 43 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 43 44 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL
r4814 r8979 50 50 export INPUT_DIR=DEF_INPUT_DIR 51 51 export CONFIG_DIR=DEF_CONFIG_DIR 52 export TOOLS_DIR=DEF_TOOLS_DIR 52 53 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 53 54 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena
r7646 r8979 43 43 export INPUT_DIR=DEF_INPUT_DIR 44 44 export CONFIG_DIR=DEF_CONFIG_DIR 45 export TOOLS_DIR=DEF_TOOLS_DIR 45 46 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 46 47 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios
r7646 r8979 49 49 export INPUT_DIR=DEF_INPUT_DIR 50 50 export CONFIG_DIR=DEF_CONFIG_DIR 51 export TOOLS_DIR=DEF_TOOLS_DIR 51 52 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 52 53 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-macport_osx
r4147 r8979 44 44 export INPUT_DIR=DEF_INPUT_DIR 45 45 export CONFIG_DIR=DEF_CONFIG_DIR 46 export TOOLS_DIR=DEF_TOOLS_DIR 46 47 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 47 48 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-macport_osx_debug
r7646 r8979 44 44 export INPUT_DIR=DEF_INPUT_DIR 45 45 export CONFIG_DIR=DEF_CONFIG_DIR 46 export TOOLS_DIR=DEF_TOOLS_DIR 46 47 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 47 48 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-mpmd-ALTIX_NAUTILUS_MPT
r3736 r8979 68 68 export INPUT_DIR=DEF_INPUT_DIR 69 69 export CONFIG_DIR=DEF_CONFIG_DIR 70 export TOOLS_DIR=DEF_TOOLS_DIR 70 71 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 71 72 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-openmpi_NAVITI_MERCATOR
r5559 r8979 40 40 export INPUT_DIR=DEF_INPUT_DIR 41 41 export CONFIG_DIR=DEF_CONFIG_DIR 42 export TOOLS_DIR=DEF_TOOLS_DIR 42 43 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 43 44 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template
r3608 r8979 44 44 export INPUT_DIR=DEF_INPUT_DIR 45 45 export CONFIG_DIR=DEF_CONFIG_DIR 46 export TOOLS_DIR=DEF_TOOLS_DIR 46 47 export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION 47 48 export NEW_CONF=DEF_NEW_CONF -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/all_functions.sh
r8170 r8979 172 172 echo "COMPILER is : ${CMP_NAM}" 173 173 echo "TEST is : ${TEST_NAME}" 174 echo "TOOLS directory is : ${TOOLS_DIR}" 174 175 ################################################################ 175 176 # SMALL DEBUG -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/prepare_job.sh
r7753 r8979 151 151 fi 152 152 ################################################################ 153 154 ##########################################################################155 # COPY RESTART FILES (if needed; i.e. only for SHORT job in RESTART TESTS)156 # get the input tarfile if needed157 # SF : not ok for the moment because at this point is needed cn_exp variable,158 # SF : here it it not known.159 #\cd ${EXE_DIR}160 #if [ "$(echo ${TEST_NAME} | grep -c "SHORT" )" -ne 0 ] ; then161 # for (( i=1; i<=${NB_PROC}; ${NB_PROC}++)) ; do162 # L_NPROC=`printf "%04d\n" $i`163 # ln -sf ../LONG/${NEW_CONF}_00000060_restart_${L_NPROC-1}.nc .164 # done165 #fi166 ## SF : other way167 ## for file in ../LONG/${NEW_CONF}_*restart_0*.nc ; do168 ## ncpu=`echo $file | awk -F '_' '{print $NF}' | cut -f 1 -d '.'`169 ## ln -sf ${file} .170 ## done171 ##fi172 ##########################################################################173 153 174 154 ################################################################ … … 309 289 -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ 310 290 -e"s:DEF_CONFIG_DIR:${CONFIG_DIR}:" \ 291 -e"s:DEF_TOOLS_DIR:${TOOLS_DIR}:" \ 311 292 -e"s:MPI_FLAG:${MPI_FLAG}:" \ 312 293 -e"s:DEF_NEMO_VALIDATION:${NEMO_VALIDATION_DIR}:" -e"s:DEF_NEW_CONF:${NEW_CONF}:" \ -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/sette.sh
r8170 r8979 144 144 145 145 for config in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 146 147 146 do 148 147 … … 800 799 set_namelist namelist_cfg cn_exp \"SAS\" 801 800 set_namelist namelist_cfg nn_it000 1 802 set_namelist namelist_cfg nn_itend 100 803 set_namelist namelist_cfg nn_stock 50 804 set_namelist namelist_cfg ln_ctl .false. 805 set_namelist namelist_cfg ln_clobber .true. 806 set_namelist namelist_cfg ln_read_cfg .true. 807 set_namelist namelist_cfg ln_linssh .true. 801 set_namelist namelist_cfg nn_itend 240 802 set_namelist namelist_cfg nn_stock 120 803 set_namelist namelist_cfg ln_ctl .false. 804 set_namelist namelist_cfg ln_clobber .true. 805 set_namelist namelist_cfg ln_read_cfg .true. 806 set_namelist namelist_cfg ln_linssh .true. 807 set_namelist namelist_cfg nn_fsbc 1 808 808 set_namelist namelist_cfg nn_fwb 0 809 809 set_namelist namelist_cfg jpni 4 … … 823 823 cd ${EXE_DIR} 824 824 set_namelist namelist_cfg cn_exp \"SAS\" 825 set_namelist namelist_cfg nn_it000 51 826 set_namelist namelist_cfg nn_itend 100 827 set_namelist namelist_cfg ln_ctl .false. 828 set_namelist namelist_cfg ln_clobber .true. 829 set_namelist namelist_cfg ln_read_cfg .true. 830 set_namelist namelist_cfg ln_linssh .true. 825 set_namelist namelist_cfg nn_it000 121 826 set_namelist namelist_cfg nn_itend 240 827 set_namelist namelist_cfg ln_ctl .false. 828 set_namelist namelist_cfg ln_clobber .true. 829 set_namelist namelist_cfg ln_read_cfg .true. 830 set_namelist namelist_cfg ln_linssh .true. 831 set_namelist namelist_cfg nn_fsbc 1 831 832 set_namelist namelist_cfg nn_fwb 0 832 833 set_namelist namelist_cfg jpni 4 … … 835 836 set_namelist namelist_cfg ln_rstart .true. 836 837 set_namelist namelist_cfg nn_rstctl 2 837 set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000050_restart_ice\" 838 set_namelist namelist_cfg nn_date0 010106 839 set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\" 840 set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\" 838 841 if [ ${USING_MPMD} == "yes" ] ; then 839 842 set_xio_using_server iodef.xml true … … 844 847 L_NPROC=$(( $i - 1 )) 845 848 L_NPROC=`printf "%04d\n" ${L_NPROC}` 846 ln -sf ../LONG/SAS_00000050_restart_ice_${L_NPROC}.nc . 849 ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc . 850 ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc . 847 851 done 848 852 cd ${SETTE_DIR} … … 1220 1224 export TEST_NAME="LONG" 1221 1225 cd ${CONFIG_DIR0} 1222 . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_LONG -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif " del_key "key_zdftmxkey_top"1226 . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_LONG -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif key_zdftmx" del_key "key_zdftmx_new key_top" 1223 1227 cd ${SETTE_DIR} 1224 1228 . ./param.cfg … … 1296 1300 set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\" 1297 1301 set_namelist 1_namelist_cfg cn_ocerst_in \"O2LP_LONG_00000150_restart\" 1302 set_namelist 1_namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000150_restart_ice\" 1298 1303 1299 1304 for (( i=1; i<=$NPROC; i++)) ; do … … 1303 1308 ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc . 1304 1309 ln -sf ../LONG/1_O2LP_LONG_00000150_restart_${L_NPROC}.nc . 1310 ln -sf ../LONG/1_O2LP_LONG_00000150_restart_ice_${L_NPROC}.nc . 1305 1311 done 1306 1312 if [ ${USING_MPMD} == "yes" ] ; then … … 1319 1325 export TEST_NAME="REPRO_4_4" 1320 1326 cd ${CONFIG_DIR0} 1321 . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_16 -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif " del_key "key_zdftmxkey_top"1327 . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_16 -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif key_zdftmx" del_key "key_zdftmx_new key_top" 1322 1328 cd ${SETTE_DIR} 1323 1329 . ./param.cfg … … 1381 1387 set_namelist 1_namelist_cfg nn_it000 1 1382 1388 set_namelist 1_namelist_cfg nn_itend 150 1389 set_namelist 1_namelist_cfg nn_fsbc 1 1383 1390 set_namelist 1_namelist_cfg ln_ctl .false. 1384 1391 set_namelist 1_namelist_cfg nn_fsbc 1 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/sette_rpt.sh
r8186 r8979 11 11 ######################### Start of function definitions ################################# 12 12 ## 13 14 function restfile() { 15 # Rebuild ice restart for SAS CONFIG, and restartability checks. Expects LONG and SHORT run directories. 16 # For Stand Alone Surface configuration ocean is not running, just run ice model; so no outputs ocean files. 17 # Compares LONG rebuild restart ice file with equivalent entry from the SHORT rebuild restart ice file. 18 # 19 vdir=$1 20 nam=$2 21 pass=$3 22 23 # Directory to run the tests 24 SETTE_DIR=$(cd $(dirname "$0"); pwd) 25 MAIN_DIR=$(dirname $SETTE_DIR) 26 CONFIG_DIR0=${MAIN_DIR}/CONFIG 27 TOOLS_DIR=${MAIN_DIR}/TOOLS 28 COMPIL_DIR=${TOOLS_DIR}/COMPILE 29 NPROC=32 30 SAS_RESTART_DIR=${CONFIG_DIR0}/SAS_LONG 31 # 32 if [ -d $vdir/$nam ]; then 33 dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 34 dorv=`echo $dorv | sed -e 's:.*/::'` 35 rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 ` 36 rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l` 37 cd ${SAS_RESTART_DIR}/LONG 38 #SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files 39 cd ${TOOLS_DIR} 40 ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1 41 cd ${TOOLS_DIR}/REBUILD_NEMO 42 #SF echo "REBUILD LONG restart SAS files, without standard output" 43 ./rebuild_nemo -t 4 ../../CONFIG/SAS_LONG/LONG/SAS_00000240_restart_ice $NPROC > /dev/null 2>&1 44 #SF echo "REBUILD SHORT restart SAS files, without standard output" 45 ./rebuild_nemo -t 4 ../../CONFIG/SAS_LONG/SHORT/SAS_00000240_restart_ice $NPROC >&- 46 cd ${SAS_RESTART_DIR}/LONG 47 #SF echo "COPY rebuild restart files" 48 cp SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/. 49 cp ../SHORT/SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/. 50 51 f1o=$vdir/$nam/$mach/$dorv/LONG/SAS_00000240_restart_ice.nc 52 f2o=$vdir/$nam/$mach/$dorv/SHORT/SAS_00000240_restart_ice.nc 53 if [ ! -f $f1o ] && [ ! -f $f2o ] ; then 54 printf "%-20s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test"; 55 return; 56 fi 57 # 58 done_oce=0 59 # 60 if [ -f $f1o ] && [ -f $f2o ]; then 61 cmp -s $f1o $f2o 62 #SF cmp SAS_00000240_restart_ice.nc ../SHORT/SAS_00000240_restart_ice.nc > diff_restart.txt 63 if [ $? == 0 ]; then 64 if [ $pass == 0 ]; then 65 printf "%-20s %s %s\n" $nam " SAS restart files are IDENTICAL : passed : " $dorv 66 fi 67 else 68 printf "%-20s %s %s\n" $nam " SAS restart files are DIFFERENT : FAILED : " $dorv 69 # 70 # Offer view of differences on the second pass 71 # 72 if [ $pass == 1 ]; then 73 echo "BE CAREFUL: NEED cdo to see differences!!!!! " 74 echo "DO which cdo and replace cdo PATH to the cdo command in SETTE_rpt.sh " 75 echo "IF cdo is not available you need to do difference of netcdf file by hand" 76 echo "<return> to view restart_ice.nc differences" 77 read y 78 cdo -diffv $f1o $f2o 79 done_oce=1 80 #echo "<return> to continue" 81 #read y 82 fi 83 fi 84 fi 85 # 86 fi 87 } 88 13 89 function resttest() { 14 90 # … … 207 283 fi 208 284 # 285 209 286 # The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 210 287 # … … 214 291 if [ $pass == 1 ]; then echo "---------------2nd pass------------------";fi 215 292 # 293 294 # Rebuild and restartability test for SAS 295 # 296 for restart_file in WSAS_LONG 297 do 298 # restfile $SAS_RESTART_DIR LONG $pass 299 restfile $NEMO_VALID $restart_file $pass 300 done 301 # 216 302 # Restartability test 217 303 # 218 for restart_test in WGYREPIS_LONG WORCA2LIM3PIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG W SAS_LONG WISOMIP_LONG WORCA2AGUL_LONG304 for restart_test in WGYREPIS_LONG WORCA2LIM3PIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG WISOMIP_LONG WORCA2AGUL_LONG 219 305 do 220 306 resttest $NEMO_VALID $restart_test $pass -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh
r7646 r8979 65 65 echo "Adding keys in : ${NEW_CONF}" 66 66 for i in ${list_add_key} ; do 67 if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c " $i" )" -ne 0 ] ; then67 if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "\<$i\>" )" -ne 0 ] ; then 68 68 echo "key $i already present in cpp_${NEW_CONF}.fcm" 69 69 else -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/COMPILE/Fdel_keys.sh
r4990 r8979 60 60 # 61 61 #- 62 echo "Removing keys in : ${NEW_CONF}"63 for i in ${list_del_key} ; do64 if [ "$(echo ${i} | grep -c key_nproc )" -ne 0 ] ; then65 sed -e "s/key_nproc[ij]=.* //" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm > ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp66 mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm67 echo " "68 elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then69 sed -e "s/${i}//" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm > ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp70 mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm71 echo "deleted key $i in ${NEW_CONF}"72 fi73 done74 62 75 unset -v list_del_key 63 echo "Removing keys in : ${NEW_CONF}" 64 65 for i in ${list_del_key} ; do 66 67 if [ "$(echo ${i} | grep -c key_nproc )" -ne 0 ]; then 68 sed -e "s/key_nproc[ij]=.* //" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \ 69 > ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 70 mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 71 echo " " 72 elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ]; then 73 sed -e "s/\b${i}\b//" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \ 74 > ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 75 mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 76 echo "deleted key $i in ${NEW_CONF}" 77 fi 78 79 done 80 81 unset -v list_del_key -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/COMPILE/Fmake_WORK.sh
r4990 r8979 105 105 done 106 106 107 for i in `(cd ${ZCONF}/MY_SRC ; ls *.[Ffh]90 2>/dev/null ) `107 for i in `(cd ${ZCONF}/MY_SRC ; \ls *.[Ffh]90 2>/dev/null ) ` 108 108 do 109 109 [ -f ${ZCONF}/MY_SRC/$i ] && ln -sf $PWD/${ZCONF}/MY_SRC/${i} ${ZCONF}/WORK/. -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90
r7200 r8979 2078 2078 hbatt(:,:) = zenv(:,:) 2079 2079 IF( MINVAL( gphit(:,:) ) * MAXVAL( gphit(:,:) ) <= 0._wp ) THEN 2080 IF ( jphgr_msh == 2 .OR. jphgr_msh == 3) CALL ctl_stop( 'dom:zgr_sco: if jphgr_msh = 2 or 3 and & 2081 & s-coordinates stop, if not correction at Equator is applied, but it is wrong') 2080 2082 CALL ctl_warn( ' s-coordinates are tapered in vicinity of the Equator' ) 2081 2083 DO jj = 1, jpj -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/MISCELLANEOUS/chk_iomput.sh
r4162 r8979 37 37 echo ' ./chk_iomput.sh' 38 38 echo ' ./chk_iomput.sh --help' 39 echo ' ./chk_iomput.sh ../../CONFIG/ORCA2_LIM/EXP00/ iodef.xml "../../NEMO/OPA_SRC/ ../../NEMO/LIM_SRC_2/"'39 echo ' ./chk_iomput.sh ../../CONFIG/ORCA2_LIM/EXP00/context_nemo.xml "../../NEMO/OPA_SRC/ ../../NEMO/LIM_SRC_2/"' 40 40 echo 41 41 exit ;; … … 51 51 done 52 52 # 53 [ ! -f "$xmlfile" ] && echo "$xmlfile not found, we stop..." && exit 53 echo $xmlfile 54 echo $srcdir 55 56 for i in $xmlfile 57 do 58 [ ! -f "$xmlfile" ] && echo "$xmlfile not found, we stop..." && exit 59 done 54 60 for i in $srcdir 55 61 do … … 60 66 # 61 67 external=$( grep -c "<field_definition *\([^ ].* \)*src=" $xmlfile ) 62 if [ $external - eq1 ]68 if [ $external -ge 1 ] 63 69 then 64 70 xmlfield_def=$( grep "<field_definition *\([^ ].* \)*src=" $xmlfile | sed -e 's/.*src="\([^"]*\)".*/\1/' ) 65 xmlfield_def=$( dirname $xmlfile )/$xmlfield_def 71 tmp_def="" 72 for fdef in $xmlfield_def ; do tmp_def="$tmp_def $( dirname $xmlfile )/$fdef" ; done 73 xmlfield_def=$tmp_def 74 echo $xmlfield_def 66 75 else 67 76 xmlfield_def=$xmlfile 68 77 fi 78 external=$( grep -c "<file_definition *\([^ ].* \)*src=" $xmlfile ) 79 if [ $external -ge 1 ] 80 then 81 xmlfile_def=$( grep "<file_definition *\([^ ].* \)*src=" $xmlfile | sed -e 's/.*src="\([^"]*\)".*/\1/' ) 82 tmp_def="" 83 for fdef in $xmlfile_def ; do tmp_def="$tmp_def $( dirname $xmlfile )/$fdef" ; done 84 xmlfile_def=$tmp_def 85 echo $xmlfile_def 86 else 87 xmlfile_def=$xmlfile 88 fi 89 69 90 [ $inxml -eq 1 ] && grep "< *field *\([^ ].* \)*id *=" $xmlfield_def 70 91 [ $insrc -eq 1 ] && find $srcdir -name "*.[Ffh]90" -exec grep -iH "^[^\!]*call *iom_put *(" {} \; … … 95 116 # list of variables to be outputed in the xml file 96 117 # 97 varlistout=$( grep "< *field *\([^ ].* \)*field_ref *=" $xmlfile | sed -e "s/^.*< *field .*field_ref *= *[\"\']\([^\"\']*\)[\"\'].*/\1/" | sort -d )118 varlistout=$( grep "< *field *\([^ ].* \)*field_ref *=" $xmlfile_def | sed -e "s/^.*< *field .*field_ref *= *[\"\']\([^\"\']*\)[\"\'].*/\1/" | sort -d ) 98 119 # 99 120 echo "--------------------------------------------------" -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/MISCELLANEOUS/icb_pp.py
r6423 r8979 12 12 # cases the missing instances are filled with invalid (NaN) values. 13 13 # 14 # Version 2.0 August 2017. Adapted to process all variables and retain original 15 # datatypes. (acc@noc.ac.uk) 14 16 15 parser = ArgumentParser(description='produce collated trajectory file from distributed output\ 16 files, e.g. \n python ./icb_pp.py \ 17 -t trajectory_icebergs_004248_ -n 296 -o trajsout.nc' ) 17 parser = ArgumentParser(description='produce collated trajectory file \ 18 from distributed output files, e.g. \ 19 \n python ./icb_pp.py \ 20 -t trajectory_icebergs_004248_ \ 21 -n 296 -o trajsout.nc' ) 18 22 19 parser.add_argument('-t',dest='froot',help='fileroot_of_distrbuted_data; root name of \ 20 distributed trajectory output (usually completed with XXXX.nc, where \ 21 XXXX is the 4 digit processor number)', 22 default='trajectory_icebergs_004248_') 23 parser.add_argument('-t',dest='froot', 24 help='fileroot_of_distrbuted_data; root name \ 25 of distributed trajectory output (usually \ 26 completed with XXXX.nc, where XXXX is the \ 27 4 digit processor number)', 28 default='trajectory_icebergs_004248_') 23 29 24 30 parser.add_argument('-n',dest='fnum',help='number of distributed files to process', 25 type=int, default=None)31 type=int, default=None) 26 32 27 parser.add_argument('-o',dest='fout',help='collated_output_file; file name to receive the \ 28 collated trajectory data', default='trajsout.nc') 33 parser.add_argument('-o',dest='fout', 34 help='collated_output_file; file name to receive \ 35 the collated trajectory data', default='trajsout.nc') 29 36 30 37 args = parser.parse_args() … … 64 71 # 65 72 for n in range(procnum): 66 nn = '%4.4d' % n 67 fw = Dataset(pathstart+nn+'.nc') 68 if len(fw.dimensions['n']) > 0: 69 print pathstart+nn+'.nc' 70 ic = fw.variables['iceberg_number'][:,0] 71 ts = fw.variables['timestep'][:] 72 icv = np.unique(ic) 73 ts = np.unique(ts) 74 print('Min Max ts: ',ts.min(), ts.max()) 75 print('Number unique icebergs= ',icv.shape[0]) 76 icu.append(icv) 77 times.append(ts) 78 fw.close() 73 nn = '%4.4d' % n 74 fw = Dataset(pathstart+nn+'.nc') 75 # keep a list of the variables in the first dataset 76 if n == 0: 77 varlist = fw.variables 78 # 79 # skip any files with no icebergs 80 if len(fw.dimensions['n']) > 0: 81 print pathstart+nn+'.nc' 82 ic = fw.variables['iceberg_number'][:,0] 83 ts = fw.variables['timestep'][:] 84 icv = np.unique(ic) 85 ts = np.unique(ts) 86 print('Min Max ts: ',ts.min(), ts.max()) 87 print('Number unique icebergs= ',icv.shape[0]) 88 icu.append(icv) 89 times.append(ts) 90 fw.close() 79 91 # 80 92 # Now flatten the lists and reduce to the unique spanning set … … 89 101 print('times range from: ',times.min(), 'to: ', times.max()) 90 102 # 91 # Declare 2-D arrays to receive the data from all files103 # Declare array to receive data from all files 92 104 # 93 105 nt = times.shape[0] 94 lons = np.zeros((ntraj, nt)) 95 lats = np.zeros((ntraj, nt)) 96 tims = np.zeros((ntraj, nt)) 97 xis = np.zeros((ntraj, nt)) 98 yjs = np.zeros((ntraj, nt)) 106 # 107 n=0 108 for key, value in varlist.iteritems() : 109 if key != "iceberg_number" : 110 n = n + 1 111 inarr = np.zeros((n, ntraj, nt)) 99 112 # 100 113 # initially fill with invalid data 101 114 # 102 lons.fill(np.nan) 103 lats.fill(np.nan) 104 xis.fill(np.nan) 105 yjs.fill(np.nan) 106 tims.fill(np.nan) 115 inarr.fill(np.nan) 116 # 117 # Declare some lists to store variable names, types and long_name and units attributes 118 # iceberg_number gets special treatment 119 innam = [] 120 intyp = [] 121 inlngnam = [] 122 inunits = [] 123 for key, value in varlist.iteritems() : 124 if key != "iceberg_number" : 125 innam.append(key) 126 # 127 # reopen the first datset to collect variable attributes 128 # (long_name and units only) 129 # 130 nn = '%4.4d' % 0 131 fw = Dataset(pathstart+nn+'.nc') 132 for key, value in varlist.iteritems() : 133 if key != "iceberg_number" : 134 intyp.append(fw.variables[key].dtype) 135 inlngnam.append(fw.variables[key].getncattr('long_name')) 136 inunits.append(fw.variables[key].getncattr('units')) 137 fw.close() 107 138 # 108 139 # loop through distributed datasets again, this time 109 140 # checking indices against icu and times lists and 110 141 # inserting data into the correct locations in the 111 # 2-Dcollated sets.142 # collated sets. 112 143 # 113 144 for n in range(procnum): 114 nn = '%4.4d' % n 115 fw = Dataset(pathstart+nn+'.nc') 145 nn = '%4.4d' % n 146 fw = Dataset(pathstart+nn+'.nc') 147 # 116 148 # Note many distributed datafiles will contain no iceberg data 117 149 # so skip quickly over these 118 m = len(fw.dimensions['n']) 119 if m > 0: 120 inx = np.zeros(m, dtype=int) 121 tsx = np.zeros(m, dtype=int) 122 print pathstart+nn+'.nc' 123 ic = fw.variables['iceberg_number'][:,0] 124 ts = fw.variables['timestep'][:] 125 lns = fw.variables['lon'][:] 126 lts = fw.variables['lat'][:] 127 xxs = fw.variables['xi'][:] 128 yys = fw.variables['yj'][:] 129 for k in range(m): 130 inxx = np.where(icu == ic[k]) 131 inx[k] = inxx[0] 132 for k in range(m): 133 inxx = np.where(times == ts[k]) 134 tsx[k] = inxx[0] 135 lons[inx[:],tsx[:]] = lns[:] 136 lats[inx[:],tsx[:]] = lts[:] 137 tims[inx[:],tsx[:]] = ts[:] 138 xis[inx[:],tsx[:]] = xxs[:] 139 yjs[inx[:],tsx[:]] = yys[:] 140 fw.close() 141 150 m = len(fw.dimensions['n']) 151 if m > 0: 152 inx = np.zeros(m, dtype=int) 153 tsx = np.zeros(m, dtype=int) 154 #print pathstart+nn+'.nc' 155 ic = fw.variables['iceberg_number'][:,0] 156 ts = fw.variables['timestep'][:] 157 for k in range(m): 158 inxx = np.where(icu == ic[k]) 159 inx[k] = inxx[0] 160 for k in range(m): 161 inxx = np.where(times == ts[k]) 162 tsx[k] = inxx[0] 163 n = 0 164 for key, value in varlist.iteritems() : 165 if key != "iceberg_number" : 166 insmall = fw.variables[innam[n]][:] 167 inarr[n,inx[:],tsx[:]] = insmall[:] 168 n = n + 1 169 fw.close() 170 # 142 171 # Finally create the output file and write out the collated sets 143 172 # 144 fo = Dataset(pathout, 'w', format='NETCDF4 ')173 fo = Dataset(pathout, 'w', format='NETCDF4_CLASSIC') 145 174 ntrj = fo.createDimension('ntraj', ntraj) 146 175 nti = fo.createDimension('ntime', None) 147 olon = fo.createVariable('lon', 'f4',('ntraj','ntime')) 148 olat = fo.createVariable('lat', 'f4',('ntraj','ntime')) 149 otim = fo.createVariable('ttim', 'f4',('ntraj','ntime')) 150 oxis = fo.createVariable('xis', 'f4',('ntraj','ntime')) 151 oyjs = fo.createVariable('yjs', 'f4',('ntraj','ntime')) 152 icbn = fo.createVariable('icbn', 'f4',('ntraj')) 153 olon[:,:] = lons 154 olat[:,:] = lats 155 otim[:,:] = tims 156 oxis[:,:] = xis 157 oyjs[:,:] = yjs 176 icbn = fo.createVariable('iceberg_number', 'i4',('ntraj')) 158 177 icbn[:] = icu 178 n = 0 179 for key, value in varlist.iteritems() : 180 if key != "iceberg_number" : 181 oout = fo.createVariable(innam[n], intyp[n], ('ntraj','ntime'), 182 zlib=True, complevel=1, chunksizes=(1,nt)) 183 oout[:,:] = inarr[n,:,:] 184 oout.long_name = inlngnam[n] 185 oout.units = inunits[n] 186 n = n + 1 159 187 fo.close() -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/NESTING/src/agrif_create_bathy.f90
r2455 r8979 54 54 REAL*8, DIMENSION(:,:),POINTER :: save_gdepw,rx,ry,maskedtopo 55 55 REAL*8 :: Cell_lonmin,Cell_lonmax,Cell_latmin,Cell_latmax,wghts 56 LOGICAL :: Pacifique 56 LOGICAL :: Pacifique=.FALSE. 57 57 INTEGER :: boundary,xpos,ypos,iimin,iimax,jjmax,jjmin 58 58 INTEGER :: nbloops,nxhr,nyhr,ji,jj,nbiter,nbloopmax -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/TOOLS/NESTING/src/agrif_readwrite.f90
r2455 r8979 232 232 CHARACTER(len=1),DIMENSION(2) :: dimnames 233 233 ! 234 status = nf90_create(name,NF90_ WRITE,ncid)234 status = nf90_create(name,NF90_NOCLOBBER,ncid) 235 235 status = nf90_close(ncid) 236 236 !
Note: See TracChangeset
for help on using the changeset viewer.