| 1 |
mmazloff |
1.1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_cost_driver.F,v 1.10 2010/02/15 23:57:57 jmc Exp $ |
| 2 |
|
|
C $Name: $ |
| 3 |
|
|
|
| 4 |
|
|
#include "SEAICE_OPTIONS.h" |
| 5 |
|
|
|
| 6 |
|
|
subroutine seaice_cost_driver( myiter, mytime, mythid ) |
| 7 |
|
|
|
| 8 |
|
|
c ================================================================== |
| 9 |
|
|
c SUBROUTINE seaice_cost_driver |
| 10 |
|
|
c ================================================================== |
| 11 |
|
|
c |
| 12 |
|
|
c o Evaluate cost function contributions of |
| 13 |
|
|
c seaice observations |
| 14 |
|
|
c |
| 15 |
|
|
c ================================================================== |
| 16 |
|
|
c SUBROUTINE seaice_cost_driver |
| 17 |
|
|
c ================================================================== |
| 18 |
|
|
|
| 19 |
|
|
implicit none |
| 20 |
|
|
|
| 21 |
|
|
c == global variables == |
| 22 |
|
|
#include "EEPARAMS.h" |
| 23 |
|
|
#include "SIZE.h" |
| 24 |
|
|
#include "PARAMS.h" |
| 25 |
|
|
#include "GRID.h" |
| 26 |
|
|
|
| 27 |
|
|
#ifdef ALLOW_CAL |
| 28 |
|
|
# include "cal.h" |
| 29 |
|
|
#endif |
| 30 |
|
|
#ifdef ALLOW_COST |
| 31 |
|
|
# include "ctrl.h" |
| 32 |
|
|
# include "ctrl_dummy.h" |
| 33 |
|
|
# ifdef ALLOW_ECCO |
| 34 |
|
|
# include "ecco_cost.h" |
| 35 |
|
|
# endif |
| 36 |
|
|
# include "SEAICE_COST.h" |
| 37 |
|
|
#endif |
| 38 |
|
|
|
| 39 |
|
|
c == routine arguments == |
| 40 |
|
|
|
| 41 |
|
|
integer myiter |
| 42 |
|
|
_RL mytime |
| 43 |
|
|
integer mythid |
| 44 |
|
|
|
| 45 |
|
|
#ifdef ALLOW_ECCO |
| 46 |
|
|
c == local variables == |
| 47 |
|
|
character*(max_len_mbuf) msgbuf |
| 48 |
|
|
|
| 49 |
|
|
integer nnzbar |
| 50 |
|
|
integer nnzobs |
| 51 |
|
|
integer nrecloc |
| 52 |
|
|
_RL spminloc |
| 53 |
|
|
_RL spmaxloc |
| 54 |
|
|
_RL spzeroloc |
| 55 |
|
|
_RL localperiod |
| 56 |
|
|
|
| 57 |
|
|
c == end of interface == |
| 58 |
|
|
|
| 59 |
|
|
cph if (useSEAICE) then |
| 60 |
|
|
|
| 61 |
|
|
#ifdef ALLOW_SEAICE_COST_SMR_AREA |
| 62 |
|
|
|
| 63 |
|
|
# ifndef ALLOW_SEAICE_COST_AREASST |
| 64 |
|
|
|
| 65 |
|
|
write(msgbuf,'(a)') 'ph-cost call cost_smrarea' |
| 66 |
|
|
call print_message( msgbuf, standardmessageunit, |
| 67 |
|
|
& SQUEEZE_RIGHT , mythid) |
| 68 |
|
|
nnzbar = 1 |
| 69 |
|
|
nnzobs = 1 |
| 70 |
|
|
cph( |
| 71 |
|
|
nrecloc = ndaysrec |
| 72 |
|
|
cph hard-coding for ECCO |
| 73 |
|
|
cph nrecloc = 4383 |
| 74 |
|
|
cph) |
| 75 |
|
|
spminloc = 0. |
| 76 |
|
|
spmaxloc = 1. |
| 77 |
|
|
spzeroloc = -9999. |
| 78 |
|
|
localperiod = 86400. |
| 79 |
|
|
call cost_generic( |
| 80 |
|
|
& nnzbar, smrareabarfile, smrareabar, xx_smrareabar_mean_dummy, |
| 81 |
|
|
& nnzobs, smrareadatfile, mult_smrarea, |
| 82 |
|
|
& nrecloc, modelstartdate, localperiod, |
| 83 |
|
|
& 'C', wsmrarea, |
| 84 |
|
|
& spminloc, spmaxloc, spzeroloc, |
| 85 |
|
|
& objf_smrarea, num_smrarea, |
| 86 |
|
|
& myiter, mytime, mythid ) |
| 87 |
|
|
|
| 88 |
|
|
write(msgbuf,'(a,1P2E18.10)') |
| 89 |
|
|
& 'ph-cost smrarea ', objf_smrarea(1,1), num_smrarea(1,1) |
| 90 |
|
|
call print_message( msgbuf, standardmessageunit, |
| 91 |
|
|
& SQUEEZE_RIGHT , mythid) |
| 92 |
|
|
|
| 93 |
|
|
# endif /* ALLOW_SEAICE_COST_AREASST */ |
| 94 |
|
|
|
| 95 |
|
|
CMM( |
| 96 |
|
|
# endif |
| 97 |
|
|
# ifdef ALLOW_SEAICE_COST_AREASST |
| 98 |
|
|
|
| 99 |
|
|
write(msgbuf,'(a)') 'mm-cost call seaice_cost_areasst' |
| 100 |
|
|
call print_message( msgbuf, standardmessageunit, |
| 101 |
|
|
& SQUEEZE_RIGHT , mythid) |
| 102 |
|
|
nnzbar = 1 |
| 103 |
|
|
nnzobs = 1 |
| 104 |
|
|
cph( |
| 105 |
|
|
nrecloc = ndaysrec |
| 106 |
|
|
cph hard-coding for ECCO |
| 107 |
|
|
cph nrecloc = 4383 |
| 108 |
|
|
cph) |
| 109 |
|
|
spminloc = 0. |
| 110 |
|
|
spmaxloc = 1. |
| 111 |
|
|
spzeroloc = -9999. |
| 112 |
|
|
localperiod = 86400. |
| 113 |
|
|
call seaice_cost_areasst( |
| 114 |
|
|
& nnzbar, sstbarfile, sstbar, xx_sstbar_mean_dummy, |
| 115 |
|
|
& nnzobs, smrareadatfile, smrareadat, mult_smrarea, |
| 116 |
|
|
& nrecloc, modelstartdate, localperiod, |
| 117 |
|
|
& maskC, wsmrarea, |
| 118 |
|
|
& spminloc, spmaxloc, spzeroloc, |
| 119 |
|
|
& objf_smrarea, num_smrarea, |
| 120 |
|
|
& myiter, mytime, mythid ) |
| 121 |
|
|
|
| 122 |
|
|
write(msgbuf,'(a,1P2E18.10)') |
| 123 |
|
|
& 'mm-cost areasst ', objf_smrarea(1,1), num_smrarea(1,1) |
| 124 |
|
|
call print_message( msgbuf, standardmessageunit, |
| 125 |
|
|
& SQUEEZE_RIGHT , mythid) |
| 126 |
|
|
|
| 127 |
|
|
CMM) |
| 128 |
|
|
|
| 129 |
|
|
#endif |
| 130 |
|
|
|
| 131 |
|
|
cph endif |
| 132 |
|
|
|
| 133 |
|
|
#endif /* ALLOW_ECCO */ |
| 134 |
|
|
|
| 135 |
|
|
end |