Changeset 4245
- Timestamp:
- 2013-11-19T12:19:21+01:00 (11 years ago)
- Location:
- branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013
- Files:
-
- 1 added
- 3 deleted
- 39 edited
- 11 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/DOC/TexFiles/Chapters/Chap_OBS.tex
r4147 r4245 5 5 \label{OBS} 6 6 7 Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver ... % do we keep that ?7 Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ... % do we keep that ? 8 8 9 9 \minitoc … … 42 42 where to obtain data and how to setup the namelist. Section~\ref{OBS_details} introduces some 43 43 more technical details of the different observation types used and also shows a more complete 44 namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the 45 observation operator including interpolation methods and running on multiple processors. 46 Section~\ref{OBS_obsutils} introduces some utilities to help working with the files produced 47 by the OBS code. 44 namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the observation 45 operator including interpolation methods and running on multiple processors. 46 Section~\ref{OBS_ooo} describes the offline observation operator code. 47 Section~\ref{OBS_obsutils} introduces some utilities to help working with the files 48 produced by the OBS code. 48 49 49 50 % ================================================================ … … 787 788 \newpage 788 789 790 % ================================================================ 791 % Offline observation operator documentation 792 % ================================================================ 793 794 %\usepackage{framed} 795 796 \section{Offline observation operator} 797 \label{OBS_ooo} 798 799 \subsection{Concept} 800 801 The obs oper maps model variables to observation space. It is possible to apply this mapping 802 without running the model. The software which performs this functionality is known as the 803 \textbf{offline obs oper}. The obs oper is divided into three stages. An initialisation phase, 804 an interpolation phase and an output phase. The implementation of which is outlined in the 805 previous sections. During the interpolation phase the offline obs oper populates the model 806 arrays by reading saved model fields from disk. 807 808 There are two ways of exploiting this offline capacity. The first is to mimic the behaviour of 809 the online system by supplying model fields at regular intervals between the start and the end 810 of the run. This approach results in a single model counterpart per observation. This kind of 811 usage produces feedback files the same file format as the online obs oper. 812 The second is to take advantage of the offline setting in which multiple model counterparts can 813 be calculated per observation. In this case it is possible to consider all forecasts verifying 814 at the same time. By forecast, I mean any method which produces an estimate of physical reality 815 which is not an observed value. In the case of class 4 files this means forecasts, analyses, persisted 816 analyses and climatological values verifying at the same time. Although the class 4 file format 817 doesn't account for multiple ensemble members or multiple experiments per observation, it is possible 818 to include these components in the same or multiple files. 819 820 %-------------------------------------------------------------------------------------------------------- 821 % offline_oper.exe 822 %-------------------------------------------------------------------------------------------------------- 823 824 \subsection{Using the offline observation operator} 825 826 \subsubsection{Building} 827 828 In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion 829 of the \emph{OOO\_SRC} directory. \emph{OOO\_SRC} contains a replacement \textbf{nemo.f90} and 830 \textbf{nemogcm.F90} which overwrites the resultant \textbf{nemo.exe}. This is the approach taken 831 by \emph{SAS\_SRC} and \emph{OFF\_SRC}. 832 833 %-------------------------------------------------------------------------------------------------------- 834 % Running 835 %-------------------------------------------------------------------------------------------------------- 836 \subsubsection{Running} 837 838 The simplest way to use the executable is to edit and append the \textbf{ooo.nml} namelist to 839 a full NEMO namelist and then to run the executable as if it were nemo.exe. 840 841 \subsubsection{Quick script} 842 843 A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}. The 844 functions which locate model fields and observation files can be manually specified. The package 845 can be installed by appropriate use of the included setup.py script. 846 847 Documentation can be auto-generated by Sphinx by running \emph{make html} in the \textbf{doc} directory. 848 849 %-------------------------------------------------------------------------------------------------------- 850 % Configuration section 851 %-------------------------------------------------------------------------------------------------------- 852 \subsection{Configuring the offline observation operator} 853 The observation files and settings understood by \textbf{namobs} have been outlined in the online 854 obs oper section. In addition there are two further namelists wich control the operation of the offline 855 obs oper. \textbf{namooo} which controls the input model fields and \textbf{namcl4} which controls the 856 production of class 4 files. 857 858 \subsubsection{Single field} 859 860 In offline mode model arrays are populated at appropriate time steps via input files. 861 At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines. 862 These routines will be expanded upon in future versions to allow the specification of any 863 model variable. As such, input files must be global versions of the model domain with 864 \textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 865 866 For each field read there must be an entry in the \textbf{namooo} namelist specifying the 867 name of the file to read and the index along the \emph{time\_counter}. For example, to 868 read the second time counter from a single file the namelist would be. 869 870 \begin{alltt} 871 \tiny 872 \begin{verbatim} 873 !---------------------------------------------------------------------- 874 ! namooo Offline obs_oper namelist 875 !---------------------------------------------------------------------- 876 ! ooo_files specifies the files containing the model counterpart 877 ! nn_ooo_idx specifies the time_counter index within the model file 878 &namooo 879 ooo_files = "foo.nc" 880 nn_ooo_idx = 2 881 / 882 \end{verbatim} 883 \end{alltt} 884 885 \subsubsection{Multiple fields per run} 886 887 Model field iteration is controlled via \textbf{nn\_ooo\_freq} which specifies 888 the number of model steps at which the next field gets read. For example, if 889 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours. 890 891 \begin{alltt} 892 \tiny 893 \begin{verbatim} 894 !---------------------------------------------------------------------- 895 ! namooo Offline obs_oper namelist 896 !---------------------------------------------------------------------- 897 ! ooo_files specifies the files containing the model counterpart 898 ! nn_ooo_idx specifies the time_counter index within the model file 899 ! nn_ooo_freq specifies number of time steps between read operations 900 &namooo 901 ooo_files = "foo.nc" "foo.nc" 902 nn_ooo_idx = 1 2 903 nn_ooo_freq = 144 904 / 905 \end{verbatim} 906 \end{alltt} 907 908 The above namelist will result in feedback files whose first 12 hours contain 909 the first field of foo.nc and the second 12 hours contain the second field. 910 911 %\begin{framed} 912 \textbf{Note} Missing files can be denoted as "nofile". 913 %\end{framed} 914 915 It is easy to see how a collection of fields taken fron a number of files 916 at different indices can be combined at a particular frequency in time to 917 generate a pseudo model evolution. As long as all that is needed is a single 918 model counterpart at a regular interval then namooo is all that needs to 919 be edited. However, a far more interesting approach can be taken in which 920 multiple forecasts, analyses, persisted analyses and climatologies are 921 considered against the same set of observations. For this a slightly more 922 complicated approach is needed. It is referred to as \emph{Class 4} since 923 it is the fourth metric defined by the GODAE intercomparison project. 924 925 %-------------------------------------------------------------------------------------------------------- 926 % Class 4 file section 927 %-------------------------------------------------------------------------------------------------------- 928 \subsubsection{Multiple model counterparts per observation a.k.a Class 4} 929 930 A generalisation of feedback files to allow multiple model components per observation. For a single 931 observation, as well as previous forecasts verifying at the same time there are also analyses, persisted 932 analyses and climatologies. 933 934 935 The above namelist performs two basic functions. It organises the fields 936 given in \textbf{namooo} into groups so that observations can be matched 937 up multiple times. It also controls the metadata and the output variable 938 of the class 4 file when a write routine is called. 939 940 %\begin{framed} 941 \textbf{Note: ln\_cl4} must be set to \emph{.TRUE.} in \textbf{namobs} 942 to use class 4 outputs. 943 %\end{framed} 944 945 \subsubsection{Class 4 naming convention} 946 947 The standard class 4 file naming convention is as follows. 948 949 \noindent 950 \linebreak 951 \textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}.nc} 952 953 \noindent 954 \linebreak 955 Much of the namelist is devoted to specifying this convention. The 956 following namelist settings control the elements of the output 957 file names. Each should be specified as a single string of character data. 958 959 \begin{description} 960 \item[cl4\_prefix] 961 Prefix for class 4 files e.g. class4 962 \item[cl4\_date] 963 YYYYMMDD validity date 964 \item[cl4\_sys] 965 The name of the class 4 model system e.g. FOAM 966 \item[cl4\_cfg] 967 The name of the class 4 model configuration e.g. orca025 968 \item[cl4\_vn] 969 The name of the class 4 model version e.g. 12.0 970 \end{description} 971 972 \noindent 973 The kind is specified by the observation type internally to the obs oper. The processor 974 number is specified internally in NEMO. 975 976 \subsubsection{Class 4 file global attributes} 977 978 Global attributes necessary to fulfill the class 4 file definition. These 979 are also useful pieces of information when collaborating with external 980 partners. 981 982 \begin{description} 983 \item[cl4\_contact] 984 Contact email for class 4 files. 985 \item[cl4\_inst] 986 The name of the producers institution. 987 \item[cl4\_cfg] 988 The name of the class 4 model configuration e.g. orca025 989 \item[cl4\_vn] 990 The name of the class 4 model version e.g. 12.0 991 \end{description} 992 993 \noindent 994 The obs\_type, 995 creation date and validity time are specified internally to the obs oper. 996 997 \subsubsection{Class 4 model counterpart configuration} 998 999 As seen previously it is possible to perform a single sweep of the 1000 obs oper and specify a collection of model fields equally spaced 1001 along that sweep. In the class 4 case the single sweep is replaced 1002 with multiple sweeps and a certain ammount of book keeping is 1003 needed to ensure each model counterpart makes its way to the 1004 correct piece of memory in the output files. 1005 1006 \noindent 1007 \linebreak 1008 In terms of book keeping, the offline obs oper needs to know how many 1009 full sweeps need to be performed. This is specified via the 1010 \textbf{cl4\_match\_len} variable and is the total number of model 1011 counterparts per observation. For example, a 3 forecasts plus 3 persistence 1012 fields plus an analysis field would be 7 counterparts per observation. 1013 1014 \begin{alltt} 1015 \tiny 1016 \begin{verbatim} 1017 cl4_match_len = 7 1018 \end{verbatim} 1019 \end{alltt} 1020 1021 Then to correctly allocate a class 4 file the forecast axis must be defined. This 1022 is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3. 1023 1024 \begin{alltt} 1025 \tiny 1026 \begin{verbatim} 1027 cl4_fcst_len = 3 1028 \end{verbatim} 1029 \end{alltt} 1030 1031 Then for each model field it is necessary to designate what class 4 variable and 1032 index along the forecast dimension the model counterpart should be stored in the 1033 output file. As well as a value for that lead time in hours, this will be useful 1034 when interpreting the data afterwards. 1035 1036 \begin{alltt} 1037 \tiny 1038 \begin{verbatim} 1039 cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 1040 "persistence" "best_estimate" 1041 cl4_fcst_idx = 1 2 3 1 2 3 1 1042 cl4_leadtime = 12 36 60 1043 \end{verbatim} 1044 \end{alltt} 1045 1046 In terms of files and indices of fields inside each file the class 4 approach 1047 makes use of the \textbf{namooo} namelist. If our fields are in separate files 1048 with a single field per file our example inputs will be specified. 1049 1050 \begin{alltt} 1051 \tiny 1052 \begin{verbatim} 1053 ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 1054 nn_ooo_idx = 1 1 1 1 1 1 1 1055 \end{verbatim} 1056 \end{alltt} 1057 1058 When we combine all of the naming conventions, global attributes and i/o instructions 1059 the class 4 namelist becomes. 1060 1061 \begin{alltt} 1062 \tiny 1063 \begin{verbatim} 1064 !---------------------------------------------------------------------- 1065 ! namooo Offline obs_oper namelist 1066 !---------------------------------------------------------------------- 1067 ! ooo_files specifies the files containing the model counterpart 1068 ! nn_ooo_idx specifies the time_counter index within the model file 1069 ! nn_ooo_freq specifies number of time steps between read operations 1070 &namooo 1071 ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 1072 nn_ooo_idx = 1 1 1 1 1 1 1 1073 / 1074 !---------------------------------------------------------------------- 1075 ! namcl4 Offline obs_oper class 4 namelist 1076 !---------------------------------------------------------------------- 1077 ! 1078 ! Naming convention 1079 ! ----------------- 1080 ! cl4_prefix specifies the output file prefix 1081 ! cl4_date specifies the output file validity date 1082 ! cl4_sys specifies the model counterpart system 1083 ! cl4_cfg specifies the model counterpart configuration 1084 ! cl4_vn specifies the model counterpart version 1085 ! cl4_inst specifies the model counterpart institute 1086 ! cl4_contact specifies the file producers contact details 1087 ! 1088 ! I/O specification 1089 ! ----------------- 1090 ! cl4_vars specifies the names of the output file netcdf variable 1091 ! cl4_fcst_idx specifies output file forecast index 1092 ! cl4_fcst_len specifies forecast axis length 1093 ! cl4_match_len specifies number of unique matches per observation 1094 ! cl4_leadtime specifies the forecast axis lead time 1095 ! 1096 &namcl4 1097 cl4_match_len = 7 1098 cl4_fcst_len = 3 1099 cl4_fcst_idx = 1 2 3 1 2 3 1 1100 cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 1101 "persistence" "best_estimate" 1102 cl4_leadtime = 12 36 60 1103 cl4_prefix = "class4" 1104 cl4_date = "20130101" 1105 cl4_vn = "12.0" 1106 cl4_sys = "FOAM" 1107 cl4_cfg = "AMM7" 1108 cl4_contact = "example@example.com" 1109 cl4_inst = "UK Met Office" 1110 / 1111 \end{verbatim} 1112 \end{alltt} 1113 1114 \subsubsection{Climatology interpolation} 1115 1116 The climatological counterpart is generated at the start of the run by restarting 1117 the model from climatology through appropriate use of \textbf{namtsd}. To override 1118 the offline observation operator read routine and to take advantage of the restart 1119 settings, specify the first entry in \textbf{cl4\_vars} as "climatology". This will then 1120 pipe the restart from climatology into the output class 4 file. As in every other 1121 class 4 matchup the input file, input index and output index must be specified. 1122 These can be replaced with dummy data since they are not used but they must be 1123 present to cycle through the matchups correctly. 1124 1125 \subsection{Advanced usage} 1126 1127 In certain cases it may be desirable to include both multiple model fields per 1128 observation window with multiple match ups per observation. This can be achieved 1129 by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings. Care must 1130 be taken in generating the ooo\_files list such that the files are arranged into 1131 consecutive blocks of single match ups. For example, 2 forecast fields 1132 of 12 hourly data would result in 4 separate read operations but only 2 write 1133 operations, 1 per forecast. 1134 1135 \begin{alltt} 1136 \tiny 1137 \begin{verbatim} 1138 ooo_files = "F1.nc" "F1.nc" "F2.nc" "F2.nc" 1139 ... 1140 cl4_fcst_idx = 1 2 1141 \end{verbatim} 1142 \end{alltt} 1143 1144 The above notation reveals the internal split between match up iterators and file 1145 iterators. This technique has not been used before so experimentation is needed 1146 before results can be trusted. 1147 1148 1149 1150 1151 \newpage 1152 789 1153 \section{Observation Utilities} 790 1154 \label{OBS_obsutils} … … 802 1166 handling observation files and the feedback file output from the NEMO observation operator. 803 1167 The utilities are as follows 1168 1169 \subsubsection{c4comb} 1170 1171 The program c4comb combines multiple class 4 files produced by individual processors in an 1172 MPI run of NEMO offline obs\_oper into a single class 4 file. The program is called in the following way: 1173 1174 \begin{alltt} 1175 \footnotesize 1176 \begin{verbatim} 1177 c4comb.exe outputfile inputfile1 inputfile2 ... 1178 \end{verbatim} 1179 \end{alltt} 804 1180 805 1181 \subsubsection{corio2fb} -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/ARCH/arch-ALTIX_NAUTILUS_MPT.fcm
r4230 r4245 47 47 %LD ifort 48 48 %FPPFLAGS -P -C -traditional 49 %LDFLAGS -lmpi -lstdc++ 49 %LDFLAGS -lmpi -lstdc++ -lcurl 50 50 %AR ar 51 51 %ARFLAGS -r -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/ARCH/arch-PW7_METO.fcm
r4162 r4245 1 # IBM POWER 6UKMO1 # IBM POWER7 UKMO 2 2 # NCDF_INC netcdf include file 3 3 # NCDF_LIB netcdf library 4 # XIOS_INC XIOS include files 5 # XIOS_LIB XIOS library 4 6 # FC Fortran compiler command 5 7 # FCFLAGS Fortran compiler flags … … 15 17 16 18 17 %NCDF_INC -I/home/nwp/nm/frrj/lib/MTOOLS/include 18 %NCDF_LIB -L/home/nwp/nm/frrj/lib/MTOOLS/lib -lnetcdf -lhdf5 -lhdf5_hl -lhdf5_fortran -lz 19 %XIOS_ROOT /home/cr/ocean/hadcv/xios_r445 19 %NCDF_INC -I/home/cr/ocean/hadcv/netcdf/4.1.3_seq/include 20 %NCDF_LIB -L/home/cr/ocean/hadcv/netcdf/4.1.3_seq/lib -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lhdf5_fortran -lz 21 %XIOS_INC -I/data/nwp/ofrd/share/NEMO/xios_lib/seq/xios_r451/inc 22 %XIOS_LIB -L/data/nwp/ofrd/share/NEMO/xios_lib/seq/xios_r451/lib -lxios 20 23 %FC mpxlf90_r 21 %FCFLAGS -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 - I/home/nwp/nm/frrj/lib/MTOOLS/include -g -O3 -qnostrict22 %FFLAGS -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 - I/home/nwp/nm/frrj/lib/MTOOLS/include -g -O3 -qnostrict24 %FCFLAGS -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 -g -O3 -qstrict 25 %FFLAGS -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 -g -O3 -qstrict 23 26 %LD mpCC_r 24 %LDFLAGS -lxlf90 -L/ home/nwp/nm/frrj/lib/MTOOLS/lib -lnetcdf -L/projects/um1/lib -lsig -O3 -L MASS27 %LDFLAGS -lxlf90 -L/projects/um1/lib -lsig -O3 -L MASS 25 28 %FPPFLAGS -E -P -traditional -I/opt/ibmhpc/pecurrent/ppe.poe/include -I/usr/lpp/ppe.poe/include/thread64 26 29 %AR ar 27 30 %ARFLAGS rs 28 31 %MK gmake 29 %USER_INC %NCDF_INC -I%XIOS_ROOT/inc30 %USER_LIB %NCDF_LIB -L%XIOS_ROOT/lib -lxios32 %USER_INC %NCDF_INC %XIOS_INC 33 %USER_LIB %NCDF_LIB %XIOS_LIB -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
r4230 r4245 8 8 nn_it000 = 1 ! first time step 9 9 nn_itend = 2880 ! last time step (std 1 day = 288) 10 nn_date0 = 20 070101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)10 nn_date0 = 20120101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1) 11 11 nn_leapy = 1 ! Leap year calendar (1) or not (0) 12 12 ln_rstart = .true. ! start from rest (F) or from a restart file (T) -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm
r4147 r4245 1 bld::tool::fppkeys key_bdy key_tide key_ vectopt_loop key_dynspg_ts key_ldfslp key_zdfgls key_vvl key_diainstant key_mpp_mpi key_iomput key_nosignedzero1 bld::tool::fppkeys key_bdy key_tide key_dynspg_ts key_ldfslp key_zdfgls key_vvl key_diainstant key_mpp_mpi key_iomput -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/C1D_PAPA/cpp_C1D_PAPA.fcm
r4158 r4245 1 bld::tool::fppkeys key_c1d key_ c1d_papa key_dynspg_flt key_diahth key_zdfgls key_iomput1 bld::tool::fppkeys key_c1d key_dynspg_flt key_diahth key_zdfgls key_iomput -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/GYRE/EXP00/iodef.xml
r4153 r4245 46 46 <field field_ref="mldr10_1" name="somxl010" /> 47 47 <field field_ref="mldkz5" name="somixhgt" /> 48 </file> 48 <!-- variables available with MLE 49 <field field_ref="Lf_NHpf" name="Lf_NHpf" long_name="MLE:_Lf=NH/f" /> 50 --> 51 </file> 49 52 50 53 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 51 54 <field field_ref="uoce" name="vozocrtx" /> 52 55 <field field_ref="utau" name="sozotaux" /> 56 <!-- variables available with MLE 57 <field field_ref="psiu_mle" name="psiu_mle" long_name="MLE_streamfunction_along_i-axis" /> 58 --> 53 59 </file> 54 60 … … 56 62 <field field_ref="voce" name="vomecrty" /> 57 63 <field field_ref="vtau" name="sometauy" /> 64 <!-- variables available with MLE 65 <field field_ref="psiv_mle" name="psiv_mle" long_name="MLE_streamfunction_along_j-axis" /> 66 --> 58 67 </file> 59 68 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/iodef.xml
r4153 r4245 47 47 <field field_ref="mldr10_1" name="somxl010" /> 48 48 <field field_ref="mldkz5" name="somixhgt" /> 49 <!-- variables available with MLE 50 <field field_ref="Lf_NHpf" name="Lf_NHpf" long_name="MLE:_Lf=NH/f" /> 51 --> 49 52 </file> 50 53 … … 52 55 <field field_ref="uoce" name="vozocrtx" /> 53 56 <field field_ref="utau" name="sozotaux" /> 57 <!-- variables available with MLE 58 <field field_ref="psiu_mle" name="psiu_mle" long_name="MLE_streamfunction_along_i-axis" /> 59 --> 54 60 </file> 55 61 … … 57 63 <field field_ref="voce" name="vomecrty" /> 58 64 <field field_ref="vtau" name="sometauy" /> 65 <!-- variables available with MLE 66 <field field_ref="psiv_mle" name="psiv_mle" long_name="MLE_streamfunction_along_j-axis" /> 67 --> 59 68 </file> 60 69 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_default.xml
r4161 r4245 64 64 <field field_ref="vtau_ice" name="iicestrv" /> 65 65 66 <!-- variables available with MLE 67 <field field_ref="Lf_NHpf" name="Lf_NHpf" long_name="MLE:_Lf=NH/f" /> 68 --> 66 69 </file> 67 70 … … 73 76 <field field_ref="u_masstr" name="vozomatr" /> 74 77 <field field_ref="u_heattr" name="sozohetr" /> 78 <!-- variables available with MLE 79 <field field_ref="psiu_mle" name="psiu_mle" long_name="MLE_streamfunction_along_i-axis" /> 80 --> 75 81 </file> 76 82 … … 82 88 <field field_ref="v_masstr" name="vomematr" /> 83 89 <field field_ref="v_heattr" name="somehetr" /> 90 <!-- variables available with MLE 91 <field field_ref="psiv_mle" name="psiv_mle" long_name="MLE_streamfunction_along_j-axis" /> 92 --> 84 93 </file> 85 94 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml
r4153 r4245 67 67 <field field_ref="mldkz5" /> 68 68 <field field_ref="mldr10_1" /> 69 <!-- variables available with MLE 70 <field field_ref="Lf_NHpf" name="Lf_NHpf" long_name="MLE:_Lf=NH/f" /> 71 --> 69 72 </file> 70 73 … … 73 76 <field field_ref="suoce" name="uos" long_name="sea_surface_x_velocity" /> 74 77 <field field_ref="utau" name="tauuo" long_name="surface_downward_x_stress" /> 78 <!-- variables available with MLE 79 <field field_ref="psiu_mle" name="psiu_mle" long_name="MLE_streamfunction_along_i-axis" /> 80 --> 75 81 </file> 76 82 … … 79 85 <field field_ref="svoce" name="vos" long_name="sea_surface_y_velocity" /> 80 86 <field field_ref="vtau" name="tauvo" long_name="surface_downward_y_stress" /> 87 <!-- variables available with MLE 88 <field field_ref="psiv_mle" name="psiv_mle" long_name="MLE_streamfunction_along_j-axis" /> 89 --> 81 90 </file> 82 91 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/SHARED/field_def.xml
r4161 r4245 31 31 <field id="eken" long_name="kinetic energy" unit="m2/s2" grid_ref="grid_T_3D"/> 32 32 <field id="hdiv" long_name="horizontal divergence" unit="s-1" grid_ref="grid_T_3D"/> 33 <!-- variables available with MLE --> 34 <field id="Lf_NHpf" long_name="MLE: Lf = N H / f" unit="m" /> 33 35 <!-- next variables available with key_diahth --> 34 36 <field id="mlddzt" long_name="Thermocline Depth (max dT/dz)" unit="m" /> … … 268 270 <field id="uocet" long_name="ocean transport along i-axis times temperature" unit="degC.m/s" grid_ref="grid_U_3D" /> 269 271 <field id="uoces" long_name="ocean transport along i-axis times salinity" unit="psu.m/s" grid_ref="grid_U_3D" /> 272 <!-- variables available with MLE --> 273 <field id="psiu_mle" long_name="MLE streamfunction along i-axis" unit="m3/s" grid_ref="grid_U_3D" /> 270 274 <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv --> 271 275 <field id="uoce_eiv" long_name="EIV ocean current along i-axis" unit="m/s" grid_ref="grid_U_3D" /> … … 289 293 <field id="vocet" long_name="ocean transport along j-axis times temperature" unit="degC.m/s" grid_ref="grid_V_3D" /> 290 294 <field id="voces" long_name="ocean transport along j-axis times salinity" unit="psu.m/s" grid_ref="grid_V_3D" /> 295 <!-- variables available with MLE --> 296 <field id="psiv_mle" long_name="MLE streamfunction along j-axis" unit="m3/s" grid_ref="grid_V_3D" /> 291 297 <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv --> 292 298 <field id="voce_eiv" long_name="EIV ocean current along j-axis" unit="m/s" grid_ref="grid_V_3D" /> -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/SHARED/namelist_ref
r4238 r4245 112 112 !----------------------------------------------------------------------- 113 113 nn_bathy = 1 ! compute (=0) or read (=1) the bathymetry file 114 nn_closea = 0 ! remove (=0) or keep (=1) closed seas and lakes (ORCA) 114 rn_bathy = 0. ! value of the bathymetry. if (=0) bottom flat at jpkm1 115 nn_closea = 0 ! remove (=0) or keep (=1) closed seas and lakes (ORCA) 115 116 nn_msh = 0 ! create (=1) a mesh file or not (=0) 116 117 rn_hmin = -3. ! min depth of the ocean (>0) or min number of ocean level (<0) … … 284 285 ln_2m = .false. ! air temperature and humidity referenced at 2m (T) instead 10m (F) 285 286 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 287 ln_bulk2z = .false. ! Air temperature/humidity and wind vectors are referenced at heights rn_zqt and rn_zu 288 rn_zqt = 3. ! Air temperature and humidity reference height (m) (ln_bulk2z) 289 rn_zu = 4. ! Wind vector reference height (m) (ln_bulk2z) 286 290 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 287 291 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) … … 556 560 bn_tem = 'amm12_bdyT_tra' , 24 , 'votemper' , .true. , .false. , 'daily' , '' , '' , '' 557 561 bn_sal = 'amm12_bdyT_tra' , 24 , 'vosaline' , .true. , .false. , 'daily' , '' , '' , '' 558 ! bn_a_i = 'amm12_bdyT_ice' , 24 , 'ileadfra' , .true. , .false. , 'daily' , '' , '' , ''559 ! bn_ht_i = 'amm12_bdyT_ice' , 24 , 'iicethic' , .true. , .false. , 'daily' , '' , '' , ''560 ! bn_ht_s = 'amm12_bdyT_ice' , 24 , 'isnowthi' , .true. , .false. , 'daily' , '' , '' , ''561 562 cn_dir = 'bdydta/' 562 563 ln_full_vel = .false. … … 637 638 ln_traadv_qck = .false. ! QUICKEST scheme 638 639 ln_traadv_msc_ups= .false. ! use upstream scheme within muscl 640 / 641 !----------------------------------------------------------------------- 642 &namtra_adv_mle ! mixed layer eddy parametrisation (Fox-Kemper param) 643 !----------------------------------------------------------------------- 644 ln_mle = .true. ! (T) use the Mixed Layer Eddy (MLE) parameterisation 645 rn_ce = 0.06 ! magnitude of the MLE (typical value: 0.06 to 0.08) 646 nn_mle = 1 ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 647 rn_lf = 5.e+3 ! typical scale of mixed layer front (meters) (case rn_mle=0) 648 rn_time = 172800. ! time scale for mixing momentum across the mixed layer (seconds) (case rn_mle=0) 649 rn_lat = 20. ! reference latitude (degrees) of MLE coef. (case rn_mle=1) 650 nn_mld_uv = 0 ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 651 nn_conv = 0 ! =1 no MLE in case of convection ; =0 always MLE 652 rn_rho_c_mle = 0.01 ! delta rho criterion used to calculate MLD for FK 639 653 / 640 654 !---------------------------------------------------------------------------------- … … 909 923 nn_timing = 0 ! timing by routine activated (=1) creates timing.output file, or not (=0) 910 924 / 911 925 !----------------------------------------------------------------------- 926 &namc1d ! 1D configuration options ("key_c1d") 927 !----------------------------------------------------------------------- 928 rn_lat = 50 ! Column latitude 929 rn_lon = -145 ! Column longitude 930 / 931 !----------------------------------------------------------------------- 932 &namc1d_uvd ! data: U & V currents ("key_c1d") 933 !----------------------------------------------------------------------- 934 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim !'yearly' or ! weights ! rotation ! 935 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 936 sn_ucur = 'ucurrent', -1 ,'u_current', .false. ,.true. , 'monthly' , ' ' , 'Ume' 937 sn_vcur = 'vcurrent', -1 ,'v_current', .false. ,.true. , 'monthly' , ' ' , 'Vme' 938 ! 939 cn_dir = './' ! root directory for the location of the files 940 ln_uvd_init = .false. ! Initialisation of ocean U & V with U & V input data (T) or not (F) 941 ln_uvd_dyndmp = .false. ! damping of ocean U & V toward U & V input data (T) or not (F) 942 / 943 !----------------------------------------------------------------------- 944 &namc1d_dyndmp ! U & V newtonian damping ("key_c1d") 945 !----------------------------------------------------------------------- 946 ln_dyndmp = .false. ! add a damping term (T) or not (F) 947 / 912 948 !!====================================================================== 913 949 !! *** Diagnostics namelists *** -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/cfg.txt
r4230 r4245 5 5 ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 6 6 ORCA2_LIM3 OPA_SRC LIM_SRC_3 NST_SRC 7 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC8 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC9 7 ORCA2_SAS_LIM OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC 10 8 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 11 9 ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 10 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 11 C1D_PAPA OPA_SRC -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r4162 r4245 1009 1009 #endif 1010 1010 1011 #if defined key_cice 1011 #if defined key_cice && defined key_asminc 1012 1012 ! Sea-ice : CICE case. Pass ice increment tendency into CICE 1013 1013 ndaice_da(:,:) = seaice_bkginc(:,:) * zincwgt / rdt … … 1020 1020 ELSE 1021 1021 1022 #if defined key_cice 1022 #if defined key_cice && defined key_asminc 1023 1023 ! Sea-ice : CICE case. Zero ice increment tendency into CICE 1024 1024 ndaice_da(:,:) = 0.0_wp … … 1064 1064 #endif 1065 1065 1066 #if defined key_cice 1067 ! Sea-ice : CICE case. Pass ice increment tendency into CICE - is this correct?1066 #if defined key_cice && defined key_asminc 1067 ! Sea-ice : CICE case. Pass ice increment tendency into CICE 1068 1068 ndaice_da(:,:) = seaice_bkginc(:,:) / rdt 1069 1069 #endif … … 1074 1074 ELSE 1075 1075 1076 #if defined key_cice 1076 #if defined key_cice && defined key_asminc 1077 1077 ! Sea-ice : CICE case. Zero ice increment tendency into CICE 1078 1078 ndaice_da(:,:) = 0.0_wp -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90
r2409 r4245 4 4 !! Ocean domain : 1D configuration 5 5 !!===================================================================== 6 !! History : 2.0 ! 2004-09 (C. Ethe) Original code 7 !! 3.0 ! 2008-04 (G. Madec) adaptation to SBC 6 !! History : 2.0 ! 2004-09 (C. Ethe) Original code 7 !! 3.0 ! 2008-04 (G. Madec) adaptation to SBC 8 !! 3.5 ! 2013-10 (D. Calvert) add namelist 8 9 !!---------------------------------------------------------------------- 10 #if defined key_c1d 11 !!---------------------------------------------------------------------- 12 !! 'key_c1d' 1D column configuration 13 !!---------------------------------------------------------------------- 14 !! c1d_init : read in the C1D namelist 15 !!---------------------------------------------------------------------- 16 USE in_out_manager ! I/O manager 17 USE par_kind ! kind parameters 9 18 10 19 IMPLICIT NONE 11 20 PRIVATE 12 21 13 #if defined key_c1d 14 LOGICAL, PUBLIC, PARAMETER :: lk_c1d = .TRUE. !: 1D config. flag activated 15 #else 16 LOGICAL, PUBLIC, PARAMETER :: lk_c1d = .FALSE. !: 1D config. flag de-activated 17 #endif 22 PUBLIC c1d_init ! called by nemogcm.F90 23 24 LOGICAL , PUBLIC, PARAMETER :: lk_c1d = .TRUE. ! 1D config. flag 25 26 REAL(wp), PUBLIC :: rn_lat1d ! Column latitude 27 REAL(wp), PUBLIC :: rn_lon1d ! Column longitude 18 28 19 29 !!---------------------------------------------------------------------- … … 22 32 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 23 33 !!====================================================================== 34 CONTAINS 35 36 SUBROUTINE c1d_init 37 !!---------------------------------------------------------------------- 38 !! *** ROUTINE c1d_init *** 39 !! 40 !! ** Purpose : Initialization of C1D options 41 !! 42 !! ** Method : Read namelist namc1d 43 !!---------------------------------------------------------------------- 44 INTEGER :: ios ! Local integer output status for namelist read 45 NAMELIST/namc1d/ rn_lat1d, rn_lon1d 46 !!---------------------------------------------------------------------- 47 ! 48 49 REWIND( numnam_ref ) ! Namelist namc1d in reference namelist : Tracer advection scheme 50 READ ( numnam_ref, namc1d, IOSTAT = ios, ERR = 901) 51 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in reference namelist', lwp ) 52 53 REWIND( numnam_cfg ) ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 54 READ ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 ) 55 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in configuration namelist', lwp ) 56 WRITE ( numond, namc1d ) 57 58 ! 59 IF(lwp) THEN ! Control print 60 WRITE(numout,*) 61 WRITE(numout,*) 'c1d_init : Initialize 1D model configuration options' 62 WRITE(numout,*) '~~~~~~~~' 63 WRITE(numout,*) ' Namelist namc1d : set options for the C1D model' 64 WRITE(numout,*) ' column latitude rn_lat1d = ', rn_lat1d 65 WRITE(numout,*) ' column longitude rn_lon1d = ', rn_lon1d 66 ENDIF 67 ! 68 ! 69 END SUBROUTINE c1d_init 70 71 #else 72 !!---------------------------------------------------------------------- 73 !! Dummy module : No use of 1D configuration 74 !!---------------------------------------------------------------------- 75 USE par_kind ! kind parameters 76 77 LOGICAL, PUBLIC, PARAMETER :: lk_c1d = .FALSE. !: 1D config. flag de-activated 78 REAL(wp) :: rn_lat1d, rn_lon1d 79 CONTAINS 80 81 SUBROUTINE c1d_init ! Dummy routine 82 END SUBROUTINE c1d_init 83 84 #endif 85 86 !!====================================================================== 24 87 END MODULE c1d -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90
r4244 r4245 26 26 PUBLIC dta_uvd ! called by istate.F90 and dyndmp.90 27 27 28 LOGICAL , PUBLIC :: ln_uvd_init = .FALSE.! Flag to initialise with U & V current data29 LOGICAL , PUBLIC :: ln_uvd_dyndmp = .FALSE.! Flag for Newtonian damping toward U & V current data28 LOGICAL , PUBLIC :: ln_uvd_init ! Flag to initialise with U & V current data 29 LOGICAL , PUBLIC :: ln_uvd_dyndmp ! Flag for Newtonian damping toward U & V current data 30 30 31 31 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_uvd ! structure for input U & V current (file information and data) … … 59 59 !! 60 60 NAMELIST/namc1d_uvd/ ln_uvd_init, ln_uvd_dyndmp, cn_dir, sn_ucur, sn_vcur 61 INTEGER :: ios 61 62 !!---------------------------------------------------------------------- 62 63 ! … … 64 65 ! 65 66 ierr0 = 0 ; ierr1 = 0 ; ierr2 = 0 ; ierr3 = 0 66 ! 67 cn_dir = './' ! default: directory in which the model is executed 68 ! 69 ! !== read namelist namc1d_uvd: flags and field info ==! 70 71 ! ! default values (NB: frequency positive => hours, negative => months) 72 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! 73 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! 74 sn_ucur = FLD_N( 'ucurrent', -1 , 'u_current', .false. , .true. , 'monthly' , '' , 'Ume' ) 75 sn_vcur = FLD_N( 'vcurrent', -1 , 'v_current', .false. , .true. , 'monthly' , '' , 'Vme' ) 76 77 REWIND( numnam ) ! Read in namelist namc1d_uvd 78 READ ( numnam, namc1d_uvd ) 67 68 REWIND( numnam_ref ) ! Namelist namc1d_uvd in reference namelist : 69 READ ( numnam_ref, namc1d_uvd, IOSTAT = ios, ERR = 901) 70 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist', lwp ) 71 72 REWIND( numnam_cfg ) ! Namelist namc1d_uvd in configuration namelist : Parameters of the run 73 READ ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 ) 74 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist', lwp ) 75 WRITE ( numond, namc1d_uvd ) 79 76 80 77 ! ! force the initialization when dyndmp is used -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90
r4244 r4245 33 33 PUBLIC dyn_dmp ! routine called by step_c1d.F90 34 34 35 LOGICAL, PUBLIC :: ln_dyndmp = .TRUE.! Flag for Newtonian damping35 LOGICAL, PUBLIC :: ln_dyndmp ! Flag for Newtonian damping 36 36 37 37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: utrdmp ! damping U current trend (m/s2) … … 73 73 !!---------------------------------------------------------------------- 74 74 NAMELIST/namc1d_dyndmp/ ln_dyndmp 75 !!---------------------------------------------------------------------- 76 77 REWIND ( numnam ) !== read namelist namc1d_dyndmp : momentum damping flag ==! 78 READ ( numnam, namc1d_dyndmp ) !== (namelist of namtra_dmp is used for other parameters) ==! 75 INTEGER :: ios 76 !!---------------------------------------------------------------------- 77 78 REWIND( numnam_ref ) ! Namelist namc1d_dyndmp in reference namelist : 79 READ ( numnam_ref, namc1d_dyndmp, IOSTAT = ios, ERR = 901) 80 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist', lwp ) 81 82 REWIND( numnam_cfg ) ! Namelist namc1d_dyndmp in configuration namelist : Parameters of the run 83 READ ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 ) 84 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist', lwp ) 85 WRITE ( numond, namc1d_dyndmp ) 79 86 80 87 IF(lwp) THEN ! control print -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
r4153 r4245 13 13 !! stp_c1d : NEMO system time-stepping in c1d case 14 14 !!---------------------------------------------------------------------- 15 USE step_oce 15 USE step_oce ! time stepping definition modules 16 16 #if defined key_top 17 USE trcstp 17 USE trcstp ! passive tracer time-stepping (trc_stp routine) 18 18 #endif 19 19 USE dyncor_c1d ! Coriolis term (c1d case) (dyn_cor_1d ) 20 20 USE dynnxt_c1d ! time-stepping (dyn_nxt routine) 21 USE dyndmp ! U & V momentum damping (dyn_dmp routine) 21 22 USE restart ! restart 22 23 … … 124 125 CALL tra_sbc ( kstp ) ! surface boundary condition 125 126 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 127 IF( ln_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends- tracers 126 128 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 127 129 CALL tra_zdf ( kstp ) ! vertical mixing … … 136 138 va(:,:,:) = 0.e0 137 139 140 IF( ln_dyndmp ) CALL dyn_dmp ( kstp ) ! internal damping trends- momentum 138 141 CALL dyn_cor_c1d( kstp ) ! vorticity term including Coriolis 139 142 CALL dyn_zdf ( kstp ) ! vertical diffusion -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r4152 r4245 125 125 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 126 126 & nn_write, ln_dimgnnn, ln_mskland , ln_clobber , nn_chunksz 127 NAMELIST/namdom/ nn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, &128 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , &127 NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin, & 128 & nn_acc , rn_atfp , rn_rdt , rn_rdtmin , & 129 129 & rn_rdtmax, rn_rdth , nn_baro , nn_closea , ln_crs, & 130 130 & jphgr_msh, & … … 228 228 WRITE(numout,*) ' Namelist namdom : space & time domain' 229 229 WRITE(numout,*) ' flag read/compute bathymetry nn_bathy = ', nn_bathy 230 WRITE(numout,*) ' Depth (if =0 bathy=jpkm1) rn_bathy = ', rn_bathy 230 231 WRITE(numout,*) ' min depth of the ocean (>0) or rn_hmin = ', rn_hmin 231 232 WRITE(numout,*) ' min number of ocean level (<0) ' -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90
r4147 r4245 16 16 USE lib_mpp ! distributed memory computing library 17 17 USE timing ! Timing 18 USE c1d ! 1D configuration 19 USE domc1d ! 1D configuration: column location 18 20 19 21 IMPLICIT NONE … … 79 81 INTEGER :: ji, jj ! dummy loop argument 80 82 !!---------------------------------------------------------------------- 83 ! ! recalculate jpizoom/jpjzoom given lat/lon 84 IF( lk_c1d ) CALL dom_c1d( rn_lat1d, rn_lon1d ) 85 ! 81 86 ! ! ============== ! 82 87 ! ! Local domain ! -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
r4153 r4245 374 374 IF(lwp) WRITE(numout,*) 375 375 IF(lwp) WRITE(numout,*) ' bathymetry field: flat basin' 376 idta(:,:) = jpkm1 ! before last level 377 zdta(:,:) = gdepw_0(jpk) ! last w-point depth 378 h_oce = gdepw_0(jpk) 376 IF( rn_bathy > 0.01 ) THEN 377 IF(lwp) WRITE(numout,*) ' Depth = rn_bathy read in namelist' 378 zdta(:,:) = rn_bathy 379 IF( ln_sco ) THEN ! s-coordinate (zsc ): idta()=jpk 380 idta(:,:) = jpkm1 381 ELSE ! z-coordinate (zco or zps): step-like topography 382 idta(:,:) = jpkm1 383 DO jk = 1, jpkm1 384 WHERE( gdept_0(jk) < zdta(:,:) .AND. zdta(:,:) <= gdept_0(jk+1) ) idta(:,:) = jk 385 END DO 386 ENDIF 387 ELSE 388 IF(lwp) WRITE(numout,*) ' Depth = depthw(jpkm1)' 389 idta(:,:) = jpkm1 ! before last level 390 zdta(:,:) = gdepw_0(jpk) ! last w-point depth 391 h_oce = gdepw_0(jpk) 392 ENDIF 379 393 ELSE ! bump centered in the basin 380 394 IF(lwp) WRITE(numout,*) … … 1106 1120 INTEGER :: ios ! Local integer output status for namelist read 1107 1121 REAL(wp) :: zrmax, ztaper ! temporary scalars 1108 ! 1122 REAL(wp) :: zrfact 1123 ! 1124 REAL(wp), POINTER, DIMENSION(:,: ) :: ztmpi1, ztmpi2, ztmpj1, ztmpj2 1109 1125 REAL(wp), POINTER, DIMENSION(:,: ) :: zenv, ztmp, zmsk, zri, zrj, zhbat 1110 1126 … … 1115 1131 IF( nn_timing == 1 ) CALL timing_start('zgr_sco') 1116 1132 ! 1117 CALL wrk_alloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat)1133 CALL wrk_alloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) 1118 1134 ! 1119 1135 REWIND( numnam_ref ) ! Namelist namzgr_sco in reference namelist : Sigma-stretching parameters … … 1169 1185 ! ! ============================= 1170 1186 ! use r-value to create hybrid coordinates 1187 zenv(:,:) = bathy(:,:) 1188 ! 1189 ! set first land point adjacent to a wet cell to sbot_min as this needs to be included in smoothing 1171 1190 DO jj = 1, jpj 1172 1191 DO ji = 1, jpi 1173 zenv(ji,jj) = MAX( bathy(ji,jj), rn_sbot_min ) 1174 END DO 1175 END DO 1192 IF( bathy(ji,jj) == 0._wp ) THEN 1193 iip1 = MIN( ji+1, jpi ) 1194 ijp1 = MIN( jj+1, jpj ) 1195 iim1 = MAX( ji-1, 1 ) 1196 ijm1 = MAX( jj-1, 1 ) 1197 IF( (bathy(iip1,jj) + bathy(iim1,jj) + bathy(ji,ijp1) + bathy(ji,ijm1) + & 1198 & bathy(iip1,ijp1) + bathy(iim1,ijm1) + bathy(iip1,ijp1) + bathy(iim1,ijm1)) > 0._wp ) THEN 1199 zenv(ji,jj) = rn_sbot_min 1200 ENDIF 1201 ENDIF 1202 END DO 1203 END DO 1204 ! apply lateral boundary condition CAUTION: keep the value when the lbc field is zero 1205 CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' ) 1176 1206 ! 1177 ! Smooth the bathymetry (if required)1207 ! smooth the bathymetry (if required) 1178 1208 scosrf(:,:) = 0._wp ! ocean surface depth (here zero: no under ice-shelf sea) 1179 1209 scobot(:,:) = bathy(:,:) ! ocean bottom depth … … 1181 1211 jl = 0 1182 1212 zrmax = 1._wp 1183 ! ! ================ ! 1184 DO WHILE( jl <= 10000 .AND. zrmax > rn_rmax ) ! Iterative loop ! 1185 ! ! ================ ! 1213 ! 1214 ! 1215 ! set scaling factor used in reducing vertical gradients 1216 zrfact = ( 1._wp - rn_rmax ) / ( 1._wp + rn_rmax ) 1217 ! 1218 ! initialise temporary evelope depth arrays 1219 ztmpi1(:,:) = zenv(:,:) 1220 ztmpi2(:,:) = zenv(:,:) 1221 ztmpj1(:,:) = zenv(:,:) 1222 ztmpj2(:,:) = zenv(:,:) 1223 ! 1224 ! initialise temporary r-value arrays 1225 zri(:,:) = 1._wp 1226 zrj(:,:) = 1._wp 1227 ! ! ================ ! 1228 DO WHILE( jl <= 10000 .AND. ( zrmax - rn_rmax ) > 1.e-8_wp ) ! Iterative loop ! 1229 ! ! ================ ! 1186 1230 jl = jl + 1 1187 1231 zrmax = 0._wp 1188 zmsk(:,:) = 0._wp 1232 ! we set zrmax from previous r-values (zri and zrj) first 1233 ! if set after current r-value calculation (as previously) 1234 ! we could exit DO WHILE prematurely before checking r-value 1235 ! of current zenv 1236 DO jj = 1, nlcj 1237 DO ji = 1, nlci 1238 zrmax = MAX( zrmax, ABS(zri(ji,jj)), ABS(zrj(ji,jj)) ) 1239 END DO 1240 END DO 1241 zri(:,:) = 0._wp 1242 zrj(:,:) = 0._wp 1189 1243 DO jj = 1, nlcj 1190 1244 DO ji = 1, nlci 1191 1245 iip1 = MIN( ji+1, nlci ) ! force zri = 0 on last line (ji=ncli+1 to jpi) 1192 1246 ijp1 = MIN( jj+1, nlcj ) ! force zrj = 0 on last raw (jj=nclj+1 to jpj) 1193 zri(ji,jj) = ABS( zenv(iip1,jj ) - zenv(ji,jj) ) / ( zenv(iip1,jj ) + zenv(ji,jj) ) 1194 zrj(ji,jj) = ABS( zenv(ji ,ijp1) - zenv(ji,jj) ) / ( zenv(ji ,ijp1) + zenv(ji,jj) ) 1195 zrmax = MAX( zrmax, zri(ji,jj), zrj(ji,jj) ) 1196 IF( zri(ji,jj) > rn_rmax ) zmsk(ji ,jj ) = 1._wp 1197 IF( zri(ji,jj) > rn_rmax ) zmsk(iip1,jj ) = 1._wp 1198 IF( zrj(ji,jj) > rn_rmax ) zmsk(ji ,jj ) = 1._wp 1199 IF( zrj(ji,jj) > rn_rmax ) zmsk(ji ,ijp1) = 1._wp 1247 IF( (zenv(ji,jj) > 0._wp) .AND. (zenv(iip1,jj) > 0._wp)) THEN 1248 zri(ji,jj) = ( zenv(iip1,jj ) - zenv(ji,jj) ) / ( zenv(iip1,jj ) + zenv(ji,jj) ) 1249 END IF 1250 IF( (zenv(ji,jj) > 0._wp) .AND. (zenv(ji,ijp1) > 0._wp)) THEN 1251 zrj(ji,jj) = ( zenv(ji ,ijp1) - zenv(ji,jj) ) / ( zenv(ji ,ijp1) + zenv(ji,jj) ) 1252 END IF 1253 IF( zri(ji,jj) > rn_rmax ) ztmpi1(ji ,jj ) = zenv(iip1,jj ) * zrfact 1254 IF( zri(ji,jj) < -rn_rmax ) ztmpi2(iip1,jj ) = zenv(ji ,jj ) * zrfact 1255 IF( zrj(ji,jj) > rn_rmax ) ztmpj1(ji ,jj ) = zenv(ji ,ijp1) * zrfact 1256 IF( zrj(ji,jj) < -rn_rmax ) ztmpj2(ji ,ijp1) = zenv(ji ,jj ) * zrfact 1200 1257 END DO 1201 1258 END DO 1202 1259 IF( lk_mpp ) CALL mpp_max( zrmax ) ! max over the global domain 1203 ! lateral boundary condition on zmsk: keep 1 along closed boundary (use of MAX)1204 ztmp(:,:) = zmsk(:,:) ; CALL lbc_lnk( zmsk, 'T', 1._wp )1205 DO jj = 1, nlcj1206 DO ji = 1, nlci1207 zmsk(ji,jj) = MAX( zmsk(ji,jj), ztmp(ji,jj) )1208 END DO1209 END DO1210 1260 ! 1211 IF(lwp)WRITE(numout,*) 'zgr_sco : iter= ',jl, ' rmax= ', zrmax , ' nb of pt= ', INT( SUM(zmsk(:,:) ) )1261 IF(lwp)WRITE(numout,*) 'zgr_sco : iter= ',jl, ' rmax= ', zrmax 1212 1262 ! 1213 1263 DO jj = 1, nlcj 1214 1264 DO ji = 1, nlci 1215 iip1 = MIN( ji+1, nlci ) ! last line (ji=nlci) 1216 ijp1 = MIN( jj+1, nlcj ) ! last raw (jj=nlcj) 1217 iim1 = MAX( ji-1, 1 ) ! first line (ji=nlci) 1218 ijm1 = MAX( jj-1, 1 ) ! first raw (jj=nlcj) 1219 IF( zmsk(ji,jj) == 1._wp ) THEN 1220 ztmp(ji,jj) = ( & 1221 & zenv(iim1,ijp1)*zmsk(iim1,ijp1) + zenv(ji,ijp1)*zmsk(ji,ijp1) + zenv(iip1,ijp1)*zmsk(iip1,ijp1) & 1222 & + zenv(iim1,jj )*zmsk(iim1,jj ) + zenv(ji,jj )* 2._wp + zenv(iip1,jj )*zmsk(iip1,jj ) & 1223 & + zenv(iim1,ijm1)*zmsk(iim1,ijm1) + zenv(ji,ijm1)*zmsk(ji,ijm1) + zenv(iip1,ijm1)*zmsk(iip1,ijm1) & 1224 & ) / ( & 1225 & zmsk(iim1,ijp1) + zmsk(ji,ijp1) + zmsk(iip1,ijp1) & 1226 & + zmsk(iim1,jj ) + 2._wp + zmsk(iip1,jj ) & 1227 & + zmsk(iim1,ijm1) + zmsk(ji,ijm1) + zmsk(iip1,ijm1) & 1228 & ) 1229 ENDIF 1230 END DO 1231 END DO 1232 ! 1233 DO jj = 1, nlcj 1234 DO ji = 1, nlci 1235 IF( zmsk(ji,jj) == 1._wp ) zenv(ji,jj) = MAX( ztmp(ji,jj), bathy(ji,jj) ) 1236 END DO 1237 END DO 1238 ! 1239 ! Apply lateral boundary condition CAUTION: keep the value when the lbc field is zero 1240 ztmp(:,:) = zenv(:,:) ; CALL lbc_lnk( zenv, 'T', 1._wp ) 1241 DO jj = 1, nlcj 1242 DO ji = 1, nlci 1243 IF( zenv(ji,jj) == 0._wp ) zenv(ji,jj) = ztmp(ji,jj) 1244 END DO 1245 END DO 1265 zenv(ji,jj) = MAX(zenv(ji,jj), ztmpi1(ji,jj), ztmpi2(ji,jj), ztmpj1(ji,jj), ztmpj2(ji,jj) ) 1266 END DO 1267 END DO 1268 ! apply lateral boundary condition CAUTION: keep the value when the lbc field is zero 1269 CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' ) 1246 1270 ! ! ================ ! 1247 1271 END DO ! End loop ! 1248 1272 ! ! ================ ! 1249 ! 1250 ! Fill ghost rows with appropriate values to avoid undefined e3 values with some mpp decompositions 1251 DO ji = nlci+1, jpi 1252 zenv(ji,1:nlcj) = zenv(nlci,1:nlcj) 1253 END DO 1254 ! 1255 DO jj = nlcj+1, jpj 1256 zenv(:,jj) = zenv(:,nlcj) 1273 DO jj = 1, jpj 1274 DO ji = 1, jpi 1275 zenv(ji,jj) = MAX( zenv(ji,jj), rn_sbot_min ) ! set all points to avoid undefined scale value warnings 1276 END DO 1257 1277 END DO 1258 1278 ! … … 1532 1552 END DO 1533 1553 ! 1534 CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat)1554 CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) 1535 1555 ! 1536 1556 IF( nn_timing == 1 ) CALL timing_stop('zgr_sco') -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90
r4230 r4245 70 70 ierr0 = 0 ; ierr1 = 0 ; ierr2 = 0 ; ierr3 = 0 71 71 ! 72 ! ! set default namelist values73 cn_dir = './' ! directory in which the model is executed74 ! ! sn_... default values (NB: frequency positive => hours, negative => months)75 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! land/sea mask !76 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! filename !77 sn_tem = FLD_N( 'temperature', -1. , 'votemper', .false. , .true. , 'monthly' , '' , &78 & '' , '' )79 sn_sal = FLD_N( 'salinity' , -1. , 'vosaline', .false. , .true. , 'monthly' , '' , &80 & '' , '' )81 82 72 REWIND( numnam_ref ) ! Namelist namtsd in reference namelist : 83 73 READ ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
r3764 r4245 26 26 USE oce ! ocean dynamics and active tracers 27 27 USE dom_oce ! ocean space and time domain 28 USE c1d ! 1D vertical configuration 28 29 USE daymod ! calendar 29 30 USE eosbn2 ! eq. of state, Brunt Vaisala frequency (eos routine) … … 32 33 USE phycst ! physical constants 33 34 USE dtatsd ! data temperature and salinity (dta_tsd routine) 35 USE dtauvd ! data: U & V current (dta_uvd routine) 34 36 USE in_out_manager ! I/O manager 35 37 USE iom ! I/O library … … 70 72 ! - ML - needed for initialization of e3t_b 71 73 INTEGER :: jk ! dummy loop indice 74 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: zuvd ! U & V data workspace 72 75 !!---------------------------------------------------------------------- 73 76 ! … … 80 83 81 84 CALL dta_tsd_init ! Initialisation of T & S input data 85 IF( lk_c1d ) CALL dta_uvd_init ! Initialization of U & V input data 82 86 83 87 rhd (:,:,: ) = 0.e0 … … 111 115 ELSEIF( cp_cfg == 'gyre' ) THEN 112 116 CALL istate_gyre ! GYRE configuration : start from pre-defined T-S fields 113 ELSEIF( ln_tsd_init ) THEN ! Initial T-S fields read in files 114 CALL dta_tsd( nit000, tsb ) ! read 3D T and S data at nit000 115 tsn(:,:,:,:) = tsb(:,:,:,:) 116 ! 117 ELSE ! Initial T-S fields defined analytically 118 CALL istate_t_s 117 ELSE ! Initial T-S, U-V fields read in files 118 IF ( ln_tsd_init ) THEN ! read 3D T and S data at nit000 119 CALL dta_tsd( nit000, tsb ) 120 tsn(:,:,:,:) = tsb(:,:,:,:) 121 ! 122 ELSE ! Initial T-S fields defined analytically 123 CALL istate_t_s 124 ENDIF 125 IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000 126 CALL wrk_alloc( jpi, jpj, jpk, 2, zuvd ) 127 CALL dta_uvd( nit000, zuvd ) 128 ub(:,:,:) = zuvd(:,:,:,1) ; un(:,:,:) = ub(:,:,:) 129 vb(:,:,:) = zuvd(:,:,:,2) ; vn(:,:,:) = vb(:,:,:) 130 CALL wrk_dealloc( jpi, jpj, jpk, 2, zuvd ) 131 ENDIF 119 132 ENDIF 120 133 ! … … 180 193 END SUBROUTINE istate_t_s 181 194 182 183 195 SUBROUTINE istate_eel 184 196 !!---------------------------------------------------------------------- … … 404 416 405 417 END SUBROUTINE istate_gyre 406 407 418 408 419 SUBROUTINE istate_uvg -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
r3625 r4245 14 14 USE oce ! ocean dynamics and tracers variables 15 15 USE dom_oce ! ocean space and time domain variables 16 USE c1d ! 1D vertical configuration 16 17 USE phycst ! physical constants 17 18 USE sbc_oce ! surface boundary condition: ocean … … 220 221 IF(lk_dynspg_flt) ioptio = ioptio + 1 221 222 ! 222 IF( ( ioptio > 1 .AND. .NOT. lk_esopa ) .OR. ioptio == 0) &223 IF( ( ioptio > 1 .AND. .NOT. lk_esopa ) .OR. ( ioptio == 0 .AND. .NOT. lk_c1d ) ) & 223 224 & CALL ctl_stop( ' Choose only one surface pressure gradient scheme with a key cpp' ) 224 225 ! -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r4205 r4245 479 479 !! INTERFACE iom_get 480 480 !!---------------------------------------------------------------------- 481 SUBROUTINE iom_g0d( kiomid, cdvar, pvar )481 SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime ) 482 482 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 483 483 CHARACTER(len=*), INTENT(in ) :: cdvar ! Name of the variable 484 484 REAL(wp) , INTENT( out) :: pvar ! read field 485 ! 486 INTEGER :: idvar ! variable id 485 INTEGER , INTENT(in ), OPTIONAL :: ktime ! record number 486 ! 487 INTEGER :: idvar ! variable id 488 INTEGER :: idmspc ! number of spatial dimensions 489 INTEGER , DIMENSION(1) :: itime ! record number 490 CHARACTER(LEN=100) :: clinfo ! info character 491 CHARACTER(LEN=100) :: clname ! file name 492 CHARACTER(LEN=1) :: cldmspc ! 493 ! 494 itime = 1 495 IF( PRESENT(ktime) ) itime = ktime 496 ! 497 clname = iom_file(kiomid)%name 498 clinfo = ' iom_g0d, file: '//trim(clname)//', var: '//trim(cdvar) 487 499 ! 488 500 IF( kiomid > 0 ) THEN 489 501 idvar = iom_varid( kiomid, cdvar ) 490 502 IF( iom_file(kiomid)%nfid > 0 .AND. idvar > 0 ) THEN 503 idmspc = iom_file ( kiomid )%ndims( idvar ) 504 IF( iom_file(kiomid)%luld(idvar) ) idmspc = idmspc - 1 505 WRITE(cldmspc , fmt='(i1)') idmspc 506 IF( idmspc > 0 ) CALL ctl_stop( TRIM(clinfo), 'When reading to a 0D array, we do not accept data', & 507 & 'with 1 or more spatial dimensions: '//cldmspc//' were found.' , & 508 & 'Use ncwa -a to suppress the unnecessary dimensions' ) 491 509 SELECT CASE (iom_file(kiomid)%iolib) 492 CASE (jpioipsl ) ; CALL iom_ioipsl_get( kiomid, idvar, pvar )493 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, pvar )510 CASE (jpioipsl ) ; CALL iom_ioipsl_get( kiomid, idvar, pvar, itime ) 511 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, pvar, itime ) 494 512 CASE (jprstdimg) ; CALL iom_rstdimg_get( kiomid, idvar, pvar ) 495 513 CASE DEFAULT … … 656 674 ELSE 657 675 CALL ctl_stop( TRIM(clinfo), 'To keep iom lisibility, when reading a '//clrankpv//'D array,' , & 658 & 'we do not accept data with more than '//cldmspc//' spatial dimension', &676 & 'we do not accept data with '//cldmspc//' spatial dimensions', & 659 677 & 'Use ncwa -a to suppress the unnecessary dimensions' ) 660 678 ENDIF … … 768 786 769 787 IF( istop == nstop ) THEN ! no additional errors until this point... 770 IF(lwp) WRITE(numout,"(10x,' read ',a,' (rec: ',i 4,') in ',a,' ok')") TRIM(cdvar), itime, TRIM(iom_file(kiomid)%name)788 IF(lwp) WRITE(numout,"(10x,' read ',a,' (rec: ',i6,') in ',a,' ok')") TRIM(cdvar), itime, TRIM(iom_file(kiomid)%name) 771 789 772 790 !--- overlap areas and extra hallows (mpp) -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
r2715 r4245 170 170 iom_file(kiomid)%cn_var(kiv) = TRIM(cdvar) 171 171 iom_file(kiomid)%ndims(kiv) = i_nvd 172 iom_file(kiomid)%dimsz(:,kiv) = 0 ! reset dimsz in case previously used 172 173 CALL flioinqv( ioipslid, cdvar, ll_fnd, & 173 174 & len_dims = iom_file(kiomid)%dimsz(1:i_nvd,kiv), & ! dimensions size … … 210 211 211 212 212 SUBROUTINE iom_ioipsl_g0d( kiomid, kvid, pvar )213 SUBROUTINE iom_ioipsl_g0d( kiomid, kvid, pvar, kstart ) 213 214 !!----------------------------------------------------------------------- 214 215 !! *** ROUTINE iom_ioipsl_g0d *** … … 216 217 !! ** Purpose : read a scalar with IOIPSL (only fliocom module) 217 218 !!----------------------------------------------------------------------- 218 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 219 INTEGER , INTENT(in ) :: kvid ! variable id 220 REAL(wp), INTENT( out) :: pvar ! read field 221 ! 222 CALL fliogetv( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), pvar ) 219 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 220 INTEGER , INTENT(in ) :: kvid ! variable id 221 REAL(wp), INTENT( out) :: pvar ! read field 222 INTEGER , DIMENSION(1), INTENT(in ), OPTIONAL :: kstart ! start position of the reading in each axis 223 ! 224 CALL fliogetv( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), pvar, kstart ) 223 225 ! 224 226 END SUBROUTINE iom_ioipsl_g0d -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
r4161 r4245 217 217 CALL iom_nf90_check(NF90_Inquire_Variable(if90id, ivarid, dimids = idimid(1:i_nvd)), clinfo) ! dimensions ids 218 218 iom_file(kiomid)%luld(kiv) = .FALSE. ! default value 219 iom_file(kiomid)%dimsz(:,kiv) = 0 ! reset dimsz in case previously used 219 220 DO ji = 1, i_nvd ! dimensions size 220 221 CALL iom_nf90_check(NF90_Inquire_Dimension(if90id, idimid(ji), len = iom_file(kiomid)%dimsz(ji,kiv)), clinfo) … … 251 252 252 253 253 SUBROUTINE iom_nf90_g0d( kiomid, kvid, pvar )254 SUBROUTINE iom_nf90_g0d( kiomid, kvid, pvar, kstart ) 254 255 !!----------------------------------------------------------------------- 255 256 !! *** ROUTINE iom_nf90_g0d *** … … 257 258 !! ** Purpose : read a scalar with NF90 258 259 !!----------------------------------------------------------------------- 259 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 260 INTEGER , INTENT(in ) :: kvid ! variable id 261 REAL(wp), INTENT( out) :: pvar ! read field 260 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 261 INTEGER , INTENT(in ) :: kvid ! variable id 262 REAL(wp), INTENT( out) :: pvar ! read field 263 INTEGER , DIMENSION(1), INTENT(in ), OPTIONAL :: kstart ! start position of the reading in each axis 262 264 ! 263 265 CHARACTER(LEN=100) :: clinfo ! info character 264 266 !--------------------------------------------------------------------- 265 267 clinfo = 'iom_nf90_g0d , file: '//TRIM(iom_file(kiomid)%name)//', var: '//TRIM(iom_file(kiomid)%cn_var(kvid)) 266 CALL iom_nf90_check(NF90_GET_VAR(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), pvar ), clinfo )268 CALL iom_nf90_check(NF90_GET_VAR(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), pvar, start = kstart), clinfo ) 267 269 ! 268 270 END SUBROUTINE iom_nf90_g0d -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
r4147 r4245 21 21 USE par_oce 22 22 USE dom_oce ! Ocean space and time domain variables 23 USE obs_fbm, ONLY: ln_cl4 ! Class 4 diagnostic switch 23 24 USE obs_read_prof ! Reading and allocation of observations (Coriolis) 24 25 USE obs_read_sla ! Reading and allocation of SLA observations … … 48 49 PUBLIC dia_obs_init, & ! Initialize and read observations 49 50 & dia_obs, & ! Compute model equivalent to observations 50 & dia_obs_wri ! Write model equivalent to observations 51 & dia_obs_wri, & ! Write model equivalent to observations 52 & dia_obs_dealloc ! Deallocate dia_obs data 51 53 52 54 !! * Shared Module variables … … 80 82 LOGICAL, PUBLIC :: ln_ssh !: Logical switch for sea surface height 81 83 LOGICAL, PUBLIC :: ln_sss !: Logical switch for sea surface salinity 84 LOGICAL, PUBLIC :: ln_sstnight !: Logical switch for night mean SST observations 82 85 LOGICAL, PUBLIC :: ln_nea !: Remove observations near land 83 86 LOGICAL, PUBLIC :: ln_altbias !: Logical switch for altimeter bias … … 167 170 & nmsshc, mdtcorr, mdtcutoff, & 168 171 & ln_reysst, ln_ghrsst, reysstname, reysstfmt, & 172 & ln_sstnight, & 169 173 & ln_grid_search_lookup, & 170 174 & grid_search_file, grid_search_res, & … … 176 180 & ln_velhradcp, velhradcpfiles, & 177 181 & ln_velfb, velfbfiles, ln_velfb_av, & 178 & ln_profb_enatim, ln_ignmis 182 & ln_profb_enatim, ln_ignmis, ln_cl4 179 183 180 184 INTEGER :: jprofset … … 311 315 WRITE(numout,*) ' Logical switch for GHRSST observations ln_ghrsst = ', ln_ghrsst 312 316 WRITE(numout,*) ' Logical switch for feedback SST data ln_sstfb = ', ln_sstfb 317 WRITE(numout,*) ' Logical switch for night-time SST obs ln_sstnight = ', ln_sstnight 313 318 WRITE(numout,*) ' Logical switch for SSS observations ln_sss = ', ln_sss 314 319 WRITE(numout,*) ' Logical switch for Sea Ice observations ln_seaice = ', ln_seaice … … 704 709 nsstsets = nsstsets + 1 705 710 706 ld_sstnight(nsstsets) = .TRUE.711 ld_sstnight(nsstsets) = ln_sstnight 707 712 708 713 CALL obs_rea_sst_rey( reysstname, reysstfmt, sstdata(nsstsets), & … … 718 723 nsstsets = nsstsets + 1 719 724 720 ld_sstnight(nsstsets) = .TRUE.725 ld_sstnight(nsstsets) = ln_sstnight 721 726 722 727 CALL obs_rea_sst( 1, sstdata(nsstsets), jnumsst, & … … 737 742 nsstsets = nsstsets + 1 738 743 739 ld_sstnight(nsstsets) = .TRUE.744 ld_sstnight(nsstsets) = ln_sstnight 740 745 741 746 CALL obs_rea_sst( 0, sstdata(nsstsets), 1, & … … 1368 1373 END SUBROUTINE dia_obs_wri 1369 1374 1375 SUBROUTINE dia_obs_dealloc 1376 IMPLICIT NONE 1377 !!---------------------------------------------------------------------- 1378 !! *** ROUTINE dia_obs_dealloc *** 1379 !! 1380 !! ** Purpose : To deallocate data to enable the obs_oper online loop. 1381 !! Specifically: dia_obs_init --> dia_obs --> dia_obs_wri 1382 !! 1383 !! ** Method : Clean up various arrays left behind by the obs_oper. 1384 !! 1385 !! ** Action : 1386 !! 1387 !!---------------------------------------------------------------------- 1388 !! obs_grid deallocation 1389 CALL obs_grid_deallocate 1390 1391 !! diaobs deallocation 1392 IF ( nprofsets > 0 ) THEN 1393 DEALLOCATE(ld_enact, & 1394 & profdata, & 1395 & prodatqc) 1396 END IF 1397 IF ( ln_sla ) THEN 1398 DEALLOCATE(sladata, & 1399 & sladatqc) 1400 END IF 1401 IF ( ln_seaice ) THEN 1402 DEALLOCATE(sladata, & 1403 & sladatqc) 1404 END IF 1405 IF ( ln_sst ) THEN 1406 DEALLOCATE(sstdata, & 1407 & sstdatqc) 1408 END IF 1409 IF ( ln_vel3d ) THEN 1410 DEALLOCATE(ld_velav, & 1411 & velodata, & 1412 & veldatqc) 1413 END IF 1414 END SUBROUTINE dia_obs_dealloc 1415 1370 1416 SUBROUTINE ini_date( ddobsini ) 1371 1417 !!---------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/mpp_map.F90
r2363 r4245 52 52 !!---------------------------------------------------------------------- 53 53 54 ALLOCATE( & 55 & mppmap(jpiglo,jpjglo) & 56 & ) 57 54 IF (.NOT. ALLOCATED(mppmap)) THEN 55 ALLOCATE( & 56 & mppmap(jpiglo,jpjglo) & 57 & ) 58 ENDIF 58 59 ! Initialize local imppmap 59 60 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/obs_fbm.F90
r2287 r4245 45 45 INTEGER, PARAMETER :: fbimdi = -99999 !: Integers 46 46 REAL(fbsp), PARAMETER :: fbrmdi = 99999 !: Reals 47 47 48 ! Output stream choice 49 LOGICAL :: ln_cl4 = .FALSE. !: Logical switch for 50 !: class 4 file outputs 51 48 52 ! Main data structure for observation feedback data. 49 53 … … 1026 1030 1027 1031 SUBROUTINE write_obfbdata( cdfilename, fbdata ) 1032 !!---------------------------------------------------------------------- 1033 !! *** ROUTINE write_obfbdata *** 1034 !! 1035 !! ** Purpose : Write an obfbdata structure into a netCDF file. 1036 !! 1037 !! ** Method : Decides which output wrapper to use. 1038 !! 1039 !! ** Action : 1040 !! 1041 !!---------------------------------------------------------------------- 1042 !! * Arguments 1043 CHARACTER(len=*) :: cdfilename ! Output filename 1044 TYPE(obfbdata) :: fbdata ! obsfbdata structure 1045 #if defined key_offobsoper 1046 IF (ln_cl4) THEN 1047 ! Class 4 file output stream 1048 CALL write_obfbdata_cl( cdfilename, fbdata ) 1049 ELSE 1050 #endif 1051 ! Standard feedback file output stream 1052 CALL write_obfbdata_fb( cdfilename, fbdata ) 1053 #if defined key_offobsoper 1054 ENDIF 1055 #endif 1056 END SUBROUTINE write_obfbdata 1057 1058 SUBROUTINE write_obfbdata_fb( cdfilename, fbdata ) 1028 1059 !!---------------------------------------------------------------------- 1029 1060 !! *** ROUTINE write_obfbdata *** … … 1524 1555 1525 1556 1526 END SUBROUTINE write_obfbdata 1557 END SUBROUTINE write_obfbdata_fb 1558 1559 #if defined key_offobsoper 1560 SUBROUTINE write_obfbdata_cl(cdfilename, fbdata) 1561 !!---------------------------------------------------------------------- 1562 !! *** ROUTINE write_obfbdata_cl *** 1563 !! 1564 !! ** Purpose : Write an obfbdata structure into a class 4 file. 1565 !! 1566 !! ** Method : 1. Allocate memory needed by ooo_write 1567 !! 2. Map obfbdata into allocated memory 1568 !! 3. Pass mapped data to ooo_write 1569 !! 4. Deallocate memory 1570 !!---------------------------------------------------------------------- 1571 USE dom_oce, ONLY: narea 1572 USE ooo_write 1573 USE ooo_data 1574 !! * Arguments 1575 CHARACTER(len=*) :: cdfilename ! Feedback filename 1576 TYPE(obfbdata) :: fbdata ! obsfbdata structure 1577 !! * Local variables 1578 CHARACTER(len=17), PARAMETER :: cpname = 'write_obfbdata_cl' 1579 CHARACTER(len=64) :: & 1580 & cdate, & !: class 4 file validity date 1581 & cconf, & !: model configuration 1582 & csys, & !: model system 1583 & ccont, & !: contact email 1584 & cinst, & !: institution 1585 & cversion !: model version 1586 CHARACTER(len=8) :: & 1587 & ckind !: observation kind 1588 CHARACTER(len=3) :: cfield 1589 INTEGER :: kobs, & !: number of observations 1590 & kvars, & !: number of physical variables 1591 & kdeps, & !: number of observed depths 1592 & kfcst, & !: number of forecasts 1593 & kifcst, & !: current forecast number 1594 & kproc !: processor number 1595 INTEGER, DIMENSION(:, :, :), ALLOCATABLE :: & 1596 & kqc !: quality control counterpart 1597 INTEGER(KIND=2), DIMENSION(:, :, :), ALLOCATABLE :: & 1598 & k2qc !: quality control counterpart 1599 REAL(kind=fbdp) :: & 1600 & pmodjuld !: model Julian day 1601 REAL(kind=fbdp), DIMENSION(:), ALLOCATABLE :: & 1602 & plead, & !: forecast lead time 1603 & plam, & !: longitude of observation 1604 & pphi, & !: latitude of observation 1605 & ptim !: time of observation 1606 REAL(kind=fbdp), DIMENSION(:, :), ALLOCATABLE :: & 1607 & pdep !: depths of observations 1608 REAL(kind=fbdp), DIMENSION(:, :, :), ALLOCATABLE :: & 1609 & pob, & !: observation counterpart 1610 & pextra !: extra field counterpart 1611 REAL(kind=fbdp), DIMENSION(:, :, :), ALLOCATABLE :: & 1612 & pmod !: model counterpart 1613 CHARACTER(len=128) :: & 1614 & clfilename !: class 4 file name 1615 CHARACTER(len=128), DIMENSION(:), ALLOCATABLE :: & 1616 & ctype !: Instrument type 1617 CHARACTER(len=nf90_max_name) :: & 1618 & cdtmp !: NetCDF variable name 1619 CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: & 1620 & cwmo, & !: Instrument WMO ID 1621 & cunit, & !: Instrument WMO ID 1622 & cvarname !: Instrument WMO ID 1623 INTEGER :: & 1624 & idep, & !: Loop variable 1625 & ivar, & !: Loop variable 1626 & iobs, & !: Loop variable 1627 & ii, & !: Loop variable 1628 & ij, & !: Loop variable 1629 & ik, & !: Loop variable 1630 & il !: Loop variable 1631 cconf = TRIM(cl4_cfg) 1632 csys = TRIM(cl4_sys) 1633 cversion = TRIM(cl4_vn) 1634 ccont = TRIM(cl4_contact) 1635 cinst = TRIM(cl4_inst) 1636 cdate = TRIM(cl4_date) 1637 CALL locate_kind(cdfilename, ckind) 1638 kproc = narea 1639 kfcst = cl4_fcst_len 1640 kobs = fbdata%nobs 1641 kdeps = fbdata%nlev 1642 kvars = fbdata%nvar 1643 IF (kobs .GT. 0) THEN 1644 ALLOCATE(plam(kobs), & 1645 & pphi(kobs), & 1646 & ptim(kobs), & 1647 & plead(kfcst), & 1648 & pdep(kdeps, kobs), & 1649 & kqc(kdeps, kvars, kobs), & 1650 & k2qc(kdeps, kvars, kobs), & 1651 & pob(kdeps, kvars, kobs), & 1652 & pmod(kdeps, kvars, kobs), & 1653 & pextra(kdeps, kvars, kobs), & 1654 & ctype(kobs), & 1655 & cwmo(kobs), & 1656 & cunit(kvars), & 1657 & cvarname(kvars)) 1658 plam(:) = fbdata%plam(:) 1659 pphi(:) = fbdata%pphi(:) 1660 ptim(:) = fbdata%ptim(:) 1661 pdep(:, :) = fbdata%pdep(:, :) 1662 kqc(:,:,:) = 1. 1663 DO ii = 1, kvars 1664 cvarname(ii) = fbdata%cname(ii) 1665 cunit(ii) = fbdata%cobunit(ii) 1666 END DO 1667 1668 ! Quality control algorithm 1669 k2qc(:,:,:) = NF90_FILL_SHORT 1670 DO idep = 1,kdeps 1671 DO ivar = 1, kvars 1672 DO iobs = 1, kobs 1673 ! 1 symbolises good for fbdata 1674 ! fbimdi symbolises that qc has not been set 1675 ! Essentially, if any fbdata flag is not an element of {1, fbimdi} 1676 ! then set the class 4 flag to bad. 1677 ! Note: fbdata%ioqc is marked good if zero. 1678 IF (((fbdata%ioqc(iobs) /= 0) .AND. & 1679 & (fbdata%ioqc(iobs) /= fbimdi)) .OR. & 1680 & ((fbdata%ipqc(iobs) /= 1) .AND. & 1681 & (fbdata%ipqc(iobs) /= fbimdi)) .OR. & 1682 & ((fbdata%idqc(idep,iobs) /= 1) .AND. & 1683 & (fbdata%idqc(idep,iobs) /= fbimdi)) .OR. & 1684 & ((fbdata%ivqc(iobs,ivar) /= 1) .AND. & 1685 & (fbdata%ivqc(iobs,ivar) /= fbimdi)) .OR. & 1686 & ((fbdata%ivlqc(idep,iobs,ivar) /= 1) .AND. & 1687 & (fbdata%ivlqc(idep,iobs,ivar) /= fbimdi)) .OR. & 1688 & ((fbdata%itqc(iobs) /= 1) .AND. & 1689 & (fbdata%itqc(iobs) /= fbimdi))) THEN 1690 ! 1 symbolises bad for class 4 file 1691 k2qc(idep, ivar, iobs) = 1 1692 ELSE 1693 ! 0 symbolises good for class 4 file 1694 k2qc(idep, ivar, iobs) = 0 1695 END IF 1696 END DO 1697 END DO 1698 END DO 1699 1700 ! Permute observation dimensions 1701 pob(:,:,:) = RESHAPE(fbdata%pob, (/kdeps, kvars, kobs/), & 1702 & ORDER=(/1, 3, 2/)) 1703 1704 ! Explicit model counterpart dimension permutation 1705 ! 1,2,3,4 --> 1,4,2,3 1706 pmod(:,:,:) = fbrmdi 1707 ij = cl4_fcst_idx(jimatch) 1708 DO ii = 1,kdeps 1709 DO ik = 1, kvars 1710 DO il = 1, kobs 1711 pmod(ii,ik,il) = fbdata%padd(ii,il,1,ik) 1712 END DO 1713 END DO 1714 END DO 1715 1716 ! Extra fields set to missing for now 1717 pextra(:,:,:) = fbrmdi 1718 1719 ! Lead time of class 4 file is a global parameter 1720 plead = cl4_leadtime(1:cl4_fcst_len) 1721 1722 ! Model Julian day 1723 pmodjuld = cl4_modjuld 1724 1725 ! Observation types 1726 ctype(:) = 'X' 1727 DO ii = 1,kobs 1728 ctype(ii) = fbdata%cdtyp(ii) 1729 END DO 1730 1731 ! World Meteorology Organisation codes 1732 cwmo(:) = fbdata%cdwmo(:) 1733 1734 ! Initialise class 4 file 1735 CALL ooo_wri_init(cconf, csys, ckind, cversion, ccont, cinst, cdate, & 1736 & kproc, kobs, kvars, kdeps, kfcst, & 1737 & clfilename) 1738 1739 ! Write standard variables 1740 CALL ooo_wri_default(clfilename, kobs, kvars, kfcst, kdeps, & 1741 & ctype, cwmo, cunit, cvarname, & 1742 & plam, pphi, pdep, ptim, pob, plead, & 1743 & k2qc, pmodjuld) 1744 !! Write to optional variables 1745 cdtmp = cl4_vars(jimatch) 1746 IF ( (TRIM(cdtmp) == "forecast") .OR. & 1747 (TRIM(cdtmp) == "persistence") ) THEN 1748 !! 4D variables 1749 CALL ooo_wri_extra(clfilename, TRIM(cdtmp), kdeps, kfcst, & 1750 & kvars, kobs, (/ 1,ij,1,1 /), (/ kdeps,1,kvars,kobs /), pmod) 1751 ELSE 1752 !! 3D variables 1753 CALL ooo_wri_extra(clfilename, TRIM(cdtmp), kdeps, & 1754 & kvars, kobs, (/ 1,1,1 /), (/ kdeps,kvars,kobs /), pmod) 1755 ENDIF 1756 1757 DEALLOCATE(plam, pphi, ptim, pdep, plead, kqc, k2qc, & 1758 & pob, pmod, pextra, ctype, cwmo, & 1759 & cunit, cvarname) 1760 END IF 1761 END SUBROUTINE write_obfbdata_cl 1762 #endif 1763 1764 #if defined key_offobsoper 1765 SUBROUTINE locate_kind(cdfilename, ckind) 1766 !!---------------------------------------------------------------------- 1767 !! *** ROUTINE locate_kind *** 1768 !! 1769 !! ** Purpose : Detect which kind of class 4 file is being produced. 1770 !! 1771 !! ** Method : 1. Inspect cdfilename for observation kind. 1772 !!---------------------------------------------------------------------- 1773 CHARACTER(len=*) :: cdfilename ! Feedback filename 1774 CHARACTER(len=8) :: ckind 1775 IF (cdfilename(1:3) == 'sst') THEN 1776 ckind = 'SST' 1777 ELSE IF (cdfilename(1:3) == 'sla') THEN 1778 ckind = 'SLA' 1779 ELSE IF (cdfilename(1:3) == 'pro') THEN 1780 ckind = 'profile' 1781 ELSE IF (cdfilename(1:3) == 'ena') THEN 1782 ckind = 'profile' 1783 ELSE IF (cdfilename(1:3) == 'sea') THEN 1784 ckind = 'seaice' 1785 ELSE 1786 ckind = 'unknown' 1787 END IF 1788 END SUBROUTINE locate_kind 1789 #endif 1527 1790 1528 1791 SUBROUTINE putvaratt_obfbdata( idfile, idvar, cdlongname, cdunits, & -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90
r3651 r4245 861 861 862 862 ENDIF 863 864 863 sstdatqc%rmod(jobs,1) = zext(1) 865 864 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r4230 r4245 23 23 USE lib_mpp ! MPP library 24 24 USE wrk_nemo ! work arrays 25 USE lbclnk ! ocean lateral boundary conditions (C1D case) 25 26 USE ioipsl, ONLY : ymds2ju, ju2ymds ! for calendar 26 27 USE sbc_oce … … 34 35 TYPE, PUBLIC :: FLD_N !: Namelist field informations 35 36 CHARACTER(len = 256) :: clname ! generic name of the NetCDF flux file 36 INTEGER:: nfreqh ! frequency of each flux file37 REAL(wp) :: nfreqh ! frequency of each flux file 37 38 CHARACTER(len = 34) :: clvar ! generic name of the variable in the NetCDF flux file 38 39 LOGICAL :: ln_tint ! time interpolation or not (T/F) … … 50 51 CHARACTER(len = 256) :: clrootname ! generic name of the NetCDF file 51 52 CHARACTER(len = 256) :: clname ! current name of the NetCDF file 52 INTEGER:: nfreqh ! frequency of each flux file53 REAL(wp) :: nfreqh ! frequency of each flux file 53 54 CHARACTER(len = 34) :: clvar ! generic name of the variable in the NetCDF flux file 54 55 LOGICAL :: ln_tint ! time interpolation or not (T/F) … … 200 201 sd(jf)%fdta(:,:,:,1) = sd(jf)%fdta(:,:,:,2) ! re-swap before record field 201 202 sd(jf)%nrec_b(1) = sd(jf)%nrec_a(1) ! update before record informations 202 sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - sd(jf)%nfreqh * 3600! assume freq to be in hours in this case203 sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - NINT( sd(jf)%nfreqh * 3600 ) ! assume freq to be in hours in this case 203 204 sd(jf)%rotn(1) = sd(jf)%rotn(2) ! update before rotate informations 204 205 sd(jf)%nrec_a(1) = itmp ! move back to after record … … 218 219 sd(jf)%fdta(:,:,:,1) = sd(jf)%fdta(:,:,:,2) ! re-swap before record field 219 220 sd(jf)%nrec_b(1) = sd(jf)%nrec_a(1) ! update before record informations 220 sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - sd(jf)%nfreqh * 3600! assume freq to be in hours in this case221 sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - NINT( sd(jf)%nfreqh * 3600 ) ! assume freq to be in hours in this case 221 222 sd(jf)%rotn(1) = sd(jf)%rotn(2) ! update before rotate informations 222 223 sd(jf)%nrec_a(1) = sd(jf)%nrec_a(1) + 1 ! move back to after record … … 271 272 IF( sd(jf)%ln_tint ) THEN ! temporal interpolation 272 273 IF(lwp .AND. kt - nit000 <= 100 ) THEN 273 clfmt = "('fld_read: var ', a, ' kt = ', i8, ' (', f 7.2,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," // &274 & "', records b/a: ', i 4.4, '/', i4.4, ' (days ', f7.2,'/', f7.2, ')')"274 clfmt = "('fld_read: var ', a, ' kt = ', i8, ' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," // & 275 & "', records b/a: ', i6.4, '/', i6.4, ' (days ', f9.4,'/', f9.4, ')')" 275 276 WRITE(numout, clfmt) TRIM( sd(jf)%clvar ), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday, & 276 277 & sd(jf)%nrec_b(1), sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday … … 284 285 ELSE ! nothing to do... 285 286 IF(lwp .AND. kt - nit000 <= 100 ) THEN 286 clfmt = "('fld_read: var ', a, ' kt = ', i8,' (', f 7.2,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," // &287 & "', record: ', i 4.4, ' (days ', f7.2, ' <-> ', f7.2, ')')"287 clfmt = "('fld_read: var ', a, ' kt = ', i8,' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," // & 288 & "', record: ', i6.4, ' (days ', f9.4, ' <-> ', f9.4, ')')" 288 289 WRITE(numout, clfmt) TRIM(sd(jf)%clvar), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday, & 289 290 & sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday … … 356 357 ELSE ! higher frequency mean (in hours) 357 358 IF ( sdjf%cltype == 'monthly' ) THEN ! monthly file 358 sdjf%nrec_a(1) = 24 * nmonth_len(nmonth-1) / sdjf%nfreqh! last record of previous month359 sdjf%nrec_a(1) = NINT( 24 * nmonth_len(nmonth-1) / sdjf%nfreqh ) ! last record of previous month 359 360 llprevmth = .TRUE. ! use previous month file? 360 361 llprevyr = llprevmth .AND. nmonth == 1 ! use previous year file? 361 362 ELSEIF( sdjf%cltype(1:4) == 'week' ) THEN ! weekly file 362 363 llprevweek = .TRUE. ! use previous week file? 363 sdjf%nrec_a(1) = 24 * 7 / sdjf%nfreqh! last record of previous week364 sdjf%nrec_a(1) = NINT( 24 * 7 / sdjf%nfreqh ) ! last record of previous week 364 365 isec_week = NINT(rday) * 7 ! add a shift toward previous week 365 366 ELSEIF( sdjf%cltype == 'daily' ) THEN ! daily file 366 sdjf%nrec_a(1) = 24 / sdjf%nfreqh! last record of previous day367 sdjf%nrec_a(1) = NINT( 24 / sdjf%nfreqh ) ! last record of previous day 367 368 llprevday = .TRUE. ! use previous day file? 368 369 llprevmth = llprevday .AND. nday == 1 ! use previous month file? 369 370 llprevyr = llprevmth .AND. nmonth == 1 ! use previous year file? 370 371 ELSE ! yearly file 371 sdjf%nrec_a(1) = 24 * nyear_len(0) / sdjf%nfreqh! last record of previous year372 sdjf%nrec_a(1) = NINT( 24 * nyear_len(0) / sdjf%nfreqh ) ! last record of previous year 372 373 llprevyr = .NOT. sdjf%ln_clim ! use previous year file? 373 374 ENDIF … … 408 409 CALL fld_get( sdjf, map ) 409 410 410 clfmt = "('fld_init : time-interpolation for ', a, ' read previous record = ', i 4, ' at time = ', f7.2, ' days')"411 clfmt = "('fld_init : time-interpolation for ', a, ' read previous record = ', i6, ' at time = ', f7.2, ' days')" 411 412 IF(lwp) WRITE(numout, clfmt) TRIM(sdjf%clvar), sdjf%nrec_a(1), REAL(sdjf%nrec_a(2),wp)/rday 412 413 … … 518 519 ! ! ================================ ! 519 520 ! 520 ifreq_sec = sdjf%nfreqh * 3600! frequency mean (in seconds)521 ifreq_sec = NINT( sdjf%nfreqh * 3600 ) ! frequency mean (in seconds) 521 522 IF( sdjf%cltype(1:4) == 'week' ) isec_week = ksec_week( sdjf%cltype(6:8) ) ! since the first day of the current week 522 523 ! number of second since the beginning of the file … … 588 589 INTEGER :: iw ! index into wgts array 589 590 INTEGER :: ipdom ! index of the domain 591 INTEGER :: idvar ! variable ID 592 INTEGER :: idmspc ! number of spatial dimensions 593 LOGICAL :: lmoor ! C1D case: point data 590 594 !!--------------------------------------------------------------------- 591 595 ! … … 607 611 ELSE ; ipdom = jpdom_unknown 608 612 ENDIF 613 ! C1D case: If product of spatial dimensions == ipk, then x,y are of 614 ! size 1 (point/mooring data): this must be read onto the central grid point 615 idvar = iom_varid( sdjf%num, sdjf%clvar ) 616 idmspc = iom_file( sdjf%num )%ndims( idvar ) 617 IF( iom_file( sdjf%num )%luld( idvar ) ) idmspc = idmspc - 1 618 lmoor = (idmspc == 0 .OR. PRODUCT( iom_file( sdjf%num )%dimsz( 1:MAX(idmspc,1) ,idvar ) ) == ipk) 619 ! 609 620 SELECT CASE( ipk ) 610 621 CASE(1) 611 IF( sdjf%ln_tint ) THEN ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_a(1) ) 612 ELSE ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,1 ), sdjf%nrec_a(1) ) 622 IF( lk_c1d .AND. lmoor ) THEN 623 IF( sdjf%ln_tint ) THEN 624 CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fdta(2,2,1,2), sdjf%nrec_a(1) ) 625 CALL lbc_lnk( sdjf%fdta(:,:,1,2),'Z',1. ) 626 ELSE 627 CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fnow(2,2,1 ), sdjf%nrec_a(1) ) 628 CALL lbc_lnk( sdjf%fnow(:,:,1 ),'Z',1. ) 629 ENDIF 630 ELSE 631 IF( sdjf%ln_tint ) THEN ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_a(1) ) 632 ELSE ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,1 ), sdjf%nrec_a(1) ) 633 ENDIF 613 634 ENDIF 614 635 CASE DEFAULT 615 IF( sdjf%ln_tint ) THEN ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) ) 616 ELSE ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,: ), sdjf%nrec_a(1) ) 636 IF (lk_c1d .AND. lmoor ) THEN 637 IF( sdjf%ln_tint ) THEN 638 CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fdta(2,2,:,2), sdjf%nrec_a(1) ) 639 CALL lbc_lnk( sdjf%fdta(:,:,:,2),'Z',1. ) 640 ELSE 641 CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fnow(2,2,: ), sdjf%nrec_a(1) ) 642 CALL lbc_lnk( sdjf%fnow(:,:,: ),'Z',1. ) 643 ENDIF 644 ELSE 645 IF( sdjf%ln_tint ) THEN ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) ) 646 ELSE ; CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,: ), sdjf%nrec_a(1) ) 647 ENDIF 617 648 ENDIF 618 649 END SELECT … … 826 857 ENDIF 827 858 ELSE ! higher frequency mean (in hours) 828 IF( sdjf%cltype == 'monthly' ) THEN ; sdjf%nreclast = 24 * imonth_len / sdjf%nfreqh829 ELSEIF( sdjf%cltype(1:4) == 'week' ) THEN ; sdjf%nreclast = 24 * 7 / sdjf%nfreqh830 ELSEIF( sdjf%cltype == 'daily' ) THEN ; sdjf%nreclast = 24 / sdjf%nfreqh831 ELSE ; sdjf%nreclast = 24 * iyear_len / sdjf%nfreqh859 IF( sdjf%cltype == 'monthly' ) THEN ; sdjf%nreclast = NINT( 24 * imonth_len / sdjf%nfreqh ) 860 ELSEIF( sdjf%cltype(1:4) == 'week' ) THEN ; sdjf%nreclast = NINT( 24 * 7 / sdjf%nfreqh ) 861 ELSEIF( sdjf%cltype == 'daily' ) THEN ; sdjf%nreclast = NINT( 24 / sdjf%nfreqh ) 862 ELSE ; sdjf%nreclast = NINT( 24 * iyear_len / sdjf%nfreqh ) 832 863 ENDIF 833 864 ENDIF -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r4230 r4245 79 79 REAL(wp) :: rn_efac ! multiplication factor for evaporation (clem) 80 80 REAL(wp) :: rn_vfac ! multiplication factor for ice/ocean velocity in the calculation of wind stress (clem) 81 LOGICAL :: ln_bulk2z ! logical flag for case where z(q,t) and z(u) are specified in the namelist 82 REAL(wp) :: rn_zqt ! z(q,t) : height of humidity and temperature measurements 83 REAL(wp) :: rn_zu ! z(u) : height of wind measurements 81 84 82 85 !! * Substitutions … … 134 137 NAMELIST/namsbc_core/ cn_dir , ln_2m , ln_taudif, rn_pfac, rn_efac, rn_vfac, & 135 138 & sn_wndi, sn_wndj, sn_humi , sn_qsr , & 136 & sn_qlw , sn_tair, sn_prec , sn_snow, sn_tdif 139 & sn_qlw , sn_tair, sn_prec , sn_snow, & 140 & sn_tdif, rn_zqt , ln_bulk2z, rn_zu 137 141 !!--------------------------------------------------------------------- 138 142 … … 316 320 & Cd , Ch , Ce , & 317 321 & zt_zu , zq_zu ) 322 ELSE IF( ln_bulk2z ) THEN 323 !! If the height of the air temp./spec. hum. and wind are to be specified by hand : 324 IF( rn_zqt == rn_zu ) THEN 325 !! If air temp. and spec. hum. are at the same height as wind : 326 CALL TURB_CORE_1Z( rn_zu, zst , sf(jp_tair)%fnow(:,:,1), & 327 & zqsatw, sf(jp_humi)%fnow(:,:,1), wndm, & 328 & Cd , Ch , Ce ) 329 ELSE 330 !! If air temp. and spec. hum. are at a different height to wind : 331 CALL TURB_CORE_2Z(rn_zqt, rn_zu , zst , sf(jp_tair)%fnow, & 332 & zqsatw, sf(jp_humi)%fnow, wndm, & 333 & Cd , Ch , Ce , & 334 & zt_zu , zq_zu ) 335 ENDIF 318 336 ELSE 319 337 !! If air temp. and spec. hum. are given at same height than wind (10m) : … … 360 378 ! Turbulent fluxes over ocean 361 379 ! ----------------------------- 362 IF( ln_2m ) THEN363 ! Values of temp. and hum. adjusted to 10m must be used instead of 2m values380 IF( ln_2m .OR. ( ln_bulk2z .AND. rn_zqt /= rn_zu ) ) THEN 381 ! Values of temp. and hum. adjusted to height of wind must be used 364 382 zevap(:,:) = rn_efac * MAX( 0.e0, rhoa *Ce(:,:)*( zqsatw(:,:) - zq_zu(:,:) ) * wndm(:,:) ) ! Evaporation 365 383 zqsb (:,:) = rhoa*cpa*Ch(:,:)*( zst (:,:) - zt_zu(:,:) ) * wndm(:,:) ! Sensible Heat … … 789 807 !! Momentum, Latent and sensible heat exchange coefficients 790 808 !! Caution: this procedure should only be used in cases when air 791 !! temperature (T_air) and air specific humidity (q_air) are at 2m792 !! whereas wind (dU) is at 10m.809 !! temperature (T_air) and air specific humidity (q_air) are at a 810 !! different height to wind (dU). 793 811 !! 794 812 !! References : Large & Yeager, 2004 : ??? … … 808 826 809 827 INTEGER :: j_itt 810 INTEGER , PARAMETER :: nb_itt = 3! number of itterations828 INTEGER , PARAMETER :: nb_itt = 5 ! number of itterations 811 829 REAL(wp), PARAMETER :: grav = 9.8 ! gravity 812 830 REAL(wp), PARAMETER :: kappa = 0.4 ! von Karman's constant … … 905 923 !! 906 924 !! Shifting the neutral 10m transfer coefficients to (zu,zeta_u) : 907 xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m) 925 xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m) ! L & Y eq. (10a) 908 926 Cd = Cd_n10/(xct*xct) ; sqrt_Cd = sqrt(Cd) 909 927 ENDIF … … 911 929 xlogt = log(zu/10.) - zpsi_hu 912 930 !! 913 xct = 1. + Ch_n10*xlogt/kappa/sqrt_Cd_n10 931 xct = 1. + Ch_n10*xlogt/kappa/sqrt_Cd_n10 ! L & Y eq. (10b) 914 932 Ch = Ch_n10*sqrt_Cd/sqrt_Cd_n10/xct 915 933 !! 916 xct = 1. + Ce_n10*xlogt/kappa/sqrt_Cd_n10 934 xct = 1. + Ce_n10*xlogt/kappa/sqrt_Cd_n10 ! L & Y eq. (10c) 917 935 Ce = Ce_n10*sqrt_Cd/sqrt_Cd_n10/xct 918 936 !! -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
r4147 r4245 6 6 !! History : 2.0 ! 2005-11 (G. Madec) Original code 7 7 !! 3.3 ! 2010-09 (C. Ethe, G. Madec) merge TRC-TRA + switch from velocity to transport 8 !! 4.0 ! 2011-06 (G. Madec) Addition of Mixed Layer Eddy parameterisation 8 9 !!---------------------------------------------------------------------- 9 10 … … 21 22 USE traadv_qck ! QUICKEST scheme (tra_adv_qck routine) 22 23 USE traadv_eiv ! eddy induced velocity (tra_adv_eiv routine) 24 USE traadv_mle ! ML eddy induced velocity (tra_adv_mle routine) 23 25 USE cla ! cross land advection (cla_traadv routine) 24 26 USE ldftra_oce ! lateral diffusion coefficient on tracers … … 99 101 & CALL tra_adv_eiv( kt, nit000, zun, zvn, zwn, 'TRA' ) ! add the eiv transport (if necessary) 100 102 ! 103 IF( ln_mle ) CALL tra_adv_mle( kt, nit000, zun, zvn, zwn, 'TRA' ) ! add the mle transport (if necessary) 101 104 CALL iom_put( "uocetr_eff", zun ) ! output effective transport 102 105 CALL iom_put( "vocetr_eff", zvn ) … … 136 139 & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 137 140 ! 138 IF( nn_timing == 1 ) CALL timing_stop( 'tra_adv')141 IF( nn_timing == 1 ) CALL timing_stop( 'tra_adv' ) 139 142 ! 140 143 CALL wrk_dealloc( jpi, jpj, jpk, zun, zvn, zwn ) … … 213 216 ENDIF 214 217 ! 218 CALL tra_adv_mle_init ! initialisation of the Mixed Layer Eddy parametrisation (MLE) 219 ! 215 220 END SUBROUTINE tra_adv_init 216 221 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90
r4244 r4245 29 29 30 30 ! !!* namelist namtra_adv_mle * 31 LOGICAL, PUBLIC :: ln_mle = .TRUE.! flag to activate the Mixed Layer Eddy (MLE) parameterisation32 INTEGER :: nn_mle = 0! MLE type: =0 standard Fox-Kemper ; =1 new formulation33 INTEGER :: nn_mld_uv = 0! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)34 INTEGER :: nn_conv = 0! =1 no MLE in case of convection ; =0 always MLE35 REAL(wp) :: rn_ce = 0.06_wp! MLE coefficient36 ! 37 REAL(wp) :: rn_lf = 5.e+3_wp! typical scale of mixed layer front38 REAL(wp) :: rn_time = 2._wp * 86400._wp! time scale for mixing momentum across the mixed layer39 ! 40 REAL(wp) :: rn_lat = 20._wp! reference latitude for a 5 km scale of ML front41 REAL(wp) :: rn_rho_c_mle = 0.01! Density criterion for definition of MLD used by FK31 LOGICAL, PUBLIC :: ln_mle ! flag to activate the Mixed Layer Eddy (MLE) parameterisation 32 INTEGER :: nn_mle ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 33 INTEGER :: nn_mld_uv ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 34 INTEGER :: nn_conv ! =1 no MLE in case of convection ; =0 always MLE 35 REAL(wp) :: rn_ce ! MLE coefficient 36 ! ! parameters used in nn_mle = 0 case 37 REAL(wp) :: rn_lf ! typical scale of mixed layer front 38 REAL(wp) :: rn_time ! time scale for mixing momentum across the mixed layer 39 ! ! parameters used in nn_mle = 1 case 40 REAL(wp) :: rn_lat ! reference latitude for a 5 km scale of ML front 41 REAL(wp) :: rn_rho_c_mle ! Density criterion for definition of MLD used by FK 42 42 43 43 REAL(wp) :: r5_21 = 5.e0 / 21.e0 ! factor used in mle streamfunction computation … … 271 271 INTEGER :: ji, jj, jk ! dummy loop indices 272 272 INTEGER :: ierr 273 INTEGER :: ios ! Local integer output status for namelist read 273 274 REAL(wp) :: z1_t2, zfu, zfv ! - - 274 275 ! … … 276 277 !!---------------------------------------------------------------------- 277 278 278 REWIND ( numnam ) ! Read Namelist namtra_adv_mle : mixed layer eddy advection acting on tracers 279 READ ( numnam, namtra_adv_mle ) 279 280 REWIND( numnam_ref ) ! Namelist namtra_adv_mle in reference namelist : Tracer advection scheme 281 READ ( numnam_ref, namtra_adv_mle, IOSTAT = ios, ERR = 901) 282 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv_mle in reference namelist', lwp ) 283 284 REWIND( numnam_cfg ) ! Namelist namtra_adv_mle in configuration namelist : Tracer advection scheme 285 READ ( numnam_cfg, namtra_adv_mle, IOSTAT = ios, ERR = 902 ) 286 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv_mle in configuration namelist', lwp ) 287 WRITE ( numond, namtra_adv_mle ) 280 288 281 289 IF(lwp) THEN ! Namelist print -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
r4147 r4245 27 27 USE oce ! ocean: variables 28 28 USE dom_oce ! ocean: domain variables 29 USE c1d ! 1D vertical configuration 29 30 USE trdmod_oce ! ocean: trend variables 30 31 USE trdtra ! active tracers: trends … … 44 45 PUBLIC tra_dmp ! routine called by step.F90 45 46 PUBLIC tra_dmp_init ! routine called by opa.F90 46 PUBLIC dtacof ! routine called by in both tradmp.F90 and trcdmp.F9047 PUBLIC dtacof_zoom ! routine called by in both tradmp.F90 and trcdmp.F9047 PUBLIC dtacof ! routine called by tradmp.F90, trcdmp.F90 and dyndmp.F90 48 PUBLIC dtacof_zoom ! routine called by tradmp.F90, trcdmp.F90 and dyndmp.F90 48 49 49 50 ! !!* Namelist namtra_dmp : T & S newtonian damping * 50 LOGICAL, PUBLIC :: ln_tradmp = .TRUE.!: internal damping flag51 LOGICAL, PUBLIC :: ln_tradmp !: internal damping flag 51 52 INTEGER :: nn_hdmp ! = 0/-1/'latitude' for damping over T and S 52 53 INTEGER :: nn_zdmp ! = 0/1/2 flag for damping in the mixed layer … … 191 192 !! ** Purpose : Initialization for the newtonian damping 192 193 !! 193 !! ** Method : read the nam mbfnamelist and check the parameters194 !! ** Method : read the namtra_dmp namelist and check the parameters 194 195 !!---------------------------------------------------------------------- 195 196 NAMELIST/namtra_dmp/ ln_tradmp, nn_hdmp, nn_zdmp, rn_surf, rn_bot, rn_dep, nn_file … … 206 207 WRITE ( numond, namtra_dmp ) 207 208 208 IF( lzoom ) nn_zdmp = 0 ! restoring to climatology at closed north or south boundaries209 IF( lzoom .AND. .NOT. lk_c1d ) nn_zdmp = 0 ! restoring to climatology at closed north or south boundaries 209 210 210 211 IF(lwp) THEN ! Namelist print … … 213 214 WRITE(numout,*) '~~~~~~~' 214 215 WRITE(numout,*) ' Namelist namtra_dmp : set damping parameter' 215 WRITE(numout,*) ' add a damping term n or notln_tradmp = ', ln_tradmp216 WRITE(numout,*) ' add a damping term or not ln_tradmp = ', ln_tradmp 216 217 WRITE(numout,*) ' T and S damping option nn_hdmp = ', nn_hdmp 217 WRITE(numout,*) ' mixed layer damping option nn_zdmp = ', nn_zdmp, '( zoom: forced to 0)'218 WRITE(numout,*) ' mixed layer damping option nn_zdmp = ', nn_zdmp, '(non-C1D zoom: forced to 0)' 218 219 WRITE(numout,*) ' surface time scale (days) rn_surf = ', rn_surf 219 220 WRITE(numout,*) ' bottom time scale (days) rn_bot = ', rn_bot … … 227 228 IF( tra_dmp_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'tra_dmp_init: unable to allocate arrays' ) 228 229 ! 230 #if ! defined key_c1d 229 231 SELECT CASE ( nn_hdmp ) 230 232 CASE ( -1 ) ; IF(lwp) WRITE(numout,*) ' tracer damping in the Med & Red seas only' … … 235 237 END SELECT 236 238 ! 239 #endif 237 240 SELECT CASE ( nn_zdmp ) 238 241 CASE ( 0 ) ; IF(lwp) WRITE(numout,*) ' tracer damping throughout the water column' … … 252 255 ttrdmp(:,:,:) = 0._wp 253 256 ! ! Damping coefficients initialization 254 IF( lzoom ) THEN ; CALL dtacof_zoom( resto )257 IF( lzoom .AND. .NOT. lk_c1d ) THEN ; CALL dtacof_zoom( resto ) 255 258 ELSE ; CALL dtacof( nn_hdmp, rn_surf, rn_bot, rn_dep, nn_file, 'TRA', resto ) 256 259 ENDIF … … 360 363 REAL(wp) , INTENT(in ) :: pn_dep ! depth of transition (meters) 361 364 INTEGER , INTENT(in ) :: kn_file ! save the damping coef on a file or not 362 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracerindicator)365 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA, TRC or DYN (tracer/dynamics indicator) 363 366 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: presto ! restoring coeff. (s-1) 364 367 ! … … 380 383 CALL wrk_alloc( jpi, jpj, zmrs ) 381 384 CALL wrk_alloc( jpi, jpj, jpk, zdct ) 385 #if defined key_c1d 386 ! ! ==================== 387 ! ! C1D configuration : local domain 388 ! ! ==================== 389 ! 390 IF(lwp) WRITE(numout,*) 391 IF(lwp) WRITE(numout,*) ' dtacof : C1D 3x3 local domain' 392 IF(lwp) WRITE(numout,*) ' -----------------------------' 393 ! 394 presto(:,:,:) = 0._wp 395 ! 396 zsdmp = 1._wp / ( pn_surf * rday ) 397 zbdmp = 1._wp / ( pn_bot * rday ) 398 DO jk = 2, jpkm1 399 DO jj = 1, jpj 400 DO ji = 1, jpi 401 ! ONLY vertical variation from zsdmp (sea surface) to zbdmp (bottom) 402 presto(ji,jj,jk) = zbdmp + (zsdmp-zbdmp) * EXP(-fsdept(ji,jj,jk)/pn_dep) 403 END DO 404 END DO 405 END DO 406 ! 407 presto(:,:, : ) = presto(:,:,:) * tmask(:,:,:) 408 #else 382 409 ! ! ==================== 383 410 ! ! ORCA configuration : global domain … … 559 586 CALL ctl_stop( 'Choose a correct value of nn_hdmp or put ln_tradmp to FALSE' ) 560 587 ENDIF 588 #endif 561 589 562 590 ! !--------------------------------! … … 566 594 IF( cdtype == 'TRA' ) cfile = 'damping.coeff' 567 595 IF( cdtype == 'TRC' ) cfile = 'damping.coeff.trc' 596 IF( cdtype == 'DYN' ) cfile = 'damping.coeff.dyn' 568 597 cfile = TRIM( cfile ) 569 598 CALL iom_open ( cfile, inum0, ldwrt = .TRUE., kiolib = jprstlib ) -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
r3294 r4245 24 24 25 25 PUBLIC zdf_mxl ! called by step.F90 26 27 REAL(wp), PUBLIC :: rho_c = 0.01_wp ! density criterion for mixed layer depth 28 REAL(wp), PUBLIC :: avt_c = 5.e-4_wp ! Kz criterion for the turbocline depth 26 29 27 30 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nmln !: number of level in the mixed layer (used by TOP) … … 63 66 !! ** Method : The mixed layer depth is the shallowest W depth with 64 67 !! the density of the corresponding T point (just bellow) bellow a 65 !! given value defined locally as rho(10m) + zrho_c68 !! given value defined locally as rho(10m) + rho_c 66 69 !! The turbocline depth is the depth at which the vertical 67 70 !! eddy diffusivity coefficient (resulting from the vertical physics … … 76 79 INTEGER :: iikn, iiki ! temporary integer within a do loop 77 80 INTEGER, POINTER, DIMENSION(:,:) :: imld ! temporary workspace 78 REAL(wp) :: zrho_c = 0.01_wp ! density criterion for mixed layer depth79 REAL(wp) :: zavt_c = 5.e-4_wp ! Kz criterion for the turbocline depth80 81 !!---------------------------------------------------------------------- 81 82 ! … … 98 99 DO jj = 1, jpj 99 100 DO ji = 1, jpi 100 IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + zrho_c ) nmln(ji,jj) = jk ! Mixed layer101 IF( avt (ji,jj,jk) < zavt_c ) imld(ji,jj) = jk ! Turbocline101 IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rho_c ) nmln(ji,jj) = jk ! Mixed layer 102 IF( avt (ji,jj,jk) < avt_c ) imld(ji,jj) = jk ! Turbocline 102 103 END DO 103 104 END DO -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r4230 r4245 77 77 USE c1d ! 1D configuration 78 78 USE step_c1d ! Time stepping loop for the 1D configuration 79 USE dyndmp ! Momentum damping 79 80 #if defined key_top 80 81 USE trcini ! passive tracer initialisation … … 372 373 CALL phy_cst ! Physical constants 373 374 CALL eos_init ! Equation of state 375 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 374 376 CALL dom_cfg ! Domain configuration 375 377 CALL dom_init ! Domain … … 418 420 CALL tra_bbc_init ! bottom heat flux 419 421 IF( lk_trabbl ) CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme 420 IF( ln_tradmp ) CALL tra_dmp_init ! internal damping trends422 CALL tra_dmp_init ! internal damping trends- tracers 421 423 CALL tra_adv_init ! horizontal & vertical advection 422 424 CALL tra_ldf_init ! lateral mixing … … 424 426 425 427 ! ! Dynamics 428 IF( lk_c1d ) CALL dyn_dmp_init ! internal damping trends- momentum 426 429 CALL dyn_adv_init ! advection (vector or flux form) 427 430 CALL dyn_vor_init ! vorticity term including Coriolis -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/all_functions.sh
r4147 r4245 96 96 if [ ${#} -lt ${minargcount} ] 97 97 then 98 echo "not enough targuments for set_namelist"98 echo "not enough arguments for set_namelist" 99 99 echo "${usage}" 100 100 exit 1 … … 153 153 } 154 154 155 155 156 # function to tidy up after each test and populate the NEMO_VALIDATION store 156 157 post_test_tidyup () { … … 249 250 fi 250 251 } 252 253 ############################################################# 254 # extra functions to manipulate settings in the iodef.xml file 255 # 256 # Examples: 257 # set_xio_file_type iodef.xml one_file 258 # set_xio_using_server iodef.xml true 259 # set_xio_buffer_size iodef.xml 50000000 260 # 261 ############################################################# 262 263 usage2=" Usage : set_xio_file_type input_iodef.xml one_file||multiple_file" 264 usage3=" Usage : set_xio_using_server input_iodef.xml true||false" 265 usage4=" Usage : set_xio_buffer_size input_iodef.xml int_buffer_size" 266 267 set_xio_file_type () { 268 minargcount=2 269 if [ ${#} -lt ${minargcount} ] 270 then 271 echo "not enough arguments for set_xio_file_type" 272 echo "${usage2}" 273 exit 1 274 fi 275 if [ $2 != "one_file" ] && [ $2 != "multiple_file" ] 276 then 277 echo "unrecognised argument for set_xio_file_type" 278 echo "${usage2}" 279 echo $2 280 exit 1 281 fi 282 unset minargcount 283 if [ ! -f ${SETTE_DIR}/output.sette ] ; then 284 touch ${SETTE_DIR}/output.sette 285 fi 286 287 echo "executing script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette 288 echo "################" >> ${SETTE_DIR}/output.sette 289 290 VAR_NAME=$( grep "^.*<.*file_definition.*type.*=" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" ) 291 if [ ${#VAR_NAME} -eq 0 ] 292 then 293 echo "doing \"set_xio_file_type $@\". " 294 echo "xml_tag: file_definition with variable: type is empty" 295 echo "confirm that an appropriate file_definition is in \"${EXE_DIR}/$1\" " 296 echo "exit" 297 echo "error in executing script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette 298 echo "....." >> ${SETTE_DIR}/output.sette 299 exit 1 300 fi 301 if [ $2 == "one_file" ] 302 then 303 sed -e "s:multiple_file:one_file:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 304 else 305 sed -e "s:one_file:multiple_file:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 306 fi 307 mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 308 309 echo "finished script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette 310 echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette 311 echo " " >> ${SETTE_DIR}/output.sette 312 } 313 314 set_xio_using_server () { 315 minargcount=2 316 if [ ${#} -lt ${minargcount} ] 317 then 318 echo "not enough arguments for set_xio_using_server" 319 echo "${usage2}" 320 exit 1 321 fi 322 if [ $2 != "true" ] && [ $2 != "false" ] 323 then 324 echo "unrecognised argument for set_xio_using_server" 325 echo "${usage2}" 326 echo $2 327 exit 1 328 fi 329 unset minargcount 330 if [ ! -f ${SETTE_DIR}/output.sette ] ; then 331 touch ${SETTE_DIR}/output.sette 332 fi 333 334 echo "executing script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette 335 echo "################" >> ${SETTE_DIR}/output.sette 336 337 VAR_NAME=$( grep "^.*<.*variable id.*=.*using_server.*=.*boolean" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" ) 338 if [ ${#VAR_NAME} -eq 0 ] 339 then 340 echo "doing \"set_xio_using_server $@\". " 341 echo "xml_tag: "variable id=using_server" with variable: boolean is empty" 342 echo "confirm that an appropriate variable id is in \"${EXE_DIR}/$1\" " 343 echo "exit" 344 echo "error in executing script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette 345 echo "....." >> ${SETTE_DIR}/output.sette 346 exit 1 347 fi 348 if [ $2 == "false" ] 349 then 350 sed -e "/using_server/s:true:false:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 351 export USING_MPMD=no 352 else 353 sed -e "/using_server/s:false:true:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 354 export USING_MPMD=yes 355 fi 356 mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 357 358 echo "finished script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette 359 echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette 360 echo " " >> ${SETTE_DIR}/output.sette 361 } 362 363 set_xio_buffer_size () { 364 minargcount=2 365 if [ ${#} -lt ${minargcount} ] 366 then 367 echo "not enough arguments for set_xio_buffer_size" 368 echo "${usage4}" 369 exit 1 370 fi 371 unset minargcount 372 if [ ! -f ${SETTE_DIR}/output.sette ] ; then 373 touch ${SETTE_DIR}/output.sette 374 fi 375 376 echo "executing script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette 377 echo "################" >> ${SETTE_DIR}/output.sette 378 379 VAR_NAME=$( grep "^.*<.*variable id.*=.*buffer_size.*=.*integer" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" ) 380 if [ ${#VAR_NAME} -eq 0 ] 381 then 382 echo "doing \"set_xio_buffer_size $@\". " 383 echo "xml_tag: "variable id=buffer_size" with variable: integer is empty" 384 echo "confirm that an appropriate variable id is in \"${EXE_DIR}/$1\" " 385 echo "exit" 386 echo "error in executing script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette 387 echo "....." >> ${SETTE_DIR}/output.sette 388 exit 1 389 fi 390 sed -e "/buffer_size/s:>.*<:>$2<:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 391 mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 392 393 echo "finished script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette 394 echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette 395 echo " " >> ${SETTE_DIR}/output.sette 396 } 397 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/input_AMM12.cfg
r4147 r4245 1 AMM12_v3. 5.tar AMM12.v3_51 AMM12_v3.6.tar AMM12.v3_6 -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/prepare_job.sh
r4147 r4245 68 68 # 69 69 70 usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE "71 usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE "72 73 74 minargcount= 570 usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE NUM_XIO_SERVERS" 71 usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE 0" 72 73 74 minargcount=6 75 75 if [ ${#} -lt ${minargcount} ] 76 76 then … … 93 93 MPI_FLAG=$4 94 94 JOB_FILE=$5 95 NXIO_PROC=$6 95 96 96 97 # export EXE_DIR. This directory is used to execute model … … 186 187 case ${COMPILER} in 187 188 ALTIX_NAUTILUS_MPT) 188 NB_REM=$( echo $NB_PROC | awk '{print $1% 4}')189 NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 4}') 189 190 if [ ${NB_REM} == 0 ] ; then 190 191 # number of processes required is an integer multiple of 4 191 192 # 192 NB_NODES=$( echo $NB_PROC | awk '{print $1/ 4}')193 NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 4}') 193 194 else 194 195 # … … 196 197 # round up the number of nodes required. 197 198 # 198 NB_NODES=$( echo $NB_PROC | awk '{printf("%d",$1/ 4 + 1 )}')199 NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1 + $2 ) / 4 + 1 )}') 199 200 fi 200 201 ;; … … 230 231 # Pass settings into job file by using sed to edit predefined strings 231 232 # 232 cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCS/${NB_PROC}/" \ 233 cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" \ 234 -e"s/NPROCS/${NB_PROC}/" \ 235 -e"s/NXIOPROCS/${NXIO_PROC}/" \ 233 236 -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 234 237 -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ -
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/sette.sh
r4242 r4245 2 2 ############################################################ 3 3 # Author : Simona Flavoni for NEMO 4 # Contact : sflod@locean-ipsl.upmc.fr 4 # Contact: sflod@locean-ipsl.upmc.fr 5 # 2013 : A.C. Coward added options for testing with XIOS in dettached mode 5 6 # 6 7 # sette.sh : principal script of SET TEsts for NEMO (SETTE) … … 15 16 #set -u 16 17 #set -e 17 #+ 18 # 19 # ================ 20 # sette.sh 21 # ================ 22 # 23 # ---------------------------------------------- 24 # Set of tests for NEMO 25 # ---------------------------------------------- 26 # 27 # SYNOPSIS 28 # ======== 29 # 30 # :: 31 # 32 # $ ./sette.sh 33 # 18 # =========== 34 19 # DESCRIPTION 35 20 # =========== … … 37 22 # Variables to be checked by user: 38 23 # 39 # COMPILER : name of compiler as defined in NEMOGCM/ARCH directory 40 # 41 # BATCH_COMMAND : name of the command for batch submission 42 # 43 # INTERACT_FLAG : flag to run in interactive mode "yes" 44 # to run in batch mode "no" 45 # 46 # MPIRUN_FLAG : flag to run in parallel (MPI) "yes" 47 # to run in sequential mode (NB_PROC = 1) "no" 24 # COMPILER : name of compiler as defined in NEMOGCM/ARCH directory 25 # BATCH_COMMAND_PAR : name of the command for submitting parallel batch jobs 26 # BATCH_COMMAND_SEQ : name of the command for submitting sequential batch jobs 27 # INTERACT_FLAG : flag to run in interactive mode "yes" 28 # to run in batch mode "no" 29 # MPIRUN_FLAG : flag to run in parallel (MPI) "yes" 30 # to run in sequential mode (NB_PROC = 1) "no" 31 # USING_XIOS : flag to control the activation of key_iomput 32 # "yes" to compile using key_iomput and link to the external XIOS library 33 # "no" to compile without key_iomput and link to the old IOIPSL library 34 # USING_MPMD : flag to control the use of stand-alone IO servers 35 # requires USING_XIOS="yes" 36 # "yes" to run in MPMD (detached) mode with stand-alone IO servers 37 # "no" to run in SPMD (attached) mode without separate IO servers 38 # NUM_XIOSERVERS : number of stand-alone IO servers to employ 39 # set to zero if USING_MPMD="no" 48 40 # 49 41 # Principal script is sette.sh, that calls 50 42 # 51 # makenemo 52 # 53 # creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe (and its link opa in ${CONFIG_NAME}/EXP00) 43 # makenemo : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 44 # and links to opa in ${CONFIG_NAME}/EXP00) 54 45 # 55 46 # param.cfg : sets and loads following directories: 56 47 # 57 # FORCING_DIR : is the directory for forcing files (tarfile) 58 # 59 # INPUT_DIR : is the directory for input files storing 60 # 61 # TMPDIR : is the temporary directory (if needed) 48 # FORCING_DIR : is the directory for forcing files (tarfile) 49 # INPUT_DIR : is the directory for input files storing 50 # TMPDIR : is the temporary directory (if needed) 51 # NEMO_VALIDATION_DIR : is the validation directory 52 # 53 # (NOTE: this file is the same for all configrations to be tested with sette) 54 # 55 # all_functions.sh : loads functions used by sette (note: new functions can be added here) 56 # set_namelist : function declared in all_functions that sets namelist parameters 57 # post_test_tidyup : creates validation storage directory and copies required output files 58 # (solver.stat and ocean.output) in it after execution of test. 59 # 60 # VALIDATION tree is: 61 # 62 # NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 63 # 64 # prepare_exe_dir.sh : defines and creates directory where the test is executed 65 # execution directory takes name of TEST_NAME defined for every test 66 # in sette.sh. (each test in executed in its own directory) 67 # 68 # prepare_job.sh : to generate the script run_job.sh 69 # 70 # fcm_job.sh : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") 71 # see sette.sh and BATCH_TEMPLATE directory 72 # 73 # NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which 74 # can be found paths to the input tar file) 75 # NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} 76 # directory 77 # NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists 78 # remain in ${NEW_CONF}/EXP00 62 79 # 63 # NEMO_VALIDATION_DIR : is the validation directory 64 # 65 # (NOTE: this file is the same for all configrations to be tested with sette) 66 # 67 # 68 # all_functions.sh : loads functions used by sette (note: new functions can be added here) 69 # 70 # set_namelist : function declared in all_functions that set namelist parameters for tests 71 # 72 # post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test. 73 # 74 # Tree of VALIDATION is: 75 # 76 # NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 77 # 78 # 79 # prepare_exe_dir.sh : defines and creates directory where the test is executed 80 # 81 # execution directory takes name of TEST_NAME defined in every test in sette.sh 82 # 83 # ( each test in executed in its own directory ) 84 # 85 # 86 # prepare_job.sh 87 # 88 # to generate the script run_job.sh 89 # 90 # fcm_job.sh 91 # 92 # run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") see sette.sh and BATCH_TEMPLATE directory 93 # 94 # (note this job needs to have an input_CONFIG.cfg in which can be found input tar file) 95 # 96 # NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory 97 # 98 # NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00 99 # 100 # in ${SETTE_DIR} is created output.sette with the echo of executed commands 101 # 102 # if sette.sh is stopped in output.sette there is written the last command executed by sette.sh 103 # 104 # if you run: ./sette.sh 2>&1 | tee out.sette 105 # 106 # in ${SETTE_DIR} out.sette is redirected standard error & standard output 107 # 108 # 109 # EXAMPLES 110 # ======== 111 # 112 # :: 113 # 114 # $ ./sette.sh 115 # 116 # 117 # TODO 118 # ==== 119 # 120 # option debug 121 # 122 # EVOLUTIONS 123 # ========== 124 # 125 # $Id$ 126 # 127 # * creation 128 # 129 #- 130 # 131 #- 80 # NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of 81 # executed commands 82 # 83 # NOTE: if sette.sh is stopped in output.sette there is written the last command 84 # executed by sette.sh 85 # 86 # example use: ./sette.sh 87 ######################################################################################### 88 # 132 89 # Compiler among those in NEMOGCM/ARCH 133 90 COMPILER=x3750_ADA … … 136 93 export INTERACT_FLAG="no" 137 94 export MPIRUN_FLAG="yes" 138 # IF YOU DON'T WANT TO USE XIOS : (this is a list of keys to be delete) 139 #export KEY_XIOS="key_iomput" 140 # IF YOU WANT TO USE XIOS : 141 export KEY_XIOS="" 142 95 export USING_XIOS="yes" 96 # 97 export DEL_KEYS="key_iomput" 98 if [ ${USING_XIOS} == "yes" ] 99 then 100 export DEL_KEYS="" 101 fi 102 # 103 # Settings which control the use of stand alone servers (only relevant if using xios) 104 # 105 export USING_MPMD="no" 106 export NUM_XIOSERVERS=4 107 export JOB_PREFIX=batch-mpmd 108 # 109 if [ ${USING_MPMD} == "no" ] 110 then 111 export NUM_XIOSERVERS=0 112 export JOB_PREFIX=batch 113 fi 114 # 115 # 116 if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"] 117 then 118 echo "Incompatible choices. MPMD mode requires the XIOS server" 119 exit 120 fi 121 # 143 122 144 123 # Directory to run the tests … … 152 131 # Copy job_batch_COMPILER file for specific compiler into job_batch_template 153 132 cd ${SETTE_DIR} 154 cp BATCH_TEMPLATE/ batch-${COMPILER} job_batch_template || exit133 cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit 155 134 156 135 for config in 1 2 3 4 5 6 7 8 9 10 11 … … 163 142 export TEST_NAME="LONG" 164 143 cd ${CONFIG_DIR} 165 . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 add_key "key_mpp_mpi" del_key ${KEY_XIOS}144 . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 del_key ${DEL_KEYS} 166 145 cd ${SETTE_DIR} 167 146 . param.cfg … … 170 149 JOB_FILE=${EXE_DIR}/run_job.sh 171 150 NPROC=4 172 \rm ${JOB_FILE}151 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 173 152 cd ${EXE_DIR} 174 153 set_namelist namelist_cfg cn_exp \"GYRE_LONG\" … … 181 160 set_namelist namelist_cfg jpnj 2 182 161 set_namelist namelist_cfg jpnij 4 183 cd ${SETTE_DIR} 184 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 162 if [ ${USING_MPMD} == "yes" ] ; then 163 set_xio_using_server iodef.xml true 164 else 165 set_xio_using_server iodef.xml false 166 fi 167 cd ${SETTE_DIR} 168 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 185 169 186 170 cd ${SETTE_DIR} … … 200 184 set_namelist namelist_cfg jpnij 4 201 185 set_namelist namelist_cfg cn_ocerst_in \"GYRE_LONG_00000060_restart\" 186 if [ ${USING_MPMD} == "yes" ] ; then 187 set_xio_using_server iodef.xml true 188 else 189 set_xio_using_server iodef.xml false 190 fi 202 191 for (( i=1; i<=$NPROC; i++)) ; do 203 192 L_NPROC=$(( $i - 1 )) … … 205 194 ln -sf ../LONG/GYRE_LONG_00000060_restart_${L_NPROC}.nc . 206 195 done 207 cd ${SETTE_DIR} 208 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 196 if [ ${USING_MPMD} == "yes" ] ; then 197 set_xio_using_server iodef.xml true 198 else 199 set_xio_using_server iodef.xml false 200 fi 201 cd ${SETTE_DIR} 202 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 209 203 cd ${SETTE_DIR} 210 204 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 215 209 export TEST_NAME="REPRO_1_4" 216 210 cd ${CONFIG_DIR} 217 . ./makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_ mpi key_mpp_rep" del_key ${KEY_XIOS}211 . ./makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 218 212 cd ${SETTE_DIR} 219 213 . param.cfg … … 222 216 JOB_FILE=${EXE_DIR}/run_job.sh 223 217 NPROC=4 224 \rm ${JOB_FILE}218 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 225 219 cd ${EXE_DIR} 226 220 set_namelist namelist_cfg cn_exp \"GYRE_14\" … … 235 229 set_namelist namelist_cfg jpnj 4 236 230 set_namelist namelist_cfg jpnij 4 237 cd ${SETTE_DIR} 238 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 231 if [ ${USING_MPMD} == "yes" ] ; then 232 set_xio_using_server iodef.xml true 233 else 234 set_xio_using_server iodef.xml false 235 fi 236 cd ${SETTE_DIR} 237 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 239 238 cd ${SETTE_DIR} 240 239 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 245 244 JOB_FILE=${EXE_DIR}/run_job.sh 246 245 NPROC=4 247 \rm $JOB_FILE246 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 248 247 cd ${EXE_DIR} 249 248 set_namelist namelist_cfg cn_exp \"GYRE_22\" … … 257 256 set_namelist namelist_cfg jpnj 2 258 257 set_namelist namelist_cfg jpnij 4 259 cd ${SETTE_DIR} 260 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 258 if [ ${USING_MPMD} == "yes" ] ; then 259 set_xio_using_server iodef.xml true 260 else 261 set_xio_using_server iodef.xml false 262 fi 263 cd ${SETTE_DIR} 264 . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 261 265 cd ${SETTE_DIR} 262 266 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 269 273 export TEST_NAME="LONG" 270 274 cd ${CONFIG_DIR} 271 . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi" del_key ${KEY_XIOS}275 . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 del_key ${DEL_KEYS} 272 276 cd ${SETTE_DIR} 273 277 . param.cfg … … 276 280 JOB_FILE=${EXE_DIR}/run_job.sh 277 281 NPROC=4 278 \rm ${JOB_FILE}282 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 279 283 cd ${EXE_DIR} 280 284 set_namelist namelist_cfg cn_exp \"O2LP_LONG\" … … 299 303 set_namelist namelist_pisces_cfg ln_ironsed .false. 300 304 set_namelist namelist_pisces_cfg ln_hydrofe .false. 301 cd ${SETTE_DIR} 302 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 305 if [ ${USING_MPMD} == "yes" ] ; then 306 set_xio_using_server iodef.xml true 307 else 308 set_xio_using_server iodef.xml false 309 fi 310 cd ${SETTE_DIR} 311 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 303 312 304 313 cd ${SETTE_DIR} … … 342 351 ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc . 343 352 done 344 cd ${SETTE_DIR} 345 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 353 if [ ${USING_MPMD} == "yes" ] ; then 354 set_xio_using_server iodef.xml true 355 else 356 set_xio_using_server iodef.xml false 357 fi 358 cd ${SETTE_DIR} 359 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 346 360 cd ${SETTE_DIR} 347 361 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 352 366 export TEST_NAME="REPRO_4_4" 353 367 cd ${CONFIG_DIR} 354 . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_ mpi key_mpp_rep" del_key ${KEY_XIOS}368 . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 355 369 cd ${SETTE_DIR} 356 370 . param.cfg … … 359 373 JOB_FILE=${EXE_DIR}/run_job.sh 360 374 NPROC=16 361 \rm $JOB_FILE375 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 362 376 cd ${EXE_DIR} 363 377 set_namelist namelist_cfg nn_it000 1 … … 384 398 # put ln_pisdmp to false : no restoring to global mean value 385 399 set_namelist namelist_pisces_cfg ln_pisdmp .false. 386 cd ${SETTE_DIR} 387 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 400 if [ ${USING_MPMD} == "yes" ] ; then 401 set_xio_using_server iodef.xml true 402 else 403 set_xio_using_server iodef.xml false 404 fi 405 cd ${SETTE_DIR} 406 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 388 407 cd ${SETTE_DIR} 389 408 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 394 413 JOB_FILE=${EXE_DIR}/run_job.sh 395 414 NPROC=16 396 \rm $JOB_FILE415 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 397 416 cd ${EXE_DIR} 398 417 set_namelist namelist_cfg nn_it000 1 … … 418 437 # put ln_pisdmp to false : no restoring to global mean value 419 438 set_namelist namelist_pisces_cfg ln_pisdmp .false. 420 cd ${SETTE_DIR} 421 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 439 if [ ${USING_MPMD} == "yes" ] ; then 440 set_xio_using_server iodef.xml true 441 else 442 set_xio_using_server iodef.xml false 443 fi 444 cd ${SETTE_DIR} 445 . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 422 446 cd ${SETTE_DIR} 423 447 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 429 453 export TEST_NAME="LONG" 430 454 cd ${CONFIG_DIR} 431 . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_ mpi key_mpp_rep" del_key ${KEY_XIOS}455 . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 432 456 cd ${SETTE_DIR} 433 457 . param.cfg … … 436 460 JOB_FILE=${EXE_DIR}/run_job.sh 437 461 NPROC=4 438 \rm $JOB_FILE462 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 439 463 cd ${EXE_DIR} 440 464 set_namelist namelist_cfg cn_exp \"OFFP_LONG\" … … 460 484 # put ln_pisdmp to false : no restoring to global mean value 461 485 set_namelist namelist_pisces_cfg ln_pisdmp .false. 462 cd ${SETTE_DIR} 463 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 486 if [ ${USING_MPMD} == "yes" ] ; then 487 set_xio_using_server iodef.xml true 488 else 489 set_xio_using_server iodef.xml false 490 fi 491 cd ${SETTE_DIR} 492 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 464 493 465 494 cd ${SETTE_DIR} … … 496 525 # put ln_pisdmp to false : no restoring to global mean value 497 526 set_namelist namelist_pisces_cfg ln_pisdmp .false. 498 cd ${SETTE_DIR} 499 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 527 if [ ${USING_MPMD} == "yes" ] ; then 528 set_xio_using_server iodef.xml true 529 else 530 set_xio_using_server iodef.xml false 531 fi 532 cd ${SETTE_DIR} 533 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 500 534 cd ${SETTE_DIR} 501 535 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 506 540 export TEST_NAME="REPRO_4_4" 507 541 cd ${CONFIG_DIR} 508 . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_ mpi key_mpp_rep" del_key ${KEY_XIOS}542 . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 509 543 cd ${SETTE_DIR} 510 544 . param.cfg … … 513 547 JOB_FILE=${EXE_DIR}/run_job.sh 514 548 NPROC=16 515 \rm $JOB_FILE549 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 516 550 cd ${EXE_DIR} 517 551 set_namelist namelist_cfg nn_it000 1 … … 536 570 # put ln_pisdmp to false : no restoring to global mean value 537 571 set_namelist namelist_pisces_cfg ln_pisdmp .false. 538 cd ${SETTE_DIR} 539 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 572 if [ ${USING_MPMD} == "yes" ] ; then 573 set_xio_using_server iodef.xml true 574 else 575 set_xio_using_server iodef.xml false 576 fi 577 cd ${SETTE_DIR} 578 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 540 579 cd ${SETTE_DIR} 541 580 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 546 585 JOB_FILE=${EXE_DIR}/run_job.sh 547 586 NPROC=16 548 \rm $JOB_FILE587 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 549 588 cd ${EXE_DIR} 550 589 set_namelist namelist_cfg nn_it000 1 … … 569 608 # put ln_pisdmp to false : no restoring to global mean value 570 609 set_namelist namelist_pisces_cfg ln_pisdmp .false. 571 cd ${SETTE_DIR} 572 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 610 if [ ${USING_MPMD} == "yes" ] ; then 611 set_xio_using_server iodef.xml true 612 else 613 set_xio_using_server iodef.xml false 614 fi 615 cd ${SETTE_DIR} 616 . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 573 617 cd ${SETTE_DIR} 574 618 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 580 624 export TEST_NAME="LONG" 581 625 cd ${CONFIG_DIR} 582 . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${ KEY_XIOS}626 . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS} 583 627 cd ${SETTE_DIR} 584 628 . param.cfg … … 587 631 JOB_FILE=${EXE_DIR}/run_job.sh 588 632 NPROC=32 589 \rm $JOB_FILE633 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 590 634 cd ${EXE_DIR} 591 635 set_namelist namelist_cfg nn_it000 1 … … 602 646 set_namelist namelist_cfg jpnj 4 603 647 set_namelist namelist_cfg jpnij 32 604 cd ${SETTE_DIR} 605 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 648 if [ ${USING_MPMD} == "yes" ] ; then 649 set_xio_using_server iodef.xml true 650 else 651 set_xio_using_server iodef.xml false 652 fi 653 cd ${SETTE_DIR} 654 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 606 655 607 656 cd ${SETTE_DIR} … … 627 676 ln -sf ../LONG/AMM12_00000006_restart_oce_out_${L_NPROC}.nc . 628 677 done 629 cd ${SETTE_DIR} 630 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 678 if [ ${USING_MPMD} == "yes" ] ; then 679 set_xio_using_server iodef.xml true 680 else 681 set_xio_using_server iodef.xml false 682 fi 683 cd ${SETTE_DIR} 684 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 631 685 cd ${SETTE_DIR} 632 686 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 637 691 export TEST_NAME="REPRO_8_4" 638 692 cd ${CONFIG_DIR} 639 . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${ KEY_XIOS}693 . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${DEL_KEYS} 640 694 cd ${SETTE_DIR} 641 695 . param.cfg … … 644 698 JOB_FILE=${EXE_DIR}/run_job.sh 645 699 NPROC=32 646 \rm ${JOB_FILE}700 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 647 701 cd ${EXE_DIR} 648 702 set_namelist namelist_cfg nn_it000 1 … … 657 711 set_namelist namelist_cfg jpnj 4 658 712 set_namelist namelist_cfg jpnij 32 659 cd ${SETTE_DIR} 660 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 713 if [ ${USING_MPMD} == "yes" ] ; then 714 set_xio_using_server iodef.xml true 715 else 716 set_xio_using_server iodef.xml false 717 fi 718 cd ${SETTE_DIR} 719 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 661 720 cd ${SETTE_DIR} 662 721 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} … … 677 736 set_namelist namelist_cfg jpnj 8 678 737 set_namelist namelist_cfg jpnij 32 679 cd ${SETTE_DIR} 680 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 681 cd ${SETTE_DIR} 682 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 683 fi 684 685 # TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests) 738 if [ ${USING_MPMD} == "yes" ] ; then 739 set_xio_using_server iodef.xml true 740 else 741 set_xio_using_server iodef.xml false 742 fi 743 cd ${SETTE_DIR} 744 . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 745 cd ${SETTE_DIR} 746 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 747 fi 748 749 750 # TESTS FOR ORCA2_SAS_LIM CONFIGURATION 686 751 if [ ${config} -eq 9 ] ; then 687 ## ORCA2_LIM with Agulhas AGRIF zoom in MPI688 export TEST_NAME="SHORT"689 cd ${CONFIG_DIR}690 . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_mpi key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${KEY_XIOS}691 cd ${SETTE_DIR}692 . param.cfg693 . all_functions.sh694 . prepare_exe_dir.sh695 JOB_FILE=${EXE_DIR}/run_job.sh696 NPROC=2697 \rm ${JOB_FILE}698 cd ${EXE_DIR}699 set_namelist namelist_cfg nn_it000 1700 set_namelist namelist_cfg nn_itend 75701 set_namelist namelist_cfg ln_ctl .false.702 set_namelist namelist_cfg ln_clobber .true.703 set_namelist namelist_cfg jpni 1704 set_namelist namelist_cfg jpnj 2705 set_namelist namelist_cfg jpnij 2706 set_namelist 1_namelist_cfg nn_it000 1707 set_namelist 1_namelist_cfg nn_itend 150708 set_namelist 1_namelist_cfg ln_ctl .false.709 set_namelist 1_namelist_cfg ln_clobber .true.710 cd ${SETTE_DIR}711 . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}712 cd ${SETTE_DIR}713 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}714 fi715 716 # TESTS FOR ORCA2_SAS_LIM CONFIGURATION717 if [ ${config} -eq 10 ] ; then718 752 ## Restartability tests for SAS 719 753 export TEST_NAME="LONG" 720 754 cd ${CONFIG_DIR} 721 . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM -j 8 add_key " " del_key ${KEY_XIOS}755 . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM -j 8 "key_mpp_rep" del_key ${DEL_KEYS} 722 756 cd ${SETTE_DIR} 723 757 . param.cfg … … 737 771 set_namelist namelist_cfg jpnj 4 738 772 set_namelist namelist_cfg jpnij 32 739 cd ${SETTE_DIR} 740 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 773 if [ ${USING_MPMD} == "yes" ] ; then 774 set_xio_using_server iodef.xml true 775 else 776 set_xio_using_server iodef.xml false 777 fi 778 cd ${SETTE_DIR} 779 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 741 780 742 781 cd ${SETTE_DIR} … … 759 798 ln -sf ../LONG/SAS_00000050_restart_${L_NPROC}.nc . 760 799 done 761 cd ${SETTE_DIR} 762 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 763 cd ${SETTE_DIR} 764 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 765 fi 766 767 if [ ${config} -eq 11 ] ; then 800 if [ ${USING_MPMD} == "yes" ] ; then 801 set_xio_using_server iodef.xml true 802 else 803 set_xio_using_server iodef.xml false 804 fi 805 cd ${SETTE_DIR} 806 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 807 cd ${SETTE_DIR} 808 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 809 fi 810 811 if [ ${config} -eq 10 ] ; then 768 812 ## Reproducibility tests for ORCA2_SAS_LIM 769 813 export TEST_NAME="REPRO_8_4" 770 814 cd ${CONFIG_DIR} 771 . ./makenemo -m ${CMP_NAM} -n SAS_32 -r ORCA2_SAS_LIM -j 8 add_key " " del_key ${KEY_XIOS}815 . ./makenemo -m ${CMP_NAM} -n SAS_32 -r ORCA2_SAS_LIM -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 772 816 cd ${SETTE_DIR} 773 817 . param.cfg … … 786 830 set_namelist namelist_cfg jpnj 4 787 831 set_namelist namelist_cfg jpnij 32 788 cd ${SETTE_DIR} 789 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 790 cd ${SETTE_DIR} 791 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 792 832 if [ ${USING_MPMD} == "yes" ] ; then 833 set_xio_using_server iodef.xml true 834 else 835 set_xio_using_server iodef.xml false 836 fi 837 cd ${SETTE_DIR} 838 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 839 cd ${SETTE_DIR} 840 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 793 841 cd ${SETTE_DIR} 794 842 export TEST_NAME="REPRO_4_8" … … 803 851 set_namelist namelist_cfg jpnj 8 804 852 set_namelist namelist_cfg jpnij 32 805 cd ${SETTE_DIR} 806 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 807 cd ${SETTE_DIR} 808 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 809 fi 853 if [ ${USING_MPMD} == "yes" ] ; then 854 set_xio_using_server iodef.xml true 855 else 856 set_xio_using_server iodef.xml false 857 fi 858 cd ${SETTE_DIR} 859 . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 860 cd ${SETTE_DIR} 861 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 862 fi 863 864 # TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests) 865 if [ ${config} -eq 11 ] ; then 866 ## ORCA2_LIM with Agulhas AGRIF zoom in MPI 867 export TEST_NAME="SHORT" 868 cd ${CONFIG_DIR} 869 . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS} 870 cd ${SETTE_DIR} 871 . param.cfg 872 . all_functions.sh 873 . prepare_exe_dir.sh 874 JOB_FILE=${EXE_DIR}/run_job.sh 875 NPROC=2 876 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 877 cd ${EXE_DIR} 878 set_namelist namelist_cfg nn_it000 1 879 set_namelist namelist_cfg nn_itend 75 880 set_namelist namelist_cfg ln_ctl .false. 881 set_namelist namelist_cfg ln_clobber .true. 882 set_namelist namelist_cfg jpni 1 883 set_namelist namelist_cfg jpnj 2 884 set_namelist namelist_cfg jpnij 2 885 set_namelist 1_namelist_cfg nn_it000 1 886 set_namelist 1_namelist_cfg nn_itend 150 887 set_namelist 1_namelist_cfg ln_ctl .false. 888 set_namelist 1_namelist_cfg ln_clobber .true. 889 if [ ${USING_MPMD} == "yes" ] ; then 890 set_xio_using_server iodef.xml true 891 else 892 set_xio_using_server iodef.xml false 893 fi 894 cd ${SETTE_DIR} 895 . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 896 cd ${SETTE_DIR} 897 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 898 fi 899 810 900 811 901 done
Note: See TracChangeset
for help on using the changeset viewer.