Oasis3 4.0.2
|
00001 SUBROUTINE inilun 00002 C**** 00003 C ***************************** 00004 C * OASIS ROUTINE - LEVEL 0 * 00005 C * ------------- ------- * 00006 C ***************************** 00007 C 00008 C**** *inilun* - Initialize logical unit numbers 00009 C 00010 C Purpose: 00011 C ------- 00012 C Creates and prints logical unit numbers used to deal with 00013 C grids, masks and surfaces files as well as anais-related files 00014 C 00015 C** Interface: 00016 C --------- 00017 C *CALL* *inilun* 00018 C 00019 C Input: 00020 C ----- 00021 C None 00022 C 00023 C Output: 00024 C ------ 00025 C None 00026 C 00027 C Workspace: 00028 C --------- 00029 C None 00030 C 00031 C Externals: 00032 C --------- 00033 C None 00034 C 00035 C Reference: 00036 C --------- 00037 C See OASIS manual (1995) 00038 C 00039 C History: 00040 C ------- 00041 C Version Programmer Date Description 00042 C ------- ---------- ---- ----------- 00043 C 1.0 L. Terray 94/01/01 created 00044 C 2.0 L. Terray 95/08/23 modified: new structure 00045 C 2.2 L. Terray 97/10/10 added: unit nudum for SVIPC 00046 C 2.3 S. Valcke 99/03/30 added: unit nulgn for NINENN 00047 C 2.3 S. Valcke 99/04/30 added: printing levels 00048 C 00049 C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00050 C 00051 C* ---------------- Include files and USE of modules--------------------------- 00052 C 00053 USE mod_unit 00054 USE mod_parameter 00055 USE mod_string 00056 USE mod_printing 00057 USE mod_hardware 00058 C 00059 C* ---------------------------- Poema verses ---------------------------- 00060 C 00061 C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00062 C 00063 C* 1. Assign unit numbers and initialize comlun 00064 C ----------------------------------------- 00065 C 00066 C* First we open output file for coupler 00067 C 00068 IF (nlogprt .GE. 2) THEN 00069 WRITE (UNIT = nulou,FMT = *)' ' 00070 WRITE (UNIT = nulou,FMT = *)' ROUTINE inilun - Level 0' 00071 WRITE (UNIT = nulou,FMT = *)' ************** *******' 00072 WRITE (UNIT = nulou,FMT = *)' ' 00073 WRITE (UNIT = nulou,FMT = *)' Set up logical unit numbers' 00074 WRITE (UNIT = nulou,FMT = *)' ' 00075 CALL FLUSH(nulou) 00076 ENDIF 00077 C 00078 C* If there is no field going through Oasis then assign only the 00079 C trace FILE unit for CLIM 00080 IF (.not. lg_oasis_field) THEN 00081 nultr = 7 00082 IF (nlogprt .GE. 1) 00083 $ WRITE (UNIT = nulou,FMT = *)'Trace file unit for CLIM :', 00084 $ nultr 00085 ELSE 00086 C* Grids file 00087 nulgr = 11 00088 C* Masks file 00089 nulma = 12 00090 C* Surfaces file 00091 nulsu = 13 00092 C* File for reduced grid masks 00093 nulrd = 14 00094 C* Trace file for CLIM and PVM 00095 nultr = 7 00096 C* Output file for ANAIS interpolation 00097 nulan = 8 00098 C* Dummy file for SVIPC library 00099 nudum = 9 00100 C* Anaism weights file 00101 nulcc = 16 00102 C* Anaisg weights file 00103 nulgg = 17 00104 C* NINENN weight and address file 00105 nulgn = 18 00106 C 00107 C 00108 C* 2. Print comlun 00109 C ------------ 00110 C 00111 IF (nlogprt .GE. 1) THEN 00112 WRITE (UNIT = nulou,FMT = 00113 '( $ '' nulin ='',i3,'' nulou =' 00114 ',i3, $ '' nulgr ='',i3,'' nulma =' 00115 ',i3, $ '' nulsu ='',i3,'' nultr =' 00116 ',i3, $ '' nulcc ='',i3,'' nulgg ='',i3,'' nulgn =' 00117 ',i3, $ '' nulan ='',i3,'' nulrd ='',i3,'' nudum ='',i3,/)') 00118 $ nulin, nulou, nulgr, nulma, nulsu, 00119 $ nultr, nulcc, nulgg, nulgn, nulan, nulrd, nudum 00120 ENDIF 00121 C 00122 C 00123 C 00124 C* 3. Assign unit numbers to input and output binary files 00125 C ---------------------------------------------------- 00126 C 00127 nluinp(1)=21 00128 DO 310 jf = 2, ig_nfield 00129 isamefic=0 00130 DO 320 jj = 1, jf-1 00131 IF (cficinp(jf) .eq. cficinp(jj)) THEN 00132 isamefic=1 00133 nluinp(jf) = nluinp(jj) 00134 ENDIF 00135 320 CONTINUE 00136 IF (isamefic .lt. 1) nluinp(jf) = 20 + jf 00137 310 CONTINUE 00138 C 00139 C* For PIPE technique only 00140 C 00141 IF (cchan. eq. 'PIPE' .or. cchan. eq. 'NONE') THEN 00142 nluout(1)=21 + ig_nfield 00143 DO 330 jf = 2, ig_nfield 00144 DO 340 jj = 1, jf-1 00145 IF(cficout(jf) .eq. cficout(jj)) THEN 00146 nluout(jf) = nluout(jj) 00147 ELSE 00148 nluout(jf) = 20 + ig_nfield + jf 00149 ENDIF 00150 340 CONTINUE 00151 330 CONTINUE 00152 ENDIF 00153 ENDIF 00154 C 00155 C* 4. End of routine 00156 C -------------- 00157 C 00158 IF (nlogprt .GE. 2) THEN 00159 WRITE (UNIT = nulou,FMT = *) ' ' 00160 WRITE (UNIT = nulou,FMT = *) 00161 $ ' --------- End of ROUTINE inilun ---------' 00162 CALL FLUSH (nulou) 00163 ENDIF 00164 RETURN 00165 END 00166 00167 00168 00169 00170 00171