/[MITgcm]/MITgcm_contrib/gael/bulkMatlab/coeff_MonthlyAtlasInterp.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/bulkMatlab/coeff_MonthlyAtlasInterp.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Feb 19 21:28:58 2008 UTC (17 years, 4 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
matlab script to compute bulk formulae forcing etc.

1 gforget 1.1 function [mcur,mcurW]=coeff_MonthlyAtlasInterp(dcur);
2     %=> sst=(1-mcurW)*field_sst(:,:,mcur(1))+mcurW*field_sst(:,:,mcur(2));
3    
4     if dcur<1|dcur>365;
5     fprintf('error in coeff_MonthlyAtlasInterp: dcur must be in [1 365] \n');
6     mcur=[]; mcurW=[]; return; end;
7    
8     tmp1=greg_0h(jul_0h([1994 1 0 0 0 0])+dcur);
9     tmp2=jul_0h(tmp1)-jul_0h([1994 tmp1(2)+0.5 0 0 0 0]);
10     if tmp2>=0; tmp3=[tmp2 jul_0h([1994 tmp1(2)+1.5 0 0 0 0])-jul_0h(tmp1)];
11     mcur=greg_0h(jul_0h([1994 tmp1(2)+1.5 0 0 0 0])); mcur=[tmp1(2) mcur(2)];
12     else; tmp3=[-tmp2 jul_0h(tmp1)-jul_0h([1994 tmp1(2)-0.5 0 0 0 0])];
13     mcur=greg_0h(jul_0h([1994 tmp1(2)-0.5 0 0 0 0])); mcur=[tmp1(2) mcur(2)];
14     end;
15     mcurW=tmp3(1)/sum(tmp3);
16    

  ViewVC Help
Powered by ViewVC 1.1.22