Commit eb3930d28a442505358faa6b1a7ff38c4ecf2173

Authored by dumoda01
1 parent 66a36157
Exists in master and in 1 other branch snow

Ecriture dun fichier se sortie pour les simulations en batch

src/extras/bio/bio_fasham.F90
... ... @@ -38,6 +38,7 @@
38 38 ! !USES:
39 39 ! default: all is private.
40 40 use bio_var
  41 + use output
41 42 private
42 43 !
43 44 ! !PUBLIC MEMBER FUNCTIONS:
... ... @@ -115,11 +116,8 @@
115 116 REALTYPE :: b0 = 0.0
116 117 REALTYPE :: vp = 1.5
117 118 REALTYPE :: alpha = 0.065
118   -!CHG1 Intensité optimale (I_opt))
119 119 REALTYPE :: I_opt = 10.0
120   -!CHG1 Paramere d'inibition (inib)
121 120 REALTYPE :: inib = 0.05
122   -!CHG2 Paramere de flottaison du phytoplancton
123 121 REALTYPE :: theta = 0.0
124 122 REALTYPE :: w_pmin = -0.06
125 123 REALTYPE :: w_pmax = -0.38
... ... @@ -174,6 +172,7 @@
174 172 ! !INPUT PARAMETERS:
175 173 integer, intent(in) :: namlst
176 174 character(len=*), intent(in) :: fname
  175 + character(len=20) :: pfile
177 176 integer, intent(in) :: unit
178 177 !
179 178 ! !REVISION HISTORY:
... ... @@ -199,20 +198,35 @@
199 198 numcc=numc
200 199  
201 200 ! Print some parameter values in standard output
202   - LEVEL3 'FASHAM parameters ...'
  201 +! and save them in a separate file [out_fn]_fasham.par
  202 + pfile = trim(out_fn) // '_fasham.par'
  203 + open(10,status='unknown',action='write',file=pfile)
  204 + LEVEL3 'FASHAM parameters saved in ', pfile
203 205 write(*,900) ' vp = ',vp
  206 + write(10,901) vp
204 207 write(*,900) ' alpha = ',alpha
  208 + write(10,901) alpha
205 209 write(*,900) ' inib = ',inib
  210 + write(10,901) inib
206 211 write(*,900) ' k1 = ',k1
  212 + write(10,901) k1
207 213 write(*,900) ' k2 = ',k2
  214 + write(10,901) k2
208 215 write(*,900) ' w_p = ',w_p
  216 + write(10,901) w_p
209 217 write(*,900) ' theta = ',theta
  218 + write(10,901) theta
210 219 write(*,900) ' w_pmin = ',w_pmin
  220 + write(10,901) w_pmin
211 221 write(*,900) ' w_pmax = ',w_pmax
  222 + write(10,901) w_pmax
212 223 write(*,900) ' aa = ',aa
  224 + write(10,901) aa
213 225 write(*,900) ' g2 = ',g2
  226 + write(10,901) g2
214 227  
215   -900 format (A,F8.5)
  228 +900 format (a,f8.5)
  229 +901 format (f8.5)
216 230  
217 231 ! Conversion from day to second
218 232 vp = vp /secs_pr_day
... ...
src/extras/bio/bio_npzd.F90
... ... @@ -26,6 +26,7 @@
26 26 ! !USES:
27 27 ! default: all is private.
28 28 use bio_var
  29 + use output
29 30 private
30 31 !
31 32 ! !PUBLIC MEMBER FUNCTIONS:
... ... @@ -136,6 +137,7 @@
136 137 ! !INPUT PARAMETERS:
137 138 integer, intent(in) :: namlst
138 139 character(len=*), intent(in) :: fname
  140 + character(len=20) :: pfile
139 141 integer, intent(in) :: unit
140 142 !
141 143 ! !REVISION HISTORY:
... ... @@ -160,16 +162,27 @@
160 162 numcc=numc
161 163  
162 164 ! Print some parameter values in standard output
163   - LEVEL3 'NPZD parameters ...'
  165 +! and save them in a separate file [out_fn]_npzd.par
  166 + pfile = trim(out_fn) // '_npzd.par'
  167 + open(11,status='unknown',action='write',file=pfile)
  168 + LEVEL3 'NPZD parameters saved in ', pfile
164 169 write(*,900) ' rmax = ',rmax
  170 + write(11,901) rmax
165 171 write(*,900) ' iv = ',iv
  172 + write(11,901) iv
166 173 write(*,900) ' alpha = ',alpha
  174 + write(11,901) alpha
167 175 write(*,900) ' inib = ',inib
  176 + write(11,901) inib
168 177 write(*,900) ' k1 = ',k1
  178 + write(11,901) k1
169 179 write(*,900) ' aa = ',aa
  180 + write(11,901) aa
170 181 write(*,900) ' g2 = ',g2
  182 + write(11,901) g2
171 183  
172   -900 format (A,F8.5)
  184 +900 format (a,f8.5)
  185 +901 format (f8.5)
173 186  
174 187 ! Conversion from day to second
175 188 rpn = rpn /secs_pr_day
... ...