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,6 +38,7 @@
38 ! !USES: 38 ! !USES:
39 ! default: all is private. 39 ! default: all is private.
40 use bio_var 40 use bio_var
  41 + use output
41 private 42 private
42 ! 43 !
43 ! !PUBLIC MEMBER FUNCTIONS: 44 ! !PUBLIC MEMBER FUNCTIONS:
@@ -115,11 +116,8 @@ @@ -115,11 +116,8 @@
115 REALTYPE :: b0 = 0.0 116 REALTYPE :: b0 = 0.0
116 REALTYPE :: vp = 1.5 117 REALTYPE :: vp = 1.5
117 REALTYPE :: alpha = 0.065 118 REALTYPE :: alpha = 0.065
118 -!CHG1 Intensité optimale (I_opt))  
119 REALTYPE :: I_opt = 10.0 119 REALTYPE :: I_opt = 10.0
120 -!CHG1 Paramere d'inibition (inib)  
121 REALTYPE :: inib = 0.05 120 REALTYPE :: inib = 0.05
122 -!CHG2 Paramere de flottaison du phytoplancton  
123 REALTYPE :: theta = 0.0 121 REALTYPE :: theta = 0.0
124 REALTYPE :: w_pmin = -0.06 122 REALTYPE :: w_pmin = -0.06
125 REALTYPE :: w_pmax = -0.38 123 REALTYPE :: w_pmax = -0.38
@@ -174,6 +172,7 @@ @@ -174,6 +172,7 @@
174 ! !INPUT PARAMETERS: 172 ! !INPUT PARAMETERS:
175 integer, intent(in) :: namlst 173 integer, intent(in) :: namlst
176 character(len=*), intent(in) :: fname 174 character(len=*), intent(in) :: fname
  175 + character(len=20) :: pfile
177 integer, intent(in) :: unit 176 integer, intent(in) :: unit
178 ! 177 !
179 ! !REVISION HISTORY: 178 ! !REVISION HISTORY:
@@ -199,20 +198,35 @@ @@ -199,20 +198,35 @@
199 numcc=numc 198 numcc=numc
200 199
201 ! Print some parameter values in standard output 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 write(*,900) ' vp = ',vp 205 write(*,900) ' vp = ',vp
  206 + write(10,901) vp
204 write(*,900) ' alpha = ',alpha 207 write(*,900) ' alpha = ',alpha
  208 + write(10,901) alpha
205 write(*,900) ' inib = ',inib 209 write(*,900) ' inib = ',inib
  210 + write(10,901) inib
206 write(*,900) ' k1 = ',k1 211 write(*,900) ' k1 = ',k1
  212 + write(10,901) k1
207 write(*,900) ' k2 = ',k2 213 write(*,900) ' k2 = ',k2
  214 + write(10,901) k2
208 write(*,900) ' w_p = ',w_p 215 write(*,900) ' w_p = ',w_p
  216 + write(10,901) w_p
209 write(*,900) ' theta = ',theta 217 write(*,900) ' theta = ',theta
  218 + write(10,901) theta
210 write(*,900) ' w_pmin = ',w_pmin 219 write(*,900) ' w_pmin = ',w_pmin
  220 + write(10,901) w_pmin
211 write(*,900) ' w_pmax = ',w_pmax 221 write(*,900) ' w_pmax = ',w_pmax
  222 + write(10,901) w_pmax
212 write(*,900) ' aa = ',aa 223 write(*,900) ' aa = ',aa
  224 + write(10,901) aa
213 write(*,900) ' g2 = ',g2 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 ! Conversion from day to second 231 ! Conversion from day to second
218 vp = vp /secs_pr_day 232 vp = vp /secs_pr_day
src/extras/bio/bio_npzd.F90
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
26 ! !USES: 26 ! !USES:
27 ! default: all is private. 27 ! default: all is private.
28 use bio_var 28 use bio_var
  29 + use output
29 private 30 private
30 ! 31 !
31 ! !PUBLIC MEMBER FUNCTIONS: 32 ! !PUBLIC MEMBER FUNCTIONS:
@@ -136,6 +137,7 @@ @@ -136,6 +137,7 @@
136 ! !INPUT PARAMETERS: 137 ! !INPUT PARAMETERS:
137 integer, intent(in) :: namlst 138 integer, intent(in) :: namlst
138 character(len=*), intent(in) :: fname 139 character(len=*), intent(in) :: fname
  140 + character(len=20) :: pfile
139 integer, intent(in) :: unit 141 integer, intent(in) :: unit
140 ! 142 !
141 ! !REVISION HISTORY: 143 ! !REVISION HISTORY:
@@ -160,16 +162,27 @@ @@ -160,16 +162,27 @@
160 numcc=numc 162 numcc=numc
161 163
162 ! Print some parameter values in standard output 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 write(*,900) ' rmax = ',rmax 169 write(*,900) ' rmax = ',rmax
  170 + write(11,901) rmax
165 write(*,900) ' iv = ',iv 171 write(*,900) ' iv = ',iv
  172 + write(11,901) iv
166 write(*,900) ' alpha = ',alpha 173 write(*,900) ' alpha = ',alpha
  174 + write(11,901) alpha
167 write(*,900) ' inib = ',inib 175 write(*,900) ' inib = ',inib
  176 + write(11,901) inib
168 write(*,900) ' k1 = ',k1 177 write(*,900) ' k1 = ',k1
  178 + write(11,901) k1
169 write(*,900) ' aa = ',aa 179 write(*,900) ' aa = ',aa
  180 + write(11,901) aa
170 write(*,900) ' g2 = ',g2 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 ! Conversion from day to second 187 ! Conversion from day to second
175 rpn = rpn /secs_pr_day 188 rpn = rpn /secs_pr_day