73 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
74 |
#include "SIZE.h" |
#include "SIZE.h" |
75 |
|
|
76 |
#include "ecco.h" |
cdfer#include "ecco.h" |
77 |
#include "ctrl.h" |
#include "ctrl.h" |
78 |
#include "optim.h" |
#include "optim.h" |
79 |
#include "minimization.h" |
#include "minimization.h" |
107 |
c == external == |
c == external == |
108 |
|
|
109 |
integer ilnblnk |
integer ilnblnk |
|
external ilnblnk |
|
110 |
|
|
111 |
c == end of interface == |
c == end of interface == |
112 |
|
|
113 |
namelist /CTRL_NML/ |
namelist /CTRL_NML/ |
114 |
& xx_theta_file, |
& xx_theta_file, xx_salt_file, |
115 |
& xx_salt_file, |
& xx_hflux_file, xx_hflux_remo_intercept, xx_hflux_remo_slope, |
|
& xx_hflux_file, |
|
116 |
& xx_hfluxstartdate1, xx_hfluxstartdate2, xx_hfluxperiod, |
& xx_hfluxstartdate1, xx_hfluxstartdate2, xx_hfluxperiod, |
117 |
& xx_sflux_file, |
& xx_sflux_file, xx_sflux_remo_intercept, xx_sflux_remo_slope, |
118 |
& xx_sfluxstartdate1, xx_sfluxstartdate2, xx_sfluxperiod, |
& xx_sfluxstartdate1, xx_sfluxstartdate2, xx_sfluxperiod, |
119 |
& xx_tauu_file, |
& xx_tauu_file, xx_tauu_remo_intercept, xx_tauu_remo_slope, |
120 |
& xx_tauustartdate1, xx_tauustartdate2, xx_tauuperiod, |
& xx_tauustartdate1, xx_tauustartdate2, xx_tauuperiod, |
121 |
& xx_tauv_file, |
& xx_tauv_file, xx_tauv_remo_intercept, xx_tauv_remo_slope, |
122 |
& xx_tauvstartdate1, xx_tauvstartdate2, xx_tauvperiod, |
& xx_tauvstartdate1, xx_tauvstartdate2, xx_tauvperiod, |
123 |
& xx_atemp_file, |
& xx_atemp_file, xx_atemp_remo_intercept, xx_atemp_remo_slope, |
124 |
& xx_atempstartdate1, xx_atempstartdate2, xx_atempperiod, |
& xx_atempstartdate1, xx_atempstartdate2, xx_atempperiod, |
125 |
& xx_aqh_file, |
& xx_aqh_file, xx_aqh_remo_intercept, xx_aqh_remo_slope, |
126 |
& xx_aqhstartdate1, xx_aqhstartdate2, xx_aqhperiod, |
& xx_aqhstartdate1, xx_aqhstartdate2, xx_aqhperiod, |
127 |
& xx_uwind_file, |
& xx_precip_file, xx_precip_remo_intercept, xx_precip_remo_slope, |
128 |
|
& xx_precipstartdate1, xx_precipstartdate2, xx_precipperiod, |
129 |
|
& xx_swflux_file, xx_swflux_remo_intercept, xx_swflux_remo_slope, |
130 |
|
& xx_swfluxstartdate1, xx_swfluxstartdate2, xx_swfluxperiod, |
131 |
|
& xx_swdown_file, xx_swdown_remo_intercept, xx_swdown_remo_slope, |
132 |
|
& xx_swdownstartdate1, xx_swdownstartdate2, xx_swdownperiod, |
133 |
|
& xx_lwflux_file, xx_lwflux_remo_intercept, xx_lwflux_remo_slope, |
134 |
|
& xx_lwfluxstartdate1, xx_lwfluxstartdate2, xx_lwfluxperiod, |
135 |
|
& xx_lwdown_file, xx_lwdown_remo_intercept, xx_lwdown_remo_slope, |
136 |
|
& xx_lwdownstartdate1, xx_lwdownstartdate2, xx_lwdownperiod, |
137 |
|
& xx_evap_file, xx_evap_remo_intercept, xx_evap_remo_slope, |
138 |
|
& xx_evapstartdate1, xx_evapstartdate2, xx_evapperiod, |
139 |
|
& xx_snowprecip_file, xx_snowprecip_remo_intercept, |
140 |
|
& xx_snowprecip_remo_slope, xx_snowprecipperiod, |
141 |
|
& xx_snowprecipstartdate1, xx_snowprecipstartdate2, |
142 |
|
& xx_apressure_file, xx_apressure_remo_intercept, |
143 |
|
& xx_apressure_remo_slope, xx_apressureperiod, |
144 |
|
& xx_apressurestartdate1, xx_apressurestartdate2, |
145 |
|
& xx_runoff_file, xx_runoff_remo_intercept, xx_runoff_remo_slope, |
146 |
|
& xx_runoffstartdate1, xx_runoffstartdate2, xx_runoffperiod, |
147 |
|
& xx_uwind_file, xx_uwind_remo_intercept, xx_uwind_remo_slope, |
148 |
& xx_uwindstartdate1, xx_uwindstartdate2, xx_uwindperiod, |
& xx_uwindstartdate1, xx_uwindstartdate2, xx_uwindperiod, |
149 |
& xx_vwind_file, |
& xx_vwind_file, xx_vwind_remo_intercept, xx_vwind_remo_slope, |
150 |
& xx_vwindstartdate1, xx_vwindstartdate2, xx_vwindperiod, |
& xx_vwindstartdate1, xx_vwindstartdate2, xx_vwindperiod, |
151 |
& xx_obcsn_file, |
& xx_obcsn_file, xx_obcss_file, xx_obcsw_file, xx_obcse_file, |
152 |
& xx_obcsnstartdate1, xx_obcsnstartdate2, xx_obcsnperiod, |
& xx_obcsnstartdate1, xx_obcsnstartdate2, xx_obcsnperiod, |
|
& xx_obcss_file, |
|
153 |
& xx_obcssstartdate1, xx_obcssstartdate2, xx_obcssperiod, |
& xx_obcssstartdate1, xx_obcssstartdate2, xx_obcssperiod, |
|
& xx_obcsw_file, |
|
154 |
& xx_obcswstartdate1, xx_obcswstartdate2, xx_obcswperiod, |
& xx_obcswstartdate1, xx_obcswstartdate2, xx_obcswperiod, |
|
& xx_obcse_file, |
|
155 |
& xx_obcsestartdate1, xx_obcsestartdate2, xx_obcseperiod, |
& xx_obcsestartdate1, xx_obcsestartdate2, xx_obcseperiod, |
156 |
& xx_diffkr_file, |
& xx_diffkr_file, xx_kapgm_file, xx_tr1_file, |
157 |
& xx_kapgm_file, |
& xx_sst_file, xx_sss_file, |
158 |
& xx_tr1_file, |
& xx_sststartdate1, xx_sststartdate2, xx_sstperiod, |
159 |
& xx_sst_file, |
& xx_sssstartdate1, xx_sssstartdate2, xx_sssperiod, |
160 |
& xx_sss_file, |
& xx_depth_file, xx_efluxy_file, xx_efluxp_file, |
161 |
& xx_hfacc_file, |
& xx_bottomdrag_file, xx_edtaux_file, xx_edtauy_file, |
162 |
& xx_efluxy_file, |
& xx_uvel_file, xx_vvel_file, xx_etan_file, |
163 |
& xx_efluxp_file, |
& doInitXX, doPackDiag, doZscaleUnpack, doZscalePack, |
164 |
& xx_bottomdrag_file, |
& doMainUnpack, doMainPack, doAdmtlmBypassAD, delZexp |
165 |
& doInitXX |
cdfer |
166 |
|
& ,xx_hfluxm_file |
167 |
|
cdfer |
168 |
|
|
169 |
namelist /CTRL_PACKNAMES/ |
namelist /CTRL_PACKNAMES/ |
170 |
& yadmark, |
& yadmark, yctrlid, yctrlposunpack, yctrlpospack, |
171 |
& ctrlname, costname, scalname, maskname, metaname |
& ctrlname, costname, scalname, maskname, metaname |
172 |
|
|
173 |
namelist /ECCO_PARMS/ |
namelist /OPTIM/ |
|
& expId |
|
|
|
|
|
namelist /ECCO_OPTIM/ |
|
174 |
& optimcycle, |
& optimcycle, |
175 |
& numiter, nfunc, fmin, iprint, |
& numiter, nfunc, fmin, iprint, |
176 |
& epsf, epsx, epsg, |
& epsf, epsx, epsg, |
188 |
eps = -1.e-6 |
eps = -1.e-6 |
189 |
nupdate = 1 |
nupdate = 1 |
190 |
ff = 0. |
ff = 0. |
191 |
expId = 'MIT_CE_000' |
cdfer expId = 'MIT_CE_000' |
192 |
|
yctrlid = 'MIT_CE_000' |
193 |
|
|
194 |
modeldataunit = 14 |
modeldataunit = 14 |
195 |
scrunit1 = 11 |
scrunit1 = 11 |
196 |
|
|
|
c-- Read ecco parameters from file. |
|
|
open(unit=scrunit1,status='scratch') |
|
|
|
|
|
open(unit = modeldataunit,file = 'data.ecco', |
|
|
& status = 'old', iostat = errio) |
|
|
if ( errio .lt. 0 ) then |
|
|
stop ' stopped in optim_numbmod' |
|
|
endif |
|
|
|
|
|
do while ( .true. ) |
|
|
read(modeldataunit, fmt='(a)', end=20) record |
|
|
il = max(ilnblnk(record),1) |
|
|
if ( record(1:1) .ne. commentcharacter ) |
|
|
& write(unit=scrunit1, fmt='(a)') record(:il) |
|
|
enddo |
|
|
20 continue |
|
|
close( modeldataunit ) |
|
|
|
|
|
rewind( scrunit1 ) |
|
|
read(unit = scrunit1, nml = ecco_parms) |
|
|
close( scrunit1 ) |
|
|
print*, ' OPTIM_NUMBMOD: ECCO options have been read.' |
|
|
|
|
197 |
c-- Read control parameters from file. |
c-- Read control parameters from file. |
198 |
open(unit=scrunit1,status='scratch') |
open(unit=scrunit1,status='scratch') |
199 |
|
|
218 |
close( scrunit1 ) |
close( scrunit1 ) |
219 |
print*, ' OPTIM_NUMBMOD: Control options have been read.' |
print*, ' OPTIM_NUMBMOD: Control options have been read.' |
220 |
|
|
221 |
|
cph( |
222 |
|
cdfer expId = yctrlid |
223 |
|
cph) |
224 |
|
|
225 |
c-- Read optimization parameters from file. |
c-- Read optimization parameters from file. |
226 |
open(unit=scrunit1,status='scratch') |
open(unit=scrunit1,status='scratch') |
227 |
|
|
241 |
close( modeldataunit ) |
close( modeldataunit ) |
242 |
|
|
243 |
rewind( scrunit1 ) |
rewind( scrunit1 ) |
244 |
read(unit = scrunit1, nml = ecco_optim) |
read(unit = scrunit1, nml = optim) |
245 |
close( scrunit1 ) |
close( scrunit1 ) |
246 |
print*, ' OPTIM_NUMBMOD: Minimization options have been read.' |
print*, ' OPTIM_NUMBMOD: Minimization options have been read.' |
247 |
|
|