Changeset 4152
- Timestamp:
- 2013-11-05T12:59:53+01:00 (11 years ago)
- Location:
- branches/2013/dev_LOCEAN_2013/NEMOGCM
- Files:
-
- 43 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
r4147 r4152 74 74 / 75 75 !----------------------------------------------------------------------- 76 &namcrs ! Grid coarsening for dynamics output and/or 77 ! passive tracer coarsened online simulations 78 !----------------------------------------------------------------------- 79 / 80 !----------------------------------------------------------------------- 76 81 &namtsd ! data : Temperature & Salinity 77 82 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
r4147 r4152 64 64 / 65 65 !----------------------------------------------------------------------- 66 &namcrs ! Grid coarsening for dynamics output and/or 67 ! passive tracer coarsened online simulations 68 !----------------------------------------------------------------------- 69 / 70 !----------------------------------------------------------------------- 66 71 &namtsd ! data : Temperature & Salinity 67 72 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
r4147 r4152 70 70 / 71 71 !----------------------------------------------------------------------- 72 &namcrs ! Grid coarsening for dynamics output and/or 73 ! passive tracer coarsened online simulations 74 !----------------------------------------------------------------------- 75 / 76 !----------------------------------------------------------------------- 72 77 &namtsd ! data : Temperature & Salinity 73 78 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_top_cfg
r4147 r4152 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 2 !! NEMO-TOP : GYRE_BFM configuration namelist used to overwrite SHARED/namelist_top_ref 3 !----------------------------------------------------------------------- 4 &namtrc_run ! run information 5 !----------------------------------------------------------------------- 6 nn_writetrc = 0 ! time step frequency for sn_tracer outputs 7 ln_top_euler = .true. ! use Euler time-stepping for TOP 8 / 3 9 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 4 10 &namtrc ! tracers definition 5 11 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 6 7 nn_writetrc = 0 ! time step frequency for sn_tracer outputs8 ln_top_euler = .true. ! use Euler timestepping for TOP9 12 ln_trcdta = .false. ! Initialisation from data input file (T) or not (F) 10 13 ! 11 14 ! ! name ! title of the field ! units ! initial data ! save ! 12 ! ! ! ! ! from file ! or not ! 15 ! ! ! ! ! from file ! or not ! 13 16 ! ! ! ! ! or not ! ! 14 17 sn_tracer(1) = 'DUMMY ' , 'Dummy tracer ' , 'dummy-units' , .false. , .true. -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
r4147 r4152 60 60 / 61 61 !----------------------------------------------------------------------- 62 &namcrs ! Grid coarsening for dynamics output and/or 63 ! passive tracer coarsened online simulations 64 !----------------------------------------------------------------------- 65 / 66 !----------------------------------------------------------------------- 62 67 &namtsd ! data : Temperature & Salinity 63 68 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg
r4147 r4152 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 2 !! NEMO-TOP Configuration namelist for GYRE_PISCES configuration used to overwrite SHARED/namelist_top_ref 3 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 3 !----------------------------------------------------------------------- 4 &namtrc_run ! run information 5 !----------------------------------------------------------------------- 6 nn_writetrc = 60 ! time step frequency for sn_tracer outputs 7 / 8 !----------------------------------------------------------------------- 4 9 &namtrc ! tracers definition 5 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 6 nn_writetrc = 60 ! time step frequency for sn_tracer outputs 7 nn_rsttr = 1 ! restart control = 0 initial time step is not compared to the restart file value 10 !----------------------------------------------------------------------- 8 11 ln_trcdta = .false. ! Initialisation from data input file (T) or not (F) 9 12 ! 10 13 ! ! name ! title of the field ! units ! initial data ! save ! 11 ! ! ! ! ! from file ! or not ! 14 ! ! ! ! ! from file ! or not ! 12 15 ! ! ! ! ! or not ! ! 13 16 sn_tracer(1) = 'DET' , 'Detritus ', 'mmole-N/m3' , .false. , .false. -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
r4147 r4152 49 49 ppkth2 = 999999. ! 50 50 ppacr2 = 999999. ! 51 / 52 !----------------------------------------------------------------------- 53 &namcrs ! Grid coarsening for dynamics output and/or 54 ! passive tracer coarsened online simulations 55 !----------------------------------------------------------------------- 51 56 / 52 57 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/iodef.xml
r3771 r4152 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 24 23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 25 26 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 27 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 33 34 <file_group id="3d" output_freq="3d" output_level="10" enabled=".TRUE."/> <!-- 3d files --> 34 35 <file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files --> 36 37 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 38 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> 39 <field field_ref="soce" name="so" long_name="sea_water_salinity" /> 40 <field field_ref="sst" name="tos" long_name="sea_surface_temperature" /> 41 <field field_ref="sst2" name="tossq" long_name="square_of_sea_surface_temperature" /> 42 <field field_ref="sss" name="sos" long_name="sea_surface_salinity" /> 43 <field field_ref="ssh" name="zos" long_name="sea_surface_height_above_geoid" /> 44 <field field_ref="ssh2" name="zossq" long_name="square_of_sea_surface_height_above_geoid" /> 45 <field field_ref="empmr" name="wfo" long_name="water_flux_into_sea_water" /> 46 <field field_ref="qsr" name="rsntds" long_name="surface_net_downward_shortwave_flux" /> 47 <field field_ref="qt" name="tohfls" long_name="surface_net_downward_total_heat_flux" /> 48 <field field_ref="taum" /> 49 <field field_ref="mldkz5" /> 50 <field field_ref="mldr10_1" /> 51 </file> 52 53 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 54 <field field_ref="uoce" name="uo" long_name="sea_water_x_velocity" /> 55 <field field_ref="suoce" name="uos" long_name="sea_surface_x_velocity" /> 56 <field field_ref="utau" name="tauuo" long_name="surface_downward_x_stress" /> 57 </file> 58 59 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 60 <field field_ref="voce" name="vo" long_name="sea_water_y_velocity" /> 61 <field field_ref="svoce" name="vos" long_name="sea_surface_y_velocity" /> 62 <field field_ref="vtau" name="tauvo" long_name="surface_downward_y_stress" /> 63 </file> 64 65 <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 66 <field field_ref="woce" name="wo" long_name="ocean vertical velocity" /> 67 <field field_ref="avt" name="difvho" long_name="ocean_vertical_heat_diffusivity" /> 68 </file> 69 70 <file id="file5" name_suffix="_icemod" description="ice variables" > 71 <field field_ref="ice_pres" /> 72 <field field_ref="snowthic_cea" name="snd" long_name="surface_snow_thickness" /> 73 <field field_ref="icethic_cea" name="sit" long_name="sea_ice_thickness" /> 74 <field field_ref="iceprod_cea" name="sip" long_name="sea_ice_thickness" /> 75 <field field_ref="ist_ipa" /> 76 <field field_ref="ioceflxb" /> 77 <field field_ref="uice_ipa" /> 78 <field field_ref="vice_ipa" /> 79 <field field_ref="utau_ice" /> 80 <field field_ref="vtau_ice" /> 81 <field field_ref="qsr_io_cea" /> 82 <field field_ref="qns_io_cea" /> 83 <field field_ref="snowpre" /> 84 </file> 85 86 87 <file id="file6" name_suffix="_ptrc_T" description="sms variables" > 88 <field field_ref="CFC11" /> 89 <field field_ref="C14B" /> 90 </file> 91 92 <file id="file7" name_suffix="_diad_T" description="additional diagnostics" > 93 <field field_ref="qtrCFC11" /> 94 <field field_ref="qintCFC11" /> 95 <field field_ref="qtrC14b" /> 96 <field field_ref="qintC14b" /> 97 <field field_ref="fdecay" /> 98 </file> 99 35 100 </file_group> 36 101 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
r4147 r4152 69 69 / 70 70 !----------------------------------------------------------------------- 71 &namcrs ! Grid coarsening for dynamics output and/or 72 ! passive tracer coarsened online simulations 73 !----------------------------------------------------------------------- 74 / 75 !----------------------------------------------------------------------- 71 76 &namtsd ! data : Temperature & Salinity 72 77 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_top_cfg
r4147 r4152 2 2 !! NEMO/TOP1 : ORCA2_LIM_CFC_C14b configuration namelist used to overwrite SHARED/namelist_top 3 3 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 4 !----------------------------------------------------------------------- 5 &namtrc_run ! run information 6 !----------------------------------------------------------------------- 7 / 4 8 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 5 9 &namtrc ! tracers definition … … 8 12 ! 9 13 ! ! name ! title of the field ! units ! initial data ! save ! 10 ! ! ! ! ! from file ! or not ! 14 ! ! ! ! ! from file ! or not ! 11 15 ! ! ! ! ! or not ! ! 12 16 sn_tracer(1) = 'CFC11 ' , 'CFC11 Concentration ', 'umolC/L', .false. , .true. -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml
r4148 r4152 20 20 ============================================================================================================ 21 21 --> 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 24 22 23 24 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 25 26 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 25 27 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 28 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 31 33 <file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files --> 32 34 33 <file id="1d_grid_T" name="auto" description="ocean T grid variables" > 34 <field field_ref="sst" name="sosstsst" /> 35 <field field_ref="sss" name="sosaline" /> 36 <field field_ref="ssh" name="sossheig" /> 37 </file> 38 39 <file id="1d_grid_U" name="auto" description="ocean U grid variables" > 40 <field field_ref="suoce" name="vozocrtx" /> 41 </file> 42 43 <file id="1d_grid_V" name="auto" description="ocean V grid variables" > 44 <field field_ref="svoce" name="vomecrty" /> 45 </file> 46 47 </file_group> 35 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 36 <field field_ref="sst" name="tos" long_name="sea_surface_temperature" /> 37 <field field_ref="sss" name="sos" long_name="sea_surface_salinity" /> 38 <field field_ref="ssh" name="zos" long_name="sea_surface_height_above_geoid" /> 39 </file> 40 41 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 42 <field field_ref="suoce" name="uos" long_name="sea_surface_x_velocity" /> 43 </file> 44 45 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 46 <field field_ref="svoce" name="vos" long_name="sea_surface_y_velocity" /> 47 </file> 48 49 </file_group> 50 48 51 <file_group id="3d" output_freq="3d" output_level="10" enabled=".TRUE."/> <!-- 3d files --> 52 49 53 <file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files --> 50 54 51 <file id="5d_grid_T" name="auto" description="ocean T grid variables" > 52 <field field_ref="toce" name="votemper" /> 53 <field field_ref="soce" name="vosaline" /> 54 <field field_ref="sst" name="sosstsst" /> 55 <field field_ref="sss" name="sosaline" /> 56 <field field_ref="ssh" name="sossheig" /> 57 <field field_ref="empmr" name="sowaflup" /> 58 <field field_ref="qsr" name="soshfldo" /> 59 <field field_ref="saltflx" name="sosfldow" /> 60 <field field_ref="fmmflx" name="sofmflup" /> 61 <field field_ref="qt" name="sohefldo" /> 62 <field field_ref="mldr10_1" name="somxl010" /> 63 <field field_ref="mldkz5" name="somixhgt" /> 64 <field field_ref="ice_cover" name="soicecov" /> 65 <field field_ref="wspd" name="sowindsp" /> 66 <field field_ref="erp" name="sowafldp" /> 67 <field field_ref="ist_ipa" name="soicetem" /> 68 <field field_ref="icealb_cea" name="soicealb" /> 69 </file> 70 71 <file id="5d_grid_U" name="auto" description="ocean U grid variables" > 72 <field field_ref="uoce" name="vozocrtx" /> 73 <field field_ref="uoce_eiv" name="vozoeivu" /> 74 <field field_ref="utau" name="sozotaux" /> 75 </file> 76 77 <file id="5d_grid_V" name="auto" description="ocean V grid variables" > 78 <field field_ref="voce" name="vomecrty" /> 79 <field field_ref="voce_eiv" name="vomeeivv" /> 80 <field field_ref="vtau" name="sometauy" /> 81 </file> 82 83 <file id="5d_grid_W" name="auto" description="ocean W grid variables" > 84 <field field_ref="woce" name="vovecrtz" /> 85 <field field_ref="avt" name="votkeavt" /> 86 <field field_ref="avs" name="voddmavs" /> 87 <field field_ref="aht2d_eiv" name="soleaeiw" /> 88 </file> 89 90 <file id="5d_icemod" name="auto" description="ice variables" > 55 <file id="file4" name_suffix="_grid_T" description="ocean T grid variables" > 56 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> 57 <field field_ref="soce" name="so" long_name="sea_water_salinity" /> 58 <field field_ref="sst" name="tos" long_name="sea_surface_temperature" /> 59 <field field_ref="sst2" name="tossq" long_name="square_of_sea_surface_temperature" /> 60 <field field_ref="sss" name="sos" long_name="sea_surface_salinity" /> 61 <field field_ref="ssh" name="zos" long_name="sea_surface_height_above_geoid" /> 62 <field field_ref="ssh2" name="zossq" long_name="square_of_sea_surface_height_above_geoid" /> 63 <field field_ref="empmr" name="wfo" long_name="water_flux_into_sea_water" /> 64 <field field_ref="qsr" name="rsntds" long_name="surface_net_downward_shortwave_flux" /> 65 <field field_ref="qt" name="tohfls" long_name="surface_net_downward_total_heat_flux" /> 66 <field field_ref="taum" /> 67 <field field_ref="mldkz5" /> 68 <field field_ref="mldr10_1" /> 69 </file> 70 71 <file id="file5" name_suffix="_grid_U" description="ocean U grid variables" > 72 <field field_ref="uoce" name="uo" long_name="sea_water_x_velocity" /> 73 <field field_ref="suoce" name="uos" long_name="sea_surface_x_velocity" /> 74 <field field_ref="utau" name="tauuo" long_name="surface_downward_x_stress" /> 75 </file> 76 77 <file id="file6" name_suffix="_grid_V" description="ocean V grid variables" > 78 <field field_ref="voce" name="vo" long_name="sea_water_y_velocity" /> 79 <field field_ref="svoce" name="vos" long_name="sea_surface_y_velocity" /> 80 <field field_ref="vtau" name="tauvo" long_name="surface_downward_y_stress" /> 81 </file> 82 83 <file id="file7" name_suffix="_grid_W" description="ocean W grid variables" > 84 <field field_ref="woce" name="wo" long_name="ocean vertical velocity" /> 85 <field field_ref="avt" name="difvho" long_name="ocean_vertical_heat_diffusivity" /> 86 </file> 87 88 <file id="file8" name_suffix="_icemod" description="ice variables" > 91 89 <field field_ref="ice_pres" /> 92 <field field_ref="snowthic_cea" name=" isnowthi"/>93 <field field_ref="icethic_cea" name=" iicethic"/>94 <field field_ref="iceprod_cea" name=" iiceprod"/>95 <field field_ref="ist_ipa" name="iicetemp"/>96 <field field_ref="ioceflxb" name="ioceflxb"/>97 <field field_ref="uice_ipa" name="iicevelu"/>98 <field field_ref="vice_ipa" name="iicevelv"/>99 <field field_ref="utau_ice" name="iicestru"/>100 <field field_ref="vtau_ice" name="iicestrv"/>101 <field field_ref="qsr_io_cea" name="iicesflx"/>102 <field field_ref="qns_io_cea" name="iicenflx"/>103 <field field_ref="snowpre" name="isnowpre"/>90 <field field_ref="snowthic_cea" name="snd" long_name="surface_snow_thickness" /> 91 <field field_ref="icethic_cea" name="sit" long_name="sea_ice_thickness" /> 92 <field field_ref="iceprod_cea" name="sip" long_name="sea_ice_thickness" /> 93 <field field_ref="ist_ipa" /> 94 <field field_ref="ioceflxb" /> 95 <field field_ref="uice_ipa" /> 96 <field field_ref="vice_ipa" /> 97 <field field_ref="utau_ice" /> 98 <field field_ref="vtau_ice" /> 99 <field field_ref="qsr_io_cea" /> 100 <field field_ref="qns_io_cea" /> 101 <field field_ref="snowpre" /> 104 102 </file> 105 103 … … 108 106 <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files --> 109 107 110 <file id=" 1m_ptrc_T" name="auto" description="pisces sms variables" >108 <file id="file9" name_suffix="_ptrc_T" description="pisces sms variables" > 111 109 <field field_ref="DIC" /> 112 110 <field field_ref="Alkalini" /> … … 120 118 </file> 121 119 122 <file id=" 1m_diad_T" name="auto" description="additional pisces diagnostics" >120 <file id="file10" name_suffix="_diad_T" description="additional pisces diagnostics" > 123 121 <field field_ref="Cflx" /> 124 122 <field field_ref="Dpco2" /> … … 126 124 127 125 </file_group> 126 128 127 <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files --> 129 128 <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files --> … … 133 132 <file_group id="1y" output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 134 133 135 <file id=" 1y_ptrc_T" name="auto" description="pisces sms variables" >134 <file id="file11" name_suffix="_ptrc_T" description="pisces sms variables" > 136 135 <field field_ref="DIC" /> 137 136 <field field_ref="Alkalini" /> … … 160 159 </file> 161 160 162 <file id=" 1y_diad_T" name="auto" description="additional pisces diagnostics" >161 <file id="file12" name_suffix="_diad_T" description="additional pisces diagnostics" > 163 162 <field field_ref="PH" /> 164 163 <field field_ref="CO3" /> … … 212 211 213 212 </file_group> 213 214 214 <file_group id="2y" output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files --> 215 215 <file_group id="5y" output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files --> … … 217 217 218 218 </file_definition> 219 219 220 220 <!-- 221 221 ============================================================================================================ -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
r4147 r4152 49 49 ppkth2 = 999999. ! 50 50 ppacr2 = 999999. ! 51 / 52 !----------------------------------------------------------------------- 53 &namcrs ! Grid coarsening for dynamics output and/or 54 ! passive tracer coarsened online simulations 55 !----------------------------------------------------------------------- 51 56 / 52 57 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg
r4148 r4152 2 2 !! NEMO/TOP1 : Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_top_ref 3 3 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 4 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 4 !----------------------------------------------------------------------- 5 &namtrc_run ! run information 6 !----------------------------------------------------------------------- 7 ln_top_euler = .true. ! use Euler time-stepping for TOP 8 / 9 !----------------------------------------------------------------------- 5 10 &namtrc ! tracers definition 6 ! ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,11 !----------------------------------------------------------------------- 7 12 ln_top_euler = .true. ! use Euler time-stepping for TOP 8 13 ! ! name ! title of the field ! initial data ! initial data ! save ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/iodef.xml
r3771 r4152 20 20 ============================================================================================================ 21 21 --> 22 23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 22 24 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 25 26 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 27 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 35 36 <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files --> 36 37 37 <file id=" 1m_ptrc_T" name="auto" description="pisces sms variables" >38 <file id="file1" name_suffix="_ptrc_T" description="pisces sms variables" > 38 39 <field field_ref="DIC" /> 39 40 <field field_ref="Alkalini" /> … … 47 48 </file> 48 49 49 <file id=" 1m_diad_T" name="auto" description="additional pisces diagnostics" >50 <file id="file2" name_suffix="_diad_T" description="additional pisces diagnostics" > 50 51 <field field_ref="Cflx" /> 51 52 <field field_ref="Dpco2" /> … … 60 61 <file_group id="1y" output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 61 62 62 <file id=" 1y_ptrc_T" name="auto" description="pisces sms variables" >63 <file id="file3" name_suffix="_ptrc_T" description="pisces sms variables" > 63 64 <field field_ref="DIC" /> 64 65 <field field_ref="Alkalini" /> … … 87 88 </file> 88 89 89 <file id=" 1y_diad_T" name="auto" description="additional pisces diagnostics" >90 <file id="file4" name_suffix="_ptrc_T" description="additional pisces diagnostics" > 90 91 <field field_ref="PH" /> 91 92 <field field_ref="CO3" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
r4148 r4152 55 55 ppacr2 = 999999. ! 56 56 / 57 57 !----------------------------------------------------------------------- 58 &namcrs ! Grid coarsening for dynamics output and/or 59 ! passive tracer coarsened online simulations 60 !----------------------------------------------------------------------- 61 / 58 62 !----------------------------------------------------------------------- 59 63 &namsbc ! Surface Boundary Condition (surface module) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg
r4148 r4152 2 2 !! NEMO/TOP1 : ORCA2_OFF_PISCES configuration namelist used to overwrite SHARED/namelist_top 3 3 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 4 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 4 !----------------------------------------------------------------------- 5 &namtrc_run ! run information 6 !----------------------------------------------------------------------- 7 ln_top_euler = .true. ! use Euler time-stepping for TOP 8 / 9 !----------------------------------------------------------------------- 5 10 &namtrc ! tracers definition 6 ! ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,11 !----------------------------------------------------------------------- 7 12 ln_top_euler = .true. ! use Euler time-stepping for TOP 8 13 nn_writetrc = 1460 ! time step frequency for sn_tracer outputs -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg
r4147 r4152 50 50 / 51 51 !----------------------------------------------------------------------- 52 &namcrs ! Grid coarsening for dynamics output and/or 53 ! passive tracer coarsened online simulations 54 !----------------------------------------------------------------------- 55 / 56 !----------------------------------------------------------------------- 52 57 &namctl ! Control prints & Benchmark 53 58 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/SHARED/field_def.xml
r4148 r4152 29 29 <field id="mldr10_1" long_name="Mixed Layer Depth 0.01 ref.10m" unit="m" /> 30 30 <field id="rhop" long_name="potential density (sigma0)" unit="kg/m3" grid_ref="grid_T_3D"/> 31 <field id="eken" long_name="kinetic energy" unit="m2/s2" grid_ref="grid_T_3D"/> 32 <field id="hdiv" long_name="horizontal divergence" unit="s-1" grid_ref="grid_T_3D"/> 31 33 <!-- next variables available with key_diahth --> 32 34 <field id="mlddzt" long_name="Thermocline Depth (max dT/dz)" unit="m" /> … … 140 142 <field id="uoce" long_name="ocean current along i-axis" unit="m/s" grid_ref="grid_U_3D" /> 141 143 <field id="uocetr_eff" long_name="Effective ocean transport along i-axis" unit="m3/s" grid_ref="grid_U_3D" /> 144 <field id="uocet" long_name="ocean transport along i-axis times temperature" unit="degC.m/s" grid_ref="grid_U_3D" /> 145 <field id="uoces" long_name="ocean transport along i-axis times salinity" unit="psu.m/s" grid_ref="grid_U_3D" /> 142 146 <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv --> 143 147 <field id="uoce_eiv" long_name="EIV ocean current along i-axis" unit="m/s" grid_ref="grid_U_3D" /> … … 159 163 <field id="voce" long_name="ocean current along j-axis" unit="m/s" grid_ref="grid_V_3D" /> 160 164 <field id="vocetr_eff" long_name="Effective ocean transport along j-axis" unit="m3/s" grid_ref="grid_V_3D" /> 165 <field id="vocet" long_name="ocean transport along j-axis times temperature" unit="degC.m/s" grid_ref="grid_V_3D" /> 166 <field id="voces" long_name="ocean transport along j-axis times salinity" unit="psu.m/s" grid_ref="grid_V_3D" /> 161 167 <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv --> 162 168 <field id="voce_eiv" long_name="EIV ocean current along j-axis" unit="m/s" grid_ref="grid_V_3D" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/SHARED/namelist_ref
r4147 r4152 126 126 rn_rdtmax = 28800. ! maximum time step on tracers (used if nn_acc=1) 127 127 rn_rdth = 800. ! depth variation of tracer time step (used if nn_acc=1) 128 ln_crs = .false. ! Logical switch for coarsening module 128 129 jphgr_msh = 0 ! type of horizontal mesh 129 130 ! = 0 curvilinear coordinate on the sphere read in coordinate.nc … … 149 150 ppkth2 = 48.029893720000 ! 150 151 ppacr2 = 13.000000000000 ! 152 / 153 !----------------------------------------------------------------------- 154 &namcrs ! Grid coarsening for dynamics output and/or 155 ! passive tracer coarsened online simulations 156 !----------------------------------------------------------------------- 157 nn_factx = 3 ! Reduction factor of x-direction 158 nn_facty = 3 ! Reduction factor of y-direction 159 nn_binref = 0 ! Bin centering preference: NORTH or EQUAT 160 ! 0, coarse grid is binned with preferential treatment of the north fold 161 ! 1, coarse grid is binned with centering at the equator 162 ! Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty. 163 nn_msh_crs = 1 ! create (=1) a mesh file or not (=0) 164 nn_crs_kz = 0 ! 0, MEAN of volume boxes 165 ! 1, MAX of boxes 166 ! 2, MIN of boxes 167 ln_crs_wn = .true. ! wn coarsened (T) or computed using horizontal divergence ( F ) 151 168 / 152 169 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/SHARED/namelist_top_ref
r4148 r4152 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 !! NEMO/TOP1 : 1 - tracer definition (namtrc ) 3 !! 2 - tracer data initialisation (namtrc_dta) 4 !! 3 - tracer advection (namtrc_adv) 5 !! 4 - tracer lateral diffusion (namtrc_ldf) 6 !! 5 - tracer vertical physics (namtrc_zdf) 7 !! 6 - tracer newtonian damping (namtrc_dmp) 8 !! 7 - dynamical tracer trends (namtrc_trd) 9 !! 8 - tracer output diagonstics (namtrc_dia) 2 !! NEMO/TOP1 : - tracer run information (namtrc_run) 3 !! - tracer definition (namtrc ) 4 !! - tracer data initialisation (namtrc_dta) 5 !! - tracer advection (namtrc_adv) 6 !! - tracer lateral diffusion (namtrc_ldf) 7 !! - tracer vertical physics (namtrc_zdf) 8 !! - tracer newtonian damping (namtrc_dmp) 9 !! - dynamical tracer trends (namtrc_trd) 10 !! - tracer output diagonstics (namtrc_dia) 10 11 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 11 ! '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''12 &namtrc ! tracers definition13 ! ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,14 nn_dttrc = 1 ! time step frequency for passive sn_tracers 12 !----------------------------------------------------------------------- 13 &namtrc_run ! run information 14 !----------------------------------------------------------------------- 15 nn_dttrc = 1 ! time step frequency for passive sn_tracers 15 16 nn_writetrc = 5475 ! time step frequency for sn_tracer outputs 16 ln_top_euler = .false. ! use Euler time-stepping for TOP17 ln_top_euler = .false. ! use Euler time-stepping for TOP 17 18 ln_rsttr = .false. ! start from a restart file (T) or not (F) 18 19 nn_rsttr = 0 ! restart control = 0 initial time step is not compared to the restart file value 19 20 20 ! = 1 do not use the value in the restart file 21 ! = 2 calendar parameters read in the restart file 21 22 cn_trcrst_in = "restart_trc" ! suffix of pass. sn_tracer restart name (input) 22 23 cn_trcrst_out = "restart_trc" ! suffix of pass. sn_tracer restart name (output) 24 / 25 !----------------------------------------------------------------------- 26 &namtrc ! tracers definition 27 !----------------------------------------------------------------------- 23 28 ln_trcdta = .true. ! Initialisation from data input file (T) or not (F) 24 29 ln_trcdmp = .false. ! add a damping termn (T) or not (F) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/cfg.txt
r4148 r4152 4 4 AMM12 OPA_SRC 5 5 ORCA2_SAS_LIM OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC 6 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 6 7 ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 7 8 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 8 9 GYRE_PISCES OPA_SRC TOP_SRC 9 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r4147 r4152 47 47 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 48 48 49 USE trc 50 USE trcnam 51 USE trcrst 52 49 53 IMPLICIT NONE 50 54 PRIVATE … … 89 93 istp = nit000 90 94 ! 91 CALL iom_init ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)95 CALL iom_init( "nemo" ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 92 96 ! 93 97 DO WHILE ( istp <= nitend .AND. nstop == 0 ) ! time stepping 94 98 ! 95 99 IF( istp /= nit000 ) CALL day ( istp ) ! Calendar (day was already called at nit000 in day_init) 96 CALL iom_setkt( istp - nit000 + 1 )! say to iom that we are at time step kstp100 CALL iom_setkt( istp - nit000 + 1, "nemo" ) ! say to iom that we are at time step kstp 97 101 CALL dta_dyn ( istp ) ! Interpolation of the dynamical fields 98 102 CALL trc_stp ( istp ) ! time-stepping … … 270 274 IF( lk_trabbl ) CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme 271 275 276 CALL trc_nam_run ! Needed to get restart parameters for passive tracers 277 IF( ln_rsttr ) THEN 278 neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 279 CALL trc_rst_cal( nit000, 'READ' ) ! calendar 280 ELSE 281 neuler = 0 ! Set time-step indicator at nit000 (euler) 282 CALL day_init ! set calendar 283 ENDIF 284 ! ! Dynamics 285 CALL dta_dyn_init ! Initialization for the dynamics 286 272 287 ! ! Passive tracers 273 288 CALL trc_init ! Passive tracers initialization 274 ! ! Dynamics275 CALL dta_dyn_init ! Initialization for the dynamics276 289 277 290 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA … … 432 445 ierr = ierr + zdf_oce_alloc () ! ocean vertical physics 433 446 ! 434 ierr = ierr + lib_mpp_alloc (numout) ! mpp exchanges435 447 ierr = ierr + trc_oce_alloc () ! shared TRC / TRA arrays 436 448 ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r4147 r4152 21 21 USE bdy_par ! (for lk_bdy) 22 22 USE timing ! preformance summary 23 USE lib_fortran 24 USE sbcrnf 23 25 24 26 IMPLICIT NONE … … 33 35 REAL(dp) :: surf_tot , vol_tot ! 34 36 REAL(dp) :: frc_t , frc_s , frc_v ! global forcing trends 37 REAL(dp) :: frc_wn_t , frc_wn_s ! global forcing trends 35 38 REAL(dp) :: fact1 ! conversion factors 36 39 REAL(dp) :: fact21 , fact22 ! - - … … 38 41 REAL(dp), DIMENSION(:,:) , ALLOCATABLE :: surf , ssh_ini ! 39 42 REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: hc_loc_ini, sc_loc_ini, e3t_ini ! 43 REAL(dp), DIMENSION(:,:) , ALLOCATABLE :: ssh_hc_loc_ini, ssh_sc_loc_ini 40 44 41 45 !! * Substitutions … … 67 71 INTEGER :: jk ! dummy loop indice 68 72 REAL(dp) :: zdiff_hc , zdiff_sc ! heat and salt content variations 73 REAL(dp) :: zdiff_hc1 , zdiff_sc1 ! heat and salt content variations of ssh 69 74 REAL(dp) :: zdiff_v1 , zdiff_v2 ! volume variation 70 REAL(dp) :: z 1_rau0 ! local scalars75 REAL(dp) :: zerr_hc1 , zerr_sc1 ! Non conservation due to free surface 71 76 REAL(dp) :: zdeltat ! - - 72 77 REAL(dp) :: z_frc_trd_t , z_frc_trd_s ! - - 73 78 REAL(dp) :: z_frc_trd_v ! - - 79 REAL(dp) :: z_wn_trd_t , z_wn_trd_s ! - - 80 REAL(dp) :: z_ssh_hc , z_ssh_sc ! - - 74 81 !!--------------------------------------------------------------------------- 75 82 IF( nn_timing == 1 ) CALL timing_start('dia_hsb') … … 78 85 ! 1 - Trends due to forcing ! 79 86 ! ------------------------- ! 80 z1_rau0 = 1.e0 / rau0 81 z_frc_trd_v = z1_rau0 * SUM( - ( emp(:,:) - rnf(:,:) ) * surf(:,:) ) ! volume fluxes 82 z_frc_trd_t = SUM( sbc_tsc(:,:,jp_tem) * surf(:,:) ) ! heat fluxes 83 z_frc_trd_s = SUM( sbc_tsc(:,:,jp_sal) * surf(:,:) ) ! salt fluxes 87 z_frc_trd_v = r1_rau0 * glob_sum( - ( emp(:,:) - rnf(:,:) ) * surf(:,:) ) ! volume fluxes 88 z_frc_trd_t = glob_sum( sbc_tsc(:,:,jp_tem) * surf(:,:) ) ! heat fluxes 89 z_frc_trd_s = glob_sum( sbc_tsc(:,:,jp_sal) * surf(:,:) ) ! salt fluxes 90 ! Add runoff heat & salt input 91 IF( ln_rnf ) z_frc_trd_t = z_frc_trd_t + glob_sum( rnf_tsc(:,:,jp_tem) * surf(:,:) ) 92 IF( ln_rnf_sal) z_frc_trd_s = z_frc_trd_s + glob_sum( rnf_tsc(:,:,jp_sal) * surf(:,:) ) 84 93 ! Add penetrative solar radiation 85 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * SUM( qsr (:,:) * surf(:,:) )94 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( qsr (:,:) * surf(:,:) ) 86 95 ! Add geothermal heat flux 87 IF( ln_trabbc ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * SUM( qgh_trd0(:,:) * surf(:,:) ) 88 IF( lk_mpp ) THEN 89 CALL mpp_sum( z_frc_trd_v ) 90 CALL mpp_sum( z_frc_trd_t ) 91 ENDIF 96 IF( ln_trabbc ) z_frc_trd_t = z_frc_trd_t + glob_sum( qgh_trd0(:,:) * surf(:,:) ) 97 IF( .NOT. lk_vvl ) THEN 98 z_wn_trd_t = - glob_sum( surf(:,:) * wn(:,:,1) * tsb(:,:,1,jp_tem) ) 99 z_wn_trd_s = - glob_sum( surf(:,:) * wn(:,:,1) * tsb(:,:,1,jp_sal) ) 100 ENDIF 101 92 102 frc_v = frc_v + z_frc_trd_v * rdt 93 103 frc_t = frc_t + z_frc_trd_t * rdt 94 104 frc_s = frc_s + z_frc_trd_s * rdt 105 ! ! Advection flux through fixed surface (z=0) 106 IF( .NOT. lk_vvl ) THEN 107 frc_wn_t = frc_wn_t + z_wn_trd_t * rdt 108 frc_wn_s = frc_wn_s + z_wn_trd_s * rdt 109 ENDIF 95 110 96 111 ! ----------------------- ! … … 100 115 zdiff_hc = 0.d0 101 116 zdiff_sc = 0.d0 117 102 118 ! volume variation (calculated with ssh) 103 zdiff_v1 = SUM( surf(:,:) * tmask(:,:,1) * ( sshn(:,:) - ssh_ini(:,:) ) ) 119 zdiff_v1 = glob_sum( surf(:,:) * ( sshn(:,:) - ssh_ini(:,:) ) ) 120 121 ! heat & salt content variation (associated with ssh) 122 IF( .NOT. lk_vvl ) THEN 123 z_ssh_hc = glob_sum( surf(:,:) * ( tsn(:,:,1,jp_tem) * sshn(:,:) - ssh_hc_loc_ini(:,:) ) ) 124 z_ssh_sc = glob_sum( surf(:,:) * ( tsn(:,:,1,jp_sal) * sshn(:,:) - ssh_sc_loc_ini(:,:) ) ) 125 ENDIF 126 104 127 DO jk = 1, jpkm1 105 106 zdiff_v2 = zdiff_v2 + SUM( surf(:,:) * tmask(:,:,jk) &128 ! volume variation (calculated with scale factors) 129 zdiff_v2 = zdiff_v2 + glob_sum( surf(:,:) * tmask(:,:,jk) & 107 130 & * ( fse3t_n(:,:,jk) & 108 131 & - e3t_ini(:,:,jk) ) ) 109 132 ! heat content variation 110 zdiff_hc = zdiff_hc + SUM( surf(:,:) * tmask(:,:,jk) &133 zdiff_hc = zdiff_hc + glob_sum( surf(:,:) * tmask(:,:,jk) & 111 134 & * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) & 112 135 & - hc_loc_ini(:,:,jk) ) ) 113 136 ! salt content variation 114 zdiff_sc = zdiff_sc + SUM( surf(:,:) * tmask(:,:,jk) &137 zdiff_sc = zdiff_sc + glob_sum( surf(:,:) * tmask(:,:,jk) & 115 138 & * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) & 116 139 & - sc_loc_ini(:,:,jk) ) ) 117 140 ENDDO 118 141 119 IF( lk_mpp ) THEN120 CALL mpp_sum( zdiff_hc )121 CALL mpp_sum( zdiff_sc )122 CALL mpp_sum( zdiff_v1 )123 CALL mpp_sum( zdiff_v2 )124 ENDIF125 126 142 ! Substract forcing from heat content, salt content and volume variations 127 143 zdiff_v1 = zdiff_v1 - frc_v 128 zdiff_v2 = zdiff_v2 - frc_v144 IF( lk_vvl ) zdiff_v2 = zdiff_v2 - frc_v 129 145 zdiff_hc = zdiff_hc - frc_t 130 146 zdiff_sc = zdiff_sc - frc_s 147 IF( .NOT. lk_vvl ) THEN 148 zdiff_hc1 = zdiff_hc + z_ssh_hc 149 zdiff_sc1 = zdiff_sc + z_ssh_sc 150 zerr_hc1 = z_ssh_hc - frc_wn_t 151 zerr_sc1 = z_ssh_sc - frc_wn_s 152 ENDIF 131 153 132 154 ! ----------------------- ! … … 134 156 ! ----------------------- ! 135 157 zdeltat = 1.e0 / ( ( kt - nit000 + 1 ) * rdt ) 136 WRITE(numhsb , 9020) kt , zdiff_hc / vol_tot , zdiff_hc * fact1 * zdeltat, & 137 & zdiff_sc / vol_tot , zdiff_sc * fact21 * zdeltat, zdiff_sc * fact22 * zdeltat, & 138 & zdiff_v1 , zdiff_v1 * fact31 * zdeltat, zdiff_v1 * fact32 * zdeltat, & 139 & zdiff_v2 , zdiff_v2 * fact31 * zdeltat, zdiff_v2 * fact32 * zdeltat 158 IF( lk_vvl ) THEN 159 WRITE(numhsb , 9020) kt , zdiff_hc / vol_tot , zdiff_hc * fact1 * zdeltat, & 160 & zdiff_sc / vol_tot , zdiff_sc * fact21 * zdeltat, zdiff_sc * fact22 * zdeltat, & 161 & zdiff_v1 , zdiff_v1 * fact31 * zdeltat, zdiff_v1 * fact32 * zdeltat, & 162 & zdiff_v2 , zdiff_v2 * fact31 * zdeltat, zdiff_v2 * fact32 * zdeltat 163 ELSE 164 WRITE(numhsb , 9030) kt , zdiff_hc1 / vol_tot , zdiff_hc1 * fact1 * zdeltat, & 165 & zdiff_sc1 / vol_tot , zdiff_sc1 * fact21 * zdeltat, zdiff_sc1 * fact22 * zdeltat, & 166 & zdiff_v1 , zdiff_v1 * fact31 * zdeltat, zdiff_v1 * fact32 * zdeltat, & 167 & zerr_hc1 / vol_tot , zerr_sc1 / vol_tot 168 ENDIF 140 169 141 170 IF ( kt == nitend ) CLOSE( numhsb ) … … 144 173 145 174 9020 FORMAT(I5,11D15.7) 175 9030 FORMAT(I5,10D15.7) 146 176 ! 147 177 END SUBROUTINE dia_hsb … … 186 216 187 217 IF( .NOT. ln_diahsb ) RETURN 218 IF( .NOT. lk_mpp_rep ) & 219 CALL ctl_stop (' Your global mpp_sum if performed in single precision - 64 bits -', & 220 & ' whereas the global sum to be precise must be done in double precision ',& 221 & ' please add key_mpp_rep') 188 222 189 223 ! ------------------- ! 190 224 ! 1 - Allocate memory ! 191 225 ! ------------------- ! 192 ALLOCATE( hc_loc_ini(jpi,jpj,jpk), STAT=ierror ) 226 ALLOCATE( hc_loc_ini(jpi,jpj,jpk), sc_loc_ini(jpi,jpj,jpk), & 227 & ssh_hc_loc_ini(jpi,jpj), ssh_sc_loc_ini(jpi,jpj), & 228 & e3t_ini(jpi,jpj,jpk) , & 229 & surf(jpi,jpj), ssh_ini(jpi,jpj), STAT=ierror ) 193 230 IF( ierror > 0 ) THEN 194 231 CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' ) ; RETURN 195 ENDIF196 ALLOCATE( sc_loc_ini(jpi,jpj,jpk), STAT=ierror )197 IF( ierror > 0 ) THEN198 CALL ctl_stop( 'dia_hsb: unable to allocate sc_loc_ini' ) ; RETURN199 ENDIF200 ALLOCATE( e3t_ini(jpi,jpj,jpk) , STAT=ierror )201 IF( ierror > 0 ) THEN202 CALL ctl_stop( 'dia_hsb: unable to allocate e3t_ini' ) ; RETURN203 ENDIF204 ALLOCATE( surf(jpi,jpj) , STAT=ierror )205 IF( ierror > 0 ) THEN206 CALL ctl_stop( 'dia_hsb: unable to allocate surf' ) ; RETURN207 ENDIF208 ALLOCATE( ssh_ini(jpi,jpj) , STAT=ierror )209 IF( ierror > 0 ) THEN210 CALL ctl_stop( 'dia_hsb: unable to allocate ssh_ini' ) ; RETURN211 232 ENDIF 212 233 … … 221 242 cl_name = 'heat_salt_volume_budgets.txt' ! name of output file 222 243 surf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:) ! masked surface grid cell area 223 surf_tot = SUM( surf(:,:) ) ! total ocean surface area244 surf_tot = glob_sum( surf(:,:) ) ! total ocean surface area 224 245 vol_tot = 0.d0 ! total ocean volume 225 246 DO jk = 1, jpkm1 226 vol_tot = vol_tot + SUM( surf(:,:) * tmask(:,:,jk) &227 & * fse3t_n(:,:,jk) )247 vol_tot = vol_tot + glob_sum( surf(:,:) * tmask(:,:,jk) & 248 & * fse3t_n(:,:,jk) ) 228 249 END DO 229 IF( lk_mpp ) THEN230 CALL mpp_sum( vol_tot )231 CALL mpp_sum( surf_tot )232 ENDIF233 250 234 251 CALL ctl_opn( numhsb , cl_name , 'UNKNOWN' , 'FORMATTED' , 'SEQUENTIAL' , 1 , numout , lwp , 1 ) 235 ! 12345678901234567890123456789012345678901234567890123456789012345678901234567890 -> 80 236 WRITE( numhsb, 9010 ) "kt | heat content budget | salt content budget ", & 237 ! 123456789012345678901234567890123456789012345 -> 45 238 & "| volume budget (ssh) ", & 239 ! 678901234567890123456789012345678901234567890 -> 45 240 & "| volume budget (e3t) " 241 WRITE( numhsb, 9010 ) " | [C] [W/m2] | [psu] [mmm/s] [SV] ", & 242 & "| [m3] [mmm/s] [SV] ", & 243 & "| [m3] [mmm/s] [SV] " 244 252 IF( lk_vvl ) THEN 253 ! 12345678901234567890123456789012345678901234567890123456789012345678901234567890 -> 80 254 WRITE( numhsb, 9010 ) "kt | heat content budget | salt content budget ", & 255 ! 123456789012345678901234567890123456789012345 -> 45 256 & "| volume budget (ssh) ", & 257 ! 678901234567890123456789012345678901234567890 -> 45 258 & "| volume budget (e3t) " 259 WRITE( numhsb, 9010 ) " | [C] [W/m2] | [psu] [mmm/s] [SV] ", & 260 & "| [m3] [mmm/s] [SV] ", & 261 & "| [m3] [mmm/s] [SV] " 262 ELSE 263 ! 12345678901234567890123456789012345678901234567890123456789012345678901234567890 -> 80 264 WRITE( numhsb, 9011 ) "kt | heat content budget | salt content budget ", & 265 ! 123456789012345678901234567890123456789012345 -> 45 266 & "| volume budget (ssh) ", & 267 ! 678901234567890123456789012345678901234567890 -> 45 268 & "| Non conservation due to free surface " 269 WRITE( numhsb, 9011 ) " | [C] [W/m2] | [psu] [mmm/s] [SV] ", & 270 & "| [m3] [mmm/s] [SV] ", & 271 & "| [heat - C] [salt - psu] " 272 ENDIF 245 273 ! --------------- ! 246 274 ! 3 - Conversions ! (factors will be multiplied by duration afterwards) … … 268 296 frc_t = 0.d0 ! heat content - - - - 269 297 frc_s = 0.d0 ! salt content - - - - 298 IF( .NOT. lk_vvl ) THEN 299 ssh_hc_loc_ini(:,:) = tsn(:,:,1,jp_tem) * ssh_ini(:,:) ! initial heat content associated with ssh 300 ssh_sc_loc_ini(:,:) = tsn(:,:,1,jp_sal) * ssh_ini(:,:) ! initial salt content associated with ssh 301 frc_wn_t = 0.d0 302 frc_wn_s = 0.d0 303 ENDIF 270 304 ! 271 305 9010 FORMAT(A80,A45,A45) 306 9011 FORMAT(A80,A45,A45) 272 307 ! 273 308 END SUBROUTINE dia_hsb_init -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r4147 r4152 12 12 !! 2.0 ! 2005-11 (V. Garnier) Surface pressure gradient organization 13 13 !! 3.3 ! 2010-11 (G. Madec) initialisation in C1D configuration 14 !! 3.6 ! 2013 ( J. Simeon, C. Calone, G. Madec, C. Ethe ) Online coarsening of outputs 14 15 !!---------------------------------------------------------------------- 15 16 … … 126 127 NAMELIST/namdom/ nn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh , rn_hmin, & 127 128 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & 128 & rn_rdtmax, rn_rdth , nn_baro , nn_closea , &129 & rn_rdtmax, rn_rdth , nn_baro , nn_closea , ln_crs, & 129 130 & jphgr_msh, & 130 131 & ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & … … 216 217 READ ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 217 218 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 218 219 220 ! 219 221 REWIND( numnam_cfg ) ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 220 222 READ ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) … … 235 237 WRITE(numout,*) ' = 2 mesh and mask ' 236 238 WRITE(numout,*) ' = 3 mesh_hgr, msh_zgr and mask' 237 WRITE(numout,*) ' ocean time step rn_rdt = ', rn_rdt 238 WRITE(numout,*) ' asselin time filter parameter rn_atfp = ', rn_atfp 239 WRITE(numout,*) ' time-splitting: nb of sub time-step nn_baro = ', nn_baro 240 WRITE(numout,*) ' acceleration of converge nn_acc = ', nn_acc 241 WRITE(numout,*) ' nn_acc=1: surface tracer rdt rn_rdtmin = ', rn_rdtmin 242 WRITE(numout,*) ' bottom tracer rdt rdtmax = ', rn_rdtmax 243 WRITE(numout,*) ' depth of transition rn_rdth = ', rn_rdth 244 WRITE(numout,*) ' suppression of closed seas (=0) nn_closea = ', nn_closea 239 WRITE(numout,*) ' ocean time step rn_rdt = ', rn_rdt 240 WRITE(numout,*) ' asselin time filter parameter rn_atfp = ', rn_atfp 241 WRITE(numout,*) ' time-splitting: nb of sub time-step nn_baro = ', nn_baro 242 WRITE(numout,*) ' acceleration of converge nn_acc = ', nn_acc 243 WRITE(numout,*) ' nn_acc=1: surface tracer rdt rn_rdtmin = ', rn_rdtmin 244 WRITE(numout,*) ' bottom tracer rdt rdtmax = ', rn_rdtmax 245 WRITE(numout,*) ' depth of transition rn_rdth = ', rn_rdth 246 WRITE(numout,*) ' suppression of closed seas (=0) nn_closea = ', nn_closea 247 WRITE(numout,*) ' online coarsening of dynamical fields ln_crs = ', ln_crs 245 248 WRITE(numout,*) ' type of horizontal mesh jphgr_msh = ', jphgr_msh 246 249 WRITE(numout,*) ' longitude of first raw and column T-point ppglam0 = ', ppglam0 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r4148 r4152 37 37 # endif 38 38 USE ioipsl, ONLY : ju2ymds ! for calendar 39 USE crs ! Grid coarsening 39 40 40 41 IMPLICIT NONE … … 47 48 #endif 48 49 PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get, iom_gettime, iom_rstput, iom_put 49 PUBLIC iom_getatt 50 PUBLIC iom_getatt, iom_context_finalize 50 51 51 52 PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d … … 69 70 MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d 70 71 END INTERFACE 71 #if defined key_iomput72 INTERFACE iom_setkt73 MODULE PROCEDURE xios_update_calendar74 END INTERFACE75 # endif76 72 77 73 !!---------------------------------------------------------------------- … … 83 79 CONTAINS 84 80 85 SUBROUTINE iom_init 81 SUBROUTINE iom_init( cdname ) 86 82 !!---------------------------------------------------------------------- 87 83 !! *** ROUTINE *** … … 90 86 !! 91 87 !!---------------------------------------------------------------------- 88 CHARACTER(len=*), INTENT(in) :: cdname 92 89 #if defined key_iomput 93 90 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0) … … 97 94 !!---------------------------------------------------------------------- 98 95 99 clname = "nemo"100 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(c lname)96 clname = cdname 97 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(cdname) 101 98 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 102 CALL iom_swap 99 CALL iom_swap( cdname ) 103 100 104 101 ! calendar parameters … … 113 110 ! horizontal grid definition 114 111 CALL set_scalar 115 CALL set_grid( "T", glamt, gphit ) 116 CALL set_grid( "U", glamu, gphiu ) 117 CALL set_grid( "V", glamv, gphiv ) 118 CALL set_grid( "W", glamt, gphit ) 112 113 IF( TRIM(cdname) == "nemo" ) THEN 114 CALL set_grid( "T", glamt, gphit ) 115 CALL set_grid( "U", glamu, gphiu ) 116 CALL set_grid( "V", glamv, gphiv ) 117 CALL set_grid( "W", glamt, gphit ) 118 ENDIF 119 120 IF( TRIM(cdname) == "nemo_crs" ) THEN 121 CALL dom_grid_crs ! Save the parent grid information & Switch to coarse grid domain 122 ! 123 CALL set_grid( "T", glamt_crs, gphit_crs ) 124 CALL set_grid( "U", glamu_crs, gphiu_crs ) 125 CALL set_grid( "V", glamv_crs, gphiv_crs ) 126 CALL set_grid( "W", glamt_crs, gphit_crs ) 127 ! 128 CALL dom_grid_glo ! Return to parent grid domain 129 ENDIF 130 119 131 120 132 ! vertical grid definition … … 141 153 142 154 143 SUBROUTINE iom_swap 155 SUBROUTINE iom_swap( cdname ) 144 156 !!--------------------------------------------------------------------- 145 157 !! *** SUBROUTINE iom_swap *** … … 147 159 !! ** Purpose : swap context between different agrif grid for xmlio_server 148 160 !!--------------------------------------------------------------------- 161 CHARACTER(len=*), INTENT(in) :: cdname 149 162 #if defined key_iomput 150 163 TYPE(xios_context) :: nemo_hdl 151 164 152 IF( TRIM(Agrif_CFixed()) == '0' ) THEN153 CALL xios_get_handle( "nemo",nemo_hdl)154 ELSE155 CALL xios_get_handle(TRIM(Agrif_CFixed())//"_ nemo",nemo_hdl)156 ENDIF157 CALL xios_set_current_context(nemo_hdl)158 165 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 166 CALL xios_get_handle(TRIM(cdname),nemo_hdl) 167 ELSE 168 CALL xios_get_handle(TRIM(Agrif_CFixed())//"_"//TRIM(cdname),nemo_hdl) 169 ENDIF 170 ! 171 CALL xios_set_current_context(nemo_hdl) 159 172 #endif 173 ! 160 174 END SUBROUTINE iom_swap 161 175 … … 1100 1114 CALL xios_solve_inheritance() 1101 1115 END SUBROUTINE iom_set_grid_attr 1116 1117 SUBROUTINE iom_setkt( kt, cdname ) 1118 INTEGER , INTENT(in) :: kt 1119 CHARACTER(LEN=*), INTENT(in) :: cdname 1120 ! 1121 CALL iom_swap( cdname ) ! swap to cdname context 1122 CALL xios_update_calendar(kt) 1123 IF( cdname /= "nemo" ) CALL iom_swap( "nemo" ) ! return back to nemo context 1124 ! 1125 END SUBROUTINE iom_setkt 1126 1127 SUBROUTINE iom_context_finalize( cdname ) 1128 CHARACTER(LEN=*), INTENT(in) :: cdname 1129 ! 1130 CALL iom_swap( cdname ) ! swap to cdname context 1131 CALL xios_context_finalize() ! finalize the context 1132 IF( cdname /= "nemo" ) CALL iom_swap( "nemo" ) ! return back to nemo context 1133 ! 1134 END SUBROUTINE iom_context_finalize 1102 1135 1103 1136 … … 1424 1457 #else 1425 1458 1426 SUBROUTINE iom_setkt( kt ) 1427 INTEGER, INTENT(in ):: kt 1428 IF( .FALSE. ) WRITE(numout,*) kt ! useless test to avoid compilation warnings 1459 1460 SUBROUTINE iom_setkt( kt, cdname ) 1461 INTEGER , INTENT(in):: kt 1462 CHARACTER(LEN=*), INTENT(in) :: cdname 1463 IF( .FALSE. ) WRITE(numout,*) kt, cdname ! useless test to avoid compilation warnings 1429 1464 END SUBROUTINE iom_setkt 1465 1466 SUBROUTINE iom_context_finalize( cdname ) 1467 CHARACTER(LEN=*), INTENT(in) :: cdname 1468 IF( .FALSE. ) WRITE(numout,*) cdname ! useless test to avoid compilation warnings 1469 END SUBROUTINE iom_context_finalize 1430 1470 1431 1471 #endif -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
r3768 r4152 264 264 END SELECT 265 265 ! ! North fold 266 pt3d( 1 ,jpj,:) = zland267 pt3d(jpi,jpj,:) = zland268 266 CALL lbc_nfd( pt3d(:,:,:), cd_type, psgn ) 269 267 ! … … 386 384 END SELECT 387 385 ! ! North fold 388 pt2d( 1 ,1 ) = zland389 pt2d( 1 ,jpj) = zland390 pt2d(jpi,jpj) = zland391 386 CALL lbc_nfd( pt2d(:,:), cd_type, psgn ) 392 387 ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lbcnfd.F90
r3294 r4152 71 71 pt3d(ji,ijpj,jk) = psgn * pt3d(ijt,ijpj-2,jk) 72 72 END DO 73 pt3d(1,ijpj,jk) = psgn * pt3d(3,ijpj-2,jk) 73 74 DO ji = jpiglo/2+1, jpiglo 74 75 ijt = jpiglo-ji+2 … … 80 81 pt3d(ji,ijpj,jk) = psgn * pt3d(iju,ijpj-2,jk) 81 82 END DO 83 pt3d( 1 ,ijpj,jk) = psgn * pt3d( 2 ,ijpj-2,jk) 84 pt3d(jpiglo,ijpj,jk) = psgn * pt3d(jpiglo-1,ijpj-2,jk) 82 85 DO ji = jpiglo/2, jpiglo-1 83 86 iju = jpiglo-ji+1 … … 90 93 pt3d(ji,ijpj ,jk) = psgn * pt3d(ijt,ijpj-3,jk) 91 94 END DO 95 pt3d(1,ijpj,jk) = psgn * pt3d(3,ijpj-3,jk) 92 96 CASE ( 'F' ) ! F-point 93 97 DO ji = 1, jpiglo-1 … … 96 100 pt3d(ji,ijpj ,jk) = psgn * pt3d(iju,ijpj-3,jk) 97 101 END DO 102 pt3d( 1 ,ijpj,jk) = psgn * pt3d( 2 ,ijpj-3,jk) 103 pt3d(jpiglo,ijpj,jk) = psgn * pt3d(jpiglo-1,ijpj-3,jk) 98 104 END SELECT 99 105 ! … … 111 117 pt3d(ji,ijpj,jk) = psgn * pt3d(iju,ijpj-1,jk) 112 118 END DO 119 pt3d(jpiglo,ijpj,jk) = psgn * pt3d(1,ijpj-1,jk) 113 120 CASE ( 'V' ) ! V-point 114 121 DO ji = 1, jpiglo … … 125 132 pt3d(ji,ijpj ,jk) = psgn * pt3d(iju,ijpj-2,jk) 126 133 END DO 134 pt3d(jpiglo,ijpj,jk) = psgn * pt3d(1,ijpj-2,jk) 127 135 DO ji = jpiglo/2+1, jpiglo-1 128 136 iju = jpiglo-ji … … 199 207 END DO 200 208 END DO 209 pt2d(1,ijpj) = psgn * pt2d(3,ijpj-2) 201 210 DO ji = jpiglo/2+1, jpiglo 202 211 ijt=jpiglo-ji+2 … … 210 219 END DO 211 220 END DO 221 pt2d( 1 ,ijpj ) = psgn * pt2d( 2 ,ijpj-2) 222 pt2d(jpiglo,ijpj ) = psgn * pt2d(jpiglo-1,ijpj-2) 223 pt2d(1 ,ijpj-1) = psgn * pt2d(jpiglo ,ijpj-1) 212 224 DO ji = jpiglo/2, jpiglo-1 213 225 iju = jpiglo-ji+1 … … 221 233 END DO 222 234 END DO 235 pt2d( 1 ,ijpj) = psgn * pt2d( 3 ,ijpj-3) 223 236 CASE ( 'F' ) ! F-point 224 237 DO jl = -1, ipr2dj … … 228 241 END DO 229 242 END DO 243 pt2d( 1 ,ijpj) = psgn * pt2d( 2 ,ijpj-3) 244 pt2d(jpiglo,ijpj) = psgn * pt2d(jpiglo-1,ijpj-3) 245 pt2d(jpiglo,ijpj-1) = psgn * pt2d(jpiglo-1,ijpj-2) 246 pt2d( 1 ,ijpj-1) = psgn * pt2d( 2 ,ijpj-2) 230 247 CASE ( 'I' ) ! ice U-V point (I-point) 231 248 DO jl = 0, ipr2dj … … 271 288 END DO 272 289 END DO 290 pt2d(jpiglo,ijpj) = psgn * pt2d(1,ijpj-1) 273 291 CASE ( 'V' ) ! V-point 274 292 DO jl = 0, ipr2dj … … 289 307 END DO 290 308 END DO 309 pt2d(jpiglo,ijpj) = psgn * pt2d(1,ijpj-2) 291 310 DO ji = jpiglo/2+1, jpiglo-1 292 311 iju = jpiglo-ji -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
r4148 r4152 22 22 !! 'mpp_lnk_bdy_2d' and 'mpp_lnk_obc_2d' routines and update 23 23 !! the mppobc routine to optimize the BDY and OBC communications 24 !! 3.6 ! 2013 ( C. Ethe, G. Madec ) message passing arrays as local variables 24 25 !!---------------------------------------------------------------------- 25 26 … … 72 73 PUBLIC mppsize 73 74 PUBLIC mppsend, mpprecv ! needed by TAM and ICB routines 74 PUBLIC lib_mpp_alloc ! Called in nemogcm.F9075 75 PUBLIC mpp_lnk_bdy_2d, mpp_lnk_bdy_3d 76 76 PUBLIC mpp_lnk_obc_2d, mpp_lnk_obc_3d … … 151 151 REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tampon ! buffer in case of bsend 152 152 153 ! message passing arrays154 REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE :: t4ns, t4sn ! 2 x 3d for north-south & south-north155 REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE :: t4ew, t4we ! 2 x 3d for east-west & west-east156 REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE :: t4p1, t4p2 ! 2 x 3d for north fold157 REAL(wp), DIMENSION(:,:,:,:) , ALLOCATABLE, SAVE :: t3ns, t3sn ! 3d for north-south & south-north158 REAL(wp), DIMENSION(:,:,:,:) , ALLOCATABLE, SAVE :: t3ew, t3we ! 3d for east-west & west-east159 REAL(wp), DIMENSION(:,:,:,:) , ALLOCATABLE, SAVE :: t3p1, t3p2 ! 3d for north fold160 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: t2ns, t2sn ! 2d for north-south & south-north161 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: t2ew, t2we ! 2d for east-west & west-east162 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: t2p1, t2p2 ! 2d for north fold163 164 ! Arrays used in mpp_lbc_north_3d()165 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: tab_3d, xnorthloc166 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, SAVE :: xnorthgloio167 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: foldwk ! Workspace for message transfers avoiding mpi_allgather168 169 ! Arrays used in mpp_lbc_north_2d()170 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: tab_2d, xnorthloc_2d171 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: xnorthgloio_2d172 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: foldwk_2d ! Workspace for message transfers avoiding mpi_allgather173 174 ! Arrays used in mpp_lbc_north_e()175 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: tab_e, xnorthloc_e176 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: xnorthgloio_e177 178 153 ! North fold arrays used to minimise the use of allgather operations. Set in nemo_northcomms (nemogcm) so need to be public 179 154 INTEGER, PUBLIC, PARAMETER :: jpmaxngh = 8 ! Assumed maximum number of active neighbours … … 190 165 !!---------------------------------------------------------------------- 191 166 CONTAINS 192 193 INTEGER FUNCTION lib_mpp_alloc( kumout )194 !!----------------------------------------------------------------------195 !! *** routine lib_mpp_alloc ***196 !!----------------------------------------------------------------------197 INTEGER, INTENT(in) :: kumout ! ocean.output logical unit198 !!----------------------------------------------------------------------199 !200 ALLOCATE( t4ns(jpi,jprecj,jpk,2,2) , t4sn(jpi,jprecj,jpk,2,2) , &201 & t4ew(jpj,jpreci,jpk,2,2) , t4we(jpj,jpreci,jpk,2,2) , &202 & t4p1(jpi,jprecj,jpk,2,2) , t4p2(jpi,jprecj,jpk,2,2) , &203 & t3ns(jpi,jprecj,jpk,2) , t3sn(jpi,jprecj,jpk,2) , &204 & t3ew(jpj,jpreci,jpk,2) , t3we(jpj,jpreci,jpk,2) , &205 & t3p1(jpi,jprecj,jpk,2) , t3p2(jpi,jprecj,jpk,2) , &206 & t2ns(jpi,jprecj ,2) , t2sn(jpi,jprecj ,2) , &207 & t2ew(jpj,jpreci ,2) , t2we(jpj,jpreci ,2) , &208 & t2p1(jpi,jprecj ,2) , t2p2(jpi,jprecj ,2) , &209 !210 & tab_3d(jpiglo,4,jpk) , xnorthloc(jpi,4,jpk) , xnorthgloio(jpi,4,jpk,jpni) , &211 & foldwk(jpi,4,jpk) , &212 !213 & tab_2d(jpiglo,4) , xnorthloc_2d(jpi,4) , xnorthgloio_2d(jpi,4,jpni) , &214 & foldwk_2d(jpi,4) , &215 !216 & tab_e(jpiglo,4+2*jpr2dj) , xnorthloc_e(jpi,4+2*jpr2dj) , xnorthgloio_e(jpi,4+2*jpr2dj,jpni) , &217 !218 & STAT=lib_mpp_alloc )219 !220 IF( lib_mpp_alloc /= 0 ) THEN221 WRITE(kumout,cform_war)222 WRITE(kumout,*) 'lib_mpp_alloc : failed to allocate arrays'223 ENDIF224 !225 END FUNCTION lib_mpp_alloc226 167 227 168 … … 395 336 REAL(wp) :: zland 396 337 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 397 !!---------------------------------------------------------------------- 338 ! 339 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zt3ns, zt3sn ! 3d for north-south & south-north 340 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zt3ew, zt3we ! 3d for east-west & west-east 341 342 !!---------------------------------------------------------------------- 343 344 ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2), & 345 & zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2) ) 398 346 399 347 zland = 0.e0 ! zero by default … … 430 378 iihom = nlci-nreci 431 379 DO jl = 1, jpreci 432 t3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)433 t3we(:,jl,:,1) = ptab(iihom +jl,:,:)380 zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:) 381 zt3we(:,jl,:,1) = ptab(iihom +jl,:,:) 434 382 END DO 435 383 END SELECT … … 440 388 SELECT CASE ( nbondi ) 441 389 CASE ( -1 ) 442 CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 )443 CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )390 CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 ) 391 CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea ) 444 392 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 445 393 CASE ( 0 ) 446 CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )447 CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req2 )448 CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )449 CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )394 CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 ) 395 CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 ) 396 CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea ) 397 CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe ) 450 398 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 451 399 IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 452 400 CASE ( 1 ) 453 CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )454 CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )401 CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 ) 402 CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe ) 455 403 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 456 404 END SELECT … … 462 410 CASE ( -1 ) 463 411 DO jl = 1, jpreci 464 ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)412 ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2) 465 413 END DO 466 414 CASE ( 0 ) 467 415 DO jl = 1, jpreci 468 ptab(jl ,:,:) = t3we(:,jl,:,2)469 ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)416 ptab(jl ,:,:) = zt3we(:,jl,:,2) 417 ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2) 470 418 END DO 471 419 CASE ( 1 ) 472 420 DO jl = 1, jpreci 473 ptab(jl ,:,:) = t3we(:,jl,:,2)421 ptab(jl ,:,:) = zt3we(:,jl,:,2) 474 422 END DO 475 423 END SELECT … … 485 433 ijhom = nlcj-nrecj 486 434 DO jl = 1, jprecj 487 t3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)488 t3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)435 zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:) 436 zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:) 489 437 END DO 490 438 ENDIF … … 495 443 SELECT CASE ( nbondj ) 496 444 CASE ( -1 ) 497 CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 )498 CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )445 CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 ) 446 CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono ) 499 447 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 500 448 CASE ( 0 ) 501 CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )502 CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req2 )503 CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )504 CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )449 CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 ) 450 CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 ) 451 CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono ) 452 CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso ) 505 453 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 506 454 IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 507 455 CASE ( 1 ) 508 CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )509 CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )456 CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 ) 457 CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso ) 510 458 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 511 459 END SELECT … … 517 465 CASE ( -1 ) 518 466 DO jl = 1, jprecj 519 ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)467 ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2) 520 468 END DO 521 469 CASE ( 0 ) 522 470 DO jl = 1, jprecj 523 ptab(:,jl ,:) = t3sn(:,jl,:,2)524 ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)471 ptab(:,jl ,:) = zt3sn(:,jl,:,2) 472 ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2) 525 473 END DO 526 474 CASE ( 1 ) 527 475 DO jl = 1, jprecj 528 ptab(:,jl,:) = t3sn(:,jl,:,2)476 ptab(:,jl,:) = zt3sn(:,jl,:,2) 529 477 END DO 530 478 END SELECT … … 543 491 ! 544 492 ENDIF 493 ! 494 DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we ) 545 495 ! 546 496 END SUBROUTINE mpp_lnk_obc_3d … … 577 527 REAL(wp) :: zland 578 528 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 579 !!---------------------------------------------------------------------- 529 ! 530 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ns, zt2sn ! 2d for north-south & south-north 531 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ew, zt2we ! 2d for east-west & west-east 532 533 !!---------------------------------------------------------------------- 534 535 ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2), & 536 & zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2) ) 580 537 581 538 zland = 0.e0 ! zero by default … … 612 569 iihom = nlci-nreci 613 570 DO jl = 1, jpreci 614 t2ew(:,jl,1) = pt2d(jpreci+jl,:)615 t2we(:,jl,1) = pt2d(iihom +jl,:)571 zt2ew(:,jl,1) = pt2d(jpreci+jl,:) 572 zt2we(:,jl,1) = pt2d(iihom +jl,:) 616 573 END DO 617 574 END SELECT … … 622 579 SELECT CASE ( nbondi ) 623 580 CASE ( -1 ) 624 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )625 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )581 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 ) 582 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 626 583 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 627 584 CASE ( 0 ) 628 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )629 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )630 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )631 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )585 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 586 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 ) 587 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 588 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 632 589 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 633 590 IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err) 634 591 CASE ( 1 ) 635 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )636 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )592 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 593 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 637 594 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 638 595 END SELECT … … 644 601 CASE ( -1 ) 645 602 DO jl = 1, jpreci 646 pt2d(iihom+jl,:) = t2ew(:,jl,2)603 pt2d(iihom+jl,:) = zt2ew(:,jl,2) 647 604 END DO 648 605 CASE ( 0 ) 649 606 DO jl = 1, jpreci 650 pt2d(jl ,:) = t2we(:,jl,2)651 pt2d(iihom+jl,:) = t2ew(:,jl,2)607 pt2d(jl ,:) = zt2we(:,jl,2) 608 pt2d(iihom+jl,:) = zt2ew(:,jl,2) 652 609 END DO 653 610 CASE ( 1 ) 654 611 DO jl = 1, jpreci 655 pt2d(jl ,:) = t2we(:,jl,2)612 pt2d(jl ,:) = zt2we(:,jl,2) 656 613 END DO 657 614 END SELECT … … 665 622 ijhom = nlcj-nrecj 666 623 DO jl = 1, jprecj 667 t2sn(:,jl,1) = pt2d(:,ijhom +jl)668 t2ns(:,jl,1) = pt2d(:,jprecj+jl)624 zt2sn(:,jl,1) = pt2d(:,ijhom +jl) 625 zt2ns(:,jl,1) = pt2d(:,jprecj+jl) 669 626 END DO 670 627 ENDIF … … 675 632 SELECT CASE ( nbondj ) 676 633 CASE ( -1 ) 677 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )678 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )634 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 ) 635 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 679 636 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 680 637 CASE ( 0 ) 681 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )682 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )683 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )684 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )638 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 639 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 ) 640 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 641 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 685 642 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 686 643 IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err) 687 644 CASE ( 1 ) 688 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )689 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )645 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 646 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 690 647 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 691 648 END SELECT … … 697 654 CASE ( -1 ) 698 655 DO jl = 1, jprecj 699 pt2d(:,ijhom+jl) = t2ns(:,jl,2)656 pt2d(:,ijhom+jl) = zt2ns(:,jl,2) 700 657 END DO 701 658 CASE ( 0 ) 702 659 DO jl = 1, jprecj 703 pt2d(:,jl ) = t2sn(:,jl,2)704 pt2d(:,ijhom+jl) = t2ns(:,jl,2)660 pt2d(:,jl ) = zt2sn(:,jl,2) 661 pt2d(:,ijhom+jl) = zt2ns(:,jl,2) 705 662 END DO 706 663 CASE ( 1 ) 707 664 DO jl = 1, jprecj 708 pt2d(:,jl ) = t2sn(:,jl,2)665 pt2d(:,jl ) = zt2sn(:,jl,2) 709 666 END DO 710 667 END SELECT … … 722 679 ! 723 680 ENDIF 681 ! 682 DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we ) 724 683 ! 725 684 END SUBROUTINE mpp_lnk_obc_2d … … 759 718 REAL(wp) :: zland 760 719 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 761 !!---------------------------------------------------------------------- 762 720 ! 721 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zt3ns, zt3sn ! 3d for north-south & south-north 722 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zt3ew, zt3we ! 3d for east-west & west-east 723 724 !!---------------------------------------------------------------------- 725 726 ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2), & 727 & zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2) ) 728 729 ! 763 730 IF( PRESENT( pval ) ) THEN ; zland = pval ! set land value 764 731 ELSE ; zland = 0.e0 ! zero by default … … 808 775 iihom = nlci-nreci 809 776 DO jl = 1, jpreci 810 t3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)811 t3we(:,jl,:,1) = ptab(iihom +jl,:,:)777 zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:) 778 zt3we(:,jl,:,1) = ptab(iihom +jl,:,:) 812 779 END DO 813 780 END SELECT … … 818 785 SELECT CASE ( nbondi ) 819 786 CASE ( -1 ) 820 CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 )821 CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )787 CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 ) 788 CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea ) 822 789 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 823 790 CASE ( 0 ) 824 CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )825 CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req2 )826 CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )827 CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )791 CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 ) 792 CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 ) 793 CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea ) 794 CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe ) 828 795 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 829 796 IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 830 797 CASE ( 1 ) 831 CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )832 CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )798 CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 ) 799 CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe ) 833 800 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 834 801 END SELECT … … 840 807 CASE ( -1 ) 841 808 DO jl = 1, jpreci 842 ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)809 ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2) 843 810 END DO 844 811 CASE ( 0 ) 845 812 DO jl = 1, jpreci 846 ptab(jl ,:,:) = t3we(:,jl,:,2)847 ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)813 ptab(jl ,:,:) = zt3we(:,jl,:,2) 814 ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2) 848 815 END DO 849 816 CASE ( 1 ) 850 817 DO jl = 1, jpreci 851 ptab(jl ,:,:) = t3we(:,jl,:,2)818 ptab(jl ,:,:) = zt3we(:,jl,:,2) 852 819 END DO 853 820 END SELECT … … 861 828 ijhom = nlcj-nrecj 862 829 DO jl = 1, jprecj 863 t3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)864 t3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)830 zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:) 831 zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:) 865 832 END DO 866 833 ENDIF … … 871 838 SELECT CASE ( nbondj ) 872 839 CASE ( -1 ) 873 CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 )874 CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )840 CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 ) 841 CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono ) 875 842 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 876 843 CASE ( 0 ) 877 CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )878 CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req2 )879 CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )880 CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )844 CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 ) 845 CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 ) 846 CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono ) 847 CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso ) 881 848 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 882 849 IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 883 850 CASE ( 1 ) 884 CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )885 CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )851 CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 ) 852 CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso ) 886 853 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 887 854 END SELECT … … 893 860 CASE ( -1 ) 894 861 DO jl = 1, jprecj 895 ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)862 ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2) 896 863 END DO 897 864 CASE ( 0 ) 898 865 DO jl = 1, jprecj 899 ptab(:,jl ,:) = t3sn(:,jl,:,2)900 ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)866 ptab(:,jl ,:) = zt3sn(:,jl,:,2) 867 ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2) 901 868 END DO 902 869 CASE ( 1 ) 903 870 DO jl = 1, jprecj 904 ptab(:,jl,:) = t3sn(:,jl,:,2)871 ptab(:,jl,:) = zt3sn(:,jl,:,2) 905 872 END DO 906 873 END SELECT … … 918 885 ! 919 886 ENDIF 887 ! 888 DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we ) 920 889 ! 921 890 END SUBROUTINE mpp_lnk_3d … … 954 923 REAL(wp) :: zland 955 924 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 956 !!---------------------------------------------------------------------- 957 925 ! 926 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ns, zt2sn ! 2d for north-south & south-north 927 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ew, zt2we ! 2d for east-west & west-east 928 929 !!---------------------------------------------------------------------- 930 931 ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2), & 932 & zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2) ) 933 934 ! 958 935 IF( PRESENT( pval ) ) THEN ; zland = pval ! set land value 959 936 ELSE ; zland = 0.e0 ! zero by default … … 1002 979 iihom = nlci-nreci 1003 980 DO jl = 1, jpreci 1004 t2ew(:,jl,1) = pt2d(jpreci+jl,:)1005 t2we(:,jl,1) = pt2d(iihom +jl,:)981 zt2ew(:,jl,1) = pt2d(jpreci+jl,:) 982 zt2we(:,jl,1) = pt2d(iihom +jl,:) 1006 983 END DO 1007 984 END SELECT … … 1012 989 SELECT CASE ( nbondi ) 1013 990 CASE ( -1 ) 1014 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )1015 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )991 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 ) 992 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 1016 993 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1017 994 CASE ( 0 ) 1018 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )1019 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )1020 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )1021 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )995 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 996 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 ) 997 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 998 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 1022 999 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1023 1000 IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err) 1024 1001 CASE ( 1 ) 1025 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )1026 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )1002 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 1003 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 1027 1004 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1028 1005 END SELECT … … 1034 1011 CASE ( -1 ) 1035 1012 DO jl = 1, jpreci 1036 pt2d(iihom+jl,:) = t2ew(:,jl,2)1013 pt2d(iihom+jl,:) = zt2ew(:,jl,2) 1037 1014 END DO 1038 1015 CASE ( 0 ) 1039 1016 DO jl = 1, jpreci 1040 pt2d(jl ,:) = t2we(:,jl,2)1041 pt2d(iihom+jl,:) = t2ew(:,jl,2)1017 pt2d(jl ,:) = zt2we(:,jl,2) 1018 pt2d(iihom+jl,:) = zt2ew(:,jl,2) 1042 1019 END DO 1043 1020 CASE ( 1 ) 1044 1021 DO jl = 1, jpreci 1045 pt2d(jl ,:) = t2we(:,jl,2)1022 pt2d(jl ,:) = zt2we(:,jl,2) 1046 1023 END DO 1047 1024 END SELECT … … 1055 1032 ijhom = nlcj-nrecj 1056 1033 DO jl = 1, jprecj 1057 t2sn(:,jl,1) = pt2d(:,ijhom +jl)1058 t2ns(:,jl,1) = pt2d(:,jprecj+jl)1034 zt2sn(:,jl,1) = pt2d(:,ijhom +jl) 1035 zt2ns(:,jl,1) = pt2d(:,jprecj+jl) 1059 1036 END DO 1060 1037 ENDIF … … 1065 1042 SELECT CASE ( nbondj ) 1066 1043 CASE ( -1 ) 1067 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )1068 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )1044 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 ) 1045 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 1069 1046 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1070 1047 CASE ( 0 ) 1071 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )1072 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )1073 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )1074 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )1048 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 1049 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 ) 1050 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 1051 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 1075 1052 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1076 1053 IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err) 1077 1054 CASE ( 1 ) 1078 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )1079 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )1055 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 1056 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 1080 1057 IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 1081 1058 END SELECT … … 1087 1064 CASE ( -1 ) 1088 1065 DO jl = 1, jprecj 1089 pt2d(:,ijhom+jl) = t2ns(:,jl,2)1066 pt2d(:,ijhom+jl) = zt2ns(:,jl,2) 1090 1067 END DO 1091 1068 CASE ( 0 ) 1092 1069 DO jl = 1, jprecj 1093 pt2d(:,jl ) = t2sn(:,jl,2)1094 pt2d(:,ijhom+jl) = t2ns(:,jl,2)1070 pt2d(:,jl ) = zt2sn(:,jl,2) 1071 pt2d(:,ijhom+jl) = zt2ns(:,jl,2) 1095 1072 END DO 1096 1073 CASE ( 1 ) 1097 1074 DO jl = 1, jprecj 1098 pt2d(:,jl ) = t2sn(:,jl,2)1075 pt2d(:,jl ) = zt2sn(:,jl,2) 1099 1076 END DO 1100 1077 END SELECT … … 1112 1089 ! 1113 1090 ENDIF 1091 ! 1092 DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we ) 1114 1093 ! 1115 1094 END SUBROUTINE mpp_lnk_2d … … 1147 1126 INTEGER :: ml_req1, ml_req2, ml_err ! for key_mpi_isend 1148 1127 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 1149 !!---------------------------------------------------------------------- 1128 ! 1129 REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE :: zt4ns, zt4sn ! 2 x 3d for north-south & south-north 1130 REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE :: zt4ew, zt4we ! 2 x 3d for east-west & west-east 1131 1132 !!---------------------------------------------------------------------- 1133 ALLOCATE( zt4ns(jpi,jprecj,jpk,2,2), zt4sn(jpi,jprecj,jpk,2,2) , & 1134 & zt4ew(jpj,jpreci,jpk,2,2), zt4we(jpj,jpreci,jpk,2,2) ) 1135 1150 1136 1151 1137 ! 1. standard boundary treatment … … 1181 1167 iihom = nlci-nreci 1182 1168 DO jl = 1, jpreci 1183 t4ew(:,jl,:,1,1) = ptab1(jpreci+jl,:,:)1184 t4we(:,jl,:,1,1) = ptab1(iihom +jl,:,:)1185 t4ew(:,jl,:,2,1) = ptab2(jpreci+jl,:,:)1186 t4we(:,jl,:,2,1) = ptab2(iihom +jl,:,:)1169 zt4ew(:,jl,:,1,1) = ptab1(jpreci+jl,:,:) 1170 zt4we(:,jl,:,1,1) = ptab1(iihom +jl,:,:) 1171 zt4ew(:,jl,:,2,1) = ptab2(jpreci+jl,:,:) 1172 zt4we(:,jl,:,2,1) = ptab2(iihom +jl,:,:) 1187 1173 END DO 1188 1174 END SELECT … … 1193 1179 SELECT CASE ( nbondi ) 1194 1180 CASE ( -1 ) 1195 CALL mppsend( 2, t4we(1,1,1,1,1), imigr, noea, ml_req1 )1196 CALL mpprecv( 1, t4ew(1,1,1,1,2), imigr, noea )1181 CALL mppsend( 2, zt4we(1,1,1,1,1), imigr, noea, ml_req1 ) 1182 CALL mpprecv( 1, zt4ew(1,1,1,1,2), imigr, noea ) 1197 1183 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 1198 1184 CASE ( 0 ) 1199 CALL mppsend( 1, t4ew(1,1,1,1,1), imigr, nowe, ml_req1 )1200 CALL mppsend( 2, t4we(1,1,1,1,1), imigr, noea, ml_req2 )1201 CALL mpprecv( 1, t4ew(1,1,1,1,2), imigr, noea )1202 CALL mpprecv( 2, t4we(1,1,1,1,2), imigr, nowe )1185 CALL mppsend( 1, zt4ew(1,1,1,1,1), imigr, nowe, ml_req1 ) 1186 CALL mppsend( 2, zt4we(1,1,1,1,1), imigr, noea, ml_req2 ) 1187 CALL mpprecv( 1, zt4ew(1,1,1,1,2), imigr, noea ) 1188 CALL mpprecv( 2, zt4we(1,1,1,1,2), imigr, nowe ) 1203 1189 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 1204 1190 IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 1205 1191 CASE ( 1 ) 1206 CALL mppsend( 1, t4ew(1,1,1,1,1), imigr, nowe, ml_req1 )1207 CALL mpprecv( 2, t4we(1,1,1,1,2), imigr, nowe )1192 CALL mppsend( 1, zt4ew(1,1,1,1,1), imigr, nowe, ml_req1 ) 1193 CALL mpprecv( 2, zt4we(1,1,1,1,2), imigr, nowe ) 1208 1194 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 1209 1195 END SELECT … … 1215 1201 CASE ( -1 ) 1216 1202 DO jl = 1, jpreci 1217 ptab1(iihom+jl,:,:) = t4ew(:,jl,:,1,2)1218 ptab2(iihom+jl,:,:) = t4ew(:,jl,:,2,2)1203 ptab1(iihom+jl,:,:) = zt4ew(:,jl,:,1,2) 1204 ptab2(iihom+jl,:,:) = zt4ew(:,jl,:,2,2) 1219 1205 END DO 1220 1206 CASE ( 0 ) 1221 1207 DO jl = 1, jpreci 1222 ptab1(jl ,:,:) = t4we(:,jl,:,1,2)1223 ptab1(iihom+jl,:,:) = t4ew(:,jl,:,1,2)1224 ptab2(jl ,:,:) = t4we(:,jl,:,2,2)1225 ptab2(iihom+jl,:,:) = t4ew(:,jl,:,2,2)1208 ptab1(jl ,:,:) = zt4we(:,jl,:,1,2) 1209 ptab1(iihom+jl,:,:) = zt4ew(:,jl,:,1,2) 1210 ptab2(jl ,:,:) = zt4we(:,jl,:,2,2) 1211 ptab2(iihom+jl,:,:) = zt4ew(:,jl,:,2,2) 1226 1212 END DO 1227 1213 CASE ( 1 ) 1228 1214 DO jl = 1, jpreci 1229 ptab1(jl ,:,:) = t4we(:,jl,:,1,2)1230 ptab2(jl ,:,:) = t4we(:,jl,:,2,2)1215 ptab1(jl ,:,:) = zt4we(:,jl,:,1,2) 1216 ptab2(jl ,:,:) = zt4we(:,jl,:,2,2) 1231 1217 END DO 1232 1218 END SELECT … … 1240 1226 ijhom = nlcj - nrecj 1241 1227 DO jl = 1, jprecj 1242 t4sn(:,jl,:,1,1) = ptab1(:,ijhom +jl,:)1243 t4ns(:,jl,:,1,1) = ptab1(:,jprecj+jl,:)1244 t4sn(:,jl,:,2,1) = ptab2(:,ijhom +jl,:)1245 t4ns(:,jl,:,2,1) = ptab2(:,jprecj+jl,:)1228 zt4sn(:,jl,:,1,1) = ptab1(:,ijhom +jl,:) 1229 zt4ns(:,jl,:,1,1) = ptab1(:,jprecj+jl,:) 1230 zt4sn(:,jl,:,2,1) = ptab2(:,ijhom +jl,:) 1231 zt4ns(:,jl,:,2,1) = ptab2(:,jprecj+jl,:) 1246 1232 END DO 1247 1233 ENDIF … … 1252 1238 SELECT CASE ( nbondj ) 1253 1239 CASE ( -1 ) 1254 CALL mppsend( 4, t4sn(1,1,1,1,1), imigr, nono, ml_req1 )1255 CALL mpprecv( 3, t4ns(1,1,1,1,2), imigr, nono )1240 CALL mppsend( 4, zt4sn(1,1,1,1,1), imigr, nono, ml_req1 ) 1241 CALL mpprecv( 3, zt4ns(1,1,1,1,2), imigr, nono ) 1256 1242 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 1257 1243 CASE ( 0 ) 1258 CALL mppsend( 3, t4ns(1,1,1,1,1), imigr, noso, ml_req1 )1259 CALL mppsend( 4, t4sn(1,1,1,1,1), imigr, nono, ml_req2 )1260 CALL mpprecv( 3, t4ns(1,1,1,1,2), imigr, nono )1261 CALL mpprecv( 4, t4sn(1,1,1,1,2), imigr, noso )1244 CALL mppsend( 3, zt4ns(1,1,1,1,1), imigr, noso, ml_req1 ) 1245 CALL mppsend( 4, zt4sn(1,1,1,1,1), imigr, nono, ml_req2 ) 1246 CALL mpprecv( 3, zt4ns(1,1,1,1,2), imigr, nono ) 1247 CALL mpprecv( 4, zt4sn(1,1,1,1,2), imigr, noso ) 1262 1248 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 1263 1249 IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 1264 1250 CASE ( 1 ) 1265 CALL mppsend( 3, t4ns(1,1,1,1,1), imigr, noso, ml_req1 )1266 CALL mpprecv( 4, t4sn(1,1,1,1,2), imigr, noso )1251 CALL mppsend( 3, zt4ns(1,1,1,1,1), imigr, noso, ml_req1 ) 1252 CALL mpprecv( 4, zt4sn(1,1,1,1,2), imigr, noso ) 1267 1253 IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 1268 1254 END SELECT … … 1274 1260 CASE ( -1 ) 1275 1261 DO jl = 1, jprecj 1276 ptab1(:,ijhom+jl,:) = t4ns(:,jl,:,1,2)1277 ptab2(:,ijhom+jl,:) = t4ns(:,jl,:,2,2)1262 ptab1(:,ijhom+jl,:) = zt4ns(:,jl,:,1,2) 1263 ptab2(:,ijhom+jl,:) = zt4ns(:,jl,:,2,2) 1278 1264 END DO 1279 1265 CASE ( 0 ) 1280 1266 DO jl = 1, jprecj 1281 ptab1(:,jl ,:) = t4sn(:,jl,:,1,2)1282 ptab1(:,ijhom+jl,:) = t4ns(:,jl,:,1,2)1283 ptab2(:,jl ,:) = t4sn(:,jl,:,2,2)1284 ptab2(:,ijhom+jl,:) = t4ns(:,jl,:,2,2)1267 ptab1(:,jl ,:) = zt4sn(:,jl,:,1,2) 1268 ptab1(:,ijhom+jl,:) = zt4ns(:,jl,:,1,2) 1269 ptab2(:,jl ,:) = zt4sn(:,jl,:,2,2) 1270 ptab2(:,ijhom+jl,:) = zt4ns(:,jl,:,2,2) 1285 1271 END DO 1286 1272 CASE ( 1 ) 1287 1273 DO jl = 1, jprecj 1288 ptab1(:,jl,:) = t4sn(:,jl,:,1,2)1289 ptab2(:,jl,:) = t4sn(:,jl,:,2,2)1274 ptab1(:,jl,:) = zt4sn(:,jl,:,1,2) 1275 ptab2(:,jl,:) = zt4sn(:,jl,:,2,2) 1290 1276 END DO 1291 1277 END SELECT … … 1306 1292 ! 1307 1293 ENDIF 1294 ! 1295 DEALLOCATE( zt4ns, zt4sn, zt4ew, zt4we ) 1308 1296 ! 1309 1297 END SUBROUTINE mpp_lnk_3d_gather … … 2158 2146 INTEGER :: ml_stat(MPI_STATUS_SIZE) ! for key_mpi_isend 2159 2147 REAL(wp), POINTER, DIMENSION(:,:) :: ztab ! temporary workspace 2148 ! 2149 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ns, zt2sn ! 2d for north-south & south-north 2150 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ew, zt2we ! 2d for east-west & west-east 2160 2151 LOGICAL :: lmigr ! is true for those processors that have to migrate the OB 2161 !!---------------------------------------------------------------------- 2152 2153 !!---------------------------------------------------------------------- 2154 2155 ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2), & 2156 & zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2) ) 2162 2157 2163 2158 CALL wrk_alloc( jpi,jpj, ztab ) … … 2223 2218 IF( nbondi /= 2 ) THEN ! Read Dirichlet lateral conditions 2224 2219 iihom = nlci-nreci 2225 t2ew(1:jpreci,1,1) = ztab(jpreci+1:nreci, ijpt0)2226 t2we(1:jpreci,1,1) = ztab(iihom+1:iihom+jpreci, ijpt0)2220 zt2ew(1:jpreci,1,1) = ztab(jpreci+1:nreci, ijpt0) 2221 zt2we(1:jpreci,1,1) = ztab(iihom+1:iihom+jpreci, ijpt0) 2227 2222 ENDIF 2228 2223 ! … … 2231 2226 ! 2232 2227 IF( nbondi == -1 ) THEN 2233 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )2234 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )2228 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 ) 2229 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 2235 2230 IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err ) 2236 2231 ELSEIF( nbondi == 0 ) THEN 2237 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )2238 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )2239 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )2240 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )2232 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 2233 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 ) 2234 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 2235 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 2241 2236 IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err ) 2242 2237 IF(l_isend) CALL mpi_wait( ml_req2, ml_stat, ml_err ) 2243 2238 ELSEIF( nbondi == 1 ) THEN 2244 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )2245 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )2239 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 2240 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 2246 2241 IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err ) 2247 2242 ENDIF … … 2251 2246 ! 2252 2247 IF( nbondi == 0 .OR. nbondi == 1 ) THEN 2253 ztab(1:jpreci, ijpt0) = t2we(1:jpreci,1,2)2248 ztab(1:jpreci, ijpt0) = zt2we(1:jpreci,1,2) 2254 2249 ENDIF 2255 2250 IF( nbondi == -1 .OR. nbondi == 0 ) THEN 2256 ztab(iihom+1:iihom+jpreci, ijpt0) = t2ew(1:jpreci,1,2)2251 ztab(iihom+1:iihom+jpreci, ijpt0) = zt2ew(1:jpreci,1,2) 2257 2252 ENDIF 2258 2253 ENDIF ! (ktype == 1) … … 2264 2259 IF( nbondj /= 2 ) THEN ! Read Dirichlet lateral conditions 2265 2260 ijhom = nlcj-nrecj 2266 t2sn(1:jprecj,1,1) = ztab(iipt0, ijhom+1:ijhom+jprecj)2267 t2ns(1:jprecj,1,1) = ztab(iipt0, jprecj+1:nrecj)2261 zt2sn(1:jprecj,1,1) = ztab(iipt0, ijhom+1:ijhom+jprecj) 2262 zt2ns(1:jprecj,1,1) = ztab(iipt0, jprecj+1:nrecj) 2268 2263 ENDIF 2269 2264 ! … … 2272 2267 ! 2273 2268 IF( nbondj == -1 ) THEN 2274 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )2275 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )2269 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 ) 2270 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 2276 2271 IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err ) 2277 2272 ELSEIF( nbondj == 0 ) THEN 2278 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )2279 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )2280 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )2281 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )2273 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 2274 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 ) 2275 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 2276 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 2282 2277 IF( l_isend ) CALL mpi_wait( ml_req1, ml_stat, ml_err ) 2283 2278 IF( l_isend ) CALL mpi_wait( ml_req2, ml_stat, ml_err ) 2284 2279 ELSEIF( nbondj == 1 ) THEN 2285 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )2286 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso)2280 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 2281 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso) 2287 2282 IF( l_isend ) CALL mpi_wait( ml_req1, ml_stat, ml_err ) 2288 2283 ENDIF … … 2291 2286 ijhom = nlcj - jprecj 2292 2287 IF( nbondj == 0 .OR. nbondj == 1 ) THEN 2293 ztab(iipt0,1:jprecj) = t2sn(1:jprecj,1,2)2288 ztab(iipt0,1:jprecj) = zt2sn(1:jprecj,1,2) 2294 2289 ENDIF 2295 2290 IF( nbondj == 0 .OR. nbondj == -1 ) THEN 2296 ztab(iipt0, ijhom+1:ijhom+jprecj) = t2ns(1:jprecj,1,2)2291 ztab(iipt0, ijhom+1:ijhom+jprecj) = zt2ns(1:jprecj,1,2) 2297 2292 ENDIF 2298 2293 ENDIF ! (ktype == 2) … … 2314 2309 ! 2315 2310 ENDIF ! ( lmigr ) 2311 ! 2312 DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we ) 2316 2313 CALL wrk_dealloc( jpi,jpj, ztab ) 2317 2314 ! … … 2603 2600 INTEGER :: ml_err ! for mpi_isend when avoiding mpi_allgather 2604 2601 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for mpi_isend when avoiding mpi_allgather 2605 !!---------------------------------------------------------------------- 2606 ! 2602 ! ! Workspace for message transfers avoiding mpi_allgather 2603 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE :: ztab 2604 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE :: znorthloc, zfoldwk 2605 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: znorthgloio 2606 2607 !!---------------------------------------------------------------------- 2608 ! 2609 ALLOCATE( ztab(jpiglo,4,jpk), znorthloc(jpi,4,jpk), zfoldwk(jpi,4,jpk), znorthgloio(jpi,4,jpk,jpni) ) 2610 2607 2611 ijpj = 4 2608 2612 ityp = -1 2609 2613 ijpjm1 = 3 2610 tab_3d(:,:,:) = 0.e02611 ! 2612 DO jj = nlcj - ijpj +1, nlcj ! put in xnorthloc the last 4 jlines of pt3d2614 ztab(:,:,:) = 0.e0 2615 ! 2616 DO jj = nlcj - ijpj +1, nlcj ! put in znorthloc the last 4 jlines of pt3d 2613 2617 ij = jj - nlcj + ijpj 2614 xnorthloc(:,ij,:) = pt3d(:,jj,:)2618 znorthloc(:,ij,:) = pt3d(:,jj,:) 2615 2619 END DO 2616 2620 ! 2617 ! ! Build in procs of ncomm_north the xnorthgloio2621 ! ! Build in procs of ncomm_north the znorthgloio 2618 2622 itaille = jpi * jpk * ijpj 2619 2623 IF ( l_north_nogather ) THEN … … 2625 2629 ij = jj - nlcj + ijpj 2626 2630 DO ji = 1, nlci 2627 tab_3d(ji+nimpp-1,ij,:) = pt3d(ji,jj,:)2631 ztab(ji+nimpp-1,ij,:) = pt3d(ji,jj,:) 2628 2632 END DO 2629 2633 END DO … … 2650 2654 2651 2655 DO jr = 1,nsndto(ityp) 2652 CALL mppsend(5, xnorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) )2656 CALL mppsend(5, znorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) ) 2653 2657 END DO 2654 2658 DO jr = 1,nsndto(ityp) 2655 CALL mpprecv(5, foldwk, itaille, isendto(jr,ityp))2659 CALL mpprecv(5, zfoldwk, itaille, isendto(jr,ityp)) 2656 2660 iproc = isendto(jr,ityp) + 1 2657 2661 ildi = nldit (iproc) … … 2660 2664 DO jj = 1, ijpj 2661 2665 DO ji = ildi, ilei 2662 tab_3d(ji+iilb-1,jj,:) =foldwk(ji,jj,:)2666 ztab(ji+iilb-1,jj,:) = zfoldwk(ji,jj,:) 2663 2667 END DO 2664 2668 END DO … … 2675 2679 2676 2680 IF ( ityp .lt. 0 ) THEN 2677 CALL MPI_ALLGATHER( xnorthloc , itaille, MPI_DOUBLE_PRECISION, &2678 & xnorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )2681 CALL MPI_ALLGATHER( znorthloc , itaille, MPI_DOUBLE_PRECISION, & 2682 & znorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 2679 2683 ! 2680 2684 DO jr = 1, ndim_rank_north ! recover the global north array … … 2685 2689 DO jj = 1, ijpj 2686 2690 DO ji = ildi, ilei 2687 tab_3d(ji+iilb-1,jj,:) = xnorthgloio(ji,jj,:,jr)2691 ztab(ji+iilb-1,jj,:) = znorthgloio(ji,jj,:,jr) 2688 2692 END DO 2689 2693 END DO … … 2691 2695 ENDIF 2692 2696 ! 2693 ! The tab_3darray has been either:2697 ! The ztab array has been either: 2694 2698 ! a. Fully populated by the mpi_allgather operation or 2695 2699 ! b. Had the active points for this domain and northern neighbours populated … … 2698 2702 ! this domain will be identical. 2699 2703 ! 2700 CALL lbc_nfd( tab_3d, cd_type, psgn ) ! North fold boundary condition2704 CALL lbc_nfd( ztab, cd_type, psgn ) ! North fold boundary condition 2701 2705 ! 2702 2706 DO jj = nlcj-ijpj+1, nlcj ! Scatter back to pt3d 2703 2707 ij = jj - nlcj + ijpj 2704 2708 DO ji= 1, nlci 2705 pt3d(ji,jj,:) = tab_3d(ji+nimpp-1,ij,:)2709 pt3d(ji,jj,:) = ztab(ji+nimpp-1,ij,:) 2706 2710 END DO 2707 2711 END DO 2712 ! 2713 DEALLOCATE( ztab, znorthloc, zfoldwk, znorthgloio ) 2708 2714 ! 2709 2715 END SUBROUTINE mpp_lbc_north_3d … … 2735 2741 INTEGER :: ml_err ! for mpi_isend when avoiding mpi_allgather 2736 2742 INTEGER, DIMENSION(MPI_STATUS_SIZE):: ml_stat ! for mpi_isend when avoiding mpi_allgather 2737 !!---------------------------------------------------------------------- 2743 ! ! Workspace for message transfers avoiding mpi_allgather 2744 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: ztab 2745 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: znorthloc, zfoldwk 2746 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: znorthgloio 2747 !!---------------------------------------------------------------------- 2748 ! 2749 ALLOCATE( ztab(jpiglo,4), znorthloc(jpi,4), zfoldwk(jpi,4), znorthgloio(jpi,4,jpni) ) 2738 2750 ! 2739 2751 ijpj = 4 2740 2752 ityp = -1 2741 2753 ijpjm1 = 3 2742 tab_2d(:,:) = 0.e02743 ! 2744 DO jj = nlcj-ijpj+1, nlcj ! put in xnorthloc_2dthe last 4 jlines of pt2d2754 ztab(:,:) = 0.e0 2755 ! 2756 DO jj = nlcj-ijpj+1, nlcj ! put in znorthloc the last 4 jlines of pt2d 2745 2757 ij = jj - nlcj + ijpj 2746 xnorthloc_2d(:,ij) = pt2d(:,jj)2758 znorthloc(:,ij) = pt2d(:,jj) 2747 2759 END DO 2748 2760 2749 ! ! Build in procs of ncomm_north the xnorthgloio_2d2761 ! ! Build in procs of ncomm_north the znorthgloio 2750 2762 itaille = jpi * ijpj 2751 2763 IF ( l_north_nogather ) THEN … … 2757 2769 ij = jj - nlcj + ijpj 2758 2770 DO ji = 1, nlci 2759 tab_2d(ji+nimpp-1,ij) = pt2d(ji,jj)2771 ztab(ji+nimpp-1,ij) = pt2d(ji,jj) 2760 2772 END DO 2761 2773 END DO … … 2783 2795 2784 2796 DO jr = 1,nsndto(ityp) 2785 CALL mppsend(5, xnorthloc_2d, itaille, isendto(jr,ityp), ml_req_nf(jr) )2797 CALL mppsend(5, znorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) ) 2786 2798 END DO 2787 2799 DO jr = 1,nsndto(ityp) 2788 CALL mpprecv(5, foldwk_2d, itaille, isendto(jr,ityp))2800 CALL mpprecv(5, zfoldwk, itaille, isendto(jr,ityp)) 2789 2801 iproc = isendto(jr,ityp) + 1 2790 2802 ildi = nldit (iproc) … … 2793 2805 DO jj = 1, ijpj 2794 2806 DO ji = ildi, ilei 2795 tab_2d(ji+iilb-1,jj) = foldwk_2d(ji,jj)2807 ztab(ji+iilb-1,jj) = zfoldwk(ji,jj) 2796 2808 END DO 2797 2809 END DO … … 2808 2820 2809 2821 IF ( ityp .lt. 0 ) THEN 2810 CALL MPI_ALLGATHER( xnorthloc_2d, itaille, MPI_DOUBLE_PRECISION, &2811 & xnorthgloio_2d, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )2822 CALL MPI_ALLGATHER( znorthloc , itaille, MPI_DOUBLE_PRECISION, & 2823 & znorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 2812 2824 ! 2813 2825 DO jr = 1, ndim_rank_north ! recover the global north array … … 2818 2830 DO jj = 1, ijpj 2819 2831 DO ji = ildi, ilei 2820 tab_2d(ji+iilb-1,jj) = xnorthgloio_2d(ji,jj,jr)2832 ztab(ji+iilb-1,jj) = znorthgloio(ji,jj,jr) 2821 2833 END DO 2822 2834 END DO … … 2824 2836 ENDIF 2825 2837 ! 2826 ! The tab array has been either:2838 ! The ztab array has been either: 2827 2839 ! a. Fully populated by the mpi_allgather operation or 2828 2840 ! b. Had the active points for this domain and northern neighbours populated … … 2831 2843 ! this domain will be identical. 2832 2844 ! 2833 CALL lbc_nfd( tab_2d, cd_type, psgn ) ! North fold boundary condition2845 CALL lbc_nfd( ztab, cd_type, psgn ) ! North fold boundary condition 2834 2846 ! 2835 2847 ! … … 2837 2849 ij = jj - nlcj + ijpj 2838 2850 DO ji = 1, nlci 2839 pt2d(ji,jj) = tab_2d(ji+nimpp-1,ij)2851 pt2d(ji,jj) = ztab(ji+nimpp-1,ij) 2840 2852 END DO 2841 2853 END DO 2854 ! 2855 DEALLOCATE( ztab, znorthloc, zfoldwk, znorthgloio ) 2842 2856 ! 2843 2857 END SUBROUTINE mpp_lbc_north_2d … … 2867 2881 INTEGER :: ierr, itaille, ildi, ilei, iilb 2868 2882 INTEGER :: ijpj, ij, iproc 2869 !!---------------------------------------------------------------------- 2883 ! 2884 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: ztab_e, znorthloc_e 2885 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: znorthgloio_e 2886 2887 !!---------------------------------------------------------------------- 2888 ! 2889 ALLOCATE( ztab_e(jpiglo,4+2*jpr2dj), znorthloc_e(jpi,4+2*jpr2dj), znorthgloio_e(jpi,4+2*jpr2dj,jpni) ) 2890 2870 2891 ! 2871 2892 ijpj=4 2872 tab_e(:,:) = 0.e02893 ztab_e(:,:) = 0.e0 2873 2894 2874 2895 ij=0 2875 ! put in xnorthloc_e the last 4 jlines of pt2d2896 ! put in znorthloc_e the last 4 jlines of pt2d 2876 2897 DO jj = nlcj - ijpj + 1 - jpr2dj, nlcj +jpr2dj 2877 2898 ij = ij + 1 2878 2899 DO ji = 1, jpi 2879 xnorthloc_e(ji,ij)=pt2d(ji,jj)2900 znorthloc_e(ji,ij)=pt2d(ji,jj) 2880 2901 END DO 2881 2902 END DO 2882 2903 ! 2883 2904 itaille = jpi * ( ijpj + 2 * jpr2dj ) 2884 CALL MPI_ALLGATHER( xnorthloc_e(1,1) , itaille, MPI_DOUBLE_PRECISION, &2885 & xnorthgloio_e(1,1,1), itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )2905 CALL MPI_ALLGATHER( znorthloc_e(1,1) , itaille, MPI_DOUBLE_PRECISION, & 2906 & znorthgloio_e(1,1,1), itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 2886 2907 ! 2887 2908 DO jr = 1, ndim_rank_north ! recover the global north array … … 2892 2913 DO jj = 1, ijpj+2*jpr2dj 2893 2914 DO ji = ildi, ilei 2894 tab_e(ji+iilb-1,jj) = xnorthgloio_e(ji,jj,jr)2915 ztab_e(ji+iilb-1,jj) = znorthgloio_e(ji,jj,jr) 2895 2916 END DO 2896 2917 END DO … … 2900 2921 ! 2. North-Fold boundary conditions 2901 2922 ! ---------------------------------- 2902 CALL lbc_nfd( tab_e(:,:), cd_type, psgn, pr2dj = jpr2dj )2923 CALL lbc_nfd( ztab_e(:,:), cd_type, psgn, pr2dj = jpr2dj ) 2903 2924 2904 2925 ij = jpr2dj … … 2907 2928 ij = ij +1 2908 2929 DO ji= 1, nlci 2909 pt2d(ji,jj) = tab_e(ji+nimpp-1,ij)2930 pt2d(ji,jj) = ztab_e(ji+nimpp-1,ij) 2910 2931 END DO 2911 2932 END DO 2933 ! 2934 DEALLOCATE( ztab_e, znorthloc_e, znorthgloio_e ) 2912 2935 ! 2913 2936 END SUBROUTINE mpp_lbc_north_e … … 2950 2973 REAL(wp) :: zland 2951 2974 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 2952 !!---------------------------------------------------------------------- 2975 ! 2976 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zt3ns, zt3sn ! 3d for north-south & south-north 2977 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zt3ew, zt3we ! 3d for east-west & west-east 2978 2979 !!---------------------------------------------------------------------- 2980 2981 ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2), & 2982 & zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2) ) 2953 2983 2954 2984 zland = 0.e0 … … 2990 3020 iihom = nlci-nreci 2991 3021 DO jl = 1, jpreci 2992 t3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)2993 t3we(:,jl,:,1) = ptab(iihom +jl,:,:)3022 zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:) 3023 zt3we(:,jl,:,1) = ptab(iihom +jl,:,:) 2994 3024 END DO 2995 3025 END SELECT … … 3000 3030 SELECT CASE ( nbondi_bdy(ib_bdy) ) 3001 3031 CASE ( -1 ) 3002 CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 )3003 CASE ( 0 ) 3004 CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )3005 CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req2 )3032 CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 ) 3033 CASE ( 0 ) 3034 CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 ) 3035 CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 ) 3006 3036 CASE ( 1 ) 3007 CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )3037 CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 ) 3008 3038 END SELECT 3009 3039 ! 3010 3040 SELECT CASE ( nbondi_bdy_b(ib_bdy) ) 3011 3041 CASE ( -1 ) 3012 CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )3013 CASE ( 0 ) 3014 CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )3015 CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )3042 CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea ) 3043 CASE ( 0 ) 3044 CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea ) 3045 CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe ) 3016 3046 CASE ( 1 ) 3017 CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )3047 CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe ) 3018 3048 END SELECT 3019 3049 ! … … 3034 3064 CASE ( -1 ) 3035 3065 DO jl = 1, jpreci 3036 ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)3066 ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2) 3037 3067 END DO 3038 3068 CASE ( 0 ) 3039 3069 DO jl = 1, jpreci 3040 ptab(jl ,:,:) = t3we(:,jl,:,2)3041 ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)3070 ptab(jl ,:,:) = zt3we(:,jl,:,2) 3071 ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2) 3042 3072 END DO 3043 3073 CASE ( 1 ) 3044 3074 DO jl = 1, jpreci 3045 ptab(jl ,:,:) = t3we(:,jl,:,2)3075 ptab(jl ,:,:) = zt3we(:,jl,:,2) 3046 3076 END DO 3047 3077 END SELECT … … 3055 3085 ijhom = nlcj-nrecj 3056 3086 DO jl = 1, jprecj 3057 t3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)3058 t3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)3087 zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:) 3088 zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:) 3059 3089 END DO 3060 3090 ENDIF … … 3065 3095 SELECT CASE ( nbondj_bdy(ib_bdy) ) 3066 3096 CASE ( -1 ) 3067 CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 )3068 CASE ( 0 ) 3069 CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )3070 CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req2 )3097 CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 ) 3098 CASE ( 0 ) 3099 CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 ) 3100 CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 ) 3071 3101 CASE ( 1 ) 3072 CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )3102 CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 ) 3073 3103 END SELECT 3074 3104 ! 3075 3105 SELECT CASE ( nbondj_bdy_b(ib_bdy) ) 3076 3106 CASE ( -1 ) 3077 CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )3078 CASE ( 0 ) 3079 CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )3080 CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )3107 CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono ) 3108 CASE ( 0 ) 3109 CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono ) 3110 CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso ) 3081 3111 CASE ( 1 ) 3082 CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )3112 CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso ) 3083 3113 END SELECT 3084 3114 ! … … 3099 3129 CASE ( -1 ) 3100 3130 DO jl = 1, jprecj 3101 ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)3131 ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2) 3102 3132 END DO 3103 3133 CASE ( 0 ) 3104 3134 DO jl = 1, jprecj 3105 ptab(:,jl ,:) = t3sn(:,jl,:,2)3106 ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)3135 ptab(:,jl ,:) = zt3sn(:,jl,:,2) 3136 ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2) 3107 3137 END DO 3108 3138 CASE ( 1 ) 3109 3139 DO jl = 1, jprecj 3110 ptab(:,jl,:) = t3sn(:,jl,:,2)3140 ptab(:,jl,:) = zt3sn(:,jl,:,2) 3111 3141 END DO 3112 3142 END SELECT … … 3124 3154 ! 3125 3155 ENDIF 3156 ! 3157 DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we ) 3126 3158 ! 3127 3159 END SUBROUTINE mpp_lnk_bdy_3d … … 3164 3196 REAL(wp) :: zland 3165 3197 INTEGER, DIMENSION(MPI_STATUS_SIZE) :: ml_stat ! for key_mpi_isend 3166 !!---------------------------------------------------------------------- 3198 ! 3199 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ns, zt2sn ! 2d for north-south & south-north 3200 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zt2ew, zt2we ! 2d for east-west & west-east 3201 3202 !!---------------------------------------------------------------------- 3203 3204 ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2), & 3205 & zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2) ) 3167 3206 3168 3207 zland = 0.e0 … … 3204 3243 iihom = nlci-nreci 3205 3244 DO jl = 1, jpreci 3206 t2ew(:,jl,1) = ptab(jpreci+jl,:)3207 t2we(:,jl,1) = ptab(iihom +jl,:)3245 zt2ew(:,jl,1) = ptab(jpreci+jl,:) 3246 zt2we(:,jl,1) = ptab(iihom +jl,:) 3208 3247 END DO 3209 3248 END SELECT … … 3214 3253 SELECT CASE ( nbondi_bdy(ib_bdy) ) 3215 3254 CASE ( -1 ) 3216 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )3217 CASE ( 0 ) 3218 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )3219 CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )3255 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 ) 3256 CASE ( 0 ) 3257 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 3258 CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 ) 3220 3259 CASE ( 1 ) 3221 CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )3260 CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 ) 3222 3261 END SELECT 3223 3262 ! 3224 3263 SELECT CASE ( nbondi_bdy_b(ib_bdy) ) 3225 3264 CASE ( -1 ) 3226 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )3227 CASE ( 0 ) 3228 CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )3229 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )3265 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 3266 CASE ( 0 ) 3267 CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea ) 3268 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 3230 3269 CASE ( 1 ) 3231 CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )3270 CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe ) 3232 3271 END SELECT 3233 3272 ! … … 3248 3287 CASE ( -1 ) 3249 3288 DO jl = 1, jpreci 3250 ptab(iihom+jl,:) = t2ew(:,jl,2)3289 ptab(iihom+jl,:) = zt2ew(:,jl,2) 3251 3290 END DO 3252 3291 CASE ( 0 ) 3253 3292 DO jl = 1, jpreci 3254 ptab(jl ,:) = t2we(:,jl,2)3255 ptab(iihom+jl,:) = t2ew(:,jl,2)3293 ptab(jl ,:) = zt2we(:,jl,2) 3294 ptab(iihom+jl,:) = zt2ew(:,jl,2) 3256 3295 END DO 3257 3296 CASE ( 1 ) 3258 3297 DO jl = 1, jpreci 3259 ptab(jl ,:) = t2we(:,jl,2)3298 ptab(jl ,:) = zt2we(:,jl,2) 3260 3299 END DO 3261 3300 END SELECT … … 3269 3308 ijhom = nlcj-nrecj 3270 3309 DO jl = 1, jprecj 3271 t2sn(:,jl,1) = ptab(:,ijhom +jl)3272 t2ns(:,jl,1) = ptab(:,jprecj+jl)3310 zt2sn(:,jl,1) = ptab(:,ijhom +jl) 3311 zt2ns(:,jl,1) = ptab(:,jprecj+jl) 3273 3312 END DO 3274 3313 ENDIF … … 3279 3318 SELECT CASE ( nbondj_bdy(ib_bdy) ) 3280 3319 CASE ( -1 ) 3281 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )3282 CASE ( 0 ) 3283 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )3284 CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )3320 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 ) 3321 CASE ( 0 ) 3322 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 3323 CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 ) 3285 3324 CASE ( 1 ) 3286 CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )3325 CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 ) 3287 3326 END SELECT 3288 3327 ! 3289 3328 SELECT CASE ( nbondj_bdy_b(ib_bdy) ) 3290 3329 CASE ( -1 ) 3291 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )3292 CASE ( 0 ) 3293 CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )3294 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )3330 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 3331 CASE ( 0 ) 3332 CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono ) 3333 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 3295 3334 CASE ( 1 ) 3296 CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )3335 CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso ) 3297 3336 END SELECT 3298 3337 ! … … 3313 3352 CASE ( -1 ) 3314 3353 DO jl = 1, jprecj 3315 ptab(:,ijhom+jl) = t2ns(:,jl,2)3354 ptab(:,ijhom+jl) = zt2ns(:,jl,2) 3316 3355 END DO 3317 3356 CASE ( 0 ) 3318 3357 DO jl = 1, jprecj 3319 ptab(:,jl ) = t2sn(:,jl,2)3320 ptab(:,ijhom+jl) = t2ns(:,jl,2)3358 ptab(:,jl ) = zt2sn(:,jl,2) 3359 ptab(:,ijhom+jl) = zt2ns(:,jl,2) 3321 3360 END DO 3322 3361 CASE ( 1 ) 3323 3362 DO jl = 1, jprecj 3324 ptab(:,jl) = t2sn(:,jl,2)3363 ptab(:,jl) = zt2sn(:,jl,2) 3325 3364 END DO 3326 3365 END SELECT … … 3338 3377 ! 3339 3378 ENDIF 3379 ! 3380 DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we ) 3340 3381 ! 3341 3382 END SUBROUTINE mpp_lnk_bdy_2d -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r4148 r4152 229 229 230 230 ! 231 CALL sbc_ssm_init 232 ! 231 233 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialisation 232 234 ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm_substitute.h90
r2715 r4152 7 7 #if defined key_zdfddm 8 8 ! 'key_zdfddm' : avs: 3D array defined in zdfddm module 9 # define fsavs(i,j,k) avs(i,j,k)9 # define fsavs(i,j,k) avs(i,j,k) 10 10 #else 11 11 ! Defautl option : avs = avt 12 # define fsavs(i,j,k) avt(i,j,k)12 # define fsavs(i,j,k) avt(i,j,k) 13 13 #endif 14 14 !!---------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r4147 r4152 29 29 !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 30 30 !! 3.4 ! 2011-11 (C. Harris) decomposition changes for running with CICE 31 !! ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 31 32 !!---------------------------------------------------------------------- 32 33 … … 84 85 #endif 85 86 USE sbctide, ONLY: lk_tide 87 USE crsini ! initialise grid coarsening utility 86 88 87 89 IMPLICIT NONE … … 388 390 CALL dyn_nept_init ! simplified form of Neptune effect 389 391 390 ! ! Ocean physics 392 ! 393 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 394 ! 395 ! Ocean physics 391 396 CALL sbc_init ! Forcings : surface module 392 397 ! ! Vertical physics … … 621 626 ierr = ierr + zdf_oce_alloc () ! ocean vertical physics 622 627 ! 623 ierr = ierr + lib_mpp_alloc (numout) ! mpp exchanges624 628 ierr = ierr + trc_oce_alloc () ! shared TRC / TRA arrays 625 629 ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/oce.F90
r3625 r4152 47 47 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: gru , grv !: horizontal gradient of rd at bottom u-point 48 48 49 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rke !: kinetic energy 50 49 51 !! arrays relating to embedding ice in the ocean. These arrays need to be declared 50 52 !! even if no ice model is required. In the no ice model or traditional levitating … … 79 81 ALLOCATE( rhd (jpi,jpj,jpk) , & 80 82 & rhop(jpi,jpj,jpk) , & 83 & rke (jpi,jpj,jpk) , & 81 84 & sshb (jpi,jpj) , sshn (jpi,jpj) , ssha (jpi,jpj) , & 82 85 & sshu_b(jpi,jpj) , sshu_n(jpi,jpj) , sshu_a(jpi,jpj) , & -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/step.F90
r4147 r4152 24 24 !! - ! 2010-10 (C. Ethe, G. Madec) reorganisation of initialisation phase + merge TRC-TRA 25 25 !! 3.4 ! 2011-04 (G. Madec, C. Ethe) Merge of dtatem and dtasal 26 !! ! 2012-07 (J. Simeon, G. Madec. C. Ethe) Online coarsening of outputs 26 27 !!---------------------------------------------------------------------- 27 28 … … 78 79 ! IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 79 80 # if defined key_iomput 80 IF( Agrif_Nbstepint() == 0 ) CALL iom_swap 81 IF( Agrif_Nbstepint() == 0 ) CALL iom_swap( "nemo" ) 81 82 # endif 82 83 #endif 83 84 indic = 0 ! reset to no error condition 85 IF( kstp == nit000 ) CALL iom_init ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 84 indic = 0 ! reset to no error condition 85 IF( kstp == nit000 ) THEN 86 CALL iom_init( "nemo" ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 87 IF( ln_crs ) CALL iom_init( "nemo_crs" ) ! initialize context for coarse grid 88 ENDIF 86 89 87 90 IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init) 88 CALL iom_setkt( kstp - nit000 + 1 ) ! say to iom that we are at time step kstp 91 CALL iom_setkt( kstp - nit000 + 1, "nemo" ) ! say to iom that we are at time step kstp 92 IF( ln_crs ) CALL iom_setkt( kstp - nit000 + 1, "nemo_crs" ) ! say to iom that we are at time step kstp 89 93 90 94 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 173 177 IF( lk_diaharm ) CALL dia_harm( kstp ) ! Tidal harmonic analysis 174 178 CALL dia_wri( kstp ) ! ocean model: outputs 179 ! 180 IF( ln_crs ) CALL crs_fld( kstp ) ! ocean model: online field coarsening & output 181 175 182 176 183 #if defined key_top … … 277 284 IF( lk_cpl ) CALL sbc_cpl_snd( kstp ) ! coupled mode : field exchanges 278 285 ! 279 #if defined key_iomput 280 IF( kstp == nitend ) CALL xios_context_finalize() ! needed for XIOS+AGRIF 281 #endif 286 IF( kstp == nitend ) THEN 287 CALL iom_context_finalize( "nemo" ) ! needed for XIOS+AGRIF 288 IF( ln_crs ) CALL iom_context_finalize( "nemo_crs" ) ! 289 ENDIF 282 290 ! 283 291 IF( nn_timing == 1 .AND. kstp == nit000 ) CALL timing_reset -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
r3769 r4152 100 100 USE floats ! floats computation (flo_stp routine) 101 101 102 USE crsfld ! Standard output on coarse grid (crs_fld routine) 103 102 104 USE asminc ! assimilation increments (tra_asm_inc routine) 103 105 ! (dyn_asm_inc routine) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r4148 r4152 76 76 ENDIF 77 77 ! 78 IF( ln_rsttr .AND. kt == nittrc000 ) CALL p4z_rst( nittrc000, 'READ' ) !* read or initialize all required fields 78 IF( kt == nittrc000 ) THEN 79 ! 80 CALL p4z_che ! initialize the chemical constants 81 ! 82 IF( .NOT. ln_rsttr ) THEN ; CALL p4z_ph_ini ! set PH at kt=nit000 83 ELSE ; CALL p4z_rst( nittrc000, 'READ' ) !* read or initialize all required fields 84 ENDIF 85 ! 86 ENDIF 87 ! 79 88 IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 ) CALL p4z_dmp( kt ) ! Relaxation of some tracers 80 89 ! … … 254 263 END SUBROUTINE p4z_sms_init 255 264 265 SUBROUTINE p4z_ph_ini 266 !!--------------------------------------------------------------------- 267 !! *** ROUTINE p4z_ini_ph *** 268 !! 269 !! ** Purpose : Initialization of chemical variables of the carbon cycle 270 !!--------------------------------------------------------------------- 271 INTEGER :: ji, jj, jk 272 REAL(wp) :: zcaralk, zbicarb, zco3 273 REAL(wp) :: ztmas, ztmas1 274 !!--------------------------------------------------------------------- 275 276 ! Set PH from total alkalinity, borat (???), akb3 (???) and ak23 (???) 277 ! -------------------------------------------------------- 278 DO jk = 1, jpk 279 DO jj = 1, jpj 280 DO ji = 1, jpi 281 ztmas = tmask(ji,jj,jk) 282 ztmas1 = 1. - tmask(ji,jj,jk) 283 zcaralk = trn(ji,jj,jk,jptal) - borat(ji,jj,jk) / ( 1. + 1.E-8 / ( rtrn + akb3(ji,jj,jk) ) ) 284 zco3 = ( zcaralk - trn(ji,jj,jk,jpdic) ) * ztmas + 0.5e-3 * ztmas1 285 zbicarb = ( 2. * trn(ji,jj,jk,jpdic) - zcaralk ) 286 hi(ji,jj,jk) = ( ak23(ji,jj,jk) * zbicarb / zco3 ) * ztmas + 1.e-9 * ztmas1 287 END DO 288 END DO 289 END DO 290 ! 291 END SUBROUTINE p4z_ph_ini 292 293 256 294 SUBROUTINE p4z_rst( kt, cdrw ) 257 295 !!--------------------------------------------------------------------- … … 282 320 ELSE 283 321 ! hi(:,:,:) = 1.e-9 284 ! Set PH from total alkalinity, borat (???), akb3 (???) and ak23 (???) 285 ! -------------------------------------------------------- 286 DO jk = 1, jpk 287 DO jj = 1, jpj 288 DO ji = 1, jpi 289 ztmas = tmask(ji,jj,jk) 290 ztmas1 = 1. - tmask(ji,jj,jk) 291 zcaralk = trn(ji,jj,jk,jptal) - borat(ji,jj,jk) / ( 1. + 1.E-8 / ( rtrn + akb3(ji,jj,jk) ) ) 292 zco3 = ( zcaralk - trn(ji,jj,jk,jpdic) ) * ztmas + 0.5e-3 * ztmas1 293 zbicarb = ( 2. * trn(ji,jj,jk,jpdic) - zcaralk ) 294 hi(ji,jj,jk) = ( ak23(ji,jj,jk) * zbicarb / zco3 ) * ztmas + 1.e-9 * ztmas1 295 END DO 296 END DO 297 END DO 322 CALL p4z_ph_ini 298 323 ENDIF 299 324 CALL iom_get( numrtr, jpdom_autoglo, 'Silicalim', xksi(:,:) ) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
r3757 r4152 122 122 rdenita = 3._wp / 5._wp 123 123 o2ut = 131._wp / 122._wp 124 125 CALL p4z_che ! initialize the chemical constants126 124 127 125 ! Initialization of tracer concentration in case of no restart … … 162 160 xksi(:,:) = 2.e-6 163 161 xksimax(:,:) = xksi(:,:) 164 165 ! Initialization of chemical variables of the carbon cycle166 ! --------------------------------------------------------167 DO jk = 1, jpk168 DO jj = 1, jpj169 DO ji = 1, jpi170 ztmas = tmask(ji,jj,jk)171 ztmas1 = 1. - tmask(ji,jj,jk)172 zcaralk = trn(ji,jj,jk,jptal) - borat(ji,jj,jk) / ( 1. + 1.E-8 / ( rtrn + akb3(ji,jj,jk) ) )173 zco3 = ( zcaralk - trn(ji,jj,jk,jpdic) ) * ztmas + 0.5e-3 * ztmas1174 zbicarb = ( 2. * trn(ji,jj,jk,jpdic) - zcaralk )175 hi(ji,jj,jk) = ( ak23(ji,jj,jk) * zbicarb / zco3 ) * ztmas + 1.e-9 * ztmas1176 END DO177 END DO178 END DO179 162 ! 180 163 END IF -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r3680 r4152 75 75 & CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' ) 76 76 77 CALL trc_nam ! read passive tracers namelists 78 ! 79 IF(lwp) WRITE(numout,*) 80 IF( ln_rsttr ) THEN 81 ! 82 IF( lk_offline ) neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 83 CALL trc_rst_cal( nittrc000, 'READ' ) ! calendar 84 ! 85 ELSE 86 IF( lk_offline ) THEN 87 neuler = 0 ! Set time-step indicator at nit000 (euler) 88 CALL day_init ! set calendar 89 ENDIF 90 ! 91 ENDIF 77 CALL trc_nam ! read passive tracers namelists 78 ! 79 IF(lwp) WRITE(numout,*) 80 ! 81 IF( ln_rsttr .AND. .NOT. lk_offline ) CALL trc_rst_cal( nit000, 'READ' ) ! calendar 82 ! 92 83 IF(lwp) WRITE(numout,*) 93 84 ! masked grid volume … … 107 98 IF( lwp ) THEN 108 99 ! 109 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )100 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 110 101 ! 111 102 ENDIF -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r4148 r4152 32 32 PRIVATE 33 33 34 PUBLIC trc_nam_run ! called in trcini 34 35 PUBLIC trc_nam ! called in trcini 35 36 … … 44 45 CONTAINS 45 46 47 46 48 SUBROUTINE trc_nam 47 49 !!--------------------------------------------------------------------- … … 54 56 !! ( (PISCES, CFC, MY_TRC ) 55 57 !!--------------------------------------------------------------------- 56 INTEGER :: jn, ierr 57 INTEGER :: ios ! Local integer output status for namelist read 58 ! Definition of a tracer as a structure 59 TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer ! type of tracer for saving if not key_iomput 60 !! 61 NAMELIST/namtrc/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, & 62 & cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, & 63 & ln_trcdmp, ln_trcdmp_clo, ln_top_euler 64 #if defined key_trdmld_trc || defined key_trdtrc 65 NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & 66 & ln_trdmld_trc_restart, ln_trdmld_trc_instant, & 67 & cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc 68 #endif 69 NAMELIST/namtrc_dia/ ln_diatrc, ln_diabio, nn_writedia, nn_writebio 70 71 !!--------------------------------------------------------------------- 72 73 IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' 74 IF(lwp) WRITE(numout,*) '~~~~~~~' 75 76 CALL ctl_opn( numnat_ref, 'namelist_top_ref' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 77 CALL ctl_opn( numnat_cfg, 'namelist_top_cfg' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 78 CALL ctl_opn( numont , 'output.namelist.top', 'REPLACE', 'FORMATTED', 'SEQUENTIAL',-1, numout, .FALSE. ) 79 80 REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables 81 READ ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 82 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 83 84 REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables 85 READ ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 86 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 87 WRITE ( numont, namtrc ) 88 89 DO jn = 1, jptra 90 ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) 91 ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) 92 ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) 93 ln_trc_ini(jn) = sn_tracer(jn)%llinit 94 ln_trc_wri(jn) = sn_tracer(jn)%llsave 95 END DO 96 97 !!KPE computes the first time step of tracer model 98 nittrc000 = nit000 + nn_dttrc - 1 99 100 101 IF(lwp) THEN ! control print 58 ! ! Parameters of the run 59 IF( .NOT. lk_offline ) CALL trc_nam_run 60 61 ! ! passive tracer informations 62 CALL trc_nam_trc 63 64 ! ! Parameters of additional diagnostics 65 CALL trc_nam_dia 66 67 ! ! namelist of transport 68 CALL trc_nam_trp 69 70 71 IF( ln_rsttr ) ln_trcdta = .FALSE. ! restart : no need of clim data 72 ! 73 IF( ln_trcdmp .OR. ln_trcdmp_clo ) ln_trcdta = .TRUE. ! damping : need to have clim data 74 ! 75 IF( .NOT.ln_trcdta ) THEN 76 ln_trc_ini(:) = .FALSE. 77 ENDIF 78 79 IF(lwp) THEN ! control print 102 80 WRITE(numout,*) 103 81 WRITE(numout,*) ' Namelist : namtrc' 104 WRITE(numout,*) ' time step freq. for passive tracer nn_dttrc = ', nn_dttrc105 WRITE(numout,*) ' restart for passive tracer ln_rsttr = ', ln_rsttr106 WRITE(numout,*) ' control of time step for passive tracer nn_rsttr = ', nn_rsttr107 WRITE(numout,*) ' first time step for pass. trac. nittrc000 = ', nittrc000108 WRITE(numout,*) ' frequency of outputs for passive tracers nn_writetrc = ', nn_writetrc109 82 WRITE(numout,*) ' Read inputs data from file (y/n) ln_trcdta = ', ln_trcdta 110 83 WRITE(numout,*) ' Damping of passive tracer (y/n) ln_trcdmp = ', ln_trcdmp 111 84 WRITE(numout,*) ' Restoring of tracer on closed seas ln_trcdmp_clo = ', ln_trcdmp_clo 112 WRITE(numout,*) ' Use euler integration for TRC (y/n) ln_top_euler = ', ln_top_euler113 85 WRITE(numout,*) ' ' 114 86 DO jn = 1, jptra … … 118 90 ENDIF 119 91 92 IF(lwp) THEN ! control print 93 IF( ln_rsttr ) THEN 94 WRITE(numout,*) 95 WRITE(numout,*) ' Read a restart file for passive tracer : ', TRIM( cn_trcrst_in ) 96 WRITE(numout,*) 97 ENDIF 98 IF( ln_trcdta .AND. .NOT.ln_rsttr ) THEN 99 WRITE(numout,*) 100 WRITE(numout,*) ' Some of the passive tracers are initialised from climatologies ' 101 WRITE(numout,*) 102 ENDIF 103 IF( .NOT.ln_trcdta ) THEN 104 WRITE(numout,*) 105 WRITE(numout,*) ' All the passive tracers are initialised with constant values ' 106 WRITE(numout,*) 107 ENDIF 108 ENDIF 109 110 120 111 rdttrc(:) = rdttra(:) * FLOAT( nn_dttrc ) ! vertical profile of passive tracer time-step 121 112 … … 124 115 WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc(1) 125 116 WRITE(numout,*) 126 ENDIF127 128 REWIND( numnat_ref ) ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics129 READ ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903)130 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp )131 132 REWIND( numnat_cfg ) ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics133 READ ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 )134 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp )135 WRITE ( numont, namtrc_dia )136 137 IF(lwp) THEN138 WRITE(numout,*)139 WRITE(numout,*)140 WRITE(numout,*) ' Namelist : namtrc_dia'141 WRITE(numout,*) ' save additionnal diagnostics arrays ln_diatrc = ', ln_diatrc142 WRITE(numout,*) ' save additionnal biology diagnostics arrays ln_diabio = ', ln_diabio143 WRITE(numout,*) ' frequency of outputs for additional arrays nn_writedia = ', nn_writedia144 WRITE(numout,*) ' frequency of outputs for biological trends nn_writebio = ', nn_writebio145 WRITE(numout,*) ' '146 ENDIF147 148 IF( ln_diatrc .AND. .NOT. lk_iomput ) THEN149 ALLOCATE( trc2d(jpi,jpj,jpdia2d), trc3d(jpi,jpj,jpk,jpdia3d), &150 & ctrc2d(jpdia2d), ctrc2l(jpdia2d), ctrc2u(jpdia2d) , &151 & ctrc3d(jpdia3d), ctrc3l(jpdia3d), ctrc3u(jpdia3d) , STAT = ierr )152 IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate add. diag. array' )153 !154 trc2d(:,:,: ) = 0._wp ; ctrc2d(:) = ' ' ; ctrc2l(:) = ' ' ; ctrc2u(:) = ' '155 trc3d(:,:,:,:) = 0._wp ; ctrc3d(:) = ' ' ; ctrc3l(:) = ' ' ; ctrc3u(:) = ' '156 !157 ENDIF158 159 IF( ( ln_diabio .AND. .NOT. lk_iomput ) .OR. l_trdtrc ) THEN160 ALLOCATE( trbio (jpi,jpj,jpk,jpdiabio) , &161 & ctrbio(jpdiabio), ctrbil(jpdiabio), ctrbiu(jpdiabio), STAT = ierr )162 IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate bio. diag. array' )163 !164 trbio(:,:,:,:) = 0._wp ; ctrbio(:) = ' ' ; ctrbil(:) = ' ' ; ctrbiu(:) = ' '165 !166 ENDIF167 168 ! namelist of transport169 ! ---------------------170 CALL trc_nam_trp171 172 173 IF( ln_rsttr ) ln_trcdta = .FALSE. ! restart : no need of clim data174 !175 IF( ln_trcdmp .OR. ln_trcdmp_clo ) ln_trcdta = .TRUE. ! damping : need to have clim data176 !177 IF( .NOT.ln_trcdta ) THEN178 ln_trc_ini(:) = .FALSE.179 ENDIF180 181 IF(lwp) THEN ! control print182 IF( ln_rsttr ) THEN183 WRITE(numout,*)184 WRITE(numout,*) ' Read a restart file for passive tracer : ', TRIM( cn_trcrst_in )185 WRITE(numout,*)186 ENDIF187 IF( ln_trcdta .AND. .NOT.ln_rsttr ) THEN188 WRITE(numout,*)189 WRITE(numout,*) ' Some of the passive tracers are initialised from climatologies '190 WRITE(numout,*)191 ENDIF192 IF( .NOT.ln_trcdta ) THEN193 WRITE(numout,*)194 WRITE(numout,*) ' All the passive tracers are initialised with constant values '195 WRITE(numout,*)196 ENDIF197 117 ENDIF 198 118 … … 246 166 END SUBROUTINE trc_nam 247 167 168 SUBROUTINE trc_nam_run 169 !!--------------------------------------------------------------------- 170 !! *** ROUTINE trc_nam *** 171 !! 172 !! ** Purpose : read options for the passive tracer run (namelist) 173 !! 174 !!--------------------------------------------------------------------- 175 NAMELIST/namtrc_run/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, ln_top_euler, & 176 & cn_trcrst_in, cn_trcrst_out 177 178 !!--------------------------------------------------------------------- 179 180 181 IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' 182 IF(lwp) WRITE(numout,*) '~~~~~~~' 183 184 CALL ctl_opn( numnat_ref, 'namelist_top_ref' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 185 CALL ctl_opn( numnat_cfg, 'namelist_top_cfg' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. ) 186 CALL ctl_opn( numont , 'output.namelist.top', 'REPLACE', 'FORMATTED', 'SEQUENTIAL',-1, numout, .FALSE. ) 187 188 REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables 189 READ ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) 190 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 191 192 REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables 193 READ ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) 194 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 195 WRITE ( numont, namtrc ) 196 197 ! computes the first time step of tracer model 198 nittrc000 = nit000 + nn_dttrc - 1 199 200 IF(lwp) THEN ! control print 201 WRITE(numout,*) 202 WRITE(numout,*) ' Namelist : namtrc' 203 WRITE(numout,*) ' time step freq. for passive tracer nn_dttrc = ', nn_dttrc 204 WRITE(numout,*) ' restart for passive tracer ln_rsttr = ', ln_rsttr 205 WRITE(numout,*) ' control of time step for passive tracer nn_rsttr = ', nn_rsttr 206 WRITE(numout,*) ' first time step for pass. trac. nittrc000 = ', nittrc000 207 WRITE(numout,*) ' frequency of outputs for passive tracers nn_writetrc = ', nn_writetrc 208 WRITE(numout,*) ' ' 209 ENDIF 210 ! 211 END SUBROUTINE trc_nam_run 212 213 214 SUBROUTINE trc_nam_trc 215 !!--------------------------------------------------------------------- 216 !! *** ROUTINE trc_nam *** 217 !! 218 !! ** Purpose : read options for the passive tracer run (namelist) 219 !! 220 !!--------------------------------------------------------------------- 221 INTEGER :: jn 222 ! Definition of a tracer as a structure 223 TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer ! type of tracer for saving if not key_iomput 224 !! 225 NAMELIST/namtrc/ sn_tracer, ln_trcdta,ln_trcdmp, ln_trcdmp_clo 226 227 !!--------------------------------------------------------------------- 228 IF(lwp) WRITE(numout,*) 229 IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' 230 IF(lwp) WRITE(numout,*) '~~~~~~~' 231 232 233 REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables 234 READ ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) 235 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) 236 237 REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables 238 READ ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) 239 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) 240 WRITE ( numont, namtrc ) 241 242 DO jn = 1, jptra 243 ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) 244 ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) 245 ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) 246 ln_trc_ini(jn) = sn_tracer(jn)%llinit 247 ln_trc_wri(jn) = sn_tracer(jn)%llsave 248 END DO 249 250 END SUBROUTINE trc_nam_trc 251 252 253 SUBROUTINE trc_nam_dia 254 !!--------------------------------------------------------------------- 255 !! *** ROUTINE trc_nam_dia *** 256 !! 257 !! ** Purpose : read options for the passive tracer diagnostics 258 !! 259 !! ** Method : - read passive tracer namelist 260 !! - read namelist of each defined SMS model 261 !! ( (PISCES, CFC, MY_TRC ) 262 !!--------------------------------------------------------------------- 263 INTEGER :: ierr 264 #if defined key_trdmld_trc || defined key_trdtrc 265 NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & 266 & ln_trdmld_trc_restart, ln_trdmld_trc_instant, & 267 & cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc 268 #endif 269 NAMELIST/namtrc_dia/ ln_diatrc, ln_diabio, nn_writedia, nn_writebio 270 271 !!--------------------------------------------------------------------- 272 273 IF(lwp) WRITE(numout,*) 274 IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' 275 IF(lwp) WRITE(numout,*) '~~~~~~~' 276 277 IF(lwp) WRITE(numout,*) 278 IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' 279 IF(lwp) WRITE(numout,*) '~~~~~~~' 280 281 REWIND( numnat_ref ) ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics 282 READ ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903) 283 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp ) 284 285 REWIND( numnat_cfg ) ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics 286 READ ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 ) 287 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp ) 288 WRITE ( numont, namtrc_dia ) 289 290 IF(lwp) THEN 291 WRITE(numout,*) 292 WRITE(numout,*) 293 WRITE(numout,*) ' Namelist : namtrc_dia' 294 WRITE(numout,*) ' save additionnal diagnostics arrays ln_diatrc = ', ln_diatrc 295 WRITE(numout,*) ' save additionnal biology diagnostics arrays ln_diabio = ', ln_diabio 296 WRITE(numout,*) ' frequency of outputs for additional arrays nn_writedia = ', nn_writedia 297 WRITE(numout,*) ' frequency of outputs for biological trends nn_writebio = ', nn_writebio 298 WRITE(numout,*) ' ' 299 ENDIF 300 301 IF( ln_diatrc .AND. .NOT. lk_iomput ) THEN 302 ALLOCATE( trc2d(jpi,jpj,jpdia2d), trc3d(jpi,jpj,jpk,jpdia3d), & 303 & ctrc2d(jpdia2d), ctrc2l(jpdia2d), ctrc2u(jpdia2d) , & 304 & ctrc3d(jpdia3d), ctrc3l(jpdia3d), ctrc3u(jpdia3d) , STAT = ierr ) 305 IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate add. diag. array' ) 306 ! 307 trc2d(:,:,: ) = 0._wp ; ctrc2d(:) = ' ' ; ctrc2l(:) = ' ' ; ctrc2u(:) = ' ' 308 trc3d(:,:,:,:) = 0._wp ; ctrc3d(:) = ' ' ; ctrc3l(:) = ' ' ; ctrc3u(:) = ' ' 309 ! 310 ENDIF 311 312 IF( ( ln_diabio .AND. .NOT. lk_iomput ) .OR. l_trdtrc ) THEN 313 ALLOCATE( trbio (jpi,jpj,jpk,jpdiabio) , & 314 & ctrbio(jpdiabio), ctrbil(jpdiabio), ctrbiu(jpdiabio), STAT = ierr ) 315 IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate bio. diag. array' ) 316 ! 317 trbio(:,:,:,:) = 0._wp ; ctrbio(:) = ' ' ; ctrbil(:) = ' ' ; ctrbiu(:) = ' ' 318 ! 319 ENDIF 320 ! 321 END SUBROUTINE trc_nam_dia 322 248 323 #else 249 324 !!---------------------------------------------------------------------- … … 253 328 SUBROUTINE trc_nam ! Empty routine 254 329 END SUBROUTINE trc_nam 330 SUBROUTINE trc_nam_run ! Empty routine 331 END SUBROUTINE trc_nam_run 255 332 #endif 256 333 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r3680 r4152 197 197 198 198 CALL iom_get ( numrtr, 'kt', zkt ) ! last time-step of previous run 199 199 200 IF(lwp) THEN 200 201 WRITE(numout,*) ' *** Info read in restart : ' … … 216 217 IF( iom_varid( numrtr, 'rdttrc1', ldstop = .FALSE. ) > 0 ) THEN 217 218 CALL iom_get( numrtr, 'rdttrc1', zrdttrc1 ) 218 IF( zrdttrc1 /= rdt trc(1)) neuler = 0219 IF( zrdttrc1 /= rdt * nn_dttrc ) neuler = 0 219 220 ENDIF 220 221 ! ! define ndastp and adatrj 221 IF 222 IF( nn_rsttr == 2 ) THEN 222 223 CALL iom_get( numrtr, 'ndastp', zndastp ) 223 224 ndastp = NINT( zndastp ) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/SETTE/input_ORCA2_LIM_PISCES.cfg
r4147 r4152 1 ORCA2_LIM_nemo_v3.4.tar ORCA2_LIM_PISCES_v3.5 2 INPUTS_DYNA_v3.tar ORCA2_LIM_PISCES_v3.5 3 INPUTS_INIT_v3.tar ORCA2_LIM_PISCES_v3.5 4 INPUTS_PISCES_v3.5.tar ORCA2_LIM_PISCES_v3.5 1 ORCA2_LIM_nemo_v3.4.tar ORCA2_LIM_nemo_v3.4 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/SETTE/input_ORCA2_OFF_PISCES.cfg
r4147 r4152 1 1 INPUTS_DYNA_v3.tar ORCA2_OFF_PISCES 2 INPUTS_INIT_v3.tar ORCA2_OFF_PISCES3 INPUTS_PISCES_v3.5.tar ORCA2_OFF_PISCES -
branches/2013/dev_LOCEAN_2013/NEMOGCM/SETTE/param.cfg
r4147 r4152 1 1 #- forcing files storing 2 FORCING_DIR= ~/Documents/WORK/FORCING2 FORCING_DIR=${WORKDIR}/FORCING 3 3 #- input files storing 4 4 INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 … … 6 6 #TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 7 7 #- VALIDATION files storing 8 NEMO_VALIDATION_DIR= ~/Documents/WORK/NEMO_VALIDATION8 NEMO_VALIDATION_DIR=${WORKDIR}/NEMO_VALIDATION -
branches/2013/dev_LOCEAN_2013/NEMOGCM/SETTE/sette.sh
r4147 r4152 131 131 #- 132 132 # Compiler among those in NEMOGCM/ARCH 133 COMPILER= macport_osx133 COMPILER=x3750_ADA 134 134 export BATCH_COMMAND_PAR="llsubmit" 135 135 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
Note: See TracChangeset
for help on using the changeset viewer.