Changeset 7401
- Timestamp:
- 2016-11-30T17:10:04+01:00 (7 years ago)
- Location:
- branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/ARCH/arch-macport_osx.fcm
r6387 r7401 42 42 %NCDF_HOME /opt/local 43 43 %HDF5_HOME /opt/local 44 %XIOS_HOME /Users/$( whoami )/xios- 1.044 %XIOS_HOME /Users/$( whoami )/xios-2.0_r966 45 45 %OASIS_HOME /not/defined 46 46 -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/domain_def.xml
r4373 r7401 1 link ../../SHARED/ domain_def.xml1 link ../../SHARED/ForXIOS2/domain_def.xml -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/field_def.xml
r4373 r7401 1 link ../../SHARED/ field_def.xml1 link ../../SHARED/ForXIOS2/field_def.xml -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/iodef.xml
r5363 r7401 2 2 <simulation> 3 3 4 <context id="nemo" time_origin="1900-01-01 00:00:00">4 <context id="nemo" > 5 5 6 6 <!-- $id$ --> … … 21 21 --> 22 22 23 <file_definition type=" multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">23 <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4"> 24 24 25 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> … … 99 99 <domain_definition src="./domain_def.xml"/> 100 100 101 <grid_definition> 102 <grid id="grid_T_2D" domain_ref="grid_T"/> 103 <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/> 104 <grid id="grid_U_2D" domain_ref="grid_U"/> 105 <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/> 106 <grid id="grid_V_2D" domain_ref="grid_V"/> 107 <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/> 108 <grid id="grid_W_2D" domain_ref="grid_W"/> 109 <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/> 110 </grid_definition> 101 102 <grid_definition> 103 <!-- --> 104 <grid id="grid_T_2D" > 105 <domain id="grid_T" /> 106 </grid> 107 <!-- --> 108 <grid id="grid_T_3D_ncatice" > 109 <domain id="grid_T" /> 110 <axis id="ncatice" /> 111 </grid> 112 <!-- --> 113 <grid id="grid_T_3D" > 114 <domain id="grid_T" /> 115 <axis id="deptht" /> 116 </grid> 117 <!-- --> 118 <grid id="grid_U_2D" > 119 <domain id="grid_U" /> 120 </grid> 121 <!-- --> 122 <grid id="grid_U_3D" > 123 <domain id="grid_U" /> 124 <axis id="depthu" /> 125 </grid> 126 <!-- --> 127 <grid id="grid_V_2D" > 128 <domain id="grid_V" /> 129 </grid> 130 <!-- --> 131 <grid id="grid_V_3D" > 132 <domain id="grid_V" /> 133 <axis id="depthv" /> 134 </grid> 135 <!-- --> 136 <grid id="grid_W_2D" > 137 <domain id="grid_W" /> 138 </grid> 139 <!-- --> 140 <grid id="grid_W_3D" > 141 <domain id="grid_W" /> 142 <axis id="depthw" /> 143 </grid> 144 <!-- --> 145 <grid id="grid_1point" > 146 <domain domain_ref="1point"/> 147 </grid> 148 <!-- --> 149 <grid id="grid_T_nfloat" > 150 <domain id="grid_T" /> 151 <axis id="nfloat" /> 152 </grid> 153 <!-- --> 154 <grid id="grid_EqT" > 155 <domain domain_ref="EqT" /> 156 </grid> 157 <!-- --> 158 <grid id="gznl_T_2D"> 159 <domain domain_ref="ptr" /> 160 </grid> 161 <!-- --> 162 <grid id="gznl_T_3D"> 163 <domain domain_ref="ptr" /> 164 <axis id="deptht" /> 165 </grid> 166 <!-- --> 167 <grid id="gznl_W_2D"> 168 <domain domain_ref="ptr" /> 169 </grid> 170 <!-- --> 171 <grid id="gznl_W_3D"> 172 <domain domain_ref="ptr" /> 173 <axis id="depthw" /> 174 </grid> 175 </grid_definition> 176 111 177 112 178 </context> … … 117 183 <variable_definition> 118 184 119 <!-- 120 We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size) 121 --> 122 <variable id="buffer_size" type="integer">10000000</variable> 123 <variable id="buffer_server_factor_size" type="integer">2</variable> 124 <variable id="info_level" type="integer">0</variable> 125 <variable id="using_server" type="boolean">false</variable> 126 <variable id="using_oasis" type="boolean">false</variable> 185 <variable id="info_level" type="int">0</variable> 186 <variable id="using_server" type="bool">false</variable> 187 <variable id="using_oasis" type="bool">false</variable> 127 188 <variable id="oasis_codes_id" type="string" >oceanx</variable> 128 189 -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
r6489 r7401 11 11 nn_stock = 4320 ! frequency of creation of a restart file (modulo referenced to 1) 12 12 nn_write = 60 ! frequency of write in the output file (modulo referenced to nn_it000) 13 14 ln_clobber = .true. ! clobber (overwrite) an existing file 15 13 16 / 14 17 !----------------------------------------------------------------------- … … 41 44 nn_bathy = 0 ! compute (=0) or read (=1) the bathymetry file 42 45 rn_rdt = 7200. ! time step for the dynamics 43 ! nn_baro = 60 ! number of barotropic time step ("key_dynspg_ts")44 46 jphgr_msh = 5 ! type of horizontal mesh 45 47 ppglam0 = 0.0 ! longitude of first raw and column T-point (jphgr_msh = 1) … … 77 79 !----------------------------------------------------------------------- 78 80 nn_fsbc = 1 ! frequency of surface boundary condition computation 79 81 ! ! (also = the frequency of sea-ice model call) 80 82 ln_ana = .true. ! analytical formulation (T => fill namsbc_ana ) 81 83 ln_blk_core = .false. ! CORE bulk formulation (T => fill namsbc_core) … … 173 175 / 174 176 !----------------------------------------------------------------------- 175 &nambbc ! bottom temperature boundary condition (default: NO) 176 !----------------------------------------------------------------------- 177 &nambbc ! bottom temperature boundary condition 178 !----------------------------------------------------------------------- 179 ln_trabbc = .false. ! Apply a geothermal heating at the ocean bottom 180 nn_geoflx = 0 ! geothermal heat flux: = 0 no flux 177 181 / 178 182 !----------------------------------------------------------------------- … … 184 188 !----------------------------------------------------------------------- 185 189 ln_eos80 = .true. ! = Use EOS80 equation of state 190 ! ! 191 ! ! S-EOS coefficients : 192 ! ! rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS 193 rn_a0 = 1.6550e-1 ! thermal expension coefficient (nn_eos= 1) 194 rn_b0 = 7.6554e-1 ! saline expension coefficient (nn_eos= 1) 195 rn_lambda1 = 5.9520e-2 ! cabbeling coeff in T^2 (=0 for linear eos) 196 rn_lambda2 = 7.4914e-4 ! cabbeling coeff in S^2 (=0 for linear eos) 197 rn_mu1 = 1.4970e-4 ! thermobaric coeff. in T (=0 for linear eos) 198 rn_mu2 = 1.1090e-5 ! thermobaric coeff. in S (=0 for linear eos) 199 rn_nu = 2.4341e-3 ! cabbeling coeff in T*S (=0 for linear eos) 200 !!org GYRE rn_alpha = 2.0e-4 ! thermal expension coefficient (nn_eos= 1 or 2) 201 !!org GYRE rn_beta = 7.7e-4 ! saline expension coefficient (nn_eos= 2) 202 !!org caution now a0 = alpha / rau0 with rau0 = 1026 186 203 / 187 204 !----------------------------------------------------------------------- 188 205 &namtra_adv ! advection scheme for tracer 189 206 !----------------------------------------------------------------------- 190 ln_traadv_fct = .true. 207 ln_traadv_fct = .true. ! FCT scheme 191 208 nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order 192 209 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order … … 207 224 ln_traldf_lev = .false. ! iso-level 208 225 ln_traldf_hor = .false. ! horizontal (geopotential) 209 ln_traldf_iso = .true. ! iso-neutral (standard operator)210 ln_traldf_triad = .false. ! iso-neutral (triad operator)226 ln_traldf_iso = .true. ! iso-neutral 227 ln_traldf_triad = .false. ! iso-neutral using Griffies triads 211 228 ! 212 229 ! ! iso-neutral options: 213 ln_traldf_msc = . true.! Method of Stabilizing Correction (both operators)230 ln_traldf_msc = .false. ! Method of Stabilizing Correction (both operators) 214 231 rn_slpmax = 0.01 ! slope limit (both operators) 215 ln_triad_iso = .false. ! pure horizontal mixing in ML 232 ln_triad_iso = .false. ! pure horizontal mixing in ML (triad only) 216 233 rn_sw_triad = 1 ! =1 switching triad ; =0 all 4 triads used (triad only) 217 ln_botmix_triad = .false. ! lateral mixing on bottom 234 ln_botmix_triad = .false. ! lateral mixing on bottom (triad only) 218 235 ! 219 236 ! ! Coefficients: … … 246 263 &namdyn_vor ! option of physics/algorithm (not control by CPP keys) 247 264 !----------------------------------------------------------------------- 248 ln_dynvor_ene = .true. ! energy conserving scheme 249 ln_dynvor_ens = .false. ! enstrophy conserving scheme 265 ln_dynvor_ene = .true. ! enstrophy conserving scheme 266 ln_dynvor_ens = .false. ! energy conserving scheme 267 ln_dynvor_mix = .false. ! mixed scheme 250 268 ln_dynvor_een = .false. ! energy & enstrophy scheme 269 nn_een_e3f = 1 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 251 270 / 252 271 !----------------------------------------------------------------------- … … 257 276 / 258 277 !----------------------------------------------------------------------- 259 &namdyn_spg ! surface pressure gradient 278 &namdyn_spg ! surface pressure gradient 260 279 !----------------------------------------------------------------------- 261 280 ln_dynspg_ts = .true. ! split-explicit free surface … … 264 283 &namdyn_ldf ! lateral diffusion on momentum 265 284 !----------------------------------------------------------------------- 266 rn_ahm_0_lap = 100000. ! horizontal laplacian eddy viscosity [m2/s] 285 ! ! Type of the operator : 286 ! ! no diffusion: set ln_dynldf_lap=..._blp=F 287 ln_dynldf_lap = .true. ! laplacian operator 288 ln_dynldf_blp = .false. ! bilaplacian operator 289 ! ! Direction of action : 290 ln_dynldf_lev = .true. ! iso-level 291 ln_dynldf_hor = .false. ! horizontal (geopotential) 292 ln_dynldf_iso = .false. ! iso-neutral 293 ! ! Coefficient 294 nn_ahm_ijk_t = 0 ! space/time variation of eddy coef 295 ! ! =-30 read in eddy_viscosity_3D.nc file 296 ! ! =-20 read in eddy_viscosity_2D.nc file 297 ! ! = 0 constant 298 ! ! = 10 F(k)=c1d 299 ! ! = 20 F(i,j)=F(grid spacing)=c2d 300 ! ! = 30 F(i,j,k)=c2d*c1d 301 ! ! = 31 F(i,j,k)=F(grid spacing and local velocity) 302 rn_ahm_0 = 100000. ! horizontal laplacian eddy viscosity [m2/s] 303 rn_ahm_b = 0. ! background eddy viscosity for ldf_iso [m2/s] 304 rn_bhm_0 = 0. ! horizontal bilaplacian eddy viscosity [m4/s] 267 305 / 268 306 !----------------------------------------------------------------------- … … 279 317 !----------------------------------------------------------------------- 280 318 nn_etau = 0 ! penetration of tke below the mixed layer (ML) due to internal & intertial waves 281 /282 !------------------------------------------------------------------------283 &namzdf_kpp ! K-Profile Parameterization dependent vertical mixing ("key_zdfkpp", and optionally:284 !------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")285 319 / 286 320 !----------------------------------------------------------------------- … … 313 347 ! ! or mixed-layer trends or barotropic vorticity ("key_trdmld" or "key_trdvor") 314 348 !----------------------------------------------------------------------- 315 / 349 ln_glo_trd = .false. ! (T) global domain averaged diag for T, T^2, KE, and PE 350 ln_dyn_trd = .false. ! (T) 3D momentum trend output 351 ln_dyn_mxl = .FALSE. ! (T) 2D momentum trends averaged over the mixed layer (not coded yet) 352 ln_vor_trd = .FALSE. ! (T) 2D barotropic vorticity trends (not coded yet) 353 ln_KE_trd = .false. ! (T) 3D Kinetic Energy trends 354 ln_PE_trd = .false. ! (T) 3D Potential Energy trends 355 ln_tra_trd = .false. ! (T) 3D tracer trend output 356 ln_tra_mxl = .false. ! (T) 2D tracer trends averaged over the mixed layer (not coded yet) 357 nn_trd = 365 ! print frequency (ln_glo_trd=T) (unit=time step) 358 / 359 !!gm nn_ctls = 0 ! control surface type in mixed-layer trends (0,1 or n<jpk) 360 !!gm rn_ucf = 1. ! unit conversion factor (=1 -> /seconds ; =86400. -> /day) 361 !!gm cn_trdrst_in = "restart_mld" ! suffix of ocean restart name (input) 362 !!gm cn_trdrst_out = "restart_mld" ! suffix of ocean restart name (output) 363 !!gm ln_trdmld_restart = .false. ! restart for ML diagnostics 364 !!gm ln_trdmld_instant = .false. ! flag to diagnose trends of instantantaneous or mean ML T/S 365 !!gm 316 366 !----------------------------------------------------------------------- 317 367 &namflo ! float parameters ("key_float") -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm
r5930 r7401 1 bld::tool::fppkeys key_zdftke key_iomput key_mpp_mpi 1 bld::tool::fppkeys key_zdftke key_iomput key_mpp_mpi key_xios2 key_nosignedzero -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/CONFIG/cfg.txt
r6403 r7401 1 1 GYRE_PISCES OPA_SRC TOP_SRC 2 2 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 3 GYRE_XIOS OPA_SRC4 3 ORCA2_SAS_LIM OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC 5 4 C1D_PAPA OPA_SRC … … 11 10 GYRE OPA_SRC 12 11 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 12 GYRE_XIOS OPA_SRC -
branches/2016/dev_r7161_trunk_XIOS2/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r6519 r7401 93 93 CHARACTER(len=*), INTENT(in) :: cdname 94 94 #if defined key_iomput 95 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0) 96 CHARACTER(len=19) :: cldate 95 96 #if defined key_xios2 97 TYPE(xios_duration) :: dtime = xios_duration(0, 0, 0, 0, 0, 0) 98 TYPE(xios_date) :: start_date 99 #else 100 TYPE(xios_time) :: dtime = xios_time(0, 0, 0, 0, 0, 0) 101 CHARACTER(len=19) :: cldate 102 #endif 97 103 CHARACTER(len=10) :: clname 98 104 INTEGER :: ji 99 105 ! 100 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z_bnds 101 !!---------------------------------------------------------------------- 102 103 ALLOCATE( z_bnds(jpk,2) ) 106 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds 107 !!---------------------------------------------------------------------- 108 109 #if defined key_xios2 110 ALLOCATE( zt_bnds(2,jpk), zw_bnds(2,jpk) ) 111 #else 112 ALLOCATE( zt_bnds(jpk,2), zw_bnds(jpk,2) ) 113 #endif 104 114 105 115 clname = cdname … … 108 118 CALL iom_swap( cdname ) 109 119 120 121 #if defined key_xios2 122 ! Calendar type is now defined in xml file 123 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 124 CASE ( 1) ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(1900,01,01,00,00,00), & 125 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 126 CASE ( 0) ; CALL xios_define_calendar( TYPE = "NoLeap" , time_origin = xios_date(1900,01,01,00,00,00), & 127 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 128 CASE (30) ; CALL xios_define_calendar( TYPE = "D360" , time_origin = xios_date(1900,01,01,00,00,00), & 129 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 130 END SELECT 131 #else 110 132 ! calendar parameters 111 133 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL … … 117 139 CALL xios_set_context_attr(TRIM(clname), start_date=cldate ) 118 140 141 #endif 119 142 ! horizontal grid definition 120 143 CALL set_scalar … … 169 192 170 193 ! Add vertical grid bounds 171 z_bnds(: ,1) = gdepw_1d(:) 172 z_bnds(1:jpkm1,2) = gdepw_1d(2:jpk) 173 z_bnds(jpk: ,2) = gdepw_1d(jpk) + e3t_1d(jpk) 174 CALL iom_set_axis_attr( "deptht", bounds=z_bnds ) 175 CALL iom_set_axis_attr( "depthu", bounds=z_bnds ) 176 CALL iom_set_axis_attr( "depthv", bounds=z_bnds ) 177 z_bnds(: ,2) = gdept_1d(:) 178 z_bnds(2:jpk,1) = gdept_1d(1:jpkm1) 179 z_bnds(1 ,1) = gdept_1d(1) - e3w_1d(1) 180 CALL iom_set_axis_attr( "depthw", bounds=z_bnds ) 194 #if defined key_xios2 195 zt_bnds(2,: ) = gdept_1d(:) 196 zt_bnds(1,2:jpk ) = gdept_1d(1:jpkm1) 197 zt_bnds(1,1 ) = gdept_1d(1) - e3w_1d(1) 198 zw_bnds(1 ,:) = gdepw_1d(:) 199 zw_bnds(2,1:jpkm1) = gdepw_1d(2:jpk) 200 zw_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 201 #else 202 zt_bnds(: ,2 ) = gdept_1d(:) 203 zt_bnds(2:jpk,1 ) = gdept_1d(1:jpkm1) 204 zt_bnds(1 ,1 ) = gdept_1d(1) - e3w_1d(1) 205 zw_bnds(: ,1) = gdepw_1d(:) 206 zw_bnds(1:jpkm1,2) = gdepw_1d(2:jpk) 207 zw_bnds(jpk: ,2) = gdepw_1d(jpk) + e3t_1d(jpk) 208 #endif 209 CALL iom_set_axis_attr( "deptht", bounds=zt_bnds ) 210 CALL iom_set_axis_attr( "depthu", bounds=zt_bnds ) 211 CALL iom_set_axis_attr( "depthv", bounds=zt_bnds ) 212 CALL iom_set_axis_attr( "depthw", bounds=zw_bnds ) 213 181 214 182 215 # if defined key_floats … … 200 233 CALL xios_update_calendar(0) 201 234 202 DEALLOCATE( z _bnds )235 DEALLOCATE( zt_bnds, zw_bnds ) 203 236 204 237 #endif … … 1130 1163 REAL(wp), DIMENSION(:) , OPTIONAL, INTENT(in) :: lonvalue, latvalue 1131 1164 REAL(wp), DIMENSION(:,:) , OPTIONAL, INTENT(in) :: bounds_lon, bounds_lat, area 1132 LOGICAL, DIMENSION(:,:) , OPTIONAL, INTENT(in) :: mask 1133 1165 #if defined key_xios2 1166 LOGICAL, DIMENSION(:) , OPTIONAL, INTENT(in) :: mask 1167 #else 1168 LOGICAL, DIMENSION(:,:) , OPTIONAL, INTENT(in) :: mask 1169 #endif 1170 1171 1172 #if defined key_xios2 1173 IF ( xios_is_valid_domain (cdid) ) THEN 1174 CALL xios_set_domain_attr ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & 1175 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj , & 1176 & lonvalue_1D=lonvalue, latvalue_1D=latvalue, mask_1D=mask, nvertex=nvertex, bounds_lon_1D=bounds_lon, & 1177 & bounds_lat_1D=bounds_lat, area=area, type='curvilinear') 1178 ENDIF 1179 IF ( xios_is_valid_domaingroup(cdid) ) THEN 1180 CALL xios_set_domaingroup_attr( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & 1181 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj , & 1182 & lonvalue_1D=lonvalue, latvalue_1D=latvalue, mask_1D=mask, nvertex=nvertex, bounds_lon_1D=bounds_lon, & 1183 & bounds_lat_1D=bounds_lat, area=area, type='curvilinear' ) 1184 ENDIF 1185 #else 1134 1186 IF ( xios_is_valid_domain (cdid) ) THEN 1135 1187 CALL xios_set_domain_attr ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & … … 1147 1199 & bounds_lat=bounds_lat, area=area ) 1148 1200 ENDIF 1201 #endif 1149 1202 CALL xios_solve_inheritance() 1150 1203 1151 1204 END SUBROUTINE iom_set_domain_attr 1205 1206 #if defined key_xios2 1207 SUBROUTINE iom_set_zoom_domain_attr( cdid, ibegin, jbegin, ni, nj) 1208 CHARACTER(LEN=*) , INTENT(in) :: cdid 1209 INTEGER , OPTIONAL, INTENT(in) :: ibegin, jbegin, ni, nj 1210 1211 IF ( xios_is_valid_zoom_domain (cdid) ) THEN 1212 CALL xios_set_zoom_domain_attr ( cdid, ibegin=ibegin, jbegin=jbegin, ni=ni, & 1213 & nj=nj) 1214 ENDIF 1215 END SUBROUTINE iom_set_zoom_domain_attr 1216 #endif 1152 1217 1153 1218 … … 1156 1221 REAL(wp), DIMENSION(:) , OPTIONAL, INTENT(in) :: paxis 1157 1222 REAL(wp), DIMENSION(:,:), OPTIONAL, INTENT(in) :: bounds 1223 1224 #if defined key_xios2 1225 IF ( PRESENT(paxis) ) THEN 1226 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, n_glo=SIZE(paxis), value=paxis ) 1227 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, n_glo=SIZE(paxis), value=paxis ) 1228 ENDIF 1229 #else 1158 1230 IF ( PRESENT(paxis) ) THEN 1159 1231 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, size=SIZE(paxis), value=paxis ) 1160 1232 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, size=SIZE(paxis), value=paxis ) 1161 1233 ENDIF 1234 #endif 1162 1235 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, bounds=bounds ) 1163 1236 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, bounds=bounds ) … … 1168 1241 SUBROUTINE iom_set_field_attr( cdid, freq_op, freq_offset ) 1169 1242 CHARACTER(LEN=*) , INTENT(in) :: cdid 1243 #if defined key_xios2 1244 TYPE(xios_duration),OPTIONAL , INTENT(in) :: freq_op 1245 TYPE(xios_duration),OPTIONAL , INTENT(in) :: freq_offset 1246 #else 1170 1247 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: freq_op 1171 1248 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: freq_offset 1249 #endif 1172 1250 IF ( xios_is_valid_field (cdid) ) CALL xios_set_field_attr & 1173 1251 & ( cdid, freq_op=freq_op, freq_offset=freq_offset ) … … 1189 1267 SUBROUTINE iom_get_file_attr( cdid, name, name_suffix, output_freq ) 1190 1268 CHARACTER(LEN=*) , INTENT(in ) :: cdid 1191 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: name, name_suffix, output_freq 1269 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: name, name_suffix 1270 #if defined key_xios2 1271 TYPE(xios_duration), OPTIONAL , INTENT(out) :: output_freq 1272 #else 1273 CHARACTER(LEN=*) , OPTIONAL , INTENT(out) :: output_freq 1274 #endif 1192 1275 LOGICAL :: llexist1,llexist2,llexist3 1193 1276 !--------------------------------------------------------------------- 1194 1277 IF( PRESENT( name ) ) name = '' ! default values 1195 1278 IF( PRESENT( name_suffix ) ) name_suffix = '' 1279 #if defined key_xios2 1280 IF( PRESENT( output_freq ) ) output_freq = xios_duration(0,0,0,0,0,0) 1281 #else 1196 1282 IF( PRESENT( output_freq ) ) output_freq = '' 1283 #endif 1197 1284 IF ( xios_is_valid_file (cdid) ) THEN 1198 1285 CALL xios_solve_inheritance() … … 1215 1302 CHARACTER(LEN=*) , INTENT(in) :: cdid 1216 1303 LOGICAL, DIMENSION(:,:,:), OPTIONAL, INTENT(in) :: mask 1304 #if defined key_xios2 1305 IF ( xios_is_valid_grid (cdid) ) CALL xios_set_grid_attr ( cdid, mask_3D=mask ) 1306 IF ( xios_is_valid_gridgroup(cdid) ) CALL xios_set_gridgroup_attr( cdid, mask_3D=mask ) 1307 #else 1217 1308 IF ( xios_is_valid_grid (cdid) ) CALL xios_set_grid_attr ( cdid, mask=mask ) 1218 1309 IF ( xios_is_valid_gridgroup(cdid) ) CALL xios_set_gridgroup_attr( cdid, mask=mask ) 1310 #endif 1219 1311 CALL xios_solve_inheritance() 1220 1312 END SUBROUTINE iom_set_grid_attr … … 1258 1350 ni=nlei-nldi+1 ; nj=nlej-nldj+1 1259 1351 1352 #if defined key_xios2 1353 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1354 #else 1260 1355 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 1356 #endif 1261 1357 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1262 1358 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), & … … 1272 1368 END SELECT 1273 1369 ! 1370 #if defined key_xios2 1371 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,1),(/ni*nj /)) /= 0. ) 1372 #else 1274 1373 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,1),(/ni,nj /)) /= 0. ) 1374 #endif 1275 1375 CALL iom_set_grid_attr ( "grid_"//cdgrd//"_3D", mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,:),(/ni,nj,jpk/)) /= 0. ) 1276 1376 ENDIF … … 1406 1506 ALLOCATE( zlon(ni*nj) ) ; zlon(:) = 0. 1407 1507 1508 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole : Reference latitude (used in plots) 1509 #if defined key_xios2 1510 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1511 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1512 CALL iom_set_domain_attr("gznl", lonvalue = zlon, & 1513 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1514 CALL iom_set_zoom_domain_attr ("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=jpjglo) 1515 #else 1408 1516 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 1409 1517 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1410 1518 CALL iom_set_domain_attr("gznl", lonvalue = zlon, & 1411 1519 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1412 !1413 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole : Reference latitude (used in plots)1414 1520 CALL iom_set_domain_attr ('ptr', zoom_ibegin=ix, zoom_nj=jpjglo) 1521 #endif 1522 ! 1415 1523 CALL iom_update_file_name('ptr') 1416 1524 ! … … 1426 1534 REAL(wp), DIMENSION(1) :: zz = 1. 1427 1535 !!---------------------------------------------------------------------- 1536 1537 #if defined key_xios2 1538 CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea-1, jbegin=0, ni=1, nj=1) 1539 #else 1428 1540 CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea, jbegin=1, ni=1, nj=1) 1541 #endif 1429 1542 CALL iom_set_domain_attr('scalarpoint', data_dim=2, data_ibegin = 1, data_ni = 1, data_jbegin = 1, data_nj = 1) 1430 1543 … … 1455 1568 REAL(wp) ,DIMENSION( 3) :: zlonpira ! longitudes of pirata moorings 1456 1569 REAL(wp) ,DIMENSION( 9) :: zlatpira ! latitudes of pirata moorings 1570 #if defined key_xios2 1571 TYPE(xios_duration) :: f_op, f_of 1572 #endif 1457 1573 !!---------------------------------------------------------------------- 1458 1574 ! 1459 1575 ! frequency of the call of iom_put (attribut: freq_op) 1460 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op = cl1//'ts', freq_offset='0ts') 1461 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op = cl1//'ts', freq_offset='0ts') 1462 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC_scalar' , freq_op = cl1//'ts', freq_offset='0ts') 1463 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('ptrc_T' , freq_op = cl1//'ts', freq_offset='0ts') 1464 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('diad_T' , freq_op = cl1//'ts', freq_offset='0ts') 1465 1576 #if defined key_xios2 1577 f_op%timestep = 1 ; f_of%timestep = 0 ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 1578 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC' , freq_op=f_op, freq_offset=f_of) 1579 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op=f_op, freq_offset=f_of) 1580 f_op%timestep = nn_dttrc ; f_of%timestep = 0 ; CALL iom_set_field_attr('ptrc_T' , freq_op=f_op, freq_offset=f_of) 1581 f_op%timestep = nn_dttrc ; f_of%timestep = 0 ; CALL iom_set_field_attr('diad_T' , freq_op=f_op, freq_offset=f_of) 1582 #else 1583 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op=cl1//'ts', freq_offset='0ts') 1584 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op=cl1//'ts', freq_offset='0ts') 1585 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC_scalar' , freq_op=cl1//'ts', freq_offset='0ts') 1586 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('ptrc_T' , freq_op=cl1//'ts', freq_offset='0ts') 1587 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('diad_T' , freq_op=cl1//'ts', freq_offset='0ts') 1588 #endif 1589 1466 1590 ! output file names (attribut: name) 1467 1591 DO ji = 1, 9 … … 1484 1608 ! Equatorial section (attributs: jbegin, ni, name_suffix) 1485 1609 CALL dom_ngb( 0., 0., ix, iy, cl1 ) 1610 #if defined key_xios2 1611 CALL iom_set_zoom_domain_attr ('Eq'//cl1, jbegin=iy-1, ni=jpiglo) 1612 #else 1486 1613 CALL iom_set_domain_attr ('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 1614 #endif 1487 1615 CALL iom_get_file_attr ('Eq'//cl1, name_suffix = clsuff ) 1488 1616 CALL iom_set_file_attr ('Eq'//cl1, name_suffix = TRIM(clsuff)//'_Eq') … … 1564 1692 ENDIF 1565 1693 clname = TRIM(ADJUSTL(clat))//TRIM(ADJUSTL(clon)) 1694 #if defined key_xios2 1695 CALL iom_set_zoom_domain_attr (TRIM(clname)//cl1, ibegin= ix-1, jbegin= iy-1) 1696 #else 1566 1697 CALL iom_set_domain_attr (TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 1698 #endif 1699 1567 1700 CALL iom_get_file_attr (TRIM(clname)//cl1, name_suffix = clsuff ) 1568 1701 CALL iom_set_file_attr (TRIM(clname)//cl1, name_suffix = TRIM(clsuff)//'_'//TRIM(clname)) … … 1593 1726 REAL(wp) :: zsec 1594 1727 LOGICAL :: llexist 1728 #if defined key_xios2 1729 TYPE(xios_duration) :: output_freq 1730 #endif 1595 1731 !!---------------------------------------------------------------------- 1596 1732 1597 1733 DO jn = 1,2 1598 1734 1735 #if defined key_xios2 1736 output_freq = xios_duration(0,0,0,0,0,0) 1737 IF( jn == 1 ) CALL iom_get_file_attr( cdid, name = clname, output_freq = output_freq ) 1738 #else 1599 1739 IF( jn == 1 ) CALL iom_get_file_attr( cdid, name = clname, output_freq = clfreq ) 1740 #endif 1600 1741 IF( jn == 2 ) CALL iom_get_file_attr( cdid, name_suffix = clname ) 1601 1742 … … 1608 1749 END DO 1609 1750 1751 #if defined key_xios2 1752 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1753 DO WHILE ( idx /= 0 ) 1754 IF ( output_freq%timestep /= 0) THEN 1755 WRITE(clfreq,'(I18,A2)')INT(output_freq%timestep),'ts' 1756 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1757 ELSE IF ( output_freq%hour /= 0 ) THEN 1758 WRITE(clfreq,'(I19,A1)')INT(output_freq%hour),'h' 1759 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1760 ELSE IF ( output_freq%day /= 0 ) THEN 1761 WRITE(clfreq,'(I19,A1)')INT(output_freq%day),'d' 1762 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1763 ELSE IF ( output_freq%month /= 0 ) THEN 1764 WRITE(clfreq,'(I19,A1)')INT(output_freq%month),'m' 1765 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1766 ELSE IF ( output_freq%year /= 0 ) THEN 1767 WRITE(clfreq,'(I19,A1)')INT(output_freq%year),'y' 1768 itrlen = LEN_TRIM(ADJUSTL(clfreq)) 1769 ELSE 1770 CALL ctl_stop('error in the name of file id '//TRIM(cdid), & 1771 & ' attribute output_freq is undefined -> cannot replace @freq@ in '//TRIM(clname) ) 1772 ENDIF 1773 clname = clname(1:idx-1)//TRIM(ADJUSTL(clfreq))//clname(idx+6:LEN_TRIM(clname)) 1774 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1775 END DO 1776 #else 1610 1777 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1611 1778 DO WHILE ( idx /= 0 ) … … 1620 1787 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1621 1788 END DO 1622 1789 #endif 1623 1790 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 1624 1791 DO WHILE ( idx /= 0 )
Note: See TracChangeset
for help on using the changeset viewer.