[MITgcm-devel] startdate passing to cost_generic

Patrick Heimbach heimbach at MIT.EDU
Thu Aug 11 16:52:09 EDT 2011


Hi Matt,

at quick glance, it looks wrong indeed 
(but benign for what it's been used for so far, where we always had obs).

You'll see that (further down in code), it's been set correctly to
"tmistartdate"
and in the case you mention, it should be properly set to
"sststartdate"

-p.

On Aug 11, 2011, at 2:47 PM, Matthew Mazloff wrote:

> Hello
> 
> It appears there may be a bug in the code with regards to the startdate passed in the costfunction.  This happens for several calls.
> 
> What happens is, for example for daily SST  (line 83 of cost_hydr.F) modelstartdate is passed when it should be the start date of the observation (sststartdate):
> 
> #elif (defined (ALLOW_DAILYSST_COST_CONTRIBUTION))
> c
>       write(msgbuf,'(a)') 'ph-cost call cost_sst'
>       call print_message( msgbuf, standardmessageunit,
>      &     SQUEEZE_RIGHT , mythid)
>       nnzbar = 1
>       nnzobs = 1
>       nrecloc = ndaysrec
>       spminloc = -2.
>       spmaxloc = 40. 
>       spzeroloc = 0.
>       localperiod = 86400.
>       call cost_generic(
>      &     nnzbar, sstbarfile, sstbar, xx_sstbar_mean_dummy,
>      &     nnzobs, sstdatfile, mult_sst,
>      &     nrecloc, modelstartdate, localperiod,
>      &     'C', wsst,
>      &     spminloc, spmaxloc, spzeroloc,
>      &     objf_sst, num_sst,
>      &     myiter, mytime, mythid )
> cph      call cost_sst   ( myiter, mytime, mythid )
> #endif
> 
> Thus the model always assumes the observation file starts the same time as the model...
> 
> Is this a bug -- or am I missing something?
> 
> -Matt
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel

---
Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS 54-1420 | 77 Massachusetts Ave | Cambridge MA 02139 USA
FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach





More information about the MITgcm-devel mailing list