Changeset 8841 for branches/UKMO/ROMS_WAD_7832/NEMOGCM
- Timestamp:
- 2017-11-29T05:08:05+01:00 (6 years ago)
- Location:
- branches/UKMO/ROMS_WAD_7832/NEMOGCM
- Files:
-
- 2 deleted
- 145 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7715 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7715 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_pisces_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
r7646 r8841 1 bld::tool::fppkeys key_zdftke key_top key_mpp_mpi 1 bld::tool::fppkeys key_zdftke key_top key_mpp_mpi key_iomput -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/1_namelist_cfg
r7715 r8841 20 20 / 21 21 !----------------------------------------------------------------------- 22 &namzgr ! vertical coordinate23 !-----------------------------------------------------------------------24 ln_zps = .true. ! z-coordinate - partial steps25 /26 !-----------------------------------------------------------------------27 22 &namdom ! space and time domain (bathymetry, mesh, timestep) 28 23 !----------------------------------------------------------------------- … … 46 41 !----------------------------------------------------------------------- 47 42 ln_blk = .true. ! CORE bulk formulation (T => fill namsbc_core) 48 nn_ice = 0! =0 no ice boundary condition ,43 nn_ice = 3 ! =0 no ice boundary condition , 49 44 ! =1 use observed ice-cover , 50 45 ! =2 ice-model used ("key_lim3" or "key_lim2) … … 90 85 &namagrif ! AGRIF zoom ("key_agrif") 91 86 !----------------------------------------------------------------------- 87 nn_cln_update = 1 ! baroclinic update frequency 92 88 / 93 89 !----------------------------------------------------------------------- -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/file_def_nemo.xml
r7828 r8841 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 … … 350 350 </file_definition> 351 351 352 353 </simulation> -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7828 r8841 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 !----------------------------------------------------------------------- … … 105 100 / 106 101 !----------------------------------------------------------------------- 102 &namagrif ! AGRIF zoom ("key_agrif") 103 !----------------------------------------------------------------------- 104 nn_cln_update = 3 ! baroclinic update frequency 105 / 106 !----------------------------------------------------------------------- 107 107 &nambfr ! bottom friction 108 108 !----------------------------------------------------------------------- -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_ice_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_pisces_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_pisces_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_OFF_TRC/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_OFF_TRC/EXP00/namelist_top_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_OFF_TRC/EXP00/namelist_trc_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_SAS_LIM3/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/ORCA2_SAS_LIM3/EXP00/namelist_ice_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml
r7828 r8841 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 … … 207 208 208 209 <!-- * variable related to ice shelf forcing * --> 209 <field id="fwfisf" long_name="Ice shelf melting" unit="Kg/m2/s" />210 <field id="fwfisf" long_name="Ice shelf melting" unit="kg/m2/s" /> 210 211 <field id="fwfisf3d" long_name="Ice shelf melting" unit="kg/m2/s" grid_ref="grid_T_3D" /> 211 212 <field id="qlatisf" long_name="Ice shelf latent heat flux" unit="W/m2" /> … … 215 216 <field id="isfgammat" long_name="transfert coefficient for isf (temperature) " unit="m/s" /> 216 217 <field id="isfgammas" long_name="transfert coefficient for isf (salinity) " unit="m/s" /> 217 218 <field id="stbl" long_name="salinity in the Losh tbl " unit="PSU" /> 218 219 <field id="ttbl" long_name="temperature in the Losh tbl " unit="C" /> 219 220 <field id="utbl" long_name="zonal current in the Losh tbl at T point " unit="m/s" /> … … 238 239 <field id="calving_cea" long_name="Calving" standard_name="water_flux_into_sea_water_from_icebergs" unit="kg/m2/s" /> 239 240 <field id="iceberg_cea" long_name="Iceberg" standard_name="water_flux_into_sea_water_from_icebergs" unit="kg/m2/s" /> 240 <field id="iceshelf_cea" long_name="Iceshelf" standard_name="water_flux_into_sea_water_from_iceshelf" unit="kg/m2/s" /> 241 <field id="iceshelf_cea" long_name="Iceshelf" standard_name="water_flux_into_sea_water_from_iceshelf" unit="kg/m2/s" /> 242 241 243 242 244 <!-- available if key_oasis3 + conservative method --> … … 253 255 <field id="hflx_ice_cea" long_name="heat flux due to ice thermodynamics" standard_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics" unit="W/m2" /> 254 256 <field id="hflx_rnf_cea" long_name="heat flux due to runoffs" standard_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water" unit="W/m2" /> 255 <field id="hflx_cal_cea" long_name="heat flux due to calving" standard_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics" unit="W/m2" /> 257 <field id="hflx_cal_cea" long_name="heat flux due to calving" standard_name="heat_flux_into_sea_water_due_to_calving" unit="W/m2" /> 258 <field id="hflx_icb_cea" long_name="heat flux due to iceberg" standard_name="heat_flux_into_sea_water_due_to_icebergs" unit="W/m2" /> 259 <field id="hflx_isf_cea" long_name="heat flux due to iceshelf" standard_name="heat_flux_into_sea_water_due_to_iceshelf" unit="W/m2" /> 256 260 <field id="bicemel_cea" long_name="Rate of Melt at Sea Ice Base (cell average)" standard_name="tendency_of_sea_ice_amount_due_to_basal_melting" unit="kg/m2/s" /> 257 261 <field id="licepro_cea" long_name="Lateral Sea Ice Growth Rate (cell average)" standard_name="tendency_of_sea_ice_amount_due_to_lateral_growth_of_ice_floes" unit="kg/m2/s" /> … … 559 563 --> 560 564 561 <field_group id="trendT" grid_ref="grid_T_3D"> 562 <!-- 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"> 563 580 <field id="ttrd_xad" long_name="temperature-trend: i-advection" unit="degC/s" /> 564 581 <field id="strd_xad" long_name="salinity -trend: i-advection" unit="1e-3/s" /> … … 593 610 <field id="ttrd_npc" long_name="temperature-trend: non-penetrative conv." unit="degC/s" /> 594 611 <field id="strd_npc" long_name="salinity -trend: non-penetrative conv." unit="1e-3/s" /> 595 <field id="ttrd_qns" long_name="temperature-trend: non-solar flux + runoff" unit="degC/s" />596 <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" /> 597 614 <field id="ttrd_qsr" long_name="temperature-trend: solar penetr. heating" unit="degC/s" /> 598 615 <field id="ttrd_bbc" long_name="temperature-trend: geothermal heating" unit="degC/s" /> 599 <field id="ttrd_atf" long_name="temperature-trend: asselin time filter" unit="degC/s" />600 <field id="strd_atf" long_name="salinity -trend: asselin time filter" unit="1e-3/s" />601 <field id="ttrd_tot" long_name="temperature-trend: total model trend" unit="degC/s" />602 <field id="strd_tot" long_name="salinity -trend: total model trend" unit="1e-3/s" />603 616 604 617 <!-- Thickness weighted versions: --> … … 637 650 <field id="ttrd_qsr_e3t" unit="degC/s * m" > ttrd_qsr * e3t </field> 638 651 <field id="ttrd_bbc_e3t" unit="degC/s * m" > ttrd_bbc * e3t </field> 639 <field id="ttrd_atf_e3t" unit="degC/s * m" > ttrd_atf * e3t </field> 640 <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: --> 641 676 <field id="ttrd_tot_e3t" unit="degC/s * m" > ttrd_tot * e3t </field> 642 677 <field id="strd_tot_e3t" unit="1e-3/s * m" > strd_tot * e3t </field> 643 644 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 **** --> 645 683 <!-- variables available with ln_KE_trd --> 646 684 <field id="ketrd_hpg" long_name="ke-trend: hydrostatic pressure gradient" unit="W/s^3" /> … … 733 771 --> 734 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 735 786 <field_group id="mooring" > 736 787 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/namelist_pisces_ref
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/namelist_ref
- Property svn:mime-type set to text/x-fortran
r7813 r8841 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) … … 1125 1124 / 1126 1125 !----------------------------------------------------------------------- 1127 &namnc4 ! netcdf4 chunking and compression settings ("key_netcdf4")1128 !-----------------------------------------------------------------------1129 ln_diatmb = .false. ! Choose Top Middle and Bottom output or not1130 /1131 !-----------------------------------------------------------------------1132 &nam_dia25h ! 25h Mean Output (default F)1133 !-----------------------------------------------------------------------1134 ln_dia25h = .false. ! Choose 25h mean output or not1135 /1136 !-----------------------------------------------------------------------1137 1126 &namnc4 ! netcdf4 chunking and compression settings ("key_netcdf4") 1138 1127 !----------------------------------------------------------------------- -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/namelist_top_ref
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/SHARED/namelist_trc_ref
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7715 r8841 5 5 &namusr_def ! ISOMIP user defined namelist 6 6 !----------------------------------------------------------------------- 7 ln_zco = .false. ! z-coordinate8 7 ln_zps = .true. ! z-partial-step coordinate 9 ln_sco = .false. ! s-coordinate10 8 rn_lam0 = 0.0 ! longitude of first raw and column T-point (jphgr_msh = 1) 11 9 rn_phi0 = -80.0 ! latitude of first raw and column T-point (jphgr_msh = 1) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_hgr.F90
r7715 r8841 94 94 pphiv(ji,jj) = rn_phi0 + rn_e2deg * zvj 95 95 pphif(ji,jj) = rn_phi0 + rn_e2deg * zfj 96 ! !== Horizontal scale factors ==! (in meters) 96 97 ! e1 97 98 pe1t(ji,jj) = ra * rad * COS( rad * pphit(ji,jj) ) * rn_e1deg … … 106 107 END DO 107 108 END DO 109 ! ! NO reduction of grid size in some straits 110 ke1e2u_v = 0 ! ==>> u_ & v_surfaces will be computed in dom_ghr routine 111 pe1e2u(:,:) = 0._wp ! CAUTION: set to zero to avoid error with some compilers that 112 pe1e2v(:,:) = 0._wp ! require an initialization of INTENT(out) arguments 108 113 ! 109 kff = 0 ! Coriolis parameter calculated on the sphere 114 ! 115 ! !== Coriolis parameter ==! 116 kff = 0 ! Coriolis parameter calculated on the sphere 117 ! 118 ! 119 pff_f(:,:) = 0._wp ! CAUTION: set to zero to avoid error with some compilers that 120 pff_t(:,:) = 0._wp ! require an initialization of INTENT(out) arguments 110 121 ! 111 122 IF( nn_timing == 1 ) CALL timing_stop('usr_def_hgr') -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_zgr.F90
r7715 r8841 80 80 ! type of vertical coordinate 81 81 ! --------------------------- 82 ! already set in usrdef_nam.F90 by reading the namusr_def namelist except for ISF 83 ld_isfcav = .TRUE. 82 ! set in usrdef_nam.F90 by reading the namusr_def namelist except for ISF 83 ln_zco = .FALSE. ! z-partial-step coordinate 84 ln_zps = .TRUE. ! z-partial-step coordinate 85 ln_sco = .FALSE. ! s-coordinate 86 ld_isfcav = .TRUE. ! ISF Ice Shelves Flag 84 87 ! 85 88 ! -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/file_def_nemo-opa.xml
r7635 r8841 8 8 --> 9 9 10 <file_definition type="multiple_file" name="@expname@ _@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">10 <file_definition type="multiple_file" name="@expname@" sync_freq="10d" min_digits="4"> 11 11 <file_group id="30mi" output_freq="30mi" output_level="10" enabled=".TRUE." > <!-- 5d files --> 12 12 -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_flux_cen2_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_eenH_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_een_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_ene_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT2_vect_ens_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_flux_cen2_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_eenH_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_een_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_ene_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_FCT4_vect_ens_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/file_def_nemo-opa.xml
r7635 r8841 8 8 --> 9 9 10 <file_definition type="multiple_file" name="@expname@ _@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">10 <file_definition type="multiple_file" name="@expname@" sync_freq="10d" min_digits="4"> 11 11 <file_group id="30mi" output_freq="30mi" output_level="10" enabled=".TRUE." > <!-- 5d files --> 12 12 -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7624 r8841 78 78 &nameos ! ocean physical parameters 79 79 !----------------------------------------------------------------------- 80 ln_teos10 = .false. ! = Use TEOS-10 equation of state 81 ln_eos80 = .true. ! = Use EOS80 equation of state 80 ln_seos = .true. ! = Use simplified equation of state (S-EOS) 82 81 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 83 rn_a0 = 0.2 ! thermal expension coefficient ( nn_eos= 1)84 rn_b0 = 0. ! saline expension coefficient ( nn_eos= 1)82 rn_a0 = 0.2 ! thermal expension coefficient (for simplified equation of state) 83 rn_b0 = 0. ! saline expension coefficient (for simplified equation of state) 85 84 rn_lambda1 = 0. ! cabbeling coeff in T^2 (=0 for linear eos) 86 85 rn_lambda2 = 0. ! cabbeling coeff in S^2 (=0 for linear eos) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_sco_FCT2_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
r7640 r8841 78 78 &nameos ! ocean physical parameters 79 79 !----------------------------------------------------------------------- 80 ln_teos10 = .false. ! = Use TEOS-10 equation of state 81 ln_eos80 = .true. ! = Use EOS80 equation of state 80 ln_seos = .true. ! = Use simplified equation of state (S-EOS) 82 81 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 83 rn_a0 = 0.2 ! thermal expension coefficient ( nn_eos= 1)84 rn_b0 = 0. ! saline expension coefficient ( nn_eos= 1)82 rn_a0 = 0.2 ! thermal expension coefficient (for simplified equation of state) 83 rn_b0 = 0. ! saline expension coefficient (for simplified equation of state) 85 84 rn_lambda1 = 0. ! cabbeling coeff in T^2 (=0 for linear eos) 86 85 rn_lambda2 = 0. ! cabbeling coeff in S^2 (=0 for linear eos) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT2_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
r7640 r8841 78 78 &nameos ! ocean physical parameters 79 79 !----------------------------------------------------------------------- 80 ln_teos10 = .false. ! = Use TEOS-10 equation of state 81 ln_eos80 = .true. ! = Use EOS80 equation of state 80 ln_seos = .true. ! = Use simplified equation of state (S-EOS) 82 81 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 83 rn_a0 = 0.2 ! thermal expension coefficient ( nn_eos= 1)84 rn_b0 = 0. ! saline expension coefficient ( nn_eos= 1)82 rn_a0 = 0.2 ! thermal expension coefficient (for simplified equation of state) 83 rn_b0 = 0. ! saline expension coefficient (for simplified equation of state) 85 84 rn_lambda1 = 0. ! cabbeling coeff in T^2 (=0 for linear eos) 86 85 rn_lambda2 = 0. ! cabbeling coeff in S^2 (=0 for linear eos) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT4_flux_ubs_cfg
- Property svn:mime-type set to text/x-fortran
r7640 r8841 78 78 &nameos ! ocean physical parameters 79 79 !----------------------------------------------------------------------- 80 ln_teos10 = .false. ! = Use TEOS-10 equation of state 81 ln_eos80 = .true. ! = Use EOS80 equation of state 80 ln_seos = .true. ! = Use simplified equation of state (S-EOS) 82 81 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 83 rn_a0 = 0.2 ! thermal expension coefficient ( nn_eos= 1)84 rn_b0 = 0. ! saline expension coefficient ( nn_eos= 1)82 rn_a0 = 0.2 ! thermal expension coefficient (for simplified equation of state) 83 rn_b0 = 0. ! saline expension coefficient (for simplified equation of state) 85 84 rn_lambda1 = 0. ! cabbeling coeff in T^2 (=0 for linear eos) 86 85 rn_lambda2 = 0. ! cabbeling coeff in S^2 (=0 for linear eos) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/EXP00/namelist_zps_FCT4_vect_een_cfg
- Property svn:mime-type set to text/x-fortran
r7640 r8841 78 78 &nameos ! ocean physical parameters 79 79 !----------------------------------------------------------------------- 80 ln_teos10 = .false. ! = Use TEOS-10 equation of state 81 ln_eos80 = .true. ! = Use EOS80 equation of state 80 ln_seos = .true. ! = Use simplified equation of state (S-EOS) 82 81 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 83 rn_a0 = 0.2 ! thermal expension coefficient ( nn_eos= 1)84 rn_b0 = 0. ! saline expension coefficient ( nn_eos= 1)82 rn_a0 = 0.2 ! thermal expension coefficient (for simplified equation of state) 83 rn_b0 = 0. ! saline expension coefficient (for simplified equation of state) 85 84 rn_lambda1 = 0. ! cabbeling coeff in T^2 (=0 for linear eos) 86 85 rn_lambda2 = 0. ! cabbeling coeff in S^2 (=0 for linear eos) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
r7822 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_ice_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/TEST_CASES/WAD/EXP00/namelist_cfg
- Property svn:mime-type set to text/x-fortran
-
branches/UKMO/ROMS_WAD_7832/NEMOGCM/CONFIG/makenemo
r7756 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
r7813 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r7761 r8841 548 548 549 549 ! Find the factors of n. 550 IF( kn == 1 ) GOTO 20 551 552 ! nu holds the unfactorised part of the number. 553 ! knfax holds the number of factors found. 554 ! l points to the allowed factor list. 555 ! ifac holds the current factor. 556 557 inu = kn 558 knfax = 0 559 560 DO jl = ntest, 1, -1 561 ! 562 ifac = ilfax(jl) 563 IF( ifac > inu ) CYCLE 564 565 ! Test whether the factor will divide. 566 567 IF( MOD(inu,ifac) == 0 ) THEN 550 IF( kn .NE. 1 ) THEN 551 552 ! nu holds the unfactorised part of the number. 553 ! knfax holds the number of factors found. 554 ! l points to the allowed factor list. 555 ! ifac holds the current factor. 556 557 inu = kn 558 knfax = 0 559 560 DO jl = ntest, 1, -1 568 561 ! 569 knfax = knfax + 1 ! Add the factor to the list 570 IF( knfax > kmaxfax ) THEN 571 kerr = 6 572 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 573 return 562 ifac = ilfax(jl) 563 IF( ifac > inu ) CYCLE 564 565 ! Test whether the factor will divide. 566 567 IF( MOD(inu,ifac) == 0 ) THEN 568 ! 569 knfax = knfax + 1 ! Add the factor to the list 570 IF( knfax > kmaxfax ) THEN 571 kerr = 6 572 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 573 return 574 ENDIF 575 kfax(knfax) = ifac 576 ! Store the other factor that goes with this one 577 knfax = knfax + 1 578 kfax(knfax) = inu / ifac 579 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 574 580 ENDIF 575 kfax(knfax) = ifac 576 ! Store the other factor that goes with this one 577 knfax = knfax + 1 578 kfax(knfax) = inu / ifac 579 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 580 ENDIF 581 ! 582 END DO 583 584 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 581 ! 582 END DO 583 584 ENDIF 585 585 ! 586 586 END SUBROUTINE factorise -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r6140 r8841 86 86 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ssh_bkg, ssh_bkginc ! Background sea surface height and its increment 87 87 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: seaice_bkginc ! Increment to the background sea ice conc 88 #if defined key_cice && defined key_asminc 89 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ndaice_da ! ice increment tendency into CICE 90 #endif 88 91 89 92 !! * Substitutions … … 339 342 ALLOCATE( ssh_iau(jpi,jpj) ) 340 343 #endif 344 #if defined key_cice && defined key_asminc 345 ALLOCATE( ndaice_da(jpi,jpj) ) 346 #endif 341 347 t_bkginc(:,:,:) = 0.0 342 348 s_bkginc(:,:,:) = 0.0 … … 347 353 #if defined key_asminc 348 354 ssh_iau(:,:) = 0.0 355 #endif 356 #if defined key_cice && defined key_asminc 357 ndaice_da(:,:) = 0.0 349 358 #endif 350 359 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN … … 759 768 ENDIF 760 769 ! 770 #if defined key_asminc 771 ELSE IF( kt == nitiaufin_r+1 ) THEN 772 ! 773 ssh_iau(:,:) = 0._wp 774 ! 775 #endif 761 776 ENDIF 762 777 ! !----------------------------------------- -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r7646 r8841 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 … … 443 445 TYPE(OBC_DATA), POINTER :: dta ! short cut 444 446 #if defined key_lim3 445 INTEGER, DIMENSION(3) :: zdimsz ! number of elements in each of the 4 dimensions (i.e. i,j,t,ice-cat) for an array446 447 INTEGER :: zndims ! number of dimensions in an array (i.e. 3 = wo ice cat; 4 = w ice cat) 447 448 INTEGER :: inum,id1 ! local integer … … 675 676 ! Test for types of ice input (lim2 or lim3) 676 677 ! Build file name to find dimensions 677 clname=TRIM( bn_a_i%clname)678 clname=TRIM( cn_dir )//TRIM(bn_a_i%clname) 678 679 IF( .NOT. bn_a_i%ln_clim ) THEN 679 WRITE(clname, '(a,"_y",i4.4)' ) TRIM( bn_a_i%clname ), nyear ! add year680 IF( bn_a_i%cltype /= 'yearly' ) WRITE(clname, '(a,"m" ,i2.2)' ) TRIM( clname 680 WRITE(clname, '(a,"_y",i4.4)' ) TRIM( clname ), nyear ! add year 681 IF( bn_a_i%cltype /= 'yearly' ) WRITE(clname, '(a,"m" ,i2.2)' ) TRIM( clname ), nmonth ! add month 681 682 ELSE 682 IF( bn_a_i%cltype /= 'yearly' ) WRITE(clname, '(a,"_m",i2.2)' ) TRIM( bn_a_i%clname ), nmonth ! add month683 IF( bn_a_i%cltype /= 'yearly' ) WRITE(clname, '(a,"_m",i2.2)' ) TRIM( clname ), nmonth ! add month 683 684 ENDIF 684 685 IF( bn_a_i%cltype == 'daily' .OR. bn_a_i%cltype(1:4) == 'week' ) & 685 & WRITE(clname, '(a,"d" ,i2.2)' ) TRIM( clname 686 & WRITE(clname, '(a,"d" ,i2.2)' ) TRIM( clname ), nday ! add day 686 687 ! 687 688 CALL iom_open ( clname, inum ) 688 id1 = iom_varid( inum, bn_a_i%clvar, k dimsz=zdimsz, kndims=zndims, ldstop = .FALSE. )689 id1 = iom_varid( inum, bn_a_i%clvar, kndims=zndims, ldstop = .FALSE. ) 689 690 CALL iom_close ( inum ) 690 691 -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
r7753 r8841 212 212 ! Exclude points where rn2 is negative as convection kicks in here and 213 213 ! work is not being done against stratification 214 CALL wrk_alloc( jpi, jpj, zpe ) 215 zpe(:,:) = 0._wp 216 IF( lk_zdfddm ) THEN 217 DO ji=1,jpi 218 DO jj=1,jpj 219 DO jk=1,jpk 220 zrw = ( gdepw_n(ji,jj,jk ) - gdept_n(ji,jj,jk) ) & 221 & / ( gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk) ) 222 ! 223 zaw = rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem)* zrw 224 zbw = rab_n(ji,jj,jk,jp_sal) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_sal)* zrw 225 ! 226 zpe(ji, jj) = zpe(ji, jj) - MIN(0._wp, rn2(ji,jj,jk)) * & 227 & grav * (avt(ji,jj,jk) * zaw * (tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) & 228 & - fsavs(ji,jj,jk) * zbw * (tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) ) ) 229 230 ENDDO 231 ENDDO 232 ENDDO 214 CALL wrk_alloc( jpi, jpj, zpe ) 215 zpe(:,:) = 0._wp 216 IF( lk_zdfddm ) THEN 217 DO jk = 2, jpk 218 DO jj = 1, jpj 219 DO ji = 1, jpi 220 IF( rn2(ji,jj,jk) > 0._wp ) THEN 221 zrw = ( gdepw_n(ji,jj,jk ) - gdept_n(ji,jj,jk) ) & 222 & / ( gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk) ) 223 ! 224 zaw = rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem)* zrw 225 zbw = rab_n(ji,jj,jk,jp_sal) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_sal)* zrw 226 ! 227 zpe(ji, jj) = zpe(ji, jj) & 228 & - grav * ( avt(ji,jj,jk) * zaw * (tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) & 229 & - fsavs(ji,jj,jk) * zbw * (tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) ) ) 230 ENDIF 231 END DO 232 END DO 233 END DO 233 234 ELSE 234 DO ji = 1, jpi235 DO jj = 1, jpj236 DO jk = 1, jpk237 238 ENDDO239 ENDDO240 ENDDO241 242 243 244 235 DO jk = 1, jpk 236 DO ji = 1, jpi 237 DO jj = 1, jpj 238 zpe(ji,jj) = zpe(ji,jj) + avt(ji, jj, jk) * MIN(0._wp,rn2(ji, jj, jk)) * rau0 * e3w_n(ji, jj, jk) 239 END DO 240 END DO 241 END DO 242 ENDIF 243 CALL lbc_lnk( zpe, 'T', 1._wp) 244 CALL iom_put( 'tnpeo', zpe ) 245 CALL wrk_dealloc( jpi, jpj, zpe ) 245 246 ENDIF 246 247 ! -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
r7646 r8841 240 240 !debug this section computing ? 241 241 lldebug=.FALSE. 242 IF( (jsec==nn_secdebug .OR. nn_secdebug==-1) .AND. kt==nit000+nn_dct-1 .AND. lwp) lldebug=.TRUE.242 IF( (jsec==nn_secdebug .OR. nn_secdebug==-1) .AND. kt==nit000+nn_dct-1 ) lldebug=.TRUE. 243 243 244 244 !Compute transport through section … … 249 249 IF( MOD(kt,nn_dctwri)==0 )THEN 250 250 251 IF( lwp .AND.kt==nit000+nn_dctwri-1 )WRITE(numout,*)" diadct: average transports and write at kt = ",kt251 IF( kt==nit000+nn_dctwri-1 )WRITE(numout,*)" diadct: average transports and write at kt = ",kt 252 252 253 253 !! divide arrays by nn_dctwri/nn_dct to obtain average … … 335 335 DO jsec=1,nb_sec_max !loop on the nb_sec sections 336 336 337 IF ( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 )) &337 IF ( jsec==nn_secdebug .OR. nn_secdebug==-1 ) & 338 338 & WRITE(numout,*)'debuging for section number: ',jsec 339 339 … … 355 355 IF( jsec .NE. isec ) CALL ctl_stop( cltmp ) 356 356 357 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ))WRITE(numout,*)"isec ",isec357 IF( jsec==nn_secdebug .OR. nn_secdebug==-1 )WRITE(numout,*)"isec ",isec 358 358 359 359 READ(numdct_in)secs(jsec)%name … … 374 374 !----- 375 375 376 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ))THEN376 IF( jsec==nn_secdebug .OR. nn_secdebug==-1 )THEN 377 377 378 378 WRITE(clformat,'(a,i2,a)') '(A40,', nb_class_max,'(f8.3,1X))' … … 407 407 !debug 408 408 !----- 409 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ))THEN409 IF( jsec==nn_secdebug .OR. nn_secdebug==-1 )THEN 410 410 WRITE(numout,*)" List of points in global domain:" 411 411 DO jpt=1,iptglo … … 441 441 !debug 442 442 !----- 443 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ))THEN443 IF( jsec==nn_secdebug .OR. nn_secdebug==-1 )THEN 444 444 WRITE(numout,*)" List of points selected by the proc:" 445 445 DO jpt = 1,iptloc … … 459 459 !remove redundant points between processors 460 460 !------------------------------------------ 461 lldebug = .FALSE. ; IF ( (jsec==nn_secdebug .OR. nn_secdebug==-1) .AND. lwp) lldebug = .TRUE.461 lldebug = .FALSE. ; IF ( jsec==nn_secdebug .OR. nn_secdebug==-1 ) lldebug = .TRUE. 462 462 IF( iptloc .NE. 0 )THEN 463 463 CALL removepoints(secs(jsec),'I','top_list',lldebug) … … 475 475 !debug 476 476 !----- 477 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ))THEN477 IF( jsec==nn_secdebug .OR. nn_secdebug==-1 )THEN 478 478 WRITE(numout,*)" List of points after removepoints:" 479 479 iptloc = secs(jsec)%nb_point … … 487 487 488 488 ELSE ! iptglo = 0 489 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ))&489 IF( jsec==nn_secdebug .OR. nn_secdebug==-1 )& 490 490 WRITE(numout,*)' No points for this section.' 491 491 ENDIF … … 695 695 ! LOOP ON THE LEVEL | 696 696 !---------------------------| 697 DO jk = 1, mb athy(k%I,k%J) !Sum of the transport on the vertical697 DO jk = 1, mbkt(k%I,k%J) !Sum of the transport on the vertical 698 698 ! ! compute temperature, salinity, insitu & potential density, ssh and depth at U/V point 699 699 SELECT CASE( sec%direction(jseg) ) … … 874 874 !---------------------------| 875 875 !Sum of the transport on the vertical 876 DO jk=1,mb athy(k%I,k%J)876 DO jk=1,mbkt(k%I,k%J) 877 877 878 878 ! compute temperature, salinity, insitu & potential density, ssh and depth at U/V point -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
r7646 r8841 124 124 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: e1e2f , r1_e1e2f !: associated metrics at f-point 125 125 ! 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: ff_f, ff_t !: coriolis factor at f- and t-point[1/s]126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE , DIMENSION(:,:) :: ff_f, ff_t !: Coriolis factor at f- & t-points [1/s] 127 127 !!---------------------------------------------------------------------- 128 128 !! vertical coordinate and scale factors -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
r7753 r8841 181 181 ELSE ! total vorticity trend 182 182 CALL vor_een( kt, ntot, un , vn , ua, va ) ! total vorticity trend 183 IF( ln_stcor ) CALL vor_e ne( kt, ncor, usd, vsd, ua, va ) ! add the Stokes-Coriolis trend183 IF( ln_stcor ) CALL vor_een( kt, ncor, usd, vsd, ua, va ) ! add the Stokes-Coriolis trend 184 184 ENDIF 185 185 ! -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/ICB/icbtrj.F90
r5215 r8841 18 18 USE lib_mpp ! NEMO MPI library, lk_mpp in particular 19 19 USE in_out_manager ! NEMO IO, numout in particular 20 USE ioipsl, ONLY : ju2ymds ! for calendar 20 21 USE netcdf 21 22 ! … … 60 61 ! 61 62 INTEGER :: iret 63 INTEGER :: iyear, imonth, iday 64 REAL(wp) :: zfjulday, zsec 62 65 CHARACTER(len=80) :: cl_filename 63 66 TYPE(iceberg), POINTER :: this 64 67 TYPE(point) , POINTER :: pt 65 !!---------------------------------------------------------------------- 66 67 IF( lk_mpp ) THEN ; WRITE(cl_filename,'("trajectory_icebergs_",I6.6,"_",I4.4,".nc")') ktend, narea-1 68 ELSE ; WRITE(cl_filename,'("trajectory_icebergs_",I6.6 ,".nc")') ktend 68 CHARACTER(LEN=20) :: cldate_ini, cldate_end 69 !!---------------------------------------------------------------------- 70 71 ! compute initial time step date 72 CALL ju2ymds( fjulday, iyear, imonth, iday, zsec ) 73 WRITE(cldate_ini, '(i4.4,2i2.2)') iyear, imonth, iday 74 75 ! compute end time step date 76 zfjulday = fjulday + rdt / rday * REAL( nitend - nit000 + 1 , wp) 77 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 78 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 79 WRITE(cldate_end, '(i4.4,2i2.2)') iyear, imonth, iday 80 81 ! define trajectory output name 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)) 69 86 ENDIF 70 87 IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, icb_trj_init: creating ',TRIM(cl_filename) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r7768 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
r6493 r8841 235 235 236 236 !! Look if more arrays to process 237 IF(PRESENT (psgnB) )CALL lbc_lnk( pt2d A, cd_typeA, psgnA )237 IF(PRESENT (psgnB) )CALL lbc_lnk( pt2dB, cd_typeB, psgnB ) 238 238 IF(PRESENT (psgnC) )CALL lbc_lnk( pt2dC, cd_typeC, psgnC ) 239 239 IF(PRESENT (psgnD) )CALL lbc_lnk( pt2dD, cd_typeD, psgnD ) … … 490 490 491 491 !! Look if more arrays to process 492 IF(PRESENT (psgnB) )CALL lbc_lnk( pt2d A, cd_typeA, psgnA )492 IF(PRESENT (psgnB) )CALL lbc_lnk( pt2dB, cd_typeB, psgnB ) 493 493 IF(PRESENT (psgnC) )CALL lbc_lnk( pt2dC, cd_typeC, psgnC ) 494 494 IF(PRESENT (psgnD) )CALL lbc_lnk( pt2dD, cd_typeD, psgnD ) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
r7646 r8841 195 195 WRITE(numout,*) ' multiexchg: nldj, nlej, njmpp =', nldj, nlej, njmpp 196 196 ENDIF 197 198 CALL oasis_def_partition ( id_part, paral, nerror )197 198 CALL oasis_def_partition ( id_part, paral, nerror, jpiglo*jpjglo ) 199 199 ! 200 200 ! ... Announce send variables. … … 514 514 END SUBROUTINE oasis_get_localcomm 515 515 516 SUBROUTINE oasis_def_partition(k1,k2,k3 )516 SUBROUTINE oasis_def_partition(k1,k2,k3,k4) 517 517 INTEGER , INTENT( out) :: k1,k3 518 518 INTEGER , INTENT(in ) :: k2(5) 519 k1 = k2(1) ; k3 = k2(5) 519 INTEGER , INTENT(in ) :: k4 520 k1 = k2(1) ; k3 = k2(5)+k4 520 521 WRITE(numout,*) 'oasis_def_partition: Error you sould not be there...' 521 522 END SUBROUTINE oasis_def_partition -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
r6140 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r7815 r8841 1566 1566 !! qsr_tot = pfrld * qsr_oce + ( 1 - pfrld ) * qsr_ice => provided 1567 1567 !! 1568 !! emp_tot = emp_oce + emp_ice => calving is provided and added to emp_tot (and emp_oce) 1569 !! river runoff (rnf) is provided but not included here 1570 !! 1568 !! emp_tot = emp_oce + emp_ice => calving is provided and added to emp_tot (and emp_oce). 1569 !! runoff (which includes rivers+icebergs) and iceshelf 1570 !! are provided but not included in emp here. Only runoff will 1571 !! be included in emp in other parts of NEMO code 1571 1572 !! ** Action : update at each nf_ice time step: 1572 1573 !! qns_tot, qsr_tot non-solar and solar total heat fluxes … … 1584 1585 ! 1585 1586 INTEGER :: jl ! dummy loop index 1586 REAL(wp), POINTER, DIMENSION(:,: ) :: zcptn, z tmp, zcptrain, zcptsnw, zicefr, zmsk, zsnw1587 REAL(wp), POINTER, DIMENSION(:,: ) :: zcptn, zcptrain, zcptsnw, zicefr, zmsk, zsnw 1587 1588 REAL(wp), POINTER, DIMENSION(:,: ) :: zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice 1588 1589 REAL(wp), POINTER, DIMENSION(:,: ) :: zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice … … 1592 1593 IF( nn_timing == 1 ) CALL timing_start('sbc_cpl_ice_flx') 1593 1594 ! 1594 CALL wrk_alloc( jpi,jpj, zcptn, z tmp, zcptrain, zcptsnw, zicefr, zmsk, zsnw )1595 CALL wrk_alloc( jpi,jpj, zcptn, zcptrain, zcptsnw, zicefr, zmsk, zsnw ) 1595 1596 CALL wrk_alloc( jpi,jpj, zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice ) 1596 1597 CALL wrk_alloc( jpi,jpj, zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice ) … … 1615 1616 zemp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - ztprecip(:,:) 1616 1617 zemp_ice(:,:) = ( frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) ) * zicefr(:,:) 1617 IF( iom_use('precip') ) &1618 & CALL iom_put( 'precip' , frcv(jpr_rain)%z3(:,:,1) + frcv(jpr_snow)%z3(:,:,1) ) ! total precipitation1619 IF( iom_use('rain') ) &1620 & CALL iom_put( 'rain' , frcv(jpr_rain)%z3(:,:,1) ) ! liquid precipitation1621 IF( iom_use('rain_ao_cea') ) &1622 & CALL iom_put( 'rain_ao_cea' , frcv(jpr_rain)%z3(:,:,1)* p_frld(:,:) * tmask(:,:,1) ) ! liquid precipitation1623 IF( iom_use('hflx_rain_cea') ) &1624 CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) * tmask(:,:,1)) ! heat flux from liq. precip.1625 IF( iom_use('hflx_prec_cea') ) &1626 CALL iom_put( 'hflx_prec_cea', ztprecip * zcptn(:,:) * tmask(:,:,1) * p_frld(:,:) ) ! heat content flux from all precip (cell avg)1627 IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) &1628 ztmp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:)1629 IF( iom_use('evap_ao_cea' ) ) &1630 CALL iom_put( 'evap_ao_cea' , ztmp * tmask(:,:,1) ) ! ice-free oce evap (cell average)1631 IF( iom_use('hflx_evap_cea') ) &1632 CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * zcptn(:,:) * tmask(:,:,1) ) ! heat flux from from evap (cell average)1633 1618 CASE( 'oce and ice' ) ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp 1634 1619 zemp_tot(:,:) = p_frld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + zicefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1) … … 1639 1624 1640 1625 #if defined key_lim3 1641 ! zsnw = snow fraction over ice after wind blowing 1626 ! zsnw = snow fraction over ice after wind blowing (=zicefr if no blowing) 1642 1627 zsnw(:,:) = 0._wp ; CALL lim_thd_snwblow( p_frld, zsnw ) 1643 1628 … … 1652 1637 zevap_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) 1653 1638 ! since the sensitivity of evap to temperature (devap/dT) is not prescribed by the atmosphere, we set it to 0 1654 ! therefore, sublimation is not redistributed over the ice categories in caseno subgrid scale fluxes are provided by atm.1639 ! therefore, sublimation is not redistributed over the ice categories when no subgrid scale fluxes are provided by atm. 1655 1640 zdevap_ice(:,:) = 0._wp 1656 1641 1657 ! --- runoffs (included in emp later on)--- !1658 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1)1659 1660 ! --- calving (put in emp_tot and emp_oce) --- !1661 IF( srcv(jpr_cal)%laction ) THEN 1642 ! --- Continental fluxes --- ! 1643 IF( srcv(jpr_rnf)%laction ) THEN ! runoffs (included in emp later on) 1644 rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1645 ENDIF 1646 IF( srcv(jpr_cal)%laction ) THEN ! calving (put in emp_tot and emp_oce) 1662 1647 zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) 1663 1648 zemp_oce(:,:) = zemp_oce(:,:) - frcv(jpr_cal)%z3(:,:,1) 1664 CALL iom_put( 'calving_cea', frcv(jpr_cal)%z3(:,:,1) ) 1665 ENDIF 1666 1667 IF( srcv(jpr_icb)%laction ) THEN 1649 ENDIF 1650 IF( srcv(jpr_icb)%laction ) THEN ! iceberg added to runoffs 1668 1651 fwficb(:,:) = frcv(jpr_icb)%z3(:,:,1) 1669 rnf(:,:) = rnf(:,:) + fwficb(:,:) ! iceberg added to runoffs 1670 CALL iom_put( 'iceberg_cea', frcv(jpr_icb)%z3(:,:,1) ) 1671 ENDIF 1672 IF( srcv(jpr_isf)%laction ) THEN 1673 fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) 1674 CALL iom_put( 'iceshelf_cea', frcv(jpr_isf)%z3(:,:,1) ) 1675 ENDIF 1676 1652 rnf(:,:) = rnf(:,:) + fwficb(:,:) 1653 ENDIF 1654 IF( srcv(jpr_isf)%laction ) THEN ! iceshelf (fwfisf <0 mean melting) 1655 fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1) 1656 ENDIF 1677 1657 1678 1658 IF( ln_mixcpl ) THEN … … 1698 1678 ENDIF 1699 1679 1700 IF( iom_use('subl_ai_cea') ) CALL iom_put( 'subl_ai_cea', zevap_ice(:,:) * zicefr(:,:) ) ! Sublimation over sea-ice (cell average)1701 CALL iom_put( 'snowpre' , sprecip(:,:) ) ! Snow1702 IF( iom_use('snow_ao_cea') ) CALL iom_put( 'snow_ao_cea', sprecip(:,:) * ( 1._wp - zsnw(:,:) ) ) ! Snow over ice-free ocean (cell average)1703 IF( iom_use('snow_ai_cea') ) CALL iom_put( 'snow_ai_cea', sprecip(:,:) * zsnw(:,:) ) ! Snow over sea-ice (cell average)1704 1680 #else 1705 ! runoffs and calving (put in emp_tot) 1706 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1707 IF( iom_use('hflx_rnf_cea') ) & 1708 CALL iom_put( 'hflx_rnf_cea' , rnf(:,:) * zcptn(:,:) ) 1709 IF( srcv(jpr_cal)%laction ) THEN 1681 zsnw(:,:) = zicefr(:,:) 1682 ! --- Continental fluxes --- ! 1683 IF( srcv(jpr_rnf)%laction ) THEN ! runoffs (included in emp later on) 1684 rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1685 ENDIF 1686 IF( srcv(jpr_cal)%laction ) THEN ! calving (put in emp_tot) 1710 1687 zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) 1711 CALL iom_put( 'calving_cea', frcv(jpr_cal)%z3(:,:,1) ) 1712 ENDIF 1713 1714 1715 IF( srcv(jpr_icb)%laction ) THEN 1688 ENDIF 1689 IF( srcv(jpr_icb)%laction ) THEN ! iceberg added to runoffs 1716 1690 fwficb(:,:) = frcv(jpr_icb)%z3(:,:,1) 1717 rnf(:,:) = rnf(:,:) + fwficb(:,:) ! iceberg added to runoffs 1718 CALL iom_put( 'iceberg_cea', frcv(jpr_icb)%z3(:,:,1) ) 1719 ENDIF 1720 IF( srcv(jpr_isf)%laction ) THEN 1721 fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) 1722 CALL iom_put( 'iceshelf_cea', frcv(jpr_isf)%z3(:,:,1) ) 1723 ENDIF 1724 1691 rnf(:,:) = rnf(:,:) + fwficb(:,:) 1692 ENDIF 1693 IF( srcv(jpr_isf)%laction ) THEN ! iceshelf (fwfisf <0 mean melting) 1694 fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1) 1695 ENDIF 1725 1696 1726 1697 IF( ln_mixcpl ) THEN … … 1736 1707 ENDIF 1737 1708 1738 IF( iom_use('subl_ai_cea') ) CALL iom_put( 'subl_ai_cea', frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) ! Sublimation over sea-ice (cell average)1739 CALL iom_put( 'snowpre' , sprecip(:,:) ) ! Snow1740 IF( iom_use('snow_ao_cea') ) CALL iom_put( 'snow_ao_cea', sprecip(:,:) * p_frld(:,:) ) ! Snow over ice-free ocean (cell average)1741 IF( iom_use('snow_ai_cea') ) CALL iom_put( 'snow_ai_cea', sprecip(:,:) * zicefr(:,:) ) ! Snow over sea-ice (cell average)1742 1709 #endif 1743 1710 ! outputs 1711 !! IF( srcv(jpr_rnf)%laction ) CALL iom_put( 'runoffs' , rnf(:,:) * tmask(:,:,1) ) ! runoff 1712 !! IF( srcv(jpr_isf)%laction ) CALL iom_put( 'iceshelf_cea', -fwfisf(:,:) * tmask(:,:,1) ) ! iceshelf 1713 IF( srcv(jpr_cal)%laction ) CALL iom_put( 'calving_cea' , frcv(jpr_cal)%z3(:,:,1) * tmask(:,:,1) ) ! calving 1714 IF( srcv(jpr_icb)%laction ) CALL iom_put( 'iceberg_cea' , frcv(jpr_icb)%z3(:,:,1) * tmask(:,:,1) ) ! icebergs 1715 IF( iom_use('snowpre') ) CALL iom_put( 'snowpre' , sprecip(:,:) ) ! Snow 1716 IF( iom_use('precip') ) CALL iom_put( 'precip' , tprecip(:,:) ) ! total precipitation 1717 IF( iom_use('rain') ) CALL iom_put( 'rain' , tprecip(:,:) - sprecip(:,:) ) ! liquid precipitation 1718 IF( iom_use('snow_ao_cea') ) CALL iom_put( 'snow_ao_cea' , sprecip(:,:) * ( 1._wp - zsnw(:,:) ) ) ! Snow over ice-free ocean (cell average) 1719 IF( iom_use('snow_ai_cea') ) CALL iom_put( 'snow_ai_cea' , sprecip(:,:) * zsnw(:,:) ) ! Snow over sea-ice (cell average) 1720 IF( iom_use('subl_ai_cea') ) CALL iom_put( 'subl_ai_cea' , frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) * tmask(:,:,1) ) ! Sublimation over sea-ice (cell average) 1721 IF( iom_use('evap_ao_cea') ) CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1) & 1722 & - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) * tmask(:,:,1) ) ! ice-free oce evap (cell average) 1723 ! note: runoff output is done in sbcrnf (which includes icebergs too) and iceshelf output is done in sbcisf 1724 ! 1744 1725 ! ! ========================= ! 1745 1726 SELECT CASE( TRIM( sn_rcv_qns%cldes ) ) ! non solar heat fluxes ! (qns) … … 1777 1758 & + pist(:,:,1) * zicefr(:,:) ) ) 1778 1759 END SELECT 1779 !!gm1780 !! currently it is taken into account in leads budget but not in the zqns_tot, and thus not in1781 !! the flux that enter the ocean....1782 !! moreover 1 - it is not diagnose anywhere....1783 !! 2 - it is unclear for me whether this heat lost is taken into account in the atmosphere or not...1784 !!1785 !! similar job should be done for snow and precipitation temperature1786 1760 ! 1787 IF( srcv(jpr_cal)%laction ) THEN ! Iceberg melting 1788 zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) * lfus ! add the latent heat of iceberg melting 1789 ! we suppose it melts at 0deg, though it should be temp. of surrounding ocean 1790 IF( iom_use('hflx_cal_cea') ) CALL iom_put( 'hflx_cal_cea', - frcv(jpr_cal)%z3(:,:,1) * lfus ) ! heat flux from calving 1791 ENDIF 1792 1793 !!chris 1794 !! The heat content associated to the ice shelf in removed in the routine sbcisf.F90 1795 ! 1796 IF( srcv(jpr_icb)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_icb)%z3(:,:,1) * lfus ! remove heat content associated to iceberg melting 1797 1761 ! --- calving (removed from qns_tot) --- ! 1762 IF( srcv(jpr_cal)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) * lfus ! remove latent heat of calving 1763 ! we suppose it melts at 0deg, though it should be temp. of surrounding ocean 1764 ! --- iceberg (removed from qns_tot) --- ! 1765 IF( srcv(jpr_icb)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_icb)%z3(:,:,1) * lfus ! remove latent heat of iceberg melting 1798 1766 1799 1767 #if defined key_lim3 … … 1821 1789 zqemp_oce(:,:) = - zevap_oce(:,:) * zcptn (:,:) & ! evap 1822 1790 & + ( ztprecip(:,:) - zsprecip(:,:) ) * zcptrain(:,:) & ! liquid precip 1823 & + zsprecip(:,:) * ( 1._wp - zsnw ) * zqprec_ice(:,:) * r1_rhosn! solid precip over ocean + snow melting1824 zqemp_ice(:,:) = zsprecip(:,:) * zsnw * zqprec_ice(:,:) * r1_rhosn! solid precip over ice (qevap_ice=0 since atm. does not take it into account)1791 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptsnw (:,:) - lfus ) ! solid precip over ocean + snow melting 1792 zqemp_ice(:,:) = zsprecip(:,:) * zsnw * ( zcptsnw (:,:) - lfus ) ! solid precip over ice (qevap_ice=0 since atm. does not take it into account) 1825 1793 !! zqemp_ice(:,:) = - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) * zcptsnw (:,:) & ! ice evap 1826 1794 !! & + zsprecip(:,:) * zsnw * zqprec_ice(:,:) * r1_rhosn ! solid precip over ice … … 1850 1818 ENDIF 1851 1819 1852 ! some more outputs1853 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea', sprecip(:,:) * ( zcptn(:,:) - Lfus ) ) ! heat flux from snow (cell average)1854 IF( iom_use('hflx_rain_cea') ) CALL iom_put('hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * zcptn(:,:) ) ! heat flux from rain (cell average)1855 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea',sprecip(:,:) * ( zcptn(:,:) - Lfus ) * (1._wp - zsnw(:,:)) ) ! heat flux from snow (cell average)1856 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea',sprecip(:,:) * ( zcptn(:,:) - Lfus ) * zsnw(:,:) ) ! heat flux from snow (cell average)1857 1858 1820 #else 1821 zcptsnw (:,:) = zcptn(:,:) 1822 zcptrain(:,:) = zcptn(:,:) 1823 1859 1824 ! clem: this formulation is certainly wrong... but better than it was... 1860 zqns_tot(:,:) = zqns_tot(:,:) &! zqns_tot update over free ocean with:1861 & - ztmp(:,:) &! remove the latent heat flux of solid precip. melting1862 & - ( zemp_tot(:,:) &! remove the heat content of mass flux (assumed to be at SST)1825 zqns_tot(:,:) = zqns_tot(:,:) & ! zqns_tot update over free ocean with: 1826 & - ( p_frld(:,:) * zsprecip(:,:) * lfus ) & ! remove the latent heat flux of solid precip. melting 1827 & - ( zemp_tot(:,:) & ! remove the heat content of mass flux (assumed to be at SST) 1863 1828 & - zemp_ice(:,:) ) * zcptn(:,:) 1864 1829 … … 1873 1838 qns_ice(:,:,:) = zqns_ice(:,:,:) 1874 1839 ENDIF 1840 1875 1841 #endif 1876 1842 ! outputs 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) 1850 & ) * zcptn(:,:) * tmask(:,:,1) ) 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) 1855 ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. 1856 ! 1877 1857 ! ! ========================= ! 1878 1858 SELECT CASE( TRIM( sn_rcv_qsr%cldes ) ) ! solar heat fluxes ! (qsr) … … 1980 1960 fr2_i0(:,:) = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice ) 1981 1961 1982 CALL wrk_dealloc( jpi,jpj, zcptn, z tmp, zcptrain, zcptsnw, zicefr, zmsk, zsnw )1962 CALL wrk_dealloc( jpi,jpj, zcptn, zcptrain, zcptsnw, zicefr, zmsk, zsnw ) 1983 1963 CALL wrk_dealloc( jpi,jpj, zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice ) 1984 1964 CALL wrk_dealloc( jpi,jpj, zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice ) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r7816 r8841 168 168 169 169 ! output 170 CALL iom_put('qlatisf' , qisf) 171 CALL iom_put('fwfisf' , fwfisf) 170 IF( iom_use('iceshelf_cea') ) CALL iom_put( 'iceshelf_cea', -fwfisf(:,:) ) ! isf mass flux 171 IF( iom_use('hflx_isf_cea') ) CALL iom_put( 'hflx_isf_cea', risf_tsc(:,:,jp_tem) * rau0 * rcp ) ! isf sensible+latent heat (W/m2) 172 IF( iom_use('qlatisf' ) ) CALL iom_put( 'qlatisf' , qisf(:,:) ) ! isf latent heat 173 IF( iom_use('fwfisf' ) ) CALL iom_put( 'fwfisf' , fwfisf(:,:) ) ! isf mass flux (opposite sign) 172 174 173 175 ! Diagnostics … … 190 192 zqlatisf3d(ji,jj,jk) = zqlatisf3d(ji,jj,jk) + qisf (ji,jj) * r1_hisf_tbl(ji,jj) * e3t_n(ji,jj,jk) 191 193 END DO 192 zfwfisf3d (ji,jj,jk) = zfwfisf3d (ji,jj,jk) + fwfisf (ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * e3t_n(ji,jj,jk) 193 zqhcisf3d (ji,jj,jk) = zqhcisf3d (ji,jj,jk) + zqhcisf2d(ji,jj) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) * e3t_n(ji,jj,jk) 194 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) 195 200 END DO 196 201 END DO -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r7822 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r7753 r8841 138 138 IF( ln_rnf_sal ) rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 139 139 ! ! else use S=0 for runoffs (done one for all in the init) 140 CALL iom_put( "runoffs", rnf ) ! output runoffs arrays 140 IF( iom_use('runoffs') ) CALL iom_put( 'runoffs' , rnf(:,:) ) ! output runoff mass flux 141 IF( iom_use('hflx_rnf_cea') ) CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rau0 * rcp ) ! output runoff sensible heat (W/m2) 141 142 ENDIF 142 143 ! -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r7646 r8841 132 132 zda_v = EXP( -2.0_wp*zkh_v ) / ( 1.0_wp + 8.0_wp*zkh_v ) 133 133 ! 134 usd(ji,jj,jk) = zda_u * z k_u(ji,jj) * umask(ji,jj,jk)135 vsd(ji,jj,jk) = zda_v * z k_v(ji,jj) * vmask(ji,jj,jk)134 usd(ji,jj,jk) = zda_u * zu0_sd(ji,jj) * umask(ji,jj,jk) 135 vsd(ji,jj,jk) = zda_v * zv0_sd(ji,jj) * vmask(ji,jj,jk) 136 136 END DO 137 137 END DO -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
r7753 r8841 384 384 END IF 385 385 ENDIF 386 ! 387 bfrua(:,:) = - bfrcoef2d(:,:) 388 bfrva(:,:) = - bfrcoef2d(:,:) 389 ! 386 390 ! 387 391 CASE DEFAULT -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm_substitute.h90
r4152 r8841 5 5 !! with a constant or 1D or 2D or 3D array, using CPP macro. 6 6 !!---------------------------------------------------------------------- 7 #if defined key_zdfddm 7 #if defined key_zdfddm && ! defined key_offline 8 8 ! 'key_zdfddm' : avs: 3D array defined in zdfddm module 9 9 # define fsavs(i,j,k) avs(i,j,k) -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
r7646 r8841 183 183 zrhos = rhop(ji,jj,1) + zflageos * ( 1. - tmask(ji,jj,1) ) 184 184 zustar = SQRT( taum(ji,jj) / ( zrhos + rsmall ) ) 185 ekm_dep(ji,jj) = rn_ekmfc * zustar / ( ABS( ff (ji,jj) ) + rsmall )185 ekm_dep(ji,jj) = rn_ekmfc * zustar / ( ABS( ff_t(ji,jj) ) + rsmall ) 186 186 ekm_dep(ji,jj) = MAX(ekm_dep(ji,jj),rn_mldmin) ! Minimun allowed 187 187 ekm_dep(ji,jj) = MIN(ekm_dep(ji,jj),rn_mldmax) ! Maximum allowed -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
r7779 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r7761 r8841 206 206 ! 207 207 #if defined key_agrif 208 IF( .NOT. Agrif_Root() ) THEN 209 CALL Agrif_ParentGrid_To_ChildGrid() 210 IF( ln_diaobs ) CALL dia_obs_wri 211 IF( nn_timing == 1 ) CALL timing_finalize 212 CALL Agrif_ChildGrid_To_ParentGrid() 213 ENDIF 208 CALL Agrif_ParentGrid_To_ChildGrid() 209 IF( ln_diaobs ) CALL dia_obs_wri 210 IF( nn_timing == 1 ) CALL timing_finalize 211 CALL Agrif_ChildGrid_To_ParentGrid() 214 212 #endif 215 213 IF( nn_timing == 1 ) CALL timing_finalize … … 452 450 ! ! external forcing 453 451 !!gm to be added : creation and call of sbc_apr_init 452 !==> cbr: sbc_apr_init in sbcmod as sbc_rnf_init 454 453 CALL tide_init ! tidal harmonics 455 454 CALL sbc_init ! surface boundary conditions (including sea-ice) … … 751 750 ! 752 751 ! Find the factors of n. 753 IF( kn == 1 ) GOTO 20 754 755 ! nu holds the unfactorised part of the number. 756 ! knfax holds the number of factors found. 757 ! l points to the allowed factor list. 758 ! ifac holds the current factor. 759 ! 760 inu = kn 761 knfax = 0 762 ! 763 DO jl = ntest, 1, -1 752 IF( kn .NE. 1 ) THEN 753 754 ! nu holds the unfactorised part of the number. 755 ! knfax holds the number of factors found. 756 ! l points to the allowed factor list. 757 ! ifac holds the current factor. 764 758 ! 765 ifac = ilfax(jl) 766 IF( ifac > inu ) CYCLE 767 768 ! Test whether the factor will divide. 769 770 IF( MOD(inu,ifac) == 0 ) THEN 759 inu = kn 760 knfax = 0 761 ! 762 DO jl = ntest, 1, -1 771 763 ! 772 knfax = knfax + 1 ! Add the factor to the list 773 IF( knfax > kmaxfax ) THEN 774 kerr = 6 775 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 776 return 764 ifac = ilfax(jl) 765 IF( ifac > inu ) CYCLE 766 767 ! Test whether the factor will divide. 768 769 IF( MOD(inu,ifac) == 0 ) THEN 770 ! 771 knfax = knfax + 1 ! Add the factor to the list 772 IF( knfax > kmaxfax ) THEN 773 kerr = 6 774 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 775 return 776 ENDIF 777 kfax(knfax) = ifac 778 ! Store the other factor that goes with this one 779 knfax = knfax + 1 780 kfax(knfax) = inu / ifac 781 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 777 782 ENDIF 778 kfax(knfax) = ifac 779 ! Store the other factor that goes with this one 780 knfax = knfax + 1 781 kfax(knfax) = inu / ifac 782 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 783 ENDIF 783 ! 784 END DO 784 785 ! 785 END DO 786 ! 787 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 786 ENDIF 788 787 ! 789 788 END SUBROUTINE factorise -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
r6140 r8841 21 21 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 22 22 USE lib_mpp ! distributed memory computing 23 USE lib_fortran ! Fortran routines library 23 24 24 25 IMPLICIT NONE … … 51 52 INTEGER :: ji, jj, jk ! dummy loop indices 52 53 INTEGER :: ii, ij, ik ! local integers 53 REAL(wp) :: zumax, zsmin, zssh2 ! local scalars54 REAL(wp) :: zumax, zsmin, zssh2, zsshmax ! local scalars 54 55 INTEGER, DIMENSION(3) :: ilocu ! 55 56 INTEGER, DIMENSION(2) :: ilocs ! … … 146 147 ENDIF 147 148 ! 148 zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) ) 149 IF( lk_mpp ) CALL mpp_sum( zssh2 ) ! sum over the global domain 149 zsshmax = 0.e0 150 DO jj = 1, jpj 151 DO ji = 1, jpi 152 IF( tmask(ji,jj,1) == 1) zsshmax = MAX( zsshmax, ABS(sshn(ji,jj)) ) 153 END DO 154 END DO 155 IF( lk_mpp ) CALL mpp_max( zsshmax ) ! min over the global domain 150 156 ! 151 IF( lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin ! ssh statistics157 IF( MOD( kt, nwrite ) == 1 .AND. lwp ) WRITE(numout,*) ' ==>> time-step= ',kt,' ssh max:', zsshmax 152 158 ! 153 9200 FORMAT('it:', i8, ' iter:', i4, ' r: ',e16.10, ' b: ',e16.10 ) 154 9300 FORMAT(' it :', i8, ' ssh2: ', e16.10, ' Umax: ',e16.10,' Smin: ',e16.10) 159 IF( zsshmax > 10.e0 ) THEN 160 IF (lk_mpp) THEN 161 CALL mpp_maxloc( ABS(sshn(:,:)),tmask(:,:,1),zsshmax,ii,ij) 162 ELSE 163 ilocs = MAXLOC( ABS(sshn(:,:)) ) 164 ii = ilocs(1) + nimpp - 1 165 ij = ilocs(2) + njmpp - 1 166 ENDIF 167 ! 168 IF(lwp) THEN 169 WRITE(numout,cform_err) 170 WRITE(numout,*) 'stp_ctl : the ssh is larger than 10m' 171 WRITE(numout,*) '======= ' 172 WRITE(numout,9600) kt, zsshmax, ii, ij 173 WRITE(numout,*) 174 WRITE(numout,*) ' output of last fields in numwso' 175 ENDIF 176 kindic = -3 177 ENDIF 178 9600 FORMAT (' kt=',i6,' max ssh: ',1pg11.4,', i j: ',2i5) 179 ! 180 zssh2 = glob_sum( sshn(:,:) * sshn(:,:) ) 181 ! 182 IF(lwp) WRITE(numsol,9700) kt, zssh2, zumax, zsmin ! ssh statistics 183 ! 184 9700 FORMAT(' it :', i8, ' ssh2: ', d23.16, ' Umax: ',d23.16,' Smin: ',d23.16) 155 185 ! 156 186 END SUBROUTINE stp_ctl -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
r7646 r8841 25 25 26 26 LOGICAL , PUBLIC :: l_co2cpl = .false. !: atmospheric pco2 recieved from oasis 27 LOGICAL , PUBLIC :: l_offline = .false. !: offline passive tracers flag28 INTEGER , PUBLIC :: nn_dttrc !: frequency of step on passive tracers27 LOGICAL , PUBLIC :: l_offline = .false. !: offline passive tracers flag 28 INTEGER , PUBLIC :: nn_dttrc = 1 !: frequency of step on passive tracers 29 29 REAL(wp), PUBLIC :: r_si2 !: largest depth of extinction (blue & 0.01 mg.m-3) (RGB) 30 30 REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) :: etot3 !: light absortion coefficient -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/SAO_SRC/nemogcm.F90
r7646 r8841 499 499 ! 500 500 ! Find the factors of n. 501 IF( kn == 1 ) GOTO 20 502 503 ! nu holds the unfactorised part of the number. 504 ! knfax holds the number of factors found. 505 ! l points to the allowed factor list. 506 ! ifac holds the current factor. 507 ! 508 inu = kn 509 knfax = 0 510 ! 511 DO jl = ntest, 1, -1 512 ! 513 ifac = ilfax(jl) 514 IF( ifac > inu ) CYCLE 515 516 ! Test whether the factor will divide. 517 518 IF( MOD(inu,ifac) == 0 ) THEN 501 IF( kn .NE. 1 ) THEN 502 503 ! nu holds the unfactorised part of the number. 504 ! knfax holds the number of factors found. 505 ! l points to the allowed factor list. 506 ! ifac holds the current factor. 507 ! 508 inu = kn 509 knfax = 0 510 ! 511 DO jl = ntest, 1, -1 519 512 ! 520 knfax = knfax + 1 ! Add the factor to the list 521 IF( knfax > kmaxfax ) THEN 522 kerr = 6 523 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 524 return 513 ifac = ilfax(jl) 514 IF( ifac > inu ) CYCLE 515 516 ! Test whether the factor will divide. 517 518 IF( MOD(inu,ifac) == 0 ) THEN 519 ! 520 knfax = knfax + 1 ! Add the factor to the list 521 IF( knfax > kmaxfax ) THEN 522 kerr = 6 523 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 524 return 525 ENDIF 526 kfax(knfax) = ifac 527 ! Store the other factor that goes with this one 528 knfax = knfax + 1 529 kfax(knfax) = inu / ifac 530 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 525 531 ENDIF 526 kfax(knfax) = ifac 527 ! Store the other factor that goes with this one 528 knfax = knfax + 1 529 kfax(knfax) = inu / ifac 530 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 531 ENDIF 532 ! 533 END DO 534 ! 535 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 532 ! 533 END DO 534 ! 535 ENDIF 536 536 ! 537 537 END SUBROUTINE factorise -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/SAS_SRC/daymod.F90
r7761 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r7761 r8841 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 ! … … 364 365 IF( ln_ctl ) CALL prt_ctl_init ! Print control 365 366 CALL day_init ! model calendar (using both namelist and restart infos) 367 IF( ln_rstart ) CALL rst_read_open 366 368 367 369 CALL sbc_init ! Forcings : surface module … … 596 598 ! 597 599 ! Find the factors of n. 598 IF( kn == 1 ) GOTO 20 599 600 ! nu holds the unfactorised part of the number. 601 ! knfax holds the number of factors found. 602 ! l points to the allowed factor list. 603 ! ifac holds the current factor. 604 ! 605 inu = kn 606 knfax = 0 607 ! 608 DO jl = ntest, 1, -1 609 ! 610 ifac = ilfax(jl) 611 IF( ifac > inu ) CYCLE 612 613 ! Test whether the factor will divide. 614 615 IF( MOD(inu,ifac) == 0 ) THEN 600 IF( kn .NE. 1 ) THEN 601 602 ! nu holds the unfactorised part of the number. 603 ! knfax holds the number of factors found. 604 ! l points to the allowed factor list. 605 ! ifac holds the current factor. 606 ! 607 inu = kn 608 knfax = 0 609 ! 610 DO jl = ntest, 1, -1 616 611 ! 617 knfax = knfax + 1 ! Add the factor to the list 618 IF( knfax > kmaxfax ) THEN 619 kerr = 6 620 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 621 return 612 ifac = ilfax(jl) 613 IF( ifac > inu ) CYCLE 614 615 ! Test whether the factor will divide. 616 617 IF( MOD(inu,ifac) == 0 ) THEN 618 ! 619 knfax = knfax + 1 ! Add the factor to the list 620 IF( knfax > kmaxfax ) THEN 621 kerr = 6 622 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 623 return 624 ENDIF 625 kfax(knfax) = ifac 626 ! Store the other factor that goes with this one 627 knfax = knfax + 1 628 kfax(knfax) = inu / ifac 629 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 622 630 ENDIF 623 kfax(knfax) = ifac 624 ! Store the other factor that goes with this one 625 knfax = knfax + 1 626 kfax(knfax) = inu / ifac 627 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 628 ENDIF 629 ! 630 END DO 631 ! 632 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 631 ! 632 END DO 633 ! 634 ENDIF 633 635 ! 634 636 END SUBROUTINE factorise -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
r7681 r8841 119 119 ! ! -------------- 120 120 neln(:,:) = 1 ! euphotic layer level 121 DO jk = 1, jpk ! (i.e. 1rst T-level strictly below EL bottom)121 DO jk = 1, jpkm1 ! (i.e. 1rst T-level strictly below EL bottom) 122 122 DO jj = 1, jpj 123 123 DO ji = 1, jpi -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
r7753 r8841 34 34 35 35 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_par ! structure of input par 36 INTEGER , PARAMETER :: nbtimes = 36 5!: maximum number of times record in a file36 INTEGER , PARAMETER :: nbtimes = 366 !: maximum number of times record in a file 37 37 INTEGER :: ntimes_par ! number of time steps in a file 38 38 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: par_varsw !: PAR fraction of shortwave -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedco3.F90
r5215 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r7753 r8841 44 44 PUBLIC trc_nxt ! routine called by step.F90 45 45 46 REAL(wp) :: rfact1, rfact2 47 46 48 !!---------------------------------------------------------------------- 47 49 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 104 106 ENDIF 105 107 ! ! Leap-Frog + Asselin filter time stepping 106 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) 107 109 DO jn = 1, jptra 108 110 DO jk = 1, jpkm1 109 111 trn(:,:,jk,jn) = tra(:,:,jk,jn) 112 trb(:,:,jk,jn) = trn(:,:,jk,jn) 110 113 END DO 111 114 END DO 112 ELSE ! Asselin filter + swap 113 IF( ln_linssh ) THEN ; CALL tra_nxt_fix( kt, nittrc000, 'TRC', trb, trn, tra, jptra ) ! linear ssh 114 ELSE ; CALL tra_nxt_vvl( kt, nittrc000, rdttrc, 'TRC', trb, trn, tra, & 115 & sbc_trc, sbc_trc_b, jptra ) ! non-linear ssh 115 ELSE 116 IF( .NOT. l_offline ) THEN ! Leap-Frog + Asselin filter time stepping 117 IF( ln_linssh ) THEN ; CALL tra_nxt_fix( kt, nittrc000, 'TRC', trb, trn, tra, jptra ) ! linear ssh 118 ELSE ; CALL tra_nxt_vvl( kt, nittrc000, rdttrc, 'TRC', trb, trn, tra, & 119 & sbc_trc, sbc_trc_b, jptra ) ! non-linear ssh 120 ENDIF 121 ELSE 122 CALL trc_nxt_off( kt ) ! offline 116 123 ENDIF 117 124 ! … … 143 150 ! 144 151 END SUBROUTINE trc_nxt 152 153 154 SUBROUTINE trc_nxt_off( kt ) 155 !!---------------------------------------------------------------------- 156 !! *** ROUTINE tra_nxt_vvl *** 157 !! 158 !! ** Purpose : Time varying volume: apply the Asselin time filter 159 !! and swap the tracer fields. 160 !! 161 !! ** Method : - Apply a thickness weighted Asselin time filter on now fields. 162 !! - save in (ta,sa) a thickness weighted average over the three 163 !! time levels which will be used to compute rdn and thus the semi- 164 !! implicit hydrostatic pressure gradient (ln_dynhpg_imp = T) 165 !! - swap tracer fields to prepare the next time_step. 166 !! This can be summurized for tempearture as: 167 !! ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] ) ln_dynhpg_imp = T 168 !! /( e3t_n + rbcp*[ e3t_b - 2 e3t_n + e3t_a ] ) 169 !! ztm = 0 otherwise 170 !! tb = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] ) 171 !! /( e3t_n + atfp*[ e3t_b - 2 e3t_n + e3t_a ] ) 172 !! tn = ta 173 !! ta = zt (NB: reset to 0 after eos_bn2 call) 174 !! 175 !! ** Action : - (tb,sb) and (tn,sn) ready for the next time step 176 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T) 177 !!---------------------------------------------------------------------- 178 INTEGER , INTENT(in ) :: kt ! ocean time-step index 179 !! 180 INTEGER :: ji, jj, jk, jn ! dummy loop indices 181 REAL(wp) :: ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar 182 REAL(wp) :: ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d ! - - 183 !!---------------------------------------------------------------------- 184 ! 185 IF( kt == nittrc000 ) THEN 186 IF(lwp) WRITE(numout,*) 187 IF(lwp) WRITE(numout,*) 'trc_nxt_off : time stepping' 188 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 189 IF( .NOT. ln_linssh ) THEN 190 rfact1 = atfp * rdttrc 191 rfact2 = rfact1 / rau0 192 ENDIF 193 ! 194 ENDIF 195 ! 196 DO jn = 1, jptra 197 DO jk = 1, jpkm1 198 DO jj = 1, jpj 199 DO ji = 1, jpi 200 ze3t_b = e3t_b(ji,jj,jk) 201 ze3t_n = e3t_n(ji,jj,jk) 202 ze3t_a = e3t_a(ji,jj,jk) 203 ! ! tracer content at Before, now and after 204 ztc_b = trb(ji,jj,jk,jn) * ze3t_b 205 ztc_n = trn(ji,jj,jk,jn) * ze3t_n 206 ztc_a = tra(ji,jj,jk,jn) * ze3t_a 207 ! 208 ze3t_d = ze3t_a - 2. * ze3t_n + ze3t_b 209 ztc_d = ztc_a - 2. * ztc_n + ztc_b 210 ! 211 ze3t_f = ze3t_n + atfp * ze3t_d 212 ztc_f = ztc_n + atfp * ztc_d 213 ! 214 IF( .NOT. ln_linssh .AND. jk == mikt(ji,jj) ) THEN ! first level 215 ze3t_f = ze3t_f - rfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 216 ztc_f = ztc_f - rfact1 * ( sbc_trc(ji,jj,jn) - sbc_trc_b(ji,jj,jn) ) 217 ENDIF 218 219 ze3t_f = 1.e0 / ze3t_f 220 trb(ji,jj,jk,jn) = ztc_f * ze3t_f ! ptb <-- ptn filtered 221 trn(ji,jj,jk,jn) = tra(ji,jj,jk,jn) ! ptn <-- pta 222 ! 223 END DO 224 END DO 225 END DO 226 ! 227 END DO 228 ! 229 END SUBROUTINE trc_nxt_off 145 230 146 231 #else -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
r7646 r8841 7 7 !! 2.0 ! 2007-12 (C. Ethe, G. Madec) rewritting 8 8 !!---------------------------------------------------------------------- 9 #if defined key_top10 !!----------------------------------------------------------------------11 !! 'key_top' TOP models12 !!----------------------------------------------------------------------13 !14 9 ! !* Domain size * 15 10 USE par_oce , ONLY : jpi => jpi !: first dimension of grid --> i … … 117 112 USE zdfmxl , ONLY : hmlpt => hmlpt !: mixed layer depth at t-points (m) 118 113 119 #else120 !!----------------------------------------------------------------------121 !! Empty module : No passive tracer122 !!----------------------------------------------------------------------123 #endif124 125 !!----------------------------------------------------------------------126 !! NEMO/TOP 3.3 , NEMO Consortium (2010)127 !! $Id$128 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)129 !!======================================================================130 114 END MODULE oce_trc -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90
r7646 r8841 6 6 !! History : - ! 2005-07 (C. Talandier) original code for OPA 7 7 !! 1.0 ! 2005-10 (C. Ethe ) adapted to passive tracer 8 !!----------------------------------------------------------------------9 #if defined key_top10 !!----------------------------------------------------------------------11 !! 'key_top' TOP models12 8 !!---------------------------------------------------------------------- 13 9 !! prt_ctl_trc : control print in mpp for passive tracers … … 299 295 END SUBROUTINE prt_ctl_trc_init 300 296 301 #else302 !!----------------------------------------------------------------------303 !! Dummy module : NO passive tracer304 !!----------------------------------------------------------------------305 #endif306 307 !!----------------------------------------------------------------------308 !! NEMO/TOP 3.3 , NEMO Consortium (2010)309 !! $Id$310 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)311 !!======================================================================312 297 END MODULE prtctl_trc -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/trc.F90
r7646 r8841 8 8 !! NEMO 1.0 ! 2004-03 (C. Ethe) Free form and module 9 9 !!---------------------------------------------------------------------- 10 #if defined key_top11 !!----------------------------------------------------------------------12 !! 'key_top' TOP models13 !!----------------------------------------------------------------------14 10 USE par_oce 15 11 USE par_trc 16 USE bdy_oce, only: ln_bdy, nb_bdy, OBC_DATA12 USE bdy_oce, only: jp_bdy, ln_bdy, nb_bdy, OBC_DATA 17 13 18 14 IMPLICIT NONE … … 173 169 # endif 174 170 ! 175 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_dflt ! Default OBC condition for all tracers 176 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc ! Choice of boundary condition for tracers 177 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 178 175 ! External data structure of BDY for TOP. Available elements: cn_obc, ll_trc, trcnow, dmp 179 176 TYPE(OBC_DATA), PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET :: trcdta_bdy !: bdy external data (local process) 180 ! 181 177 !$AGRIF_END_DO_NOT_TREAT 182 178 !!---------------------------------------------------------------------- 183 179 !! NEMO/TOP 3.3.1 , NEMO Consortium (2010) … … 210 206 ! 211 207 IF ( ln_bdy ) THEN 212 ALLOCATE( cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 213 & trcdta_bdy(jptra,nb_bdy) , & 214 & STAT = ierr(2) ) 208 ALLOCATE( trcdta_bdy(jptra, jp_bdy), STAT = ierr(2) ) 215 209 ENDIF 216 210 ! … … 224 218 END FUNCTION trc_alloc 225 219 226 #else227 !!----------------------------------------------------------------------228 !! Empty module : No passive tracer229 !!----------------------------------------------------------------------230 #endif231 232 220 !!====================================================================== 233 221 END MODULE trc -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ALTIX_NAUTILUS_MPT
r3631 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-IBM_EKMAN_INGV
r5301 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_CALYPSO
r3294 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW7_METO
r4285 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW7_MONSOON
r5029 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_ADA
r7715 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_ADA_DEBUG
r7715 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_ADA_O0
r7715 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_CURIE
r5407 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_MOBILIS
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC40_METO
r6140 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL
r4814 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-macport_osx
r4147 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-macport_osx_debug
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-mpmd-ALTIX_NAUTILUS_MPT
r3736 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-openmpi_NAVITI_MERCATOR
r5559 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template
r3608 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/all_functions.sh
r7715 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/prepare_job.sh
r7753 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/sette.sh
r7756 r8841 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 … … 661 660 export TEST_NAME="LONG" 662 661 cd ${CONFIG_DIR0} 663 . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide"del_key ${DEL_KEYS}662 . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 del_key ${DEL_KEYS} 664 663 cd ${SETTE_DIR} 665 664 . ./param.cfg … … 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 100803 set_namelist namelist_cfg nn_stock 50801 set_namelist namelist_cfg nn_itend 240 802 set_namelist namelist_cfg nn_stock 120 804 803 set_namelist namelist_cfg ln_ctl .false. 805 804 set_namelist namelist_cfg ln_clobber .true. … … 823 822 cd ${EXE_DIR} 824 823 set_namelist namelist_cfg cn_exp \"SAS\" 825 set_namelist namelist_cfg nn_it000 51826 set_namelist namelist_cfg nn_itend 100824 set_namelist namelist_cfg nn_it000 121 825 set_namelist namelist_cfg nn_itend 240 827 826 set_namelist namelist_cfg ln_ctl .false. 828 827 set_namelist namelist_cfg ln_clobber .true. … … 835 834 set_namelist namelist_cfg ln_rstart .true. 836 835 set_namelist namelist_cfg nn_rstctl 2 837 set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000050_restart_ice\" 836 set_namelist namelist_cfg nn_date0 010106 837 set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\" 838 set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\" 838 839 if [ ${USING_MPMD} == "yes" ] ; then 839 840 set_xio_using_server iodef.xml true … … 844 845 L_NPROC=$(( $i - 1 )) 845 846 L_NPROC=`printf "%04d\n" ${L_NPROC}` 846 ln -sf ../LONG/SAS_00000050_restart_ice_${L_NPROC}.nc . 847 ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc . 848 ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc . 847 849 done 848 850 cd ${SETTE_DIR} … … 1219 1221 export TEST_NAME="LONG" 1220 1222 cd ${CONFIG_DIR0} 1221 . ./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"1223 . ./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" 1222 1224 cd ${SETTE_DIR} 1223 1225 . ./param.cfg … … 1245 1247 set_namelist 1_namelist_cfg nn_itend 300 1246 1248 set_namelist 1_namelist_cfg nn_stock 150 1249 set_namelist 1_namelist_cfg nn_fsbc 1 1247 1250 set_namelist 1_namelist_cfg ln_ctl .false. 1248 1251 set_namelist 1_namelist_cfg ln_clobber .true. … … 1283 1286 set_namelist 1_namelist_cfg nn_itend 300 1284 1287 set_namelist 1_namelist_cfg nn_stock 150 1288 set_namelist 1_namelist_cfg nn_fsbc 1 1285 1289 set_namelist 1_namelist_cfg ln_rstart .true. 1286 1290 set_namelist 1_namelist_cfg nn_rstctl 2 … … 1293 1297 set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\" 1294 1298 set_namelist 1_namelist_cfg cn_ocerst_in \"O2LP_LONG_00000150_restart\" 1299 set_namelist 1_namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000150_restart_ice\" 1295 1300 1296 1301 for (( i=1; i<=$NPROC; i++)) ; do … … 1300 1305 ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc . 1301 1306 ln -sf ../LONG/1_O2LP_LONG_00000150_restart_${L_NPROC}.nc . 1307 ln -sf ../LONG/1_O2LP_LONG_00000150_restart_ice_${L_NPROC}.nc . 1302 1308 done 1303 1309 if [ ${USING_MPMD} == "yes" ] ; then … … 1316 1322 export TEST_NAME="REPRO_4_4" 1317 1323 cd ${CONFIG_DIR0} 1318 . ./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"1324 . ./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" 1319 1325 cd ${SETTE_DIR} 1320 1326 . ./param.cfg … … 1339 1345 set_namelist 1_namelist_cfg nn_it000 1 1340 1346 set_namelist 1_namelist_cfg nn_itend 150 1347 set_namelist 1_namelist_cfg nn_fsbc 1 1341 1348 set_namelist 1_namelist_cfg ln_ctl .false. 1342 1349 set_namelist 1_namelist_cfg ln_clobber .true. … … 1377 1384 set_namelist 1_namelist_cfg nn_it000 1 1378 1385 set_namelist 1_namelist_cfg nn_itend 150 1386 set_namelist 1_namelist_cfg nn_fsbc 1 1379 1387 set_namelist 1_namelist_cfg ln_ctl .false. 1380 1388 set_namelist 1_namelist_cfg ln_clobber .true. -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/SETTE/sette_rpt.sh
r7715 r8841 1 1 #!/bin/bash -f 2 #set -vx 2 3 # 3 4 # simple SETTE report generator. … … 10 11 ######################### Start of function definitions ################################# 11 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 if [ -d $vdir/$nam ]; then 24 dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 25 dorv=`echo $dorv | sed -e 's:.*/::'` 26 rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 ` 27 rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l` 28 cd ${SAS_RESTART_DIR}/LONG 29 #SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files 30 cd ${TOOLS_DIR} 31 ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1 32 cd ${TOOLS_DIR}/REBUILD_NEMO 33 #SF echo "REBUILD LONG restart SAS files, without standard output" 34 ./rebuild_nemo -t 4 ../../CONFIG/SAS_LONG/LONG/SAS_00000100_restart_ice $NPROC > /dev/null 2>&1 35 #SF echo "REBUILD SHORT restart SAS files, without standard output" 36 ./rebuild_nemo -t 4 ../../CONFIG/SAS_LONG/SHORT/SAS_00000100_restart_ice $NPROC >&- 37 cd ${SAS_RESTART_DIR}/LONG 38 #SF echo "COPY rebuild restart files" 39 cp SAS_00000100_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/. 40 cp ../SHORT/SAS_00000100_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/. 41 42 f1o=$vdir/$nam/$mach/$dorv/LONG/SAS_00000100_restart_ice.nc 43 f2o=$vdir/$nam/$mach/$dorv/SHORT/SAS_00000100_restart_ice.nc 44 if [ ! -f $f1o ] && [ ! -f $f2o ] ; then 45 printf "%-20s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test"; 46 return; 47 fi 48 # 49 done_oce=0 50 # 51 if [ -f $f1o ] && [ -f $f2o ]; then 52 cmp -s $f1o $f2o 53 #SF cmp SAS_00000100_restart_ice.nc ../SHORT/SAS_00000100_restart_ice.nc > diff_restart.txt 54 if [ $? == 0 ]; then 55 if [ $pass == 0 ]; then 56 printf "%-20s %s %s\n" $nam " SAS restart files are IDENTICAL : passed : " $dorv 57 fi 58 else 59 printf "%-20s %s %s\n" $nam " SAS restart files are DIFFERENT : FAILED : " $dorv 60 # 61 # Offer view of differences on the second pass 62 # 63 if [ $pass == 1 ]; then 64 echo "BE CAREFUL: NEED cdo to see differences!!!!! " 65 echo "DO which cdo and replace cdo PATH to the cdo command in SETTE_rpt.sh " 66 echo "IF cdo is not available you need to do difference of netcdf file by hand" 67 echo "<return> to view restart_ice.nc differences" 68 read y 69 cdo -diffv $f1o $f2o 70 done_oce=1 71 #echo "<return> to continue" 72 #read y 73 fi 74 fi 75 fi 76 # 77 fi 78 } 79 12 80 function resttest() { 13 81 # … … 199 267 mach=`grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'` 200 268 NEMO_VALID=`grep "NEMO_VALIDATION_DIR=" ./param.cfg | sed -e 's/NEMO_VALIDATION_DIR=//'` 269 # Directory to run the tests 270 SETTE_DIR=$(cd $(dirname "$0"); pwd) 271 MAIN_DIR=$(dirname $SETTE_DIR) 272 CONFIG_DIR0=${MAIN_DIR}/CONFIG 273 TOOLS_DIR=${MAIN_DIR}/TOOLS 274 COMPIL_DIR=${TOOLS_DIR}/COMPILE 275 NPROC=32 276 277 SAS_RESTART_DIR=${CONFIG_DIR0}/SAS_LONG 201 278 # 202 279 if [ ! -d $NEMO_VALID ]; then … … 205 282 fi 206 283 # 284 207 285 # The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 208 286 # … … 212 290 if [ $pass == 1 ]; then echo "---------------2nd pass------------------";fi 213 291 # 292 293 # Rebuild and restartability test for SAS 294 # 295 for restart_file in WSAS_LONG 296 do 297 # restfile $SAS_RESTART_DIR LONG $pass 298 restfile $NEMO_VALID $restart_file $pass 299 done 300 # 214 301 # Restartability test 215 302 # 216 for restart_test in WGYREPIS_LONG WORCA2LIM3PIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG W SAS_LONG WISOMIP_LONG WORCA2AGUL_LONG303 for restart_test in WGYREPIS_LONG WORCA2LIM3PIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG WISOMIP_LONG WORCA2AGUL_LONG 217 304 do 218 305 resttest $NEMO_VALID $restart_test $pass -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh
r7646 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/COMPILE/Fdel_keys.sh
r4990 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/COMPILE/Fmake_WORK.sh
r4990 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90
r7200 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/MISCELLANEOUS/chk_iomput.sh
r4162 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/MISCELLANEOUS/icb_pp.py
r6423 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/NESTING/src/agrif_create_bathy.f90
r2455 r8841 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/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/NESTING/src/agrif_readwrite.f90
r2455 r8841 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 ! -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/compute_sections.f90
r3632 r8841 681 681 IF( sec%nb_point .ne. 0 )THEN 682 682 IF ( sec%listPoint(sec%nb_point)%I .NE. sec%listPoint(1)%I ) THEN 683 sec%slopeSection = ( sec%listPoint(sec%nb_point)%J - sec%listPoint(1)%J )/ &684 ( sec%listPoint(sec%nb_point)%I - sec%listPoint(1)%I )683 sec%slopeSection = REAL( ( sec%listPoint(sec%nb_point)%J - sec%listPoint(1)%J ) , wp )/ & 684 REAL( ( sec%listPoint(sec%nb_point)%I - sec%listPoint(1)%I ) , wp ) 685 685 ELSE 686 686 sec%slopeSection = 10000._wp -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/TRUST/inputs/AMM12/namelist_cfg
r7646 r8841 201 201 / 202 202 !----------------------------------------------------------------------- 203 &namobc ! open boundaries parameters ("key_obc")204 !-----------------------------------------------------------------------205 /206 !-----------------------------------------------------------------------207 203 &namagrif ! AGRIF zoom ("key_agrif") 208 204 !----------------------------------------------------------------------- -
branches/UKMO/ROMS_WAD_7832/NEMOGCM/TRUST/inputs/GYRE/namelist_cfg
r7646 r8841 155 155 / 156 156 !----------------------------------------------------------------------- 157 &namobc ! open boundaries parameters ("key_obc")158 !-----------------------------------------------------------------------159 /160 !-----------------------------------------------------------------------161 157 &namagrif ! AGRIF zoom ("key_agrif") 162 158 !-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.